bibhamrokhanpin/wp-content/__plugins/google-site-kit/dist/assets/js/googlesitekit-modules-pagespeed-insights-49442dad950a91fa4367.js

24 lines
67 KiB
JavaScript
Raw Normal View History

2024-04-10 17:46:06 +05:45
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[23],{1:function(e,t){e.exports=googlesitekit.i18n},10:function(e,t,r){"use strict";r.d(t,"w",(function(){return c.b})),r.d(t,"t",(function(){return s.a})),r.d(t,"x",(function(){return s.b})),r.d(t,"v",(function(){return f})),r.d(t,"c",(function(){return p.b})),r.d(t,"k",(function(){return p.c})),r.d(t,"r",(function(){return m.c})),r.d(t,"s",(function(){return m.d})),r.d(t,"o",(function(){return m.b})),r.d(t,"j",(function(){return m.a})),r.d(t,"e",(function(){return b.a})),r.d(t,"p",(function(){return O})),r.d(t,"d",(function(){return y})),r.d(t,"g",(function(){return E.c})),r.d(t,"u",(function(){return E.i})),r.d(t,"h",(function(){return A.b})),r.d(t,"n",(function(){return A.c})),r.d(t,"b",(function(){return A.a})),r.d(t,"m",(function(){return R.b})),r.d(t,"i",(function(){return R.a})),r.d(t,"q",(function(){return R.d})),r.d(t,"l",(function(){return k})),r.d(t,"a",(function(){return j})),r.d(t,"y",(function(){return S})),r.d(t,"f",(function(){return w}));var n=r(114),a=r.n(n),i=r(111),o=r.n(i),c=r(30),s=r(61),l=r(28),u=r.n(l),d=r(78),g=r.n(d),f=function(e){return g()(JSON.stringify(function e(t){var r={};return Object.keys(t).sort().forEach((function(n){var a=t[n];a&&"object"===u()(a)&&!Array.isArray(a)&&(a=e(a)),r[n]=a})),r}(e)))};var p=r(80),m=(r(82),r(72)),b=r(62);function v(e){return e.replace(/\[([^\]]+)\]\((https?:\/\/[^\/]+\.\w+\/?.*?)\)/gi,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function h(e){return"<p>".concat(e.replace(/\n{2,}/g,"</p><p>"),"</p>")}function _(e){return e.replace(/\n/gi,"<br>")}function O(e){for(var t=e,r=0,n=[v,h,_];r<n.length;r++){t=(0,n[r])(t)}return t}var y=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)]},E=r(57),A=r(83),R=r(52),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}},j=function(e,t){if("0"===e||0===e||isNaN(e))return null;var r=(t-e)/e;return isNaN(r)||!a()(r)?null:r},S=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 o()(t)}},100:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"e",(function(){return a})),r.d(t,"d",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return c})),r.d(t,"g",(function(){return s})),r.d(t,"f",(function(){return l}));var n="modules/pagespeed-insights",a="mobile",i="desktop",o="data_lab",c="data_field",s="dashboardPageSpeedWidgetStrategy",l="dashboardPageSpeedWidgetDataSource"},101:function(e,t,r){"use strict";(function(e){var n=r(6),a=r.n(n),i=r(0),o=r.n(i);function c(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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Spinner(t){var r=t.isSaving,n=t.style,a=void 0===n?{}:n;return e.createElement("span",{className:"spinner",style:s({display:r?"inline-block":"none",float:"none",marginTop:"0",visibility:"visible"},a)})}Spinner.propTypes={isSaving:o.a.bool,style:o.a.object},t.a=Spinner}).call(this,r(3))},103:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return Cell}));var n=r(16),a=r.n(n),i=r(6),o=r.n(i),c=r(17),s=r.n(c),l=r(0),u=r.n(l),d=r(7),g=r.n(d);function Cell(t){var r,n=t.className,i=t.alignTop,c=t.alignMiddle,l=t.alignBottom,u=t.alignRight,d=t.alignLeft,f=t.smAlignRight,p=t.mdAlignRight,m=t.lgA
/* translators: %s: number of days */
Object(b._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}}}},594:function(e,t,r){"use strict";(function(e){var n=r(773),a=r(135);t.a=Object(a.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))},60:function(e,t,r){"use strict";(function(e){var n=r(0),a=r.n(n),i=r(7),o=r.n(i);function ChangeArrow(t){var r=t.direction,n=t.invertColor,a=t.width,i=t.height;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(r),{"googlesitekit-change-arrow--inverted-color":n}),width:a,height:i,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:a.a.string,invertColor:a.a.bool,width:a.a.number,height:a.a.number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9},t.a=ChangeArrow}).call(this,r(3))},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(28),a=r.n(n),i=r(71),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:i.a.sanitize(e,t)}};function c(e){var t,r="object"===a()(e)?e.toString():e;return null==r||null===(t=r.replace)||void 0===t?void 0:t.call(r,/\/+$/,"")}},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(2),a=function(e){return function(t){return function FilteredComponent(r){return Object(n.createElement)(n.Fragment,{},"",Object(n.createElement)(t,r),e)}}}},63:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return ProgressBar}));var n=r(0),a=r.n(n),i=r(7),o=r.n(i);function ProgressBar(t){var r=t.className,n=t.small,a=t.compress,i=t.indeterminate,c=t.height,s=t.progress,l=void 0!==c?Math.round(c/2):void 0,u=s?"scaleX(".concat(s,")"):void 0;return e.createElement("div",{role:"progressbar",style:{marginTop:l,marginBottom:l},className:o()("mdc-linear-progress",r,{"mdc-linear-progress--indeterminate":i,"mdc-linear-progress--small":n,"mdc-linear-progress--compress":a})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar",style:{transform:u}},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}ProgressBar.propTypes={className:a.a.string,small:a.a.bool,compress:a.a.bool,indeterminate:a.a.bool,progress:a.a.number,height:a.a.number},ProgressBar.defaultProps={className:"",small:!1,compress:!1,indeterminate:!0,progress:0}}).call(this,r(3))},682:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return SettingsView}));var n=r(1),a=r(4),i=r.n(a),o=r(47),c=r(10),s=r(100),l=i.a.useSelect;function SettingsView(){var t=l((function(e){return e(s.c).getAdminScreenURL()})),r=Object(o.a)("unifiedDashboard"),a="".concat(t,r?"#speed":"#googlesitekit-pagespeed-header"),i=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"),a);return e.createElement("p",{dangerouslySetInnerHTML:Object(c.t)(i,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})})}}).call(this,r(3))},71:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return a}));var n=r(115),a=r.n(n)()(e)}).call(this,r(18))},72:function(e,t,r){"use strict";(function(e){r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return A})),r.d(t,"b",(function(){return R})),r.d(t,"a",(function(){return k}));var n=r(12),a=r.n(n),i=r(28),o=r.n(i),c=r(6),s=r.n(c),l=r(17),u=r.n(l),d=r(26),g=r(67),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,a=r.formatDecimal;try{return n()}catch(e){return a()}},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),a=Math.floor(e%60);return{hours:r,minutes:n,seconds:a,formatUnit:function(){var i=t.unitDisplay,o=b(b({unitDisplay:void 0===i?"short":i},u()(t,["unitDisplay"])),{},{style:"unit"});return 0===e?A(a,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"),a?A(a,b(b({},o),{},{unit:"second"})):"",n?A(n,b(b({},o),{},{unit:"minute"})):"",r?A(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"),a);if(0===e)return t;var i=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"),a?t:"",n?i:"",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"),A(_(e),e%10==0?{}:t)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(p.__)("%sK","google-site-kit"),A(_(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(p.__)("%sK","google-site-kit"),A(_(e),e%10==0?{}:t)):A(e,{signDisplay:"never",maximumFractionDigits:1})},y=function(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={};if("%"===t)r={style:"percent",maximumFractionDigits:2};else{if("s"===t)return v(e,{unitDisplay:"narrow"});t&&"string"==typeof t?r={style:"currency",currency:t}:Object(d.isPlainObject)(t)&&(r=b({},t))}var n=r,a=n.style,i=void 0===a?"metric":a;return"metric"===i?O(e):"duration"===i?v(e,t):A(e,r)},E=f()(console.warn),A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?k():r,i=u()(t,["locale"]);try{return new Intl.NumberFormat(n,i).format(e)}catch(t){E("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(i)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},s=["signDisplay","compactDisplay"],l={},d=0,g=Object.entries(i);d<g.length;d++){var f=a()(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)}},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?k():r,a=t.style,i=void 0===a?"long":a,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var s=new Intl.ListFormat(n,{style:i,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)},k=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(18))},75:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i}));var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},a=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()};function i(e){return e.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join("")}},773:function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return DashboardPageSpeed}));var a=r(5),i=r.n(a),o=r(14),c=r.n(o),s=r(6),l=r.n(s),u=r(12),d=r.n(u),g=r(7),f=r.n(g),p=r(282),m=r.n(p),b=r(327),v=r.n(b),h=r(342),_=r(98),O=r(2),y=r(1),E=r(33),A=r.n(E),R=r(4),k=r.n(R),j=r(8),S=r(23),w=r(774),D=r(63),N=r(22),P=r(777),I=r(778),T=r(779),L=r(782),C=r(30),M=r(15),x=r(42),H=r(100),F=r(47),U=r(49),B=r(106),z=r(101),q=k.a.useSelect,V=k.a.useDispatch,Y=k.a.useInViewSelect;function DashboardPageSpeed(){var t=Object(O.useRef)(),r=Object(O.useState)(!1),a=d()(r,2),o=a[0],s=a[1],u=Object(O.useContext)(S.b),g=q((function(e){return e(M.c).getCurrentReferenceURL()})),p=q((function(e){return e(x.b).getValue(H.g)}))||H.e,b=q((function(e){return e(x.b).getValue(H.f)}))||H.b,E=q((function(e){var t=e(H.c);return{isFetchingMobile:!t.hasFinishedResolution("getReport",[g,H.e]),errorMobile:t.getErrorForSelector("getReport",[g,H.e]),isFetchingDesktop:!t.hasFinishedResolution("getReport",[g,H.d]),errorDesktop:t.getErrorForSelector("getReport",[g,H.d])}})),R=E.isFetchingMobile,k=E.isFetchingDesktop,W=E.errorMobile,G=E.errorDesktop,K=Y((function(e){return e(H.c).getReport(g,H.e)})),$=Y((function(e){return e(H.c).getReport(g,H.d)})),J=V(x.b).setValues,Z=V(H.c).invalidateResolution,X=Object(O.useCallback)((function(){return J(l()({},H.g,H.e))}),[J]),Q=Object(O.useCallback)((function(){return J(l()({},H.g,H.d))}),[J]),ee=Object(O.useCallback)((function(){return J(l()({},H.f,H.a))}),[J]),te=Object(O.useCallback)((function(){return J(l()({},H.f,H.b))}),[J]),re=Object(h.a)(t,{threshold:.25}),ne=!!(null==re?void 0:re.intersectionRatio),ae=p===H.e?R:k;Object(O.useEffect)((function(){ne&&!o&&(Object(C.b)("".concat(u,"_pagespeed-widget"),"widget_view"),Object(C.b)("".concat(u,"_pagespeed-widget"),"default_tab_view",b.replace("data_","")),s(!0))}),[ne,b,u,o]);var ie=Object(O.useCallback)((function(e){var t;0===e?(te(),t="lab"):(ee(),t="field"),Object(C.b)("".concat(u,"_pagespeed-widget"),"tab_select",t)}),[ee,te,u]),oe=Object(O.useCallback)((function(e){e.slug===H.d?Q():X()}),[Q,X]),ce=Object(O.useCallback)(function(){var e=c()(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,A.a.invalidateCache("modules","pagespeed-insights","pagespeed");case 3:Z("getReport",[g,H.d]),Z("getReport",[g,H.e]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[Z,g]),se=Object(F.a)("unifiedDashboard"),le=Object(U.e)();Object(_.a)((function(){se||"#googlesitekit-pagespeed-header"!==e.location.hash||setTimeout((function(){e.scrollTo({top:Object(B.a)(e.location.hash,le),behavior:"smooth"})}),10)}));var ue=p===H.e?K:$,de=p===H.e?W:G;return Object(O.useEffect)((function(){var e,t;(null==K||null===(e=K.loadingExperience)||void 0===e?void 0:e.metrics)&&(null==$||null===(t=$.loadingExperience)||void 0===t?void 0:t.metrics)&&ee()}),[K,$,ee]),!g||ae&&!ue||!b?n.createElement(j.b,{id:"googlesitekit-pagespeed-header"},n.createElement(j.l,null,n.createElement(j.a,{size:12},n.createElement(D.a,null),n.createElement("p",{className:"googlesitekit-text-align-center"},Object(y.__)("PageSpeed Insights is preparing data…","google-site-kit"))))):n.createElement(O.Fragment,null,n.createE
/* 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))},8:function(e,t,r){"use strict";var n=r(87),a=r.n(n);r.d(t,"n",(function(){return a.a})),r.d(t,"c",(function(){return n.HelperText})),r.d(t,"d",(function(){return n.Input}));var i=r(190);r.d(t,"i",(function(){return i.a}));var o=r(242);r.d(t,"f",(function(){return o.a}));var c=r(243);r.d(t,"h",(function(){return c.a}));var s=r(107),l=r.n(s);r.d(t,"m",(function(){return l.a})),r.d(t,"k",(function(){return s.Option}));var u=r(244);r.d(t,"j",(function(){return u.a}));var d=r(241);r.d(t,"e",(function(){return d.a}));var g=r(240);r.d(t,"g",(function(){return g.a}));var f=r(89);r.d(t,"a",(function(){return f.a})),r.d(t,"b",(function(){return f.b})),r.d(t,"l",(function(){return f.c}))},80:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var n=r(12),a=r.n(n),i=r(1);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,r=null,n=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),a=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(n&&a)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),r=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===r)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var s=document.createElement("span");return s.setAttribute("class","screen-reader-text"),s.textContent=Object(i.sprintf)(
/* translators: %d is the number of notifications */
Object(i._n)("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(c),o.appendChild(s),t&&null===n&&t.appendChild(o),r&&null===a&&r.appendChild(o),o},l=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},u=function(e){for(var t=location.search.substr(1).split("&"),r={},n=0;n<t.length;n++)r[t[n].split("=")[0]]=decodeURIComponent(t[n].split("=")[1]);return e?r.hasOwnProperty(e)?decodeURIComponent(r[e].replace(/\+/g," ")):"":r},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(t.href);if(e)return r.searchParams&&r.searchParams.get?r.searchParams.get(e):u(e);var n,i={},c=o(r.searchParams.entries());try{for(c.s();!(n=c.n()).done;){var s=a()(n.value,2),l=s[0],d=s[1];i[l]=d}}catch(e){c.e(e)}finally{c.f()}return i}}).call(this,r(18))},82:function(e,t,r){"use strict";(function(e){r(45),r(46)}).call(this,r(18))},83:function(e,t,r){"use strict";(function(e){r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return c}));var n=r(189),a=r(60),i=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isNaN(Number(t)))return"";var i=r.invertColor,o=void 0!==i&&i;return Object(n.a)(e.createElement(a.a,{direction:t>0?"up":"down",invertColor:o}))},o=function(e){var t,r,n,a,i,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===(a=e[0])||void 0===a||null===(i=a.data)||void 0===i||null===(o=i.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.totals)||void 0===f||null===(p=f[0])||void 0===p||null===(m=p.values)||void 0===m?void 0:m[0])},c=function(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}}).call(this,r(3))},84:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(6),a=r.n(n),i=r(85),o=r(86);function c(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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l={currentUserRoles:[],activeModules:[],trackingEnabled:!1,trackingID:"",referenceSiteURL:"",userIDHash:""};function u(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,a=s(s({},l),t);a.referenceSiteURL&&(a.referenceSiteURL=a.referenceSiteURL.toString().replace(/\/+$/,""));var c=Object(i.a)(a,r);return{enableTracking:function(){a.trackingEnabled=!0},disableTracking:function(){a.trackingEnabled=!1},initializeSnippet:c,isTrackingEnabled:function(){return!!a.trackingEnabled},trackEvent:Object(o.a)(a,r,c,n)}}}).call(this,r(18))},85:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return i}));var n=r(50),a=r(27);function i(t,r){var i,o=Object(n.a)(r);return function(){var r=e.document;if(void 0===i&&(i=!!r.querySelector("script[".concat(a.b,"]"))),!i){var n=r.createElement("script");n.setAttribute(a.b,""),n.async=!0,n.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(a.a),r.head.appendChild(n),o("js",new Date),o("config",t.trackingID,{send_page_view:t.isSiteKitScreen}),i=!0}}}}).call(this,r(18))},86:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return f}));var n=r(5),a=r.n(n),i=r(6),o=r.n(i),c=r(14),s=r.n(c),l=r(50),u=r(29);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=
/* translators: %s: Error message */
Object(o.__)("Error: %s","google-site-kit"),r);n&&Object(i.a)(n)&&(a=a+" "+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.t)(a,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}))}ErrorText.propTypes={message:a.a.string.isRequired,reconnectURL:a.a.string},ErrorText.defaultProps={reconnectURL:""},t.a=ErrorText}).call(this,r(3))},91:function(e,t,r){"use strict";var n=r(2),a=r(29),i=Object(n.createContext)(a.a);t.a=i}},[[1073,1,0]]]);