BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
.
/
wp-content
/
plugins
/
jetpack-boost
/
app
/
modules
/
image-guide
/
dist
📤 Upload
📝 New File
📁 New Folder
Close
Editing: guide.js
(()=>{var t={133:(t,e,n)=>{"use strict";n.d(e,{zI:()=>o});var i=n(372);async function o(t,e){e=r(e),i.A.tracks.recordEvent(`jetpack_boost_${t}`,e)}function r(t){const e={};return"object"==typeof Jetpack_Boost&&(e.boost_version=Jetpack_Boost.version),{...e,...t}}},212:(t,e,n)=>{t.exports=function(t){function e(t){let n,o,r,s=null;function c(...t){if(!c.enabled)return;const i=c,o=Number(new Date),r=o-(n||o);i.diff=r,i.prev=n,i.curr=o,n=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";s++;const r=e.formatters[o];if("function"==typeof r){const e=t[s];n=r.call(i,e),t.splice(s,1),s--}return n}),e.formatArgs.call(i,t);(i.log||e.log).apply(i,t)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=i,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==e.namespaces&&(o=e.namespaces,r=e.enabled(t)),r),set:t=>{s=t}}),"function"==typeof e.init&&e.init(c),c}function i(t,n){const i=e(this.namespace+(void 0===n?":":n)+t);return i.log=this.log,i}function o(t,e){let n=0,i=0,o=-1,r=0;for(;n<t.length;)if(i<e.length&&(e[i]===t[n]||"*"===e[i]))"*"===e[i]?(o=i,r=n,i++):(n++,i++);else{if(-1===o)return!1;i=o+1,r++,n=r}for(;i<e.length&&"*"===e[i];)i++;return i===e.length}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names,...e.skips.map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=("string"==typeof t?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const t of n)"-"===t[0]?e.skips.push(t.slice(1)):e.names.push(t)},e.enabled=function(t){for(const n of e.skips)if(o(t,n))return!1;for(const n of e.names)if(o(t,n))return!0;return!1},e.humanize=n(997),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(n=>{e[n]=t[n]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},348:(t,e,n)=>{"use strict";n.d(e,{i:()=>r});var i=n(723);const __=i.__;class o extends Error{constructor(t){super(t),this.name="AdminAjaxError"}}async function r(t,e=ajaxurl){const n={method:"post",body:new URLSearchParams(t),headers:{"Content-Type":"application/x-www-form-urlencoded"}},r=await fetch(e,n);if(!r.ok)throw new o((0,i.sprintf)(/* Translators: %d refers to an HTTP error code */ __("Received HTTP %d while communicating with your WordPress site","jetpack-boost"),r.status));return r}},372:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(941);const o=n.n(i)()("dops:analytics");let r,s;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(t,e,n){c.setUser(t,e),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(t,e=null){this.googleAnalyticsEnabled=t,this.googleAnalyticsKey=e},setMcAnalyticsEnabled:function(t){this.mcAnalyticsEnabled=t},setUser:function(t,e){s={ID:t,username:e}},setSuperProps:function(t){r=t},assignSuperProps:function(t){r=Object.assign(r||{},t)},mc:{bumpStat:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);o("Bumping stats %o",t)}else n="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e),o('Bumping stat "%s" in group "%s"',e,t);return n}(t,e);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);o("Built stats %o",t)}else n="&"+encodeURIComponent(t)+"="+encodeURIComponent(e),o('Built stat "%s" in group "%s"',e,t);return n}(t,e);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(t,e){c.tracks.recordPageView(t),c.ga.recordPageView(t,e)}},purchase:{record:function(t,e,n,i,o,r,s){c.ga.recordPurchase(t,e,n,i,o,r,s)}},tracks:{recordEvent:function(t,e){e=e||{},0===t.indexOf("akismet_")||0===t.indexOf("jetpack_")?(r&&(o("- Super Props: %o",r),e=Object.assign(e,r)),o('Record event "%s" called with props %s',t,JSON.stringify(e)),window._tkq.push(["recordEvent",t,e])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(t){const e="object"==typeof t?t:{target:t};c.tracks.recordEvent("jetpack_wpa_click",e)},recordPageView:function(t){c.tracks.recordEvent("akismet_page_view",{path:t})},setOptOut:function(t){o("Pushing setOptOut: %o",t),window._tkq.push(["setOptOut",t])}},ga:{initialized:!1,initialize:function(){let t={};c.ga.initialized||(s&&(t={userId:"u-"+s.ID}),window.ga("create",this.googleAnalyticsKey,"auto",t),c.ga.initialized=!0)},recordPageView:function(t,e){c.ga.initialize(),o("Recording Page View ~ [URL: "+t+"] [Title: "+e+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",t),window.ga("send",{hitType:"pageview",page:t,title:e}))},recordEvent:function(t,e,n,i){c.ga.initialize();let r="Recording Event ~ [Category: "+t+"] [Action: "+e+"]";void 0!==n&&(r+=" [Option Label: "+n+"]"),void 0!==i&&(r+=" [Option Value: "+i+"]"),o(r),this.googleAnalyticsEnabled&&window.ga("send","event",t,e,n,i)},recordPurchase:function(t,e,n,i,o,r,s){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:t,revenue:i,currency:s}),window.ga("ecommerce:addItem",{id:t,name:e,sku:n,price:o,quantity:r}),window.ga("ecommerce:send")}},identifyUser:function(){s&&window._tkq.push(["identifyUser",s.ID,s.username])},setProperties:function(t){window._tkq.push(["setProperties",t])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},a=c},482:(t,e,n)=>{"use strict";n.d(e,{zo:()=>Ke});class i{constructor(t,e,n=null){this.node=t,this.getURLCallback=e,this.fetch=null!=n?n:window.fetch.bind(window)}getURL(){return this.getURLCallback(this.node)}getSizeOnPage(){const{width:t,height:e}=this.node.getBoundingClientRect();return{width:Math.round(t),height:Math.round(e)}}async getFileSize(t){const{width:e,height:n}=await this.fetchFileDimensions(t);return{width:e,height:n}}async getWeight(t){return await this.fetchFileWeight(t)}getPotentialSavings(t,e,n){const i=this.getOversizedRatio(t,n);return i<=1?null:Math.round(e.weight-e.weight/i)}getExpectedSize(t){const e=window.devicePixelRatio||1;return{width:Math.round(t.width*e),height:Math.round(t.height*e)}}getOversizedRatio(t,e){if(0===t.width||0===t.height)return 1;const{width:n,height:i}=this.getExpectedSize(e);return 0===n||0===i?1:t.width*t.height/(n*i)}async fetchFileWeight(t){const e=await this.fetch(t);return e.ok?parseInt(e.headers.get("content-length"),10)/1024:(console.log(`Can't get image size for ${t} likely due to a CORS error.`),-1)}async fetchFileDimensions(t){const e=new Image;return e.src=t,new Promise((t,n)=>{e.onload=()=>{t({width:Math.round(e.width),height:Math.round(e.height)})},e.onerror=()=>{n("Unable to load image.")}})}async isImageTiny(){try{const t=65,e=await this.fetchFileDimensions(this.getURL());return e.width<t||e.height<t}catch{return!0}}}function o(){}const r=t=>t;function s(t){return t()}function c(){return Object.create(null)}function a(t){t.forEach(s)}function l(t){return"function"==typeof t}function u(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let d;function f(t,e){return t===e||(d||(d=document.createElement("a")),d.href=e,t===d.href)}function p(t,...e){if(null==t){for(const t of e)t(void 0);return o}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function h(t){let e;return p(t,t=>e=t)(),e}function g(t,e,n){t.$$.on_destroy.push(p(e,n))}function m(t,e,n,i){return t[1]&&i?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](i(e))):n.ctx}function w(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const v="undefined"!=typeof window;let y=v?()=>window.performance.now():()=>Date.now(),$=v?t=>requestAnimationFrame(t):o;const b=new Set;function C(t){b.forEach(e=>{e.c(t)||(b.delete(e),e.f())}),0!==b.size&&$(C)}function k(t){let e;return 0===b.size&&$(C),{promise:new Promise(n=>{b.add(e={c:t,f:n})}),abort(){b.delete(e)}}}function x(t,e){t.appendChild(e)}function _(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function F(t){const e=S("style");return e.textContent="/* empty */",function(t,e){x(t.head||t,e),e.sheet}(_(t),e),e.sheet}function z(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function S(t){return document.createElement(t)}function I(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t){return document.createTextNode(t)}function O(){return j(" ")}function P(){return j("")}function A(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function M(t,e){e=""+e,t.data!==e&&(t.data=e)}function R(t,e,n,i){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function T(t,e,n){t.classList.toggle(e,!!n)}function U(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}const D=new Map;let B,q=0;function W(t,e,n,i,o,r,s,c=0){const a=16.666/i;let l="{\n";for(let t=0;t<=1;t+=a){const i=e+(n-e)*r(t);l+=100*t+`%{${s(i,1-i)}}\n`}const u=l+`100% {${s(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${c}`,f=_(t),{stylesheet:p,rules:h}=D.get(f)||function(t,e){const n={stylesheet:F(e),rules:{}};return D.set(t,n),n}(f,t);h[d]||(h[d]=!0,p.insertRule(`@keyframes ${d} ${u}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${i}ms linear ${o}ms 1 both`,q+=1,d}function N(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-i.length;o&&(t.style.animation=i.join(", "),q-=o,q||$(()=>{q||(D.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),D.clear())}))}function H(t){B=t}function V(){if(!B)throw new Error("Function called outside component initialization");return B}function G(t){V().$$.on_mount.push(t)}function J(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(t=>t.call(this,e))}const Z=[],K=[];let X=[];const Y=[],Q=Promise.resolve();let tt=!1;function et(t){X.push(t)}const nt=new Set;let it,ot=0;function rt(){if(0!==ot)return;const t=B;do{try{for(;ot<Z.length;){const t=Z[ot];ot++,H(t),st(t.$$)}}catch(t){throw Z.length=0,ot=0,t}for(H(null),Z.length=0,ot=0;K.length;)K.pop()();for(let t=0;t<X.length;t+=1){const e=X[t];nt.has(e)||(nt.add(e),e())}X.length=0}while(Z.length);for(;Y.length;)Y.pop()();tt=!1,nt.clear(),H(t)}function st(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(et)}}function ct(){return it||(it=Promise.resolve(),it.then(()=>{it=null})),it}function at(t,e,n){t.dispatchEvent(U(`${e?"intro":"outro"}${n}`))}const lt=new Set;let ut;function dt(){ut={r:0,c:[],p:ut}}function ft(){ut.r||a(ut.c),ut=ut.p}function pt(t,e){t&&t.i&&(lt.delete(t),t.i(e))}function ht(t,e,n,i){if(t&&t.o){if(lt.has(t))return;lt.add(t),ut.c.push(()=>{lt.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const gt={duration:0};function mt(t,e,n){const i={direction:"in"};let s,c,a=e(t,n,i),u=!1,d=0;function f(){s&&N(t,s)}function p(){const{delay:e=0,duration:n=300,easing:i=r,tick:l=o,css:p}=a||gt;p&&(s=W(t,0,1,n,e,i,p,d++)),l(0,1);const h=y()+e,g=h+n;c&&c.abort(),u=!0,et(()=>at(t,!0,"start")),c=k(e=>{if(u){if(e>=g)return l(1,0),at(t,!0,"end"),f(),u=!1;if(e>=h){const t=i((e-h)/n);l(t,1-t)}}return u})}let h=!1;return{start(){h||(h=!0,N(t),l(a)?(a=a(i),ct().then(p)):p())},invalidate(){h=!1},end(){u&&(f(),u=!1)}}}function wt(t,e,n,i){let s,c=e(t,n,{direction:"both"}),u=i?0:1,d=null,f=null,p=null;function h(){p&&N(t,p)}function g(t,e){const n=t.b-u;return e*=Math.abs(n),{a:u,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function m(e){const{delay:n=0,duration:i=300,easing:l=r,tick:m=o,css:w}=c||gt,v={start:y()+n,b:e};e||(v.group=ut,ut.r+=1),"inert"in t&&(e?void 0!==s&&(t.inert=s):(s=t.inert,t.inert=!0)),d||f?f=v:(w&&(h(),p=W(t,u,e,i,n,l,w)),e&&m(0,1),d=g(v,i),et(()=>at(t,e,"start")),k(e=>{if(f&&e>f.start&&(d=g(f,i),f=null,at(t,d.b,"start"),w&&(h(),p=W(t,u,d.b,d.duration,0,l,c.css))),d)if(e>=d.end)m(u=d.b,1-u),at(t,d.b,"end"),f||(d.b?h():--d.group.r||a(d.group.c)),d=null;else if(e>=d.start){const t=e-d.start;u=d.a+d.d*l(t/d.duration),m(u,1-u)}return!(!d&&!f)}))}return{run(t){l(c)?ct().then(()=>{c=c({direction:t?"in":"out"}),m(t)}):m(t)},end(){h(),d=f=null}}}function vt(t){return void 0!==t?.length?t:Array.from(t)}function yt(t){t&&t.c()}function $t(t,e,n){const{fragment:i,after_update:o}=t.$$;i&&i.m(e,n),et(()=>{const e=t.$$.on_mount.map(s).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):a(e),t.$$.on_mount=[]}),o.forEach(et)}function bt(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];X.forEach(i=>-1===t.indexOf(i)?e.push(i):n.push(i)),n.forEach(t=>t()),X=e}(n.after_update),a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ct(t,e,n,i,r,s,l=null,u=[-1]){const d=B;H(t);const f=t.$$={fragment:null,ctx:[],props:s,update:o,not_equal:r,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:c(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};l&&l(f.root);let p=!1;if(f.ctx=n?n(t,e.props||{},(e,n,...i)=>{const o=i.length?i[0]:n;return f.ctx&&r(f.ctx[e],f.ctx[e]=o)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](o),p&&function(t,e){-1===t.$$.dirty[0]&&(Z.push(t),tt||(tt=!0,Q.then(rt)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n}):[],f.update(),p=!0,a(f.before_update),f.fragment=!!i&&i(f.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);f.fragment&&f.fragment.l(t),t.forEach(E)}else f.fragment&&f.fragment.c();e.intro&&pt(t.$$.fragment),$t(t,e.target,e.anchor),rt()}H(d)}class kt{$$=void 0;$$set=void 0;$destroy(){bt(this,1),this.$destroy=o}$on(t,e){if(!l(e))return o;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const xt=[];function _t(t,e=o){let n;const i=new Set;function r(e){if(u(t,e)&&(t=e,n)){const e=!xt.length;for(const e of i)e[1](),xt.push(e,t);if(e){for(let t=0;t<xt.length;t+=2)xt[t][0](xt[t+1]);xt.length=0}}}function s(e){r(e(t))}return{set:r,update:s,subscribe:function(c,a=o){const l=[c,a];return i.add(l),1===i.size&&(n=e(r,s)||o),c(t),()=>{i.delete(l),0===i.size&&n&&(n(),n=null)}}}}function Ft(t,e,n){const i=!Array.isArray(t),r=i?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return c=(t,n)=>{let c=!1;const u=[];let d=0,f=o;const h=()=>{if(d)return;f();const r=e(i?u[0]:u,t,n);s?t(r):f=l(r)?r:o},g=r.map((t,e)=>p(t,t=>{u[e]=t,d&=~(1<<e),c&&h()},()=>{d|=1<<e}));return c=!0,h(),function(){a(g),f(),c=!1}},{subscribe:_t(n,c).subscribe};var c}const zt="jetpack-boost-guide",Et={active:"Active",paused:"Paused"};let St=localStorage.getItem(zt);St&&Et[St]||(localStorage.setItem(zt,"Active"),St="active");const{set:It,update:jt,subscribe:Ot}=_t(St);Ot(t=>{localStorage.setItem(zt,t)});const Pt={subscribe:Ot,set:It,update:jt,cycle:()=>{jt(t=>{const e=Object.keys(Et),n=e.indexOf(t);return e[(n+1)%e.length]})}},At=Ft(Pt,t=>Et[t]);class Lt{constructor(t){this.loading=_t(!0),this.weightMap={},this.currentSrc="",this.image=t,this.node=t.node,this.url=_t(t.getURL()),this.fileSize=_t({width:0,height:0}),this.fileWeight=_t({weight:-1},()=>{this.maybeUpdateWeight()}),this.sizeOnPage=_t({width:0,height:0}),this.potentialSavings=this.derivePotentialSavings(),this.oversizedRatio=this.deriveOversizedRatio(),this.expectedSize=this.deriveExpectedSize()}deriveOversizedRatio(){return Ft([this.fileSize,this.sizeOnPage],([t,e])=>this.image.getOversizedRatio(t,e))}deriveExpectedSize(){return Ft(this.sizeOnPage,t=>this.image.getExpectedSize(t))}derivePotentialSavings(){return Ft([this.fileSize,this.fileWeight,this.sizeOnPage],([t,e,n])=>this.image.getPotentialSavings(t,e,n))}async updateDimensions(){const t=this.image.getSizeOnPage();this.sizeOnPage.set(t),await this.updateFileDimensions()}async updateFileDimensions(){if(this.image.getURL()===this.currentSrc)return;let t;this.currentSrc=this.image.getURL();try{t=await this.image.getFileSize(this.currentSrc)}catch{t={height:-1,width:-1}}this.url.set(this.currentSrc),this.fileSize.set(t)}async maybeUpdateWeight(){const t=this.currentSrc;if(void 0===this.weightMap[t]){this.loading.set(!0);try{const e=await this.image.getWeight(t);this.weightMap[t]=e,this.fileWeight.set({weight:e})}catch{this.fileWeight.set({weight:-1})}this.loading.set(!1)}else this.fileWeight.set({weight:this.weightMap[t]})}}class Mt{static setTracksCallback(t){Mt.tracksCallback=t}static async trackImageOutcome(t){return new Promise(e=>{t.loading.subscribe(n=>{if(!n){const n=h(t.oversizedRatio),i=function(t){return t>4?"red":t>2.5?"yellow":"green"}(n),o=h(t.fileSize),r=h(t.sizeOnPage),s=h(t.expectedSize),c=h(t.potentialSavings),a=h(t.url),l={severity:i,oversized_ratio:n,file_width:o.width,file_height:o.height,size_on_page_width:r.width,size_on_page_height:r.height,expected_width:s.width,expected_height:s.height,potential_savings:c,image_url:a};Mt.tracksCallback("image_guide_image_outcome",{...l,window_width:window.innerWidth,window_height:window.innerHeight,device_pixel_ratio:window.devicePixelRatio}),e(l)}})})}static async trackPage(t){if(!t.length||Mt.trackingComplete)return;Mt.trackingComplete=!0;const e=t.map(Mt.trackImageOutcome),n=await Promise.all(e),i=n.reduce((t,e)=>t+(e.potential_savings||0),0);Mt.tracksCallback("image_guide_page_outcome",{total_potential_savings:i,red_severity_count:n.filter(t=>"red"===t.severity).length,yellow_severity_count:n.filter(t=>"yellow"===t.severity).length,green_severity_count:n.filter(t=>"green"===t.severity).length,window_width:window.innerWidth,window_height:window.innerHeight,device_pixel_ratio:window.devicePixelRatio})}static trackInitialState(){Mt.tracksCallback("image_guide_initial_ui_state",{image_guide_state:h(Pt)})}static trackUIStateChange(){Mt.tracksCallback("image_guide_ui_state_change",{image_guide_state:h(Pt)})}}function Rt(t){return Dt(t.currentSrc)?t.currentSrc:Dt(t.src)?t.src:null}function Tt(t){const e=getComputedStyle(t).backgroundImage.match(/url\(\s*(['"])(.*?)\1\s*\)/i),n=window.location.href.split("#")[0];return e&&e[2]&&e[2]!==n&&Dt(e[2])?e[2]:null}async function Ut(t,e=null){return function(t){return t.filter(t=>{if(t instanceof HTMLImageElement){if(!t.src.trim())return!1;try{if(e=t.src,new URL(e).pathname.toLowerCase().endsWith(".svg"))return!1}catch{return!1}return!0}var e;return t instanceof HTMLElement&&"none"!==getComputedStyle(t).backgroundImage})}(t).map(t=>t instanceof HTMLImageElement?new i(t,Rt,e):t instanceof HTMLElement&&Tt(t)?new i(t,Tt):null).filter(t=>null!==t)}function Dt(t){if(t.startsWith("/"))return!t.split("?")[0].endsWith(".svg");try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function Bt(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function qt(t){const e=t-1;return e*e*e+1}function Wt(t,{delay:e=0,duration:n=400,easing:i=r}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:t=>"opacity: "+t*o}}function Nt(t,{delay:e=0,duration:n=400,easing:i=qt,x:o=0,y:r=0,opacity:s=0}={}){const c=getComputedStyle(t),a=+c.opacity,l="none"===c.transform?"":c.transform,u=a*(1-s),[d,f]=w(o),[p,h]=w(r);return{delay:e,duration:n,easing:i,css:(t,e)=>`\n\t\t\ttransform: ${l} translate(${(1-t)*d}${f}, ${(1-t)*p}${h});\n\t\t\topacity: ${a-u*e}`}}function Ht(t){let e,n,i,r,s;return{c(){e=S("div"),n=I("svg"),i=I("path"),r=I("path"),s=I("path"),L(i,"d","M55.4 107.8C84.3397 107.8 107.8 84.3397 107.8 55.4C107.8 26.4603 84.3397 3 55.4 3C26.4603 3 3 26.4603 3 55.4C3 84.3397 26.4603 107.8 55.4 107.8Z"),L(i,"fill",t[1]),L(r,"d","M58 46.6V97.4L84.2 46.6H58Z"),L(r,"fill","white"),L(s,"d","M52.7 64.1V13.4L26.6 64.1H52.7Z"),L(s,"fill","white"),L(n,"viewBox","0 0 110 110"),L(n,"fill","none"),L(n,"xmlns","http://www.w3.org/2000/svg"),R(e,"width",t[0]+"px"),R(e,"height",t[0]+"px"),L(e,"class","svelte-f6jc8")},m(t,o){z(t,e,o),x(e,n),x(n,i),x(n,r),x(n,s)},p(t,[n]){2&n&&L(i,"fill",t[1]),1&n&&R(e,"width",t[0]+"px"),1&n&&R(e,"height",t[0]+"px")},i:o,o,d(t){t&&E(e)}}}function Vt(t,e,n){let{size:i=16}=e,{bg:o="#069E08"}=e;return t.$$set=t=>{"size"in t&&n(0,i=t.size),"bg"in t&&n(1,o=t.bg)},[i,o]}Mt.trackingComplete=!1,"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class Gt extends kt{constructor(t){super(),Ct(this,t,Vt,Ht,u,{size:0,bg:1})}}function Jt(t){let e,n,i,s;return n=new Gt({props:{size:12,bg:"transparent"}}),{c(){e=S("div"),yt(n.$$.fragment),L(e,"class","spinner svelte-2eb8gc")},m(t,i){z(t,e,i),$t(n,e,null),s=!0},p:o,i(t){s||(pt(n.$$.fragment,t),i&&i.end(1),s=!0)},o(t){ht(n.$$.fragment,t),t&&(i=function(t,e){const n={direction:"out"};let i,s=e(t,{duration:300},n),c=!0;const u=ut;let d;function f(){const{delay:e=0,duration:n=300,easing:l=r,tick:f=o,css:p}=s||gt;p&&(i=W(t,1,0,n,e,l,p));const h=y()+e,g=h+n;et(()=>at(t,!1,"start")),"inert"in t&&(d=t.inert,t.inert=!0),k(e=>{if(c){if(e>=g)return f(0,1),at(t,!1,"end"),--u.r||a(u.c),!1;if(e>=h){const t=l((e-h)/n);f(1-t,t)}}return c})}return u.r+=1,l(s)?ct().then(()=>{s=s(n),f()}):f(),{end(e){e&&"inert"in t&&(t.inert=d),e&&s.tick&&s.tick(1,0),c&&(i&&N(t,i),c=!1)}}}(e,Wt)),s=!1},d(t){t&&E(e),bt(n),t&&i&&i.end()}}}class Zt extends kt{constructor(t){super(),Ct(this,t,null,Jt,u,{})}}function Kt(t){let e,n;return{c(){e=I("svg"),n=I("path"),L(n,"stroke-linecap","round"),L(n,"stroke-linejoin","round"),L(n,"stroke-width","2"),L(n,"d","M5 13l4 4L19 7"),L(e,"class","w-6 h-6 svelte-jkeb2"),L(e,"fill","none"),L(e,"stroke","white"),L(e,"width","18"),L(e,"height","18"),L(e,"viewBox","0 0 24 24"),L(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){z(t,e,i),x(e,n)},p:o,i:o,o,d(t){t&&E(e)}}}class Xt extends kt{constructor(t){super(),Ct(this,t,null,Kt,u,{})}}function Yt(t){let e,n,i;return n=new Zt({}),{c(){e=S("div"),yt(n.$$.fragment),L(e,"class","bubble-inner svelte-1qopaii")},m(t,o){z(t,e,o),$t(n,e,null),i=!0},p:o,i(t){i||(pt(n.$$.fragment,t),i=!0)},o(t){ht(n.$$.fragment,t),i=!1},d(t){t&&E(e),bt(n)}}}function Qt(t){let e,n,i,o,r,s;const c=[ne,ee,te],a=[];function l(t,e){return t[0]>9?0:t[0]>.99?1:2}return i=l(t),o=a[i]=c[i](t),{c(){e=S("div"),n=S("div"),o.c(),L(n,"class","label"),L(e,"class","bubble-inner svelte-1qopaii")},m(t,o){z(t,e,o),x(e,n),a[i].m(n,null),s=!0},p(t,e){let r=i;i=l(t),i===r?a[i].p(t,e):(dt(),ht(a[r],1,1,()=>{a[r]=null}),ft(),o=a[i],o?o.p(t,e):(o=a[i]=c[i](t),o.c()),pt(o,1),o.m(n,null))},i(t){s||(pt(o),t&&(r||et(()=>{r=mt(n,Wt,{delay:200,duration:300}),r.start()})),s=!0)},o(t){ht(o),s=!1},d(t){t&&E(e),a[i].d()}}}function te(t){let e,n;return{c(){e=S("span"),e.textContent="<",n=j(" 1x"),R(e,"font-size","0.75em")},m(t,i){z(t,e,i),z(t,n,i)},p:o,i:o,o,d(t){t&&(E(e),E(n))}}}function ee(t){let e,n,i,o;const r=[oe,ie],s=[];function c(t,e){return"normal"===t[1]?0:1}return e=c(t),n=s[e]=r[e](t),{c(){n.c(),i=P()},m(t,n){s[e].m(t,n),z(t,i,n),o=!0},p(t,o){let a=e;e=c(t),e===a?s[e].p(t,o):(dt(),ht(s[a],1,1,()=>{s[a]=null}),ft(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),pt(n,1),n.m(i.parentNode,i))},i(t){o||(pt(n),o=!0)},o(t){ht(n),o=!1},d(t){t&&E(i),s[e].d(t)}}}function ne(t){let e,n,i=Math.floor(t[0])+"";return{c(){e=j(i),n=j("x")},m(t,i){z(t,e,i),z(t,n,i)},p(t,n){1&n&&i!==(i=Math.floor(t[0])+"")&&M(e,i)},i:o,o,d(t){t&&(E(e),E(n))}}}function ie(t){let e,n,i=t[0].toFixed(1)+"";return{c(){e=j(i),n=j("x")},m(t,i){z(t,e,i),z(t,n,i)},p(t,n){1&n&&i!==(i=t[0].toFixed(1)+"")&&M(e,i)},i:o,o,d(t){t&&(E(e),E(n))}}}function oe(t){let e,n;return e=new Xt({}),{c(){yt(e.$$.fragment)},m(t,i){$t(e,t,i),n=!0},p:o,i(t){n||(pt(e.$$.fragment,t),n=!0)},o(t){ht(e.$$.fragment,t),n=!1},d(t){bt(e,t)}}}function re(t){let e,n,i,o,r,s,c,a,l;const u=[Qt,Yt],d=[];function f(t,e){return!1===t[3]?0:1}return i=f(t),o=d[i]=u[i](t),{c(){e=S("div"),n=S("div"),o.c(),L(n,"class","bubble svelte-1qopaii"),L(e,"class",r="interaction-area "+t[1]+" svelte-1qopaii")},m(o,r){z(o,e,r),x(e,n),d[i].m(n,null),t[10](e),c=!0,a||(l=A(e,"mouseenter",t[7]),a=!0)},p(s,[a]){let l=i;i=f(t=s),i===l?d[i].p(t,a):(dt(),ht(d[l],1,1,()=>{d[l]=null}),ft(),o=d[i],o?o.p(t,a):(o=d[i]=u[i](t),o.c()),pt(o,1),o.m(n,null)),(!c||2&a&&r!==(r="interaction-area "+t[1]+" svelte-1qopaii"))&&L(e,"class",r)},i(n){c||(pt(o),n&&et(()=>{c&&(s||(s=wt(e,Nt,t[6],!0)),s.run(1))}),c=!0)},o(n){ht(o),n&&(s||(s=wt(e,Nt,t[6],!1)),s.run(0)),c=!1},d(n){n&&E(e),d[i].d(),t[10](null),n&&s&&s.end(),a=!1,l()}}}function se(t,e,n){let i,o,r,{index:s}=e,{store:c}=e;const a=c.oversizedRatio;g(t,a,t=>n(0,i=t));const l=c.loading;g(t,l,t=>n(3,o=t));const u={delay:150+50*s,duration:250,y:2,easing:Bt};let d;const f=function(){const t=V();return(e,n,{cancelable:i=!1}={})=>{const o=t.$$.callbacks[e];if(o){const r=U(e,n,{cancelable:i});return o.slice().forEach(e=>{e.call(t,r)}),!r.defaultPrevented}return!0}}();return t.$$set=t=>{"index"in t&&n(8,s=t.index),"store"in t&&n(9,c=t.store)},t.$$.update=()=>{1&t.$$.dirty&&n(1,r=i>4?"high":i>2.5?"medium":"normal")},[i,r,d,o,a,l,u,function(){const t=d.getBoundingClientRect();f("hover",{index:s,position:{top:t.top+t.height+10,left:t.left}})},s,c,function(t){K[t?"unshift":"push"](()=>{d=t,n(2,d)})}]}class ce extends kt{constructor(t){super(),Ct(this,t,se,re,u,{index:8,store:9})}}function ae(t){let e,n;const i=t[2].default,o=function(t,e,n){if(t){const i=m(t,e,n,null);return t[0](i)}}(i,t,t[1]);return{c(){e=S("div"),o&&o.c(),L(e,"class","jetpack-boost-guide-portal")},m(i,r){z(i,e,r),o&&o.m(e,null),t[3](e),n=!0},p(t,[e]){o&&o.p&&(!n||2&e)&&function(t,e,n,i,o){if(o){const r=m(e,n,i,null);t.p(r,o)}}(o,i,t,t[1],n?function(t,e){return t[2],e.dirty}(i,t[1]):function(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}(t[1]))},i(t){n||(pt(o,t),n=!0)},o(t){ht(o,t),n=!1},d(n){n&&E(e),o&&o.d(n),t[3](null)}}}function le(t,e,n){let i,{$$slots:o={},$$scope:r}=e;var s;return G(()=>{document.body.appendChild(i)}),s=()=>{document.body.removeChild(i)},V().$$.on_destroy.push(s),t.$$set=t=>{"$$scope"in t&&n(1,r=t.$$scope)},[i,r,o,function(t){K[t?"unshift":"push"](()=>{i=t,n(0,i)})}]}class ue extends kt{constructor(t){super(),Ct(this,t,le,ae,u,{})}}function de(t){let e,n;return{c(){e=I("svg"),n=I("path"),L(n,"d","M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"viewBox","0 0 24 24"),L(e,"class","svelte-1336127")},m(t,i){z(t,e,i),x(e,n)},p:o,i:o,o,d(t){t&&E(e)}}}class fe extends kt{constructor(t){super(),Ct(this,t,null,de,u,{})}}function pe(t){let e,n,i,o,r=t[29]+"";return{c(){e=S("div"),n=j("The image file is "),i=j(r),o=j("x smaller than expected on this screen. This might be\n\t\t\t\t\t\tfine, but you may want to check if the image appears blurry."),L(e,"class","explanation svelte-52p8v6")},m(t,r){z(t,e,r),x(e,n),x(e,i),x(e,o)},p(t,e){8&e&&r!==(r=t[29]+"")&&M(i,r)},d(t){t&&E(e)}}}function he(t){let e,n,i=t[6]>1&&we(t);return{c(){e=S("div"),n=j("The image size is very close to the size it appears in the browser.\n\t\t\t\t\t\t"),i&&i.c(),L(e,"class","explanation svelte-52p8v6")},m(t,o){z(t,e,o),x(e,n),i&&i.m(e,null)},p(t,n){t[6]>1?i?i.p(t,n):(i=we(t),i.c(),i.m(e,null)):i&&(i.d(1),i=null)},d(t){t&&E(e),i&&i.d()}}}function ge(t){let e;return{c(){e=S("div"),e.textContent="The image is exactly the correct size for this screen.",L(e,"class","explanation svelte-52p8v6")},m(t,n){z(t,e,n)},p:o,d(t){t&&E(e)}}}function me(t){let e,n,i,o,r,s,c=t[4].weight>450&&ve();return{c(){e=S("div"),n=j("The image loaded is "),i=S("strong"),o=j(t[6]),r=j("x"),s=j(" larger than it appears in the browser.\n\t\t\t\t\t\t"),c&&c.c(),L(e,"class","explanation svelte-52p8v6")},m(t,a){z(t,e,a),x(e,n),x(e,i),x(i,o),x(i,r),x(e,s),c&&c.m(e,null)},p(t,n){64&n&&M(o,t[6]),t[4].weight>450?c||(c=ve(),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},d(t){t&&E(e),c&&c.d()}}}function we(t){let e,n,i,o,r;return{c(){e=j("Because there are various screen sizes, it's okay for the image to be\n\t\t\t\t\t\t\t"),n=S("strong"),i=j(t[6]),o=j("x"),r=j(" than it appears on the page.")},m(t,s){z(t,e,s),z(t,n,s),x(n,i),x(n,o),z(t,r,s)},p(t,e){64&e&&M(i,t[6])},d(t){t&&(E(e),E(n),E(r))}}}function ve(t){let e;return{c(){e=j("Try using a smaller image or reduce the file size by compressing it.")},m(t,n){z(t,e,n)},d(t){t&&E(e)}}}function ye(t){let e,n;return{c(){e=S("img"),f(e.src,n=t[5])||L(e,"src",n),L(e,"alt",t[8]),R(e,"width",t[2]+"px"),R(e,"height",t[7]+"px"),L(e,"width",t[2]),L(e,"height",t[7]),L(e,"class","svelte-52p8v6")},m(t,n){z(t,e,n)},p(t,i){32&i&&!f(e.src,n=t[5])&&L(e,"src",n),256&i&&L(e,"alt",t[8]),4&i&&R(e,"width",t[2]+"px"),128&i&&R(e,"height",t[7]+"px"),4&i&&L(e,"width",t[2]),128&i&&L(e,"height",t[7])},d(t){t&&E(e)}}}function $e(t){let e;function n(t,e){return t[17]?ke:Ce}let i=n(t),o=i(t);return{c(){e=S("div"),o.c(),L(e,"class","value")},m(t,n){z(t,e,n),o.m(e,null)},p(t,r){i!==(i=n(t))&&(o.d(1),o=i(t),o&&(o.c(),o.m(e,null)))},d(t){t&&E(e),o.d()}}}function be(t){let e,n,i,o,r=t[4].width+"",s=t[4].height+"";return{c(){e=S("div"),n=j(r),i=j(" x "),o=j(s),L(e,"class","value")},m(t,r){z(t,e,r),x(e,n),x(e,i),x(e,o)},p(t,e){16&e&&r!==(r=t[4].width+"")&&M(n,r),16&e&&s!==(s=t[4].height+"")&&M(o,s)},d(t){t&&E(e)}}}function Ce(t){let e;return{c(){e=S("em"),e.textContent="Unknown"},m(t,n){z(t,e,n)},d(t){t&&E(e)}}}function ke(t){let e;return{c(){e=j("Loading...")},m(t,n){z(t,e,n)},d(t){t&&E(e)}}}function xe(t){let e;return{c(){e=S("em"),e.textContent="Unknown"},m(t,n){z(t,e,n)},p:o,d(t){t&&E(e)}}}function _e(t){let e;return{c(){e=j("Loading...")},m(t,n){z(t,e,n)},p:o,d(t){t&&E(e)}}}function Fe(t){let e,n,i=Math.round(t[20].weight)+"";return{c(){e=j(i),n=j(" KB")},m(t,i){z(t,e,i),z(t,n,i)},p(t,n){1048576&n&&i!==(i=Math.round(t[20].weight)+"")&&M(e,i)},d(t){t&&(E(e),E(n))}}}function ze(t){let e;return{c(){e=S("em"),e.textContent="N/A"},m(t,n){z(t,e,n)},p:o,d(t){t&&E(e)}}}function Ee(t){let e;return{c(){e=j("Loading...")},m(t,n){z(t,e,n)},p:o,d(t){t&&E(e)}}}function Se(t){let e,n,i;return{c(){e=S("strong"),n=j(t[21]),i=j(" KB")},m(t,o){z(t,e,o),x(e,n),x(e,i)},p(t,e){2097152&e&&M(n,t[21])},d(t){t&&E(e)}}}function Ie(t){let e,n,i,o,r,s,c,a,l,u,d,f,p,h,g,m,w,v,y,$,b,C,k,_,F,I,P,T,U,D,B,q,W,N,H,V,G,J,Z,K,X,Y,Q,tt,nt,it,ot,rt,st,ct,at,lt=t[18].width+"",ut=t[18].height+"",dt=t[19].width+"",ft=t[19].height+"",gt=`${t[0].top}px`,wt=`${t[0].left}px`;function vt(t,e){return t[6]>=1.3?me:1===t[6]?ge:t[6]>=.99&&t[6]<1.3?he:pe}function Ct(t,e){return e===pe?function(t){const e=t.slice(),n=Pe(1/e[3]);return e[29]=n,e}(t):t}i=new Gt({props:{size:250}});let kt=vt(t),xt=kt(Ct(t,kt)),_t=t[5]&&ye(t);function Ft(t,e){return t[4].width>0&&t[4].height>0?be:$e}let zt=Ft(t),Et=zt(t);function St(t,e){return t[20].weight>0?Fe:t[17]?_e:xe}let It=St(t),jt=It(t);function Ot(t,e){return t[21]>0?Se:t[17]?Ee:ze}let Pt=Ot(t),At=Pt(t);return ot=new fe({}),{c(){e=S("div"),n=S("div"),yt(i.$$.fragment),o=O(),r=S("div"),s=S("div"),c=S("div"),a=S("a"),l=j(t[8]),u=O(),xt.c(),d=O(),_t&&_t.c(),f=O(),p=S("div"),h=S("div"),g=S("div"),g.textContent="Image File Dimensions",m=O(),Et.c(),w=O(),v=S("div"),y=S("div"),y.textContent="Expected Dimensions",$=O(),b=S("div"),C=j(lt),k=j(" x "),_=j(ut),F=O(),I=S("div"),P=S("div"),P.textContent="Size on screen",T=O(),U=S("div"),D=j(dt),B=j(" x "),q=j(ft),W=O(),N=S("div"),H=S("div"),H.textContent="Image Size",V=O(),G=S("div"),jt.c(),J=O(),Z=S("div"),K=S("div"),K.textContent="Potential savings",X=O(),Y=S("div"),At.c(),Q=O(),tt=S("div"),nt=S("a"),it=j("Learn how to improve site speed by optimizing images "),yt(ot.$$.fragment),L(n,"class","logo svelte-52p8v6"),L(a,"href",t[5]),L(a,"target","_blank noreferrer"),L(a,"class","svelte-52p8v6"),L(c,"class","title svelte-52p8v6"),L(s,"class","description svelte-52p8v6"),L(r,"class","preview svelte-52p8v6"),L(g,"class","label"),L(h,"class","row svelte-52p8v6"),L(y,"class","label"),L(b,"class","value"),L(v,"class","row svelte-52p8v6"),L(P,"class","label"),L(U,"class","value"),L(I,"class","row svelte-52p8v6"),L(H,"class","label"),L(G,"class","value"),L(N,"class","row svelte-52p8v6"),L(K,"class","label"),L(Y,"class","value"),L(Z,"class","row svelte-52p8v6"),L(nt,"class","documentation svelte-52p8v6"),L(nt,"href",Oe),L(nt,"target","_blank noreferrer"),L(tt,"class","info svelte-52p8v6"),L(p,"class","meta"),L(e,"class","jetpack-boost-guide-popup keep-guide-open svelte-52p8v6"),R(e,"top",gt),R(e,"left",wt)},m(E,S){z(E,e,S),x(e,n),$t(i,n,null),x(e,o),x(e,r),x(r,s),x(s,c),x(c,a),x(a,l),x(s,u),xt.m(s,null),x(r,d),_t&&_t.m(r,null),x(e,f),x(e,p),x(p,h),x(h,g),x(h,m),Et.m(h,null),x(p,w),x(p,v),x(v,y),x(v,$),x(v,b),x(b,C),x(b,k),x(b,_),x(p,F),x(p,I),x(I,P),x(I,T),x(I,U),x(U,D),x(U,B),x(U,q),x(p,W),x(p,N),x(N,H),x(N,V),x(N,G),jt.m(G,null),x(p,J),x(p,Z),x(Z,K),x(Z,X),x(Z,Y),At.m(Y,null),x(p,Q),x(p,tt),x(tt,nt),x(nt,it),$t(ot,nt,null),st=!0,ct||(at=A(e,"mouseleave",t[24]),ct=!0)},p(t,n){(!st||256&n)&&M(l,t[8]),(!st||32&n)&&L(a,"href",t[5]),kt===(kt=vt(t))&&xt?xt.p(Ct(t,kt),n):(xt.d(1),xt=kt(Ct(t,kt)),xt&&(xt.c(),xt.m(s,null))),t[5]?_t?_t.p(t,n):(_t=ye(t),_t.c(),_t.m(r,null)):_t&&(_t.d(1),_t=null),zt===(zt=Ft(t))&&Et?Et.p(t,n):(Et.d(1),Et=zt(t),Et&&(Et.c(),Et.m(h,null))),(!st||262144&n)&<!==(lt=t[18].width+"")&&M(C,lt),(!st||262144&n)&&ut!==(ut=t[18].height+"")&&M(_,ut),(!st||524288&n)&&dt!==(dt=t[19].width+"")&&M(D,dt),(!st||524288&n)&&ft!==(ft=t[19].height+"")&&M(q,ft),It===(It=St(t))&&jt?jt.p(t,n):(jt.d(1),jt=It(t),jt&&(jt.c(),jt.m(G,null))),Pt===(Pt=Ot(t))&&At?At.p(t,n):(At.d(1),At=Pt(t),At&&(At.c(),At.m(Y,null))),1&n&>!==(gt=`${t[0].top}px`)&&R(e,"top",gt),1&n&&wt!==(wt=`${t[0].left}px`)&&R(e,"left",wt)},i(t){st||(pt(i.$$.fragment,t),pt(ot.$$.fragment,t),t&&(rt||et(()=>{rt=mt(e,Nt,{duration:150,y:4,easing:Bt}),rt.start()})),st=!0)},o(t){ht(i.$$.fragment,t),ht(ot.$$.fragment,t),st=!1},d(t){t&&E(e),bt(i),xt.d(),_t&&_t.d(),Et.d(),jt.d(),At.d(),bt(ot),ct=!1,at()}}}function je(t){let e,n,i,o,r,s=!1,c=()=>{s=!1};return et(t[25]),n=new ue({props:{$$slots:{default:[Ie]},$$scope:{ctx:t}}}),{c(){yt(n.$$.fragment)},m(a,l){$t(n,a,l),i=!0,o||(r=A(window,"scroll",()=>{s=!0,clearTimeout(e),e=setTimeout(c,100),t[25]()}),o=!0)},p(t,[i]){2&i&&!s&&(s=!0,clearTimeout(e),scrollTo(window.pageXOffset,t[1]),e=setTimeout(c,100));const o={};1077805565&i&&(o.$$scope={dirty:i,ctx:t}),n.$set(o)},i(t){i||(pt(n.$$.fragment,t),i=!0)},o(t){ht(n.$$.fragment,t),i=!1},d(t){bt(n,t),o=!1,r()}}}const Oe="https://jetpack.com/support/jetpack-boost/image-performance-guide/";function Pe(t){return t%1==0?t:parseFloat(t.toFixed(2))}function Ae(t,e,n){let i,r,s,c,a,l,u,d,f,h,g,m,w,v,y,$,b,C,k,x,_=o,F=o,z=o,E=o,S=o,I=o,j=o,O=o;t.$$.on_destroy.push(()=>_()),t.$$.on_destroy.push(()=>F()),t.$$.on_destroy.push(()=>z()),t.$$.on_destroy.push(()=>E()),t.$$.on_destroy.push(()=>S()),t.$$.on_destroy.push(()=>I()),t.$$.on_destroy.push(()=>j()),t.$$.on_destroy.push(()=>O());let{store:P}=e,{size:A}=e,{position:L}=e,M=0,R=0,T=0;return G(()=>{R=M,T=L.top}),t.$$set=t=>{"store"in t&&n(22,P=t.store),"size"in t&&n(23,A=t.size),"position"in t&&n(0,L=t.position)},t.$$.update=()=>{var e;4194304&t.$$.dirty&&(n(16,i=P.loading),E(),E=p(i,t=>n(17,$=t))),4194304&t.$$.dirty&&(n(15,r=P.oversizedRatio),_(),_=p(r,t=>n(3,w=t))),4194304&t.$$.dirty&&(n(14,s=P.fileSize),F(),F=p(s,t=>n(4,v=t))),4194304&t.$$.dirty&&(n(13,c=P.fileWeight),j(),j=p(c,t=>n(20,k=t))),4194304&t.$$.dirty&&(n(12,a=P.sizeOnPage),I(),I=p(a,t=>n(19,C=t))),4194304&t.$$.dirty&&(n(11,l=P.potentialSavings),O(),O=p(l,t=>n(21,x=t))),4194304&t.$$.dirty&&(n(10,u=P.expectedSize),S(),S=p(u,t=>n(18,b=t))),4194304&t.$$.dirty&&(n(9,d=P.url),z(),z=p(d,t=>n(5,y=t))),32&t.$$.dirty&&n(8,f=y.split("/").pop()),8388608&t.$$.dirty&&n(2,h="normal"===A?100:50),20&t.$$.dirty&&n(7,g=Math.floor(h/(v.width/v.height))),8&t.$$.dirty&&n(6,m=Pe(w)),2&t.$$.dirty&&0!==(e=M)&&R!==e&&n(0,L.top=T+(R-e),L)},[L,M,h,w,v,y,m,g,f,d,u,l,a,c,s,r,i,$,b,C,k,x,P,A,function(e){J.call(this,t,e)},function(){n(1,M=window.pageYOffset)}]}class Le extends kt{constructor(t){super(),Ct(this,t,Ae,je,u,{store:22,size:23,position:0})}}function Me(t,e,n){const i=t.slice();return i[12]=e[n],i[14]=n,i}function Re(t){let e,n,i,o,r,s,c,a=vt(t[0]),l=[];for(let e=0;e<a.length;e+=1)l[e]=Te(Me(t,a,e));const u=t=>ht(l[t],1,1,()=>{l[t]=null});let d=!1!==t[1]&&Ue(t);return{c(){e=S("div"),n=S("div");for(let t=0;t<l.length;t+=1)l[t].c();i=O(),d&&d.c(),L(n,"class","previews svelte-1s5z1op"),L(e,"class",o="guide "+t[3]+" svelte-1s5z1op"),T(e,"show",!1!==t[1]),T(e,"keep-guide-open",!1!==t[1])},m(o,a){z(o,e,a),x(e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(n,null);x(e,i),d&&d.m(e,null),r=!0,s||(c=A(e,"mouseleave",t[6]),s=!0)},p(t,i){if(257&i){let e;for(a=vt(t[0]),e=0;e<a.length;e+=1){const o=Me(t,a,e);l[e]?(l[e].p(o,i),pt(l[e],1)):(l[e]=Te(o),l[e].c(),pt(l[e],1),l[e].m(n,null))}for(dt(),e=a.length;e<l.length;e+=1)u(e);ft()}!1!==t[1]?d?(d.p(t,i),2&i&&pt(d,1)):(d=Ue(t),d.c(),pt(d,1),d.m(e,null)):d&&(dt(),ht(d,1,1,()=>{d=null}),ft()),(!r||8&i&&o!==(o="guide "+t[3]+" svelte-1s5z1op"))&&L(e,"class",o),(!r||10&i)&&T(e,"show",!1!==t[1]),(!r||10&i)&&T(e,"keep-guide-open",!1!==t[1])},i(t){if(!r){for(let t=0;t<a.length;t+=1)pt(l[t]);pt(d),r=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)ht(l[t]);ht(d),r=!1},d(t){t&&E(e),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(l,t),d&&d.d(),s=!1,c()}}}function Te(t){let e,n;return e=new ce({props:{index:t[14],store:t[12]}}),e.$on("hover",t[8]),{c(){yt(e.$$.fragment)},m(t,i){$t(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.store=t[12]),e.$set(i)},i(t){n||(pt(e.$$.fragment,t),n=!0)},o(t){ht(e.$$.fragment,t),n=!1},d(t){bt(e,t)}}}function Ue(t){let e,n;return e=new Le({props:{store:t[0][t[1]],size:t[3],position:t[2]}}),e.$on("mouseleave",t[6]),{c(){yt(e.$$.fragment)},m(t,i){$t(e,t,i),n=!0},p(t,n){const i={};3&n&&(i.store=t[0][t[1]]),8&n&&(i.size=t[3]),4&n&&(i.position=t[2]),e.$set(i)},i(t){n||(pt(e.$$.fragment,t),n=!0)},o(t){ht(e.$$.fragment,t),n=!1},d(t){bt(e,t)}}}function De(t){let e,n,i="active"===t[4]&&t[5]&&Re(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),z(t,e,o),n=!0},p(t,[n]){"active"===t[4]&&t[5]?i?(i.p(t,n),48&n&&pt(i,1)):(i=Re(t),i.c(),pt(i,1),i.m(e.parentNode,e)):i&&(dt(),ht(i,1,1,()=>{i=null}),ft())},i(t){n||(pt(i),n=!0)},o(t){ht(i),n=!1},d(t){t&&E(e),i&&i.d(t)}}}function Be(t,e,n){let i,o,r,s;g(t,Pt,t=>n(4,r=t));let{stores:c}=e,a=!1;G(()=>{c.forEach(t=>t.updateDimensions())});const l=c[0].sizeOnPage;g(t,l,t=>n(10,o=t));let u={top:0,left:0};const d=Ft(c.map(t=>t.fileSize),t=>t.some(t=>-1!==t.width&&-1!==t.height));return g(t,d,t=>n(5,s=t)),t.$$set=t=>{"stores"in t&&n(0,c=t.stores)},t.$$.update=()=>{1024&t.$$.dirty&&n(3,i=function(t=-1,e=-1){return t<200||e<200?"micro":t<400||e<400?"small":"normal"}(o.width,o.height)),2&t.$$.dirty&&function(t=!1){t?c.forEach(t=>t.node.classList.add("jetpack-boost-guide__backdrop")):c.forEach(t=>t.node.classList.remove("jetpack-boost-guide__backdrop"))}(!1!==a)},[c,a,u,i,r,s,function(t){t.relatedTarget&&t.relatedTarget.classList.contains("keep-guide-open")||n(1,a=!1)},l,function(t){const e=t.detail,i=e.index;n(2,u=e.position),n(1,a=i)},d,o]}class qe extends kt{constructor(t){super(),Ct(this,t,Be,De,u,{stores:0})}}const We=[];let Ne;function He(){window.addEventListener("resize",function(){let t;return()=>{t&&clearTimeout(t),t=setTimeout(()=>{We.forEach(t=>{t.updateDimensions()})},500)}}()),Mt.trackInitialState(),Pt.subscribe(async t=>{if("paused"===t)return;const e=await Ut(Array.from(document.querySelectorAll("body *:not(.jetpack-boost-guide > *):not(.jetpack-boost-guide):not(#wpadminbar *)")),Ne),n=await Promise.all(e.map(t=>t.isImageTiny()));We.push(...function(t){const e=t.reduce((t,e)=>{var n;if(!e.node.parentNode)return console.error("Image has no parent",e.node),t;const i=function(t){const e=t.node;if(!(t.node instanceof HTMLImageElement)&&["static","relative"].includes(getComputedStyle(e).position))return e.classList.contains("jetpack-boost-guide")||(e.classList.add("jetpack-boost-guide","relative"),e.dataset.jetpackBoostGuideId=(++Ve).toString()),e;if(!e.parentNode||!e.parentElement)return;const n=function(t){let e,n=t.parentElement;for(;n&&n instanceof HTMLElement&&n!==document.body;){const t=getComputedStyle(n),i="inline"!==t.display,o="static"===t.position,r="relative"===t.position,s="auto"!==t.zIndex;i&&(!e&&(o||r)||r&&s)&&(e=n),n=n.parentElement}return e}(e);if(null==n?void 0:n.classList.contains("jetpack-boost-guide"))return n;if(n){const e=getComputedStyle(n);if("relative"===e.position){const t=Array.from(n.children).find(t=>t.classList.contains("jetpack-boost-guide"));if(t&&t instanceof HTMLElement)return t}const i=document.createElement("div");return i.classList.add("jetpack-boost-guide"),i.dataset.jetpackBoostGuideId=(++Ve).toString(),"static"===e.position&&(n.style.position="relative"),t.node instanceof HTMLImageElement&&(i.style.top=`${t.node.offsetTop}px`),n.prepend(i),i}return e.parentElement}(e);if(!i)return console.error("Could not find a parent for image",e),t;const o=parseInt(i.dataset.jetpackBoostGuideId||""),r=(null===(n=t[o])||void 0===n?void 0:n.props.stores)||[],s=new Lt(e);return r.push(s),1===r.length&&(t[o]={target:i,intro:!0,props:{stores:r}}),t},{});return Object.values(e).map(t=>(new qe(t),t.props.stores)).flat()}(e.filter((t,e)=>!n[e]))),Mt.trackPage(We)})}let Ve=0;function Ge(t){let e,n,i,o,r,s,c,a,l,u;return n=new Gt({}),{c(){e=S("a"),yt(n.$$.fragment),i=O(),o=S("span"),r=j("Image Guide: "),s=j(t[2]),L(e,"id","jetpack-boost-guide-bar"),L(e,"href",t[0]),L(e,"class",c="ab-item "+t[1]+" svelte-itog5b")},m(c,d){var f;z(c,e,d),$t(n,e,null),x(e,i),x(e,o),x(o,r),x(o,s),a=!0,l||(u=A(e,"click",(f=t[3],function(t){return t.preventDefault(),f.call(this,t)})),l=!0)},p(t,[n]){(!a||4&n)&&M(s,t[2]),(!a||1&n)&&L(e,"href",t[0]),(!a||2&n&&c!==(c="ab-item "+t[1]+" svelte-itog5b"))&&L(e,"class",c)},i(t){a||(pt(n.$$.fragment,t),a=!0)},o(t){ht(n.$$.fragment,t),a=!1},d(t){t&&E(e),bt(n),l=!1,u()}}}function Je(t,e,n){let i,o;g(t,Pt,t=>n(1,i=t)),g(t,At,t=>n(2,o=t));let{href:r}=e,{tracksCallback:s}=e;return t.$$set=t=>{"href"in t&&n(0,r=t.href),"tracksCallback"in t&&n(4,s=t.tracksCallback)},t.$$.update=()=>{16&t.$$.dirty&&Mt.setTracksCallback(s)},[r,i,o,function(){Pt.cycle(),Mt.trackUIStateChange()},s]}class Ze extends kt{constructor(t){super(),Ct(this,t,Je,Ge,u,{href:0,tracksCallback:4})}}function Ke(t,{href:e,tracksCallback:n,fetchFunction:i}){return function(t){window.frameElement||(Ne=t,window.addEventListener("load",He))}(i),new Ze({target:t,props:{href:e,tracksCallback:n}})}},499:(t,e,n)=>{"use strict";function i(t){return new URL(t).origin===window.location.origin}n.d(e,{J:()=>i})},723:t=>{"use strict";t.exports=window.wp.i18n},941:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(i++,"%c"===t&&(o=i))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(212)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},997:t=>{var e=1e3,n=60*e,i=60*n,o=24*i,r=7*o,s=365.25*o;function c(t,e,n,i){var o=e>=1.5*n;return Math.round(t/n)+" "+i+(o?"s":"")}t.exports=function(t,a){a=a||{};var l=typeof t;if("string"===l&&t.length>0)return function(t){if((t=String(t)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===l&&isFinite(t))return a.long?function(t){var r=Math.abs(t);if(r>=o)return c(t,r,o,"day");if(r>=i)return c(t,r,i,"hour");if(r>=n)return c(t,r,n,"minute");if(r>=e)return c(t,r,e,"second");return t+" ms"}(t):function(t){var r=Math.abs(t);if(r>=o)return Math.round(t/o)+"d";if(r>=i)return Math.round(t/i)+"h";if(r>=n)return Math.round(t/n)+"m";if(r>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(482),e=n(499),i=n(348),o=n(133),r=n(372);async function s(t){if(!(0,e.J)(t)){const e=await(0,i.i)({action:"boost_proxy_ig",proxy_url:t,nonce:jbImageGuide.proxyNonce},jbImageGuide.ajax_url),n=e.headers.get("content-type");if(n&&-1!==n.indexOf("application/json")){const t=await e.clone().json();if(t&&t.data["content-length"]){const n=new Headers;for(const e in t.data)Object.hasOwn(t.data,e)&&n.set(e,t.data[e]);return new Response(e.body,{status:e.status,statusText:e.statusText,headers:n})}}}return await fetch(t,{method:"HEAD",mode:"no-cors"})}document.addEventListener("DOMContentLoaded",()=>{r.A.initialize(jetpackBoostAnalytics.tracksData.userData.userid,jetpackBoostAnalytics.tracksData.userData.username,{blog_id:jetpackBoostAnalytics.tracksData.blogId});const e=(t,e)=>{(0,o.zI)(t,e)},n=document.getElementById("wp-admin-bar-jetpack-boost-guide"),i=n?.querySelector("a");if(n&&i){const o=i.getAttribute("href");i.remove(),(0,t.zo)(n,{href:o,tracksCallback:e,fetchFunction:s})}})})()})();
Save
Cancel