28 lines
75 KiB
JavaScript
28 lines
75 KiB
JavaScript
|
|
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[21],{1:function(e,t){e.exports=googlesitekit.i18n},10:function(e,t){e.exports=googlesitekit.components},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(5),i=r.n(n),a=r(6),o=r.n(a),c=r(15),s=r.n(c),l=r(60),u=r(44);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r,n){var a=Object(l.a)(t);return function(){var t=s()(i.a.mark((function t(o,c,s,l){var d,f,p,m,b,v,h,_,O,y;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d=e.activeModules,f=e.referenceSiteURL,p=e.trackingEnabled,m=e.trackingID,b=e.userIDHash,v=e.userRoles,h=void 0===v?[]:v,_=e.isAuthenticated,O=e.pluginVersion,p){t.next=3;break}return t.abrupt("return");case 3:return r(),y={send_to:m,event_category:o,event_label:s,value:l,dimension1:f,dimension2:h.join(","),dimension3:b,dimension4:O||"",dimension5:Array.from(u.a).join(","),dimension6:d.join(","),dimension7:_?"1":"0"},t.abrupt("return",new Promise((function(e){var t,r,i=setTimeout((function(){n.console.warn('Tracking event "'.concat(c,'" (category "').concat(o,'") took too long to fire.')),e()}),1e3),s=function(){clearTimeout(i),e()};a("event",c,g(g({},y),{},{event_callback:s})),(null===(t=n._gaUserPrefs)||void 0===t||null===(r=t.ioo)||void 0===r?void 0:r.call(t))&&s()})));case 6:case"end":return t.stop()}}),t)})));return function(e,r,n,i){return t.apply(this,arguments)}}()}},1033:function(e,t,r){"use strict";r.r(t);var n=r(4),i=r.n(n),a=r(158),o=r.n(a),c=r(312),s=r.n(c),l=r(1),u=r(127),d=r(700),g=r(794),f=r(2);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var m=f.createElement("defs",null,f.createElement("radialGradient",{id:"pagespeed-insights_svg__b",cx:1360.51,cy:10958.05,r:458.83,gradientTransform:"matrix(.5 0 0 .5 -675.69 -5476.24)",gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:0,stopColor:"#fff",stopOpacity:.1}),f.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})),f.createElement("linearGradient",{id:"pagespeed-insights_svg__a",x1:1572.36,y1:11164.11,x2:1691.74,y2:11283.49,gradientTransform:"matrix(.5 0 0 .5 -675.69 -5476.24)",gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:0,stopColor:"#212121",stopOpacity:.2}),f.createElement("stop",{offset:1,stopColor:"#212121",stopOpacity:0}))),b=f.createElement("path",{d:"M183.93 25.08v121.19a12.53 12.53 0 01-12.54 12.54H12.58A12.53 12.53 0 010 146.27V25.08z",fill:"#e1e1e1"}),v=f.createElement("path",{d:"M12.58 0h158.81a12.53 12.53 0 0112.54 12.54v12.54H0V12.54A12.53 12.53 0 0112.58 0z",fill:"#c2c2c2"}),h=f.createElement("path",{d:"M171.39 0H12.58A12.57 12.57 0 000 12.54v1A12.58 12.58 0 0112.58 1h158.81a12.59 12.59 0 0112.54 12.54v-1A12.58 12.58 0 00171.39 0z",fillOpacity:.2,fill:"#fff"}),_=f.createElement("path",{fill:"#212121",fillOpacity:.1,d:"M0 25.08h183.93v1H0z"}),O=f.createElement("path",{d:"M91.91 62.69a66.76 66.76 0 00-66.76 66.86c0 1.4-.09 3.14 0 4.18h29.13a36.26 36.26 0 010-4.18 37.64 37.64 0 0157.36-32l21-21a66.62 66.62 0 00-40.73-13.86z",fill:"#4285f4"}),y=f.createElement("path",{d:"M132.64 76.52l-21 21a37.59 37.59 0 0117.9 32 36.26 36.26 0 010 4.18h29.27c.08-1 0-2.78 0-4.18a66.73 66.73 0 00-26.17-53z",fill:"#f44336"}),k=f.createElement("circle",{fill:"#eee",cx:16.76,cy:12.54,r:4.18}),E=f.createElement("circle",{fill:"#eee",cx:33.48,cy:12.54,r:4.18}),j=f.createElement("path",{fill:"#21212
|
||
|
|
/* translators: %s: number of days */
|
||
|
|
Object(g._n)("Last %s day","Last %s days",e,"google-site-kit"),e)};return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}},65:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(2),i=Object(n.createContext)(""),a=(i.Consumer,i.Provider);t.b=i},66:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return c}));var n=r(94);function i(e){try{return new URL(e).pathname}catch(e){}return null}function a(e,t){try{return new URL(t,e).href}catch(e){}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function o(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function c(e,t){if(!Object(n.a)(e))return e;if(e.length<=t)return e;var r=new URL(e),i=e.replace(r.origin,"");if(i.length<t)return i;var a=i.length-Math.floor(t)+1;return"…"+i.substr(a)}},7:function(e,t,r){"use strict";r.d(t,"A",(function(){return i.b})),r.d(t,"x",(function(){return a.a})),r.d(t,"B",(function(){return a.b})),r.d(t,"z",(function(){return u})),r.d(t,"h",(function(){return d.a})),r.d(t,"v",(function(){return d.d})),r.d(t,"w",(function(){return d.e})),r.d(t,"s",(function(){return d.c})),r.d(t,"m",(function(){return d.b})),r.d(t,"t",(function(){return m})),r.d(t,"f",(function(){return b})),r.d(t,"b",(function(){return v.b})),r.d(t,"a",(function(){return v.a})),r.d(t,"c",(function(){return v.e})),r.d(t,"k",(function(){return v.g})),r.d(t,"i",(function(){return v.f})),r.d(t,"y",(function(){return v.k})),r.d(t,"j",(function(){return h.b})),r.d(t,"q",(function(){return h.c})),r.d(t,"e",(function(){return h.a})),r.d(t,"o",(function(){return _.b})),r.d(t,"l",(function(){return _.a})),r.d(t,"u",(function(){return _.c})),r.d(t,"r",(function(){return O})),r.d(t,"p",(function(){return y})),r.d(t,"n",(function(){return k})),r.d(t,"d",(function(){return E})),r.d(t,"C",(function(){return j})),r.d(t,"g",(function(){return w}));var n=r(14),i=r(34),a=r(73),o=r(33),c=r.n(o),s=r(90),l=r.n(s),u=function(e){return l()(JSON.stringify(function e(t){var r={};return Object.keys(t).sort().forEach((function(n){var i=t[n];i&&"object"===c()(i)&&!Array.isArray(i)&&(i=e(i)),r[n]=i})),r}(e)))};r(96);var d=r(74);function g(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function f(e){return"<p>".concat(e.replace(/\n{2,}/g,"</p><p>"),"</p>")}function p(e){return e.replace(/\n/gi,"<br>")}function m(e){for(var t=e,r=0,n=[g,f,p];r<n.length;r++){t=(0,n[r])(t)}return t}var b=function(e){return e=parseFloat(e),isNaN(e)||0===e?[0,0,0,0]:[Math.floor(e/60/60),Math.floor(e/60%60),Math.floor(e%60),Math.floor(1e3*e)-1e3*Math.floor(e)]},v=r(64),h=r(97),_=r(66);function O(e){var t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function y(e){if("number"==typeof e)return!0;var t=(e||"").toString();return!!t&&!isNaN(t)}var k=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}};function E(e,t){var r=function(e){return"0"===e||0===e};if(r(e)&&r(t))return 0;if(r(e)||Number.isNaN(e))return null;var n=(t-e)/e;return Number.isNaN(n)||!Number.isFinite(n)?null:n}var j=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},w=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(n.unescape)(t)}},700:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return SettingsView}));var n=r(1),i=r(4),a=r.n(i),o=r(7),c=r(88),s=a.a.useSelect;function SettingsView(){var t=s((function(e){return e(c.d).getAdminScreenURL()})),r=Object(n.sprintf)(
|
||
|
|
/* translators: %s: is the URL to the Site Kit dashboard. */
|
||
|
|
Object(n.__)('To view insights, <a href="%s">visit the dashboard</a>',"google-site-kit"),"".concat(t,"#speed"));return e.createElement("p",{dangerouslySetInnerHTML:Object(o.x)(r,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})})}}).call(this,r(3))},73:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(33),i=r.n(n),a=r(84),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:a.a.sanitize(e,t)}};function c(e){var t,r="object"===i()(e)?e.toString():e;return null==r||null===(t=r.replace)||void 0===t?void 0:t.call(r,/\/+$/,"")}},74:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return y})),r.d(t,"d",(function(){return k})),r.d(t,"e",(function(){return j})),r.d(t,"c",(function(){return w})),r.d(t,"b",(function(){return R}));var n=r(16),i=r.n(n),a=r(33),o=r.n(a),c=r(6),s=r.n(c),l=r(25),u=r.n(l),d=r(14),g=r(79),f=r.n(g),p=r(1);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=h(e,t),n=r.formatUnit,i=r.formatDecimal;try{return n()}catch(e){return i()}},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=parseInt(e,10),Number.isNaN(e)&&(e=0);var r=Math.floor(e/60/60),n=Math.floor(e/60%60),i=Math.floor(e%60);return{hours:r,minutes:n,seconds:i,formatUnit:function(){var a=t.unitDisplay,o=b(b({unitDisplay:void 0===a?"short":a},u()(t,["unitDisplay"])),{},{style:"unit"});return 0===e?j(i,b(b({},o),{},{unit:"second"})):Object(p.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?j(i,b(b({},o),{},{unit:"second"})):"",n?j(n,b(b({},o),{},{unit:"minute"})):"",r?j(r,b(b({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var t=Object(p.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
|
||
|
|
Object(p.__)("%ds","google-site-kit"),i);if(0===e)return t;var a=Object(p.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
|
||
|
|
Object(p.__)("%dm","google-site-kit"),n),o=Object(p.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
|
||
|
|
Object(p.__)("%dh","google-site-kit"),r);return Object(p.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?t:"",n?a:"",r?o:"").trim()}}},_=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},O=function(e){var t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
|
||
|
|
Object(p.__)("%sM","google-site-kit"),j(_(e),e%10==0?{}:t)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(p.__)("%sK","google-site-kit"),j(_(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(p.__)("%sK","google-site-kit"),j(_(e),e%10==0?{}:t)):j(e,{signDisplay:"never",maximumFractionDigits:1})};function y(e){var t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:Object(d.isPlainObject)(e)&&(t=b({},e)),t}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(d.isFinite)(e)?e:Number(e),Object(d.isFinite)(e)||(console.warn("Invalid number",e,o()(e)),e=0);var r=y(t),n=r.style,i=void 0===n?"metric":n;return"metric"===i?O(e):"duration"===i?v(e,r):j(e,r)}var E=f()(console.warn),j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?R():r,a=u()(t,["locale"]);try{return new Intl.NumberFormat(n,a).format(e)}catch(t){E("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},s=["signDisplay","compactDisplay"],l={},d=0,g=Object.entries(a);d<g.length;d++){var f=i()(g[d],2),p=f[0],m=f[1];c[p]&&m===c[p]||(s.includes(p)||(l[p]=m))}try{return new Intl.NumberFormat(n,l).format(e)}catch(t){return new Intl.NumberFormat(n).format(e)}},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?R():r,i=t.style,a=void 0===i?"long":i,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var s=new Intl.ListFormat(n,{style:a,type:c});return s.format(e)}
|
||
|
|
/* translators: used between list items, there is a space after the comma. */var l=Object(p.__)(", ","google-site-kit");return e.join(l)},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,r=Object(d.get)(t,["_googlesitekitLegacyData","locale"]);if(r){var n=r.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,r(26))},77:function(e,t,r){"use strict";var n=r(124);r.d(t,"a",(function(){return n.a}));var i=r(125);r.d(t,"c",(function(){return i.a}));var a=r(126);r.d(t,"b",(function(){return a.a}))},78:function(e,t,r){"use strict";(function(e){var n=r(0),i=r.n(n),a=r(94),o=r(1),c=r(7);function ErrorText(t){var r=t.message,n=t.reconnectURL,i=t.noPrefix;if(!r)return null;var s=r;void 0!==i&&i||(s=Object(o.sprintf)(
|
||
|
|
/* translators: %s: Error message */
|
||
|
|
Object(o.__)("Error: %s","google-site-kit"),r)),n&&Object(a.a)(n)&&(s=s+" "+Object(o.sprintf)(
|
||
|
|
/* translators: %s: Reconnect URL */
|
||
|
|
Object(o.__)('To fix this, <a href="%s">redo the plugin setup</a>.',"google-site-kit"),n));return e.createElement("div",{className:"googlesitekit-error-text"},e.createElement("p",{dangerouslySetInnerHTML:Object(c.x)(s,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}))}ErrorText.propTypes={message:i.a.string.isRequired,reconnectURL:i.a.string,noPrefix:i.a.bool},ErrorText.defaultProps={reconnectURL:"",noPrefix:!1},t.a=ErrorText}).call(this,r(3))},794:function(e,t,r){"use strict";(function(e){var n=r(795),i=r(105);t.a=Object(i.a)({moduleName:"pagespeed-insights"})((function DashboardPageSpeedWidget(t){var r=t.Widget;return e.createElement(r,{className:"googlesitekit-pagespeed-widget",noPadding:!0},e.createElement(n.a,null))}))}).call(this,r(3))},795:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return DashboardPageSpeed}));var n=r(5),i=r.n(n),a=r(15),o=r.n(a),c=r(6),s=r.n(c),l=r(16),u=r.n(l),d=r(12),g=r.n(d),f=r(273),p=r(2),m=r(1),b=r(37),v=r.n(b),h=r(10),_=r(4),O=r.n(_),y=r(796),k=r(21),E=r(799),j=r(800),w=r(801),R=r(804),A=r(34),N=r(13),S=r(29),D=r(88),P=r(372),T=r(20),L=r(805),M=O.a.useSelect,I=O.a.useDispatch,x=O.a.useInViewSelect;function DashboardPageSpeed(){var t=Object(p.useRef)(),r=Object(p.useState)(!1),n=u()(r,2),a=n[0],c=n[1],l=Object(T.a)(),d=M((function(e){return e(N.c).getCurrentReferenceURL()})),b=M((function(e){return e(S.b).getValue(D.h)}))||D.f,_=M((function(e){return e(S.b).getValue(D.g)}))||D.b,O=M((function(e){var t=e(D.d);return{isFetchingMobile:!t.hasFinishedResolution("getReport",[d,D.f]),errorMobile:t.getErrorForSelector("getReport",[d,D.f]),isFetchingDesktop:!t.hasFinishedResolution("getReport",[d,D.e]),errorDesktop:t.getErrorForSelector("getReport",[d,D.e])}})),C=O.isFetchingMobile,H=O.isFetchingDesktop,F=O.errorMobile,U=O.errorDesktop,z=x((function(e){return e(D.d).getReport(d,D.f)})),B=x((function(e){return e(D.d).getReport(d,D.e)})),W=I(S.b).setValues,q=I(D.d).invalidateResolution,V=Object(f.a)(t,{threshold:.25}),Y=!!(null==V?void 0:V.intersectionRatio),K=b===D.f?C:H;Object(p.useEffect)((function(){Y&&!a&&(Object(A.b)("".concat(l,"_pagespeed-widget"),"widget_view"),Object(A.b)("".concat(l,"_pagespeed-widget"),"default_tab_view",_.replace("data_","")),c(!0))}),[Y,_,l,a]);var G=Object(p.useCallback)((function(e){var t;switch(e){case 0:W(s()({},D.g,D.b)),t="lab";break;case 1:W(s()({},D.g,D.a)),t="field";break;case 2:W(s()({},D.g,D.c)),t="recommendations"}Object(A.b)("".concat(l,"_pagespeed-widget"),"tab_select",t)}),[W,l]),$=Object(p.useCallback)((function(e){e.slug===D.e?W(s()({},D.h,D.e)):W(s()({},D.h,D.f))}),[W]),J=Object(p.useCallback)(function(){var e=o()(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,v.a.invalidateCache("modules","pagespeed-insights","pagespeed");case 3:q("getReport",[d,D.e]),q("getReport",[d,D.f]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[q,d]),Z=b===D.f?z:B,X=b===D.f?F:U,Q=M((function(e){return e(D.d).hasFinishedResolution("getReport",[d,b])})),ee=x((function(e){if(X)return[];var t=e(D.d).getAuditsWithStackPack(d,b,"wordpress");if(!t||!Object.keys(t).length)return[];var r=[];return Object.keys(t).forEach((function(e){var n=t[e];"numeric"!==n.scoreDisplayMode&&"binary"!==n.scoreDisplayMode||n.score>=.9||r.push({id:n.id,title:n.title})})),r}),[d,b,Q]);Object(p.useEffect)((function(){var e,t;(null==z||null===(e=z.loadingExperience)||void 0===e?void 0:e.metrics)&&(null==B||null===(t=B.loadingExperience)||void 0===t?void 0:t.metrics)&&W(s()({},D.g,D.a))}),[z,B,W]);var te=!d||K&&!Z||!_,re=_===D.a&&["LARGEST_CONTENTFUL_PAINT_MS","CUMULATIVE_LAYOUT_SHIFT_SCORE","FIRST_INPUT_DELAY_MS"].every((function(e){var t,r;return null==Z||null===(t=Z.loadingExperience)||void 0===t||null===(r=t.metrics)||void 0===r?void 0:r[e]}));return te?e.createElement("div",{id:"googlesitekit-pagespeed-header",className:"googlesitekit-pagespeed-widget__content-wrapper googlesitekit-pagespeed-widget__content-wrapper--loading"},e.createElement(L.a,null)):e.creat
|
||
|
|
/* translators: %s: number of seconds */
|
||
|
|
Object(s._x)("%s s","duration","google-site-kit"),O),category:m.category}),e.createElement(l.a,{title:Object(s._x)("Cumulative Layout Shift","core web vitals name","google-site-kit"),description:Object(s.__)("How stable the elements on the page are","google-site-kit"),displayValue:y,category:b.category}),e.createElement(l.a,{title:Object(s._x)("First Input Delay","core web vitals name","google-site-kit"),description:Object(s.__)("Time it takes for the browser to respond when people first interact with the page","google-site-kit"),displayValue:Object(s.sprintf)(
|
||
|
|
/* translators: %s: number of milliseconds */
|
||
|
|
Object(s._x)("%s ms","duration","google-site-kit"),v.percentile),category:v.category}),e.createElement(l.a,{title:Object(s._x)("Interaction to Next Paint","core web vitals name","google-site-kit"),description:Object(s.__)("How quickly your page responds when people interact with it","google-site-kit"),displayValue:Object(s.sprintf)(
|
||
|
|
/* translators: %s: number of milliseconds */
|
||
|
|
Object(s._x)("%s ms","duration","google-site-kit"),null==h?void 0:h.percentile),category:(null==h?void 0:h.category)||p.a,isLast:!0}))))}FieldReportMetrics.propTypes={data:i.a.object,error:i.a.object}}).call(this,r(3))},801:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return Recommendations}));var n=r(0),i=r.n(n),a=r(12),o=r.n(a),c=r(1),s=r(88),l=r(802),u=r(803),d=r(17);function Recommendations(t){var r=t.className,n=t.recommendations,i=t.referenceURL,a=t.strategy;return(null==n?void 0:n.length)?e.createElement("div",{className:o()("googlesitekit-pagespeed--recommendations",r)},e.createElement("div",{className:"googlesitekit-pagespeed-recommendations__title"},Object(c.__)("Recommendations on how to improve your site","google-site-kit")),n.map((function(t){var r=t.id,n=t.title;return e.createElement(u.a,{key:r,auditID:r,title:n,referenceURL:i,strategy:a})}))):e.createElement(d.e,null,e.createElement(d.k,null,e.createElement(d.a,null,Object(c.__)("No recommendations for now.","google-site-kit")),e.createElement(d.a,{className:"googlesitekit-pagespeed__zero-recommendations"},e.createElement(l.a,null))))}Recommendations.propTypes={className:i.a.string,recommendations:i.a.arrayOf(i.a.object),referenceURL:i.a.string.isRequired,strategy:i.a.oneOf([s.f,s.e]).isRequired},Recommendations.defaultProps={className:""}}).call(this,r(3))},802:function(e,t,r){"use strict";var n=r(2);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a=n.createElement("path",{d:"M281.11 316.17a16 16 0 01-20.69 15.23M118.86 316.17a16 16 0 0020.69 15.23M201 300.22h-66.19a16 16 0 00-16 15.95h0",stroke:"#F29900",strokeLinejoin:"round",strokeWidth:9.4}),o=n.createElement("path",{d:"M198.06 300.22h67.1a16 16 0 0115.95 15.95h0",stroke:"#F29900",strokeLinejoin:"round",strokeWidth:9.4}),c=n.createElement("path",{d:"M249.64 206.74c-1.42 24.59 12.3 59.39 35.05 71.31 15.3 8 34.85 1.6 37.66-16.54C324.46 247.84 316.82 233 308 223c0 0 14.73-2.8 14.73-21.22M150.36 206.74c1.42 24.59-12.3 59.39-35.05 71.31-15.3 8-34.85 1.6-37.66-16.54C75.54 247.84 83.18 233 92 223c0 0-14.73-2.8-14.73-21.22",stroke:"#FBBC04",strokeLinejoin:"round",strokeWidth:9.4}),s=n.createElement("path",{fill:"#F9AB00",d:"M145.23 76.68h109.53v219.7H145.23z"}),l=n.createElement("path",{d:"M172.74 142.94c13.38 16.48 37.19 21.05 54.28 0",stroke:"#FFF",strokeMiterlimit:10,strokeWidth:6.66}),u=n.createElement("path",{stroke:"#F29900",strokeLinejoin:"round",strokeWidth:9.4,d:"M260.42 331.4l-141.56-45.03-10.4 28.08"}),d=n.createElement("path",{stroke:"#F29900",strokeLinejoin:"round",strokeWidth:9.4,d:"M139.55 331.4l141.56-45.03 10.4 28.08"}),g=n.createElement("ellipse",{cx:200,cy:381.74,rx:79.51,ry:8.26,fill:"#F1F3F4"}),f=n.createElement("path",{stroke:"#E8EAED",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:6,d:"M200 10v31.42M105 35.46l15.71 27.2M35.46 105l27.2 15.71M10 200h31.42M35.46 295l27.2-15.71M364.54 295l-27.2-15.71M390 200h-31.42M364.54 105l-27.2 15.71M295 35.46l-15.71 27.2"});t.a=function SvgZeroStateYellow(e){return n.createElement("svg",i({viewBox:"0 0 400 400",fill:"none"},e),a,o,c,s,l,u,d,g,f)}},803:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return Recommendation}));var n=r(0),i=r.n(n),a=r(2),o=r(4),c=r.n(o),s=r(88),l=r(516),u=r(7),d=r(20),g=c.a.useSelect;function Recommendation(t){var r=t.auditID,n=t.title,i=t.referenceURL,o=t.strategy,c=Object(d.a)(),f=Object(a.useCallback)((function(){Object(u.A)("".concat(c,"_pagespeed-widget"),"stack_pack_expand",r)}),[r,c]),p=g((function(e){return e(s.d).getStackPackDescription(i,o,r,"wordpress")}));if(!p)return null;var m=Object(u.t)(p.description);return e.createElement(l.a,{id:r,title:n,onOpen:f},e.createElement("div",{dangerouslySetInnerHTML:Object(u.x)(m,{ALLOWED_TAGS:["a","p"],ALLOWED_ATTR:["href","rel","target"]})}))}Recommendation.propTypes={auditID:i.a.string.isRequired,title:i.a.string.isRequired,referenceURL:i.a.string.isRequired,strategy:i.a
|
||
|
|
/* translators: %s: link with translated service name */
|
||
|
|
Object(n.__)("View details at %s","google-site-kit"),"<a>".concat(Object(n._x)("PageSpeed Insights","Service name","google-site-kit"),"</a>")),{a:e.createElement(l.a,{href:r,external:!0})}))}}).call(this,r(3))},805:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return DashboardPageSpeedLoading}));var n=r(618),i=r(61);function DashboardPageSpeedLoading(){return e.createElement("div",{className:"googlesitekit-pagespeed-widget__content"},e.createElement("header",{className:"googlesitekit-pagespeed-widget__header"},e.createElement("div",{className:"googlesitekit-pagespeed-widget__data-src-tabs"},e.createElement(n.a,{count:3,smallWidth:"70px",smallHeight:"48px",width:"120px",height:"48px"})),e.createElement("div",{className:"googlesitekit-pagespeed-widget__device-size-tab-bar-wrapper"},e.createElement(n.a,{count:2,width:"56px",height:"32px"}))),e.createElement("section",{className:"googlesitekit-pagespeed-widget__values"},e.createElement(n.a,{count:5,smallWidth:"100%",smallHeight:"90px",width:"100%",height:"78px"})),e.createElement("div",{className:"googlesitekit-pagespeed-report__row"},e.createElement(i.a,{width:"130px",height:"40px"})),e.createElement("div",{className:"googlesitekit-pagespeed-report__footer"},e.createElement(i.a,{width:"224px",height:"40px"})))}}).call(this,r(3))},83:function(e,t,r){"use strict";(function(e){var n=r(0),i=r.n(n),a=r(12),o=r.n(a);function ChangeArrow(t){var r=t.direction,n=t.invertColor,i=t.width,a=t.height;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(r),{"googlesitekit-change-arrow--inverted-color":n}),width:i,height:a,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:i.a.string,invertColor:i.a.bool,width:i.a.number,height:i.a.number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9},t.a=ChangeArrow}).call(this,r(3))},84:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return i}));var n=r(134),i=r.n(n)()(e)}).call(this,r(26))},87:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return a}));var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},i=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()};function a(e){return e.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join("")}},88:function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"g",(function(){return u}));var n="modules/pagespeed-insights",i="mobile",a="desktop",o="data_lab",c="data_field",s="data_recommendations",l="dashboardPageSpeedWidgetStrategy",u="dashboardPageSpeedWidgetDataSource"},96:function(e,t,r){"use strict";(function(e){r(51),r(52)}).call(this,r(26))},97:function(e,t,r){"use strict";(function(e){r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return c}));var n=r(197),i=r(83),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isNaN(Number(t)))return"";var a=r.invertColor,o=void 0!==a&&a;return Object(n.a)(e.createElement(i.a,{direction:t>0?"up":"down",invertColor:o}))},o=function(e){var t,r,n,i,a,o,c,s,l,u,d,g,f,p,m;if(void 0!==e)return 1===(null==e||null===(t=e[0])||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.rows)||void 0===n?void 0:n.length)||(null==e||null===(i=e[0])||void 0===i||null===(a=i.data)||void 0===a||null===(o=a.rows)||void 0===o||null===(c=o[0])||void 0===c||null===(s=c.metrics)||void 0===s||null===(l=s[0])||void 0===l||null===(u=l.values)||void 0===u?void 0:u[0])===(null==e||null===(d=e[0])||void 0===d||null===(g=d.data)||void 0===g||null===(f=g
|