14 lines
31 KiB
JavaScript
14 lines
31 KiB
JavaScript
|
|
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[4],{1:function(t,n){t.exports=googlesitekit.i18n},12:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"h",(function(){return o})),e.d(n,"i",(function(){return u})),e.d(n,"f",(function(){return c})),e.d(n,"g",(function(){return s})),e.d(n,"e",(function(){return l})),e.d(n,"d",(function(){return f}));var r="core/user",i="connected_url_mismatch",a="googlesitekit_authenticate",o="googlesitekit_setup",u="googlesitekit_view_dashboard",c="googlesitekit_manage_options",s="googlesitekit_read_shared_module_data",l="googlesitekit_manage_module_sharing_options",f="googlesitekit_delegate_module_sharing_management"},243:function(t,n,e){"use strict";(function(t){var r=e(59),i=e.n(r),a=e(244),o=t._googlesitekitAPIFetchData||{},u=o.nonce,c=o.nonceEndpoint,s=o.preloadedData,l=o.rootURL;i.a.nonceEndpoint=c,i.a.nonceMiddleware=i.a.createNonceMiddleware(u),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(l),i.a.preloadingMiddleware=Object(a.a)(s),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),n.default=i.a}).call(this,e(22))},244:function(t,n,e){"use strict";var r=e(213);n.a=function(t){var n=Object.keys(t).reduce((function(n,e){return n[Object(r.getStablePath)(e)]=t[e],n}),{}),e=!1;return function(t,i){if(e)return i(t);setTimeout((function(){e=!0}),1e3);var a=t.parse,o=void 0===a||a,u=t.path;if("string"==typeof t.path){var c,s=(null===(c=t.method)||void 0===c?void 0:c.toUpperCase())||"GET",l=Object(r.getStablePath)(u);if(o&&"GET"===s&&n[l]){var f=Promise.resolve(n[l].body);return delete n[l],f}if("OPTIONS"===s&&n[s]&&n[s][l]){var d=Promise.resolve(n[s][l]);return delete n[s][l],d}}return i(t)}}},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return i}));var r="_googlesitekitDataLayer",i="data-googlesitekit-gtag"},32:function(t,n,e){"use strict";(function(t){e.d(n,"a",(function(){return y})),e.d(n,"b",(function(){return m}));var r=e(86),i=t._googlesitekitTrackingData||{},a=i.activeModules,o=void 0===a?[]:a,u=i.isSiteKitScreen,c=i.trackingEnabled,s=i.trackingID,l=i.referenceSiteURL,f=i.userIDHash,d=i.isAuthenticated,v={activeModules:o,trackingEnabled:c,trackingID:s,referenceSiteURL:l,userIDHash:f,isSiteKitScreen:u,userRoles:i.userRoles,isAuthenticated:d,pluginVersion:"1.89.0"},g=Object(r.a)(v),p=g.enableTracking,b=g.disableTracking,h=(g.isTrackingEnabled,g.initializeSnippet),m=g.trackEvent;function y(t){t?p():b()}u&&c&&h()}).call(this,e(22))},36:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"e",(function(){return i})),e.d(n,"d",(function(){return a})),e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return u})),e.d(n,"f",(function(){return c}));var r="Date param must construct to a valid date instance or be a valid date instance itself.",i="Invalid dateString parameter, it must be a string.",a='Invalid date range, it must be a string with the format "last-x-days".',o=3600,u=86400,c=604800},37:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var r=function(t){return t instanceof Date&&!isNaN(t)}},38:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));var r=e(14),i=e.n(r),a=e(7),o=e.n(a),u=e(36),c=e(43),s=function(t){o()(Object(c.a)(t),u.e);var n=t.split("-"),e=i()(n,3),r=e[0],a=e[1],s=e[2];return new Date(r,a-1,s)}},42:function(t,n,e){"use strict";(function(t){var r,i;e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return o}));var a=new Set((null===(r=t)||void 0===r||null===(i=r._googlesitekitBaseData)||void 0===i?void 0:i.enabledFeatures)||[]),o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return n instanceof Set&&n.has(t)}}).call(this,e(22))},43:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(37),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n="string"==typeof t;if(!n)return!1;var e=t.split("-");return 3=
|
||
|
|
/* translators: %s: number of days */
|
||
|
|
Object(d._n)("Last %s day","Last %s days",t,"google-site-kit"),t)};return{"last-7-days":{slug:"last-7-days",label:t(7),days:7},"last-14-days":{slug:"last-14-days",label:t(14),days:14},"last-28-days":{slug:"last-28-days",label:t(28),days:28},"last-90-days":{slug:"last-90-days",label:t(90),days:90}}}},73:function(t,n,e){"use strict";(function(t){e.d(n,"c",(function(){return O})),e.d(n,"d",(function(){return k})),e.d(n,"b",(function(){return _})),e.d(n,"a",(function(){return x}));var r=e(14),i=e.n(r),a=e(30),o=e.n(a),u=e(6),c=e.n(u),s=e(21),l=e.n(s),f=e(26),d=e(71),v=e.n(d),g=e(1);function p(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function b(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?p(Object(e),!0).forEach((function(n){c()(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var h=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=m(t,n),r=e.formatUnit,i=e.formatDecimal;try{return r()}catch(t){return i()}},m=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=parseInt(t,10),Number.isNaN(t)&&(t=0);var e=Math.floor(t/60/60),r=Math.floor(t/60%60),i=Math.floor(t%60);return{hours:e,minutes:r,seconds:i,formatUnit:function(){var a=n.unitDisplay,o=b(b({unitDisplay:void 0===a?"short":a},l()(n,["unitDisplay"])),{},{style:"unit"});return 0===t?k(i,b(b({},o),{},{unit:"second"})):Object(g.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(g._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?k(i,b(b({},o),{},{unit:"second"})):"",r?k(r,b(b({},o),{},{unit:"minute"})):"",e?k(e,b(b({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var n=Object(g.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
|
||
|
|
Object(g.__)("%ds","google-site-kit"),i);if(0===t)return n;var a=Object(g.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
|
||
|
|
Object(g.__)("%dm","google-site-kit"),r),o=Object(g.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
|
||
|
|
Object(g.__)("%dh","google-site-kit"),e);return Object(g.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(g._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?n:"",r?a:"",e?o:"").trim()}}},y=function(t){return 1e6<=t?Math.round(t/1e5)/10:1e4<=t?Math.round(t/1e3):1e3<=t?Math.round(t/100)/10:t},w=function(t){var n={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in millions.
|
||
|
|
Object(g.__)("%sM","google-site-kit"),k(y(t),t%10==0?{}:n)):1e4<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(g.__)("%sK","google-site-kit"),k(y(t))):1e3<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(g.__)("%sK","google-site-kit"),k(y(t),t%10==0?{}:n)):k(t,{signDisplay:"never",maximumFractionDigits:1})},O=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(f.isFinite)(t)?t:Number(t),Object(f.isFinite)(t)||(console.warn("Invalid number",t,o()(t)),t=0);var e={};if("%"===n)e={style:"percent",maximumFractionDigits:2};else{if("s"===n)return h(t,{unitDisplay:"narrow"});n&&"string"==typeof n?e={style:"currency",currency:n}:Object(f.isPlainObject)(n)&&(e=b({},n))}var r=e,i=r.style,a=void 0===i?"metric":i;return"metric"===a?w(t):"duration"===a?h(t,n):k(t,e)},j=v()(console.warn),k=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.locale,r=void 0===e?x():e,a=l()(n,["locale"]);try{return new Intl.NumberFormat(r,a).format(t)}catch(n){j("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(r),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(t)," )"),n.message)}for(var u={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},c=["signDisplay","compactDisplay"],s={},f=0,d=Object.entries(a);f<d.length;f++){var v=i()(d[f],2),g=v[0],p=v[1];u[g]&&p===u[g]||(c.includes(g)||(s[g]=p))}try{return new Intl.NumberFormat(r,s).format(t)}catch(n){return new Intl.NumberFormat(r).format(t)}},_=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.locale,r=void 0===e?x():e,i=n.style,a=void 0===i?"long":i,o=n.type,u=void 0===o?"conjunction":o;if(Intl.ListFormat){var c=new Intl.ListFormat(r,{style:a,type:u});return c.format(t)}
|
||
|
|
/* translators: used between list items, there is a space after the comma. */var s=Object(g.__)(", ","google-site-kit");return t.join(s)},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,e=Object(f.get)(n,["_googlesitekitLegacyData","locale"]);if(e){var r=e.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return n.navigator.language}}).call(this,e(22))},755:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));var r=e(5),i=e.n(r),a=e(16),o=e.n(a),u=e(8),c=["fetch_error"];function s(t){return l.apply(this,arguments)}function l(){return(l=o()(i.a.mark((function t(n){var e,r,a,o,s,l,f,d;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.method,o=n.type,s=n.identifier,l=n.datapoint,(f=n.error)&&!c.includes(null==f?void 0:f.code)){t.next=3;break}return t.abrupt("return");case 3:return d="code: ".concat(f.code),(null===(e=f.data)||void 0===e?void 0:e.reason)&&(d+=", reason: ".concat(f.data.reason)),t.next=7,Object(u.z)("api_error","".concat(a,":").concat(o,"/").concat(s,"/data/").concat(l),"".concat(f.message," (").concat(d,")"),(null===(r=f.data)||void 0===r?void 0:r.status)||f.code);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},78:function(t,n,e){"use strict";(function(t){e.d(n,"a",(function(){return i}));var r=e(124),i=e.n(r)()(t)}).call(this,e(22))},8:function(t,n,e){"use strict";e.d(n,"z",(function(){return u.b})),e.d(n,"w",(function(){return c.a})),e.d(n,"A",(function(){return c.b})),e.d(n,"y",(function(){return v})),e.d(n,"f",(function(){return g.a})),e.d(n,"m",(function(){return g.b})),e.d(n,"u",(function(){return p.c})),e.d(n,"v",(function(){return p.d})),e.d(n,"r",(function(){return p.b})),e.d(n,"l",(function(){return p.a})),e.d(n,"s",(function(){return y})),e.d(n,"g",(function(){return w})),e.d(n,"b",(function(){return O.b})),e.d(n,"a",(function(){return O.a})),e.d(n,"c",(function(){return O.e})),e.d(n,"i",(function(){return O.f})),e.d(n,"x",(function(){return O.k})),e.d(n,"j",(function(){return j.b})),e.d(n,"q",(function(){return j.c})),e.d(n,"e",(function(){return j.a})),e.d(n,"o",(function(){return k.b})),e.d(n,"k",(function(){return k.a})),e.d(n,"t",(function(){return k.d})),e.d(n,"p",(function(){return _})),e.d(n,"n",(function(){return x})),e.d(n,"d",(function(){return S})),e.d(n,"B",(function(){return D})),e.d(n,"h",(function(){return E}));var r=e(123),i=e.n(r),a=e(118),o=e.n(a),u=e(32),c=e(63),s=e(30),l=e.n(s),f=e(81),d=e.n(f),v=function(t){return d()(JSON.stringify(function t(n){var e={};return Object.keys(n).sort().forEach((function(r){var i=n[r];i&&"object"===l()(i)&&!Array.isArray(i)&&(i=t(i)),e[r]=i})),e}(t)))};var g=e(83),p=(e(84),e(73));function b(t){return t.replace(/\[([^\]]+)\]\((https?:\/\/[^\/]+\.\w+\/?.*?)\)/gi,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function h(t){return"<p>".concat(t.replace(/\n{2,}/g,"</p><p>"),"</p>")}function m(t){return t.replace(/\n/gi,"<br>")}function y(t){for(var n=t,e=0,r=[b,h,m];e<r.length;e++){n=(0,r[e])(n)}return n}var w=function(t){return t=parseFloat(t),isNaN(t)||0===t?[0,0,0,0]:[Math.floor(t/60/60),Math.floor(t/60%60),Math.floor(t%60),Math.floor(1e3*t)-1e3*Math.floor(t)]},O=e(68),j=e(85),k=e(51);function _(t){if("number"==typeof t)return!0;var n=(t||"").toString();return!!n&&!isNaN(n)}var x=function(t){switch(t){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},S=function(t,n){if("0"===t||0===t||isNaN(t))return null;var e=(n-t)/t;return isNaN(e)||!i()(e)?null:e},D=function(t){try{return JSON.parse(t)&&!!t}catch(t){return!1}},E=function(t){if(!t)return"";var n=t.replace(/&#(\d+);/g,(function(t,n){return String.fromCharCode(n)})).replace(/(\\)/g,"");return o()(n)}},83:function(t,n,e){"use strict";(function(t){e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return s}));var r=e(14),i=e.n(r);function a(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("stri
|