42 lines
248 KiB
JavaScript
42 lines
248 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[290,551,998],{80:(e,t,i)=>{i.d(t,{CV:()=>w,Cu:()=>b,K9:()=>n,Kr:()=>m,Lf:()=>h,Oh:()=>r,PW:()=>N,Rx:()=>T,S9:()=>f,TQ:()=>g,Vt:()=>I,Wl:()=>_,ZC:()=>s,ZY:()=>a,_p:()=>E,ag:()=>p,aj:()=>u,bz:()=>M,dq:()=>C,f2:()=>c,fB:()=>A,fV:()=>S,iB:()=>d,kc:()=>l,mo:()=>v,nc:()=>j,rm:()=>x,to:()=>o,wo:()=>k,yn:()=>y});const n="modules/analytics-4",s="account_create",o="property_create",r="webdatastream_create",a="analyticsSetup",l=10,c=0,d="https://www.googleapis.com/auth/tagmanager.readonly",g="enhanced-measurement-form",u="enhanced-measurement-enabled",h="enhanced-measurement-should-dismiss-activation-banner",p="analyticsAccountCreate",m="analyticsCustomDimensionsCreate",f="https://www.googleapis.com/auth/analytics.edit",k="dashboardAllTrafficWidgetDimensionName",v="dashboardAllTrafficWidgetDimensionColor",y="dashboardAllTrafficWidgetDimensionValue",_="dashboardAllTrafficWidgetActiveRowIndex",x="dashboardAllTrafficWidgetLoaded",b={googlesitekit_post_date:{parameterName:"googlesitekit_post_date",displayName:"WordPress Post Date",description:"Created by Site Kit: Date when a post was published",scope:"EVENT"},googlesitekit_post_author:{parameterName:"googlesitekit_post_author",displayName:"WordPress Post Author",description:"Created by Site Kit: WordPress name of the post author",scope:"EVENT"},googlesitekit_post_categories:{parameterName:"googlesitekit_post_categories",displayName:"WordPress Post Categories",description:"Created by Site Kit: Names of categories assigned to a post",scope:"EVENT"},googlesitekit_post_type:{parameterName:"googlesitekit_post_type",displayName:"WordPress Post Type",description:"Created by Site Kit: Content type of a post",scope:"EVENT"}},j={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},S=[j.CONTACT,j.GENERATE_LEAD,j.SUBMIT_LEAD_FORM],A={"new-visitors":{description:"People who visited the site for the first time",displayName:"New visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"new"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:new_visitors"}}}}]}}]}}}}]},"returning-visitors":{description:"People who have visited your site at least once before",displayName:"Returning visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"returning"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:returning_visitors"}}}}]}}]}}}}]}},N="audiencePermissionsSetup",w="audienceTileCustomDimensionCreate",M="audience-selection-panel-expirable-new-badge-",C="audience",I="customDimension",E="property",T=[C,I,E]},4124:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(20697),s=i(62659);function o(){const e=(0,s.A)();return n.Nn.includes(e)}},4169:(e,t,i)=>{i.d(t,{N$:()=>s,aO:()=>o,qB:()=>n});const n={BOXES:"boxes",COMPOSITE:"composite"},s={QUARTER:"quarter",HALF:"half",FULL:"full"},o="core/widgets"},4751:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(62688),s=i.n(n),o=i(4452),r=i.n(o),a=i(97513),l=i(62540);function PreviewBlock({className:e,width:t,height:i,shape:n,padding:s,smallWidth:o,smallHeight:c,tabletWidth:d,tabletHeight:g,desktopWidth:u,desktopHeight:h}){const p=(0,a.dv)(),m={width:{[a.mp]:o,[a.Lg]:d,[a.Fo]:u,[a.Qb]:u},height:{[a.mp]:c,[a.Lg]:g,[a.Fo]:h,[a.Qb]:u}};return(0,l.jsx)("div",{className:r()("googlesitekit-preview-block",e,{"googlesitekit-pr
|
|||
|
|
(0,c.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:m.createElement(d.A,{key:"link",href:t,external:n,onClick:k})}))}SourceLink.propTypes={name:s().string,href:s().string,className:s().string,external:s().bool};const f=SourceLink},44436:(e,t,i)=>{i.d(t,{A:()=>g});var n,s=i(82871),o=i(88933),r=i(63696);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const l=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 80 21"},e),n||(n=r.createElement("path",{fill:"#5F6368",d:"M62.09 1.664h3.038v.1L58.34 9.593l7.241 10.224v.1H62.7L56.755 11.4 53.95 14.64v5.278h-2.351V1.664h2.35v9.415h.1zM69.985 3.117c0 .454-.167.853-.488 1.175-.322.322-.71.488-1.176.488-.455 0-.854-.166-1.175-.488a1.6 1.6 0 0 1-.488-1.175c0-.466.166-.854.488-1.176s.71-.488 1.175-.488c.455 0 .854.166 1.176.488.332.333.487.72.487 1.176m-.477 4.313v12.498h-2.351V7.43zM77.016 20.128c-1.02 0-1.864-.31-2.54-.943q-1.014-.948-1.031-2.628V9.57h-2.196V7.43h2.196V3.603h2.35V7.43h3.061v2.14h-3.06v6.222c0 .831.166 1.397.488 1.696.321.3.687.444 1.097.444.189 0 .366-.022.555-.067.188-.044.344-.1.499-.166l.743 2.096c-.632.222-1.342.333-2.162.333M2.673 18.952C1.375 18.009.488 16.678 0 14.97l2.883-1.176c.289 1.076.799 1.94 1.542 2.628.732.677 1.619 1.02 2.65 1.02.965 0 1.774-.244 2.45-.742.677-.5 1.01-1.187 1.01-2.052 0-.798-.3-1.453-.887-1.974q-.883-.781-3.094-1.564l-1.22-.432Q3.371 9.997 2.04 8.716C1.153 7.862.71 6.742.71 5.346c0-.966.266-1.853.787-2.673S2.75 1.209 3.693.72C4.624.244 5.678 0 6.864 0c1.708 0 3.072.41 4.081 1.242 1.02.832 1.697 1.752 2.04 2.795L10.236 5.2c-.2-.621-.576-1.164-1.142-1.63-.565-.477-1.286-.71-2.173-.71s-1.641.222-2.251.676-.91 1.032-.91 1.742c0 .676.278 1.22.82 1.663.544.432 1.398.854 2.563 1.253l1.22.41c1.674.577 2.96 1.342 3.88 2.274.921.931 1.376 2.184 1.376 3.748 0 1.275-.322 2.34-.976 3.193a6 6 0 0 1-2.495 1.919 8 8 0 0 1-3.116.621c-1.62 0-3.072-.466-4.358-1.408M15.969 3.449a1.95 1.95 0 0 1-.588-1.43c0-.566.2-1.043.588-1.431A1.95 1.95 0 0 1 17.399 0c.566 0 1.043.2 1.43.588.389.388.588.865.588 1.43 0 .566-.2 1.043-.587 1.43a1.95 1.95 0 0 1-1.43.589c-.566-.012-1.043-.2-1.431-.588m-.067 2.595h2.994v13.883h-2.994zM25.406 19.85c-.544-.2-.987-.466-1.331-.788-.776-.776-1.176-1.84-1.176-3.182V8.683h-2.428v-2.64h2.428V2.13h2.994v3.926h3.372v2.639h-3.372v6.531c0 .743.145 1.276.433 1.575.277.366.743.543 1.42.543.31 0 .576-.044.82-.122q.35-.116.765-.399v2.917c-.599.277-1.32.41-2.173.41a5 5 0 0 1-1.753-.3M33.623 19.407a6.63 6.63 0 0 1-2.529-2.628c-.61-1.12-.909-2.373-.909-3.77 0-1.332.3-2.551.887-3.693.588-1.132 1.409-2.04 2.462-2.706s2.251-1.01 3.593-1.01c1.397 0 2.606.311 3.637.921a6.1 6.1 0 0 1 2.34 2.528c.532 1.076.799 2.274.799 3.627 0 .255-.023.576-.078.953H33.179c.111 1.287.566 2.285 1.375 2.983a4.16 4.16 0 0 0 2.817 1.043c.854 0 1.597-.189 2.218-.588a4.27 4.27 0 0 0 1.508-1.597l2.528 1.198q-.981 1.713-2.561 2.694c-1.054.655-2.318.976-3.782.976q-2.046.033-3.66-.931m7.23-8.051a3.3 3.3 0 0 0-.466-1.453c-.277-.477-.687-.887-1.242-1.208-.554-.322-1.23-.488-2.03-.488-.964 0-1.773.288-2.439.853-.665.566-1.12 1.342-1.375 2.296z"})));var c=i(55989),d=i(62540);const g=function Logo(){return(0,d.jsxs)("div",{className:"googlesitekit-logo","aria-hidden":"true",children:[(0,d.jsx)(o.A,{className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),(0,d.jsx)(l,{className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),(0,d.jsx)(c.A,{children:(0,s.__)("Site Kit by Google Logo","google-site-kit")})]})}},45257:(e,t,i)=>{i.d(t,{A:()=>LoadingWrapper});var n=i(62688),s=i.n(n),o=i(4751),r=i(62540);function LoadingWrapper({loading:e,children:t,...i}){return e?(0,r.jsx)(o.A,{...i}):t}LoadingWrapper.propTypes={loading:s().bool,children:s().node,...o.A.propTypes}},46467:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,s,o,r=i(63696);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=argumen
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),s?h(s,{...l,unit:"second"}):"",n?h(n,{...l,unit:"minute"}):"",i?h(i,{...l,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%ds","google-site-kit"),s);if(0===e)return t;const o=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%dm","google-site-kit"),n),a=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%dh","google-site-kit"),i);return(0,r.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),s?t:"",n?o:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return n()}}function l(e){e=parseInt(e,10),Number.isNaN(e)&&(e=0);return{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}}function c(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e}function d(e){let t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:(0,n.isPlainObject)(e)&&(t={...e}),t}function g(e,t={}){e=(0,n.isFinite)(e)?e:Number(e),(0,n.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=d(t),{style:s="metric"}=i;return"metric"===s?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in millions.
|
|||
|
|
// translators: %s: an abbreviated number in millions.
|
|||
|
|
(0,r.__)("%sM","google-site-kit"),h(c(e),e%10==0?{}:t)):1e4<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
(0,r.__)("%sK","google-site-kit"),h(c(e))):1e3<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
(0,r.__)("%sK","google-site-kit"),h(c(e),e%10==0?{}:t)):h(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===s?a(e,i):"durationISO"===s?function(e){let{hours:t,minutes:i,seconds:n}=l(e);return n=("0"+n).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${n}`:`${t}:${i}:${n}`}(e):h(e,i)}const u=o()(console.warn);function h(e,t={}){const{locale:i=m(),...n}=t;try{return new Intl.NumberFormat(i,n).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(n)} ).format( ${typeof e} )`,t.message)}const s={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],r={};for(const[e,t]of Object.entries(n))s[e]&&t===s[e]||o.includes(e)||(r[e]=t);try{return new Intl.NumberFormat(i,r).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function p(e,t={}){const{locale:i=m(),style:n="long",type:s="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:n,type:s}).format(e)}
|
|||
|
|
/* translators: used between list items, there is a space after the comma. */const o=(0,r.__)(", ","google-site-kit");return e.join(o)}function m(e=i.g){const t=(0,n.get)(e,["_googlesitekitLegacyData","locale"]);if(t){const e=t.match(/^(\w{2})?(_)?(\w{2})/);if(e&&e[0])return e[0].replace(/_/g,"-")}return e.navigator.language}},49993:(e,t,i)=>{i.d(t,{Gq:()=>g,IL:()=>m,LD:()=>h,SO:()=>u,a2:()=>s,xD:()=>p});var n=i(13047);const s="googlesitekit_",o=`${s}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,r=["sessionStorage","localStorage"];let a,l=[...r];async function c(e){const t=i.g[e];if(!t)return!1;try{const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}async function d(){if(void 0!==a)return a;for(const e of l)a||await c(e)&&(a=i.g[e]);return void 0===a&&(a=null),a}async function g(e){const t=await d();if(t){const i=t.getItem(`${o}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:n,value:s,isError:o}=e;if(t&&(!n||Math.round(Date.now()/1e3)-t<n))return{cacheHit:!0,value:s,isError:o}}}return{cacheHit:!1,value:void 0}}async function u(e,t,{ttl:s=n.Jg,timestamp:r=Math.round(Date.now()/1e3),isError:a=!1}={}){const l=await d();if(l)try{return l.setItem(`${o}${e}`,JSON.stringify({timestamp:r,ttl:s,value:t,isError:a})),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function h(e){const t=await d();if(t)try{const i=e.startsWith(s)?e:`${o}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function p(){const e=await d();if(e)try{const t=[];for(let i=0;i<e.length;i++){const n=e.key(i);0===n.indexOf(s)&&t.push(n)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function m(){if(await d()){const e=await p();for(const t of e)await h(t);return!0}return!1}},50304:(e,t,i)=>{i.d(t,{A:()=>IconWrapper});var n=i(62688),s=i.n(n),o=i(62540);function IconWrapper({children:e,marginLeft:t,marginRight:i}){return(0,o.jsx)("span",{className:"googlesitekit-icon-wrapper",style:{marginLeft:t,marginRight:i},children:e})}IconWrapper.propTypes={children:s().node.isRequired,marginLeft:s().number,marginRight:s().number}},50477:(e,t,i)=>{i.d(t,{C:()=>o,p:()=>s});var n=i(55465);function s(e,t={}){return{__html:n.O.sanitize(e,t)}}function o(e){const t="object"==typeof e?e.toString():e;return t?.replace?.(/\/+$/,"")}},50539:e=>{e.exports=googlesitekit.data},51193:(e,t,i)=>{i.d(t,{Du:()=>h,GH:()=>l,Gp:()=>c,IS:()=>v,Jg:()=>g,N_:()=>_,O5:()=>y,Ql:()=>p,Qr:()=>m,XH:()=>k,r0:()=>d,sq:()=>f,tt:()=>u});var n=i(32091),s=i.n(n),o=i(17243),r=i(82871);const a="Date param must construct to a valid date instance or be a valid date instance itself.",l="Invalid dateString parameter, it must be a string.",c='Invalid date range, it must be a string with the format "last-x-days".',d=60,g=60*d,u=24*g,h=7*u;function p(){function e(e){return(0,r.sprintf)(/* translators: %s: number of days */ /* translators: %s: number of days */
|
|||
|
|
(0,r._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}}}function m(e=""){if(!(0,o.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,o.isDate)(t)&&!isNaN(t)}function f(e){s()((0,o.isDate)(e)&&!isNaN(e),a);const t=`${e.getMonth()+1}`,i=`${e.getDate()}`;return[e.getFullYear(),t.length<2?`0${t}`:t,i.length<2?`0${i}`:i].join("-")}function k(e){s()(m(e),l);const[t,i,n]=e.split("-");return new Date(t,i-1,n)}function v(e,t){return f(_(e,t*u))}function y(e){const t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function _(e,t){s()(m(e)||(0,o.isDate)(e)&&!isNaN(e),l);const i=m(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},52696:(e,t,i)=>{i.d(t,{WM:()=>n.WM,wA:()=>n.wA,ws:()=>n.ws});var n=i(49057);void 0===i.g.googlesitekit&&(i.g.googlesitekit={}),i.g.googlesitekit.data=n.Ay},52721:(e,t,i)=>{i.d(t,{w:()=>a});var n=i(35470),s=i(63696),o=i(85097);function r(){}function a(e,t){const i=(0,o.W)({sticky:!0}),a=(0,s.useRef)(),l=(0,s.useCallback)(e,t),c=(0,n.A)(i?l:r);return i&&(a.current=c),a.current}},52735:(e,t,i)=>{i.d(t,{A:()=>n});const n=(0,i(63696).createContext)(!1)},54419:e=>{e.exports=googlesitekit.api},55465:(e,t,i)=>{i.d(t,{O:()=>s});var n=i(31234);const s=i.n(n)()(i.g)},55989:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(62688),s=i.n(n),o=i(4452),r=i.n(o),a=i(62540);function VisuallyHidden({className:e,children:t,...i}){return t?(0,a.jsx)("span",{...i,className:r()("screen-reader-text",e),children:t}):null}VisuallyHidden.propTypes={className:s().string,children:s().node},VisuallyHidden.defaultProps={className:""};const l=VisuallyHidden},58718:(e,t,i)=>{i.d(t,{CX:()=>s,Py:()=>r,SM:()=>n,kj:()=>o});const n="adsense-connect-cta",s="adsense-connect-cta-tooltip-state",o="adsense-ga4-top-earnings-notice",r="adsense"},59121:(e,t,i)=>{var n=i(131),s=i(78325),o=i(49993),r=i(63081),a=i(50539),l=i(29785),c=i(97345),d=i(63696),g=i(51568),u=i(82286),h=i(82871),p=i(13047),m=i(75662),f=i(10740),k=i(88273),v=i(70301);const y="connect-analytics-setup-splash",_="analytics-setup-opt-in",x="shared_dashboard_splash";var b=i(22942),j=i(62659),S=i(82624),A=i(78307),N=i(88288),w=i(31675),M=i(30805),C=i(62540);function Header_Header(){const e=(0,M.i)("setupFlowRefresh"),t=(0,j.A)();return(0,C.jsx)(S.A,{subHeader:e?(0,C.jsx)(N.A,{}):null,children:e?(0,C.jsx)(w.A,{gaTrackingEventArgs:{category:t,label:"splash"}}):(0,C.jsx)(A.A,{})})}var I,E,T,R,D,L,z,O,P,q,B,F,H,U,G,V,W,Z,Y,$,Q,K,X,J=i(86751),ee=i(62688),te=i.n(ee),ie=i(13606),ne=i(49383),se=i(11999);function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},oe.apply(null,arguments)}const re=e=>d.createElement("svg",oe({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 378 196"},e),I||(I=d.createElement("g",{filter:"url(#analytics-setup-sidekick_svg__a)"},d.createElement("rect",{width:148,height:122,x:135,y:2,fill:"#fff",rx:3.976}))),E||(E=d.createElement("path",{fill:"#202124",d:"M147.754 25.902v-7.98h1.939l2.118 5.607h.089l2.118-5.606h1.95v7.98h-1.494v-3.935l.09-1.326h-.09l-2.028 5.26h-1.17l-2.04-5.26h-.089l.089 1.326v3.934zm12.456.179q-.892 0-1.583-.39a2.93 2.93 0 0 1-1.07-1.081 3.16 3.16 0 0 1-.379-1.55 3.1 3.1 0 0 1 .379-1.537q.39-.692 1.07-1.082.691-.4 1.583-.4.891 0 1.571.4a2.85 2.85 0 0 1 1.059 1.082q.39.68.39 1.537 0 .859-.39 1.55a2.85 2.85 0 0 1-1.059 1.08q-.68.39-1.571.39Zm0-1.36q.423 0 .769-.19a1.5 1.5 0 0 0 .568-.568q.223-.378.223-.903 0-.524-.223-.891a1.5 1.5 0 0 0-.568-.569 1.5 1.5 0 0 0-.769-.2 1.6 1.6 0 0 0-.781.2 1.6 1.6 0 0 0-.579.569q-.212.367-.212.891t.212.903q.223.368.579.569.369.189.781.189m6.244 1.36q-.735 0-1.259-.212a2.4 2.4 0 0 1-.836-.557 2.3 2.3 0 0 1-.479-.758l1.304-.569q.368.814 1.27.814.357
|
|||
|
|
(0,h.__)('<a href="%1$s">Click here</a> for more information, or to get more help, ask a question on our <a href="%2$s">support forum</a> and include the text of the original error message: %3$s',"google-site-kit"),s,"https://wordpress.org/support/plugin/google-site-kit/",`<br/>${e}`)}\n\t\t\t\t\t\t`,{ALLOWED_TAGS:["a","br"],ALLOWED_ATTR:["href"]})});case ue:return(0,C.jsx)(_e.A,{children:(0,ie.A)((0,h.__)("Looks like the AMP CDN is restricted in your region, which could interfere with setup on the Site Kit service. <GetHelpLink />","google-site-kit"),{GetHelpLink:(0,C.jsx)(GetHelpLink,{errorCode:e})})});case ve:return(0,C.jsx)(_e.A,{dangerouslySetInnerHTML:(0,de.p)(`\n\t\t\t\t\t\t${(0,h.__)("Looks like your site is having a technical issue with connecting to the Site Kit authentication service.","google-site-kit")}\n\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t${(0,h.sprintf)(/* translators: 1: Support Forum URL, 2: Error message */ /* translators: 1: Support Forum URL, 2: Error message */
|
|||
|
|
(0,h.__)('To get more help, ask a question on our <a href="%1$s">support forum</a> and include the text of the original error message: %2$s',"google-site-kit"),"https://wordpress.org/support/plugin/google-site-kit/",`<br/>${e}`)}\n\t\t\t\t\t\t`,{ALLOWED_TAGS:["a","br"],ALLOWED_ATTR:["href"]})})}}var be=i(54419);function je(e){const t=e.split(".");return(+t[0]<<24)+(+t[1]<<16)+(+t[2]<<8)+ +t[3]}function Se(e,t,i){return(je(e)&-1<<32-i)===je(t)}const Ae=/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/,Ne=/\.(example|invalid|localhost|test)$/,we=[{subnet:"10.0.0.0",mask:8},{subnet:"127.0.0.0",mask:8},{subnet:"172.16.0.0",mask:12},{subnet:"192.168.0.0",mask:16}];async function Me(){const{hostname:e,port:t}=i.g.location;if(t)throw fe;if(Ae.test(e)){for(const{mask:t,subnet:i}of we)if(Se(e,i,t))throw fe}else if(!e.includes(".")||e.match(Ne))throw fe}function Ce(e){return async()=>{if((await e.dispatch(l.O4).checkForSetupTag()).error)throw ke}}async function Ie(){const e=await(0,be.get)("core","site","health-checks",void 0,{useCache:!1}).catch(e=>{if("fetch_error"===e.code)throw pe;throw he});if(!e?.checks?.googleAPI?.pass)throw me;if(!e?.checks?.skService?.pass)throw ve}async function Ee(){if(!(await fetch("https://cdn.ampproject.org/v0.js").catch(()=>{throw ue})).ok)throw ue}function CompatibilityChecks({children:e,...t}){const i=(0,a.useRegistry)(),{complete:n,error:s}=function(e){const[t]=(0,d.useState)(e),[i,n]=(0,d.useState)(!t?.length),[s,o]=(0,d.useState)(void 0);return(0,ce.A)(()=>{i||async function(){try{for(const e of t)await e()}catch(e){o(e)}n(!0)}()}),{complete:i,error:s}}(function(e){return e.select(l.O4).isConnected()?[]:[Me,Ie,Ce(e),Ee]}(i)),o=s&&(0,C.jsxs)(f.xA,{className:"googlesitekit-setup-compat",alignLeft:!0,children:[(0,C.jsxs)("div",{className:"googlesitekit-setup__warning",children:[(0,C.jsx)(le.A,{}),(0,C.jsx)("div",{className:"googlesitekit-heading-4",children:(0,h.__)("Your site may not be ready for Site Kit","google-site-kit")})]}),(0,C.jsx)(CompatibilityErrorNotice,{error:s})]});return e({props:t,complete:n,error:s,inProgressFeedback:!n&&(0,C.jsxs)("div",{className:"googlesitekit-margin-left-1rem googlesitekit-align-self-center",children:[(0,C.jsx)("small",{children:(0,h.__)("Checking Compatibility…","google-site-kit")}),(0,C.jsx)(ne.ProgressBar,{small:!0,compress:!0})]}),ctaFeedback:o})}var Te,Re,De,Le,ze,Oe,Pe,qe,Be,Fe,He,Ue,Ge,Ve,We,Ze,Ye,$e,Qe,Ke,Xe,Je,et,tt,it,nt,st,ot,rt,at,lt,ct,dt,gt,ut,ht,pt,mt,ft,kt,vt,yt,_t,xt,bt,jt,St,At,Nt,wt,Mt,Ct;function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},It.apply(null,arguments)}CompatibilityChecks.propTypes={children:te().func.isRequired};const Et=e=>d.createElement("svg",It({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 570 336"},e),Te||(Te=d.createElement("path",{stroke:"#4285F4",strokeLinejoin:"round",strokeWidth:7,d:"M170.78 167.21c11.36-5.5 21.2 1.59 22.73 7"})),Re||(Re=d.createElement("ellipse",{cx:292.73,cy:307.44,fill:"#F1F3F4",rx:252.51,ry:10.01})),De||(De=d.createElement("path",{stroke:"#4285F4",strokeLinejoin:"round",strokeWidth:7,d:"M93.23 212.44c-6 6.78-17 9.12-25.62 8.24-14.77-1.52-23-11-28.38-24"})),Le||(Le=d.createElement("path",{stroke:"#1A73E8",strokeLinejoin:"round",strokeWidth:7,d:"M93.23 212.44a24.66 24.66 0 0 1-11.81 7"})),ze||(ze=d.createElement("path",{stroke:"#1967D2",strokeLinejoin:"round",strokeWidth:7,d:"M125.33 206.44 112.12 242a60 60 0 0 0 .12 42.15l11.09 21.34h-14.22M125.33 206.44l-9.55 25.67M146.34 216.44v89h13.23M125.33 206.44a72 72 0 0 0-5.25 13.5M146.34 216.44v7"})),Oe||(Oe=d.createElement("path",{fill:"#1A73E8",d:"M142.65 219.64a61.5 61.5 0 0 1-80.49-33l113.46-47.52a61.51 61.51 0 0 1-32.97 80.52"})),Pe||(Pe=d.createElement("path",{stroke:"#FFF",strokeMiterlimit:10,strokeWidth:5,d:"M146.93 202c7.74-4.34 12.25-12.92 12.66-22.39l-43.54 17.79"})),qe||(qe=d.createElement("path",{stroke:"#FBBC04",strokeLinejoin:"round",strokeWidth:7
|
|||
|
|
(0,h.__)("%1$s <Link>%2$s</Link>","google-site-kit"),s,(0,h.__)("Learn more","google-site-kit")),{Link:(0,C.jsx)(ge.A,{href:l,external:!0})})]}),r&&(0,C.jsx)(ge.A,{href:r,external:!0,children:(0,h.__)("Get help","google-site-kit")}),c.qv===o&&n!==a&&(0,C.jsxs)(_e.A,{children:[(0,h.sprintf)(/* translators: %s: Previous Connected Proxy URL */ /* translators: %s: Previous Connected Proxy URL */
|
|||
|
|
(0,h.__)("— Old URL: %s","google-site-kit"),n),(0,C.jsx)("br",{}),(0,h.sprintf)(/* translators: %s: Connected Proxy URL */ /* translators: %s: Connected Proxy URL */
|
|||
|
|
(0,h.__)("— New URL: %s","google-site-kit"),a)]}),t&&!e&&(0,C.jsx)(ActivateAnalyticsNotice,{}),(0,C.jsx)(CompatibilityChecks,{children:i})]})]})}LegacySplashContent.propTypes={analyticsModuleActive:te().bool,analyticsModuleAvailable:te().bool,children:te().func,connectedProxyURL:te().oneOfType([te().string,te().bool]),description:te().string,disconnectedReason:te().string,getHelpURL:te().string,homeURL:te().string,secondAdminLearnMoreLink:te().string,title:te().string.isRequired};var Zt=i(32885),Yt=i(5855),$t=i(4751),Qt=i(91013);const Kt=(0,d.lazy)(()=>i.e(314).then(i.bind(i,76314)));function SetupFlowSVG(){return(0,C.jsx)(d.Suspense,{fallback:(0,C.jsx)($t.A,{width:"100%",height:"100%"}),children:(0,C.jsx)(Qt.A,{errorMessage:(0,h.__)("Failed to load graphic","google-site-kit"),children:(0,C.jsx)(Kt,{})})})}var Xt;function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Jt.apply(null,arguments)}const ei=e=>d.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 595 466"},e),Xt||(Xt=d.createElement("path",{fill:"#D0FBE1",d:"M511.46 27.268C472.402-4.67 412.901-7.73 359.991 15.098s-65.962 61.86-116.047 127.747c-31.454 41.379-132.587 11.687-194.767 61.884-69.555 56.15-75.122 212.784 49.651 250.724 136.609 41.538 214.765-63.716 364.799-29.336 95.58 21.902 134.859-41.125 130.304-104.054-4.159-57.449-51.566-66.85-43.413-135.455 8.153-68.604 0-127.402-39.058-159.34"})));var ti=i(52696);function SplashContent({analyticsModuleActive:e,analyticsModuleAvailable:t,children:i,connectedProxyURL:n,description:s,disconnectedReason:o,getHelpURL:r,homeURL:a,secondAdminLearnMoreLink:g,showLearnMoreLink:u,title:p}){const{setValues:m}=(0,ti.wA)(se.s),k=(0,ae.A)(y,_),v=(0,d.useCallback)(e=>{m(y,{[_]:e.target.checked})},[m]),x=e?{smSize:4,mdSize:6,lgSize:6}:{smSize:4,mdSize:7,lgSize:6},b=(0,ti.WM)(e=>e(l.O4).getDocumentationLinkURL("setup-update-ga4-account"));return(0,C.jsxs)(f.fI,{className:"googlesitekit-setup__content",children:[(0,C.jsxs)(f.fh,{smSize:4,mdSize:8,lgSize:6,className:"googlesitekit-setup__icon",children:[(0,C.jsx)(ei,{className:"googlesitekit-setup__splash-graphic-background",width:"508",height:"466"}),(0,C.jsx)("div",{className:"googlesitekit-setup__splash-graphic-screenshot",children:(0,C.jsx)(SetupFlowSVG,{})})]}),(0,C.jsxs)(f.fh,{...x,children:[(0,C.jsx)(Wt.A,{as:"h1",className:"googlesitekit-setup__title",size:"medium",type:"headline",children:p}),(u||s)&&(0,C.jsxs)("p",{className:"googlesitekit-setup__description",children:[!u&&s,u&&(0,ie.A)((0,h.sprintf)(/* translators: 1: The description. 2: The learn more link. */ /* translators: 1: The description. 2: The learn more link. */
|
|||
|
|
(0,h.__)("%1$s <Link>%2$s</Link>","google-site-kit"),s,(0,h.__)("Learn more","google-site-kit")),{Link:(0,C.jsx)(ge.A,{href:g,external:!0})})]}),r&&(0,C.jsx)(ge.A,{href:r,external:!0,children:(0,h.__)("Get help","google-site-kit")}),c.qv===o&&n!==a&&(0,C.jsxs)(_e.A,{children:[(0,h.sprintf)(/* translators: %s: Previous Connected Proxy URL */ /* translators: %s: Previous Connected Proxy URL */
|
|||
|
|
(0,h.__)("— Old URL: %s","google-site-kit"),n),(0,C.jsx)("br",{}),(0,h.sprintf)(/* translators: %s: Connected Proxy URL */ /* translators: %s: Connected Proxy URL */
|
|||
|
|
(0,h.__)("— New URL: %s","google-site-kit"),a)]}),t&&!e&&(0,C.jsx)("div",{className:"googlesitekit-setup__analytics-opt-in-wrapper",children:(0,C.jsx)(Zt.A,{id:"googlesitekit-analytics-setup-opt-in",name:"googlesitekit-analytics-setup-opt-in",description:(0,ie.A)((0,h.__)("To get better insights about your site, Site Kit will update your Analytics account, for example by enabling enhanced measurement. <LearnMoreLink /> <RecommendedBadge />","google-site-kit"),{LearnMoreLink:(0,C.jsx)(ge.A,{href:b,external:!0,children:(0,h.__)("Learn more","google-site-kit")}),RecommendedBadge:(0,C.jsx)(Yt.A,{className:"googlesitekit-splash__analytics-recommended-badge",label:(0,h.__)("Recommended","google-site-kit")})}),checked:k,onChange:v,value:"1",children:(0,h.__)("Get visitor insights by connecting Google Analytics as part of setup","google-site-kit")})}),(0,C.jsx)(CompatibilityChecks,{children:i})]})]})}function Splash({children:e}){const t=(0,M.i)("setupFlowRefresh"),i=(0,a.useSelect)(e=>e(k.i).isModuleAvailable(b.L1)),n=(0,a.useSelect)(e=>e(k.i).isModuleActive(b.L1)),s=(0,a.useSelect)(e=>e(l.O4).hasConnectedAdmins()),o=(0,a.useSelect)(e=>e(l.O4).getReferenceSiteURL()),r=(0,a.useSelect)(e=>e(l.O4).getHomeURL()),d=(0,a.useSelect)(e=>e(l.O4).getDocumentationLinkURL("already-configured")),g=(0,a.useSelect)(e=>e(c.oR).getDisconnectedReason()),p=(0,a.useSelect)(e=>e(c.oR).getConnectedProxyURL()),m=(0,a.useSelect)(e=>e(l.O4).getDocumentationLinkURL("url-has-changed"));let v,y,_=!1,x=null;"revoked"===(0,u.d)(location.href,"googlesitekit_context")?(v=(0,h.sprintf)(/* translators: %s: is the site's hostname. (e.g. example.com) */ /* translators: %s: is the site's hostname. (e.g. example.com) */
|
|||
|
|
(0,h.__)("You revoked access to Site Kit for %s","google-site-kit"),J.Ay.toUnicode(new URL(o).hostname)),y=(0,h.__)('Site Kit will no longer have access to your account. If you’d like to reconnect Site Kit, click "Sign in with Google" below to generate new credentials.',"google-site-kit")):c.qv===g?(v=(0,h.__)("Reconnect Site Kit","google-site-kit"),y=(0,h.__)("Looks like the URL of your site has changed. In order to continue using Site Kit, you’ll need to reconnect, so that your plugin settings are updated with the new URL.","google-site-kit"),x=m):s?(v=(0,h.__)("Connect your Google account to Site Kit","google-site-kit"),y=(0,h.__)("Site Kit has already been configured by another admin of this site. To use Site Kit as well, sign in with your Google account which has access to Google services for this site (e.g. Google Analytics). Once you complete the 3 setup steps, you’ll see stats from all activated Google services.","google-site-kit"),_=!0):t?v=(0,h.__)("Let’s get started!","google-site-kit"):(v=(0,h.__)("Set up Site Kit","google-site-kit"),y=(0,h.__)("Get insights on how people find your site, as well as how to improve and monetize your site’s content, directly in your WordPress dashboard","google-site-kit"));const j=t?"googlesitekit-splash":"googlesitekit-setup__splash",S=t?SplashContent:LegacySplashContent,A={analyticsModuleActive:n,secondAdminLearnMoreLink:d,homeURL:r,analyticsModuleAvailable:i,disconnectedReason:g,title:v,description:y,getHelpURL:x,connectedProxyURL:p,showLearnMoreLink:_};return(0,C.jsx)("section",{className:j,children:(0,C.jsx)(f.xA,{children:(0,C.jsx)(S,{...A,children:e})})})}SplashContent.propTypes={analyticsModuleActive:te().bool,analyticsModuleAvailable:te().bool,children:te().func,connectedProxyURL:te().oneOfType([te().string,te().bool]),description:te().string,disconnectedReason:te().string,getHelpURL:te().string,homeURL:te().string,secondAdminLearnMoreLink:te().string,showLearnMoreLink:te().bool,title:te().string.isRequired};var ii=i(11974),ni=i(62779),si=i(21492);function Actions({proxySetupURL:e,onButtonClick:t,forwardableParams:i={},complete:n,inProgressFeedback:s,ctaFeedback:o}){const r=(0,M.i)("setupFlowRefresh"),u=(0,j.A)(),{dismissItem:m}=(0,a.useDispatch)(c.oR),{navigateTo:f}=(0,a.useDispatch)(v.M),k=(0,a.useSelect)(e=>e(l.O4).hasConnectedAdmins()),y=(0,a.useSelect)(e=>e(l.O4).hasMultipleAdmins()),_=(0,a.useSelect)(e=>!!e(c.oR).getViewableModules()?.length),b=(0,a.useSelect)(e=>e(l.O4).isResettable()),S=(0,a.useSelect)(e=>e(l.O4).getAdminURL("googlesitekit-dashboard",i)),A=(0,d.useCallback)(()=>{Promise.all([m(x),(0,p.sx)(u,r?"setup_flow_v3_skip_to_viewonly":"skip_setup_to_viewonly")]).finally(()=>{const e=r?(0,g.F)(S,{notification:i.notification||"initial_setup_success"}):S;f(e)})},[S,i.notification,m,f,r,u]),N=(0,a.useSelect)(e=>e(l.O4).getDocumentationLinkURL("setup-connect-google-account")),w=r?{trackEventAction:"setup_flow_v3_tracking_optin"}:{};return(0,C.jsxs)(d.Fragment,{children:[o,(0,C.jsx)(ii.A,{...w}),(0,C.jsxs)("div",{className:"googlesitekit-start-setup-wrap",children:[(0,C.jsx)(ne.Button,{className:"googlesitekit-start-setup",href:e,onClick:t,disabled:!n,children:(0,h._x)("Sign in with Google","Prompt to authenticate Site Kit with Google Account","google-site-kit")}),s,y&&k&&_&&n&&(0,C.jsx)(ne.Button,{onClick:A,tertiary:!0,children:(0,h.__)("Skip sign-in and view limited dashboard","google-site-kit")}),!k&&b&&n&&(0,C.jsx)(ni.A,{})]}),r&&(0,C.jsx)(si.A,{leadingText:(0,h.__)("Why is this required?","google-site-kit"),tooltipText:(0,ie.A)((0,h.__)("Site Kit needs to connect to your Google account to access data from Google products like Search Console or Analytics and display it on your dashboard. <a>Learn more</a>","google-site-kit"),{a:(0,C.jsx)(ge.A,{href:N,external:!0,hideExternalIndicator:!0})})})]})}var oi,ri,ai,li,ci,di,gi,ui,hi,pi,mi,fi,ki,vi,yi,_i,xi,bi,ji,Si,Ai,Ni,wi,Mi,Ci,Ii,Ei,Ti,Ri,Di,Li,zi,Oi,Pi,qi,Bi,Fi,Hi,Ui,Gi,Vi,Wi,Zi,Yi,$i,Qi,Ki,Xi,Ji,en,tn,nn,sn,on,rn,an,ln,cn,dn,gn=i(25797),un=i(76984),hn=i(37467);function pn(){const[e]=(0,hn.A)("notif
|
|||
|
|
(0,h.__)("We found %d existing accounts. Please choose which one to use below.","google-site-kit"),t.length)}}catch(t){e(t.message),this.setState({loading:!1,errorCode:t.code,errorMsg:t.message})}})()}async insertPropertyToSearchConsole(e,t=!1){await(0,be.set)("modules",jn.Y,"site",{siteURL:e}),t&&await(0,p.sx)("search_console_setup","add_new_sc_property"),this.setState({loading:!1,connected:!0})}submitPropertyEventHandler(){const{selectedURL:e,errorCode:t}=this.state,{setErrorMessage:i}=this.props;(async()=>{try{await this.insertPropertyToSearchConsole(e,"no_property_matched"===t),i(""),this.props.searchConsoleSetup(e)}catch(e){i(e.message[0].message),this.setState({loading:!1,errorCode:e.code,errorMsg:e.message[0].message})}})()}handleURLSelect(e,t){this.setState({selectedURL:t.getAttribute("data-value")})}matchedForm(){const{sites:e,selectedURL:t}=this.state;if(!e)return null;const i=e.map(e=>{let t=e.siteURL;return t.startsWith("sc-domain:")&&(t=(0,h.sprintf)(/* translators: %s: Search Console property domain name */ /* translators: %s: Search Console property domain name */
|
|||
|
|
(0,h.__)("%s (domain property)","google-site-kit"),t.replace(/^sc-domain:/,""))),{label:t,value:e.siteURL}});return(0,C.jsxs)(d.Fragment,{children:[(0,C.jsx)("div",{className:"googlesitekit-setup-module__inputs",children:(0,C.jsx)(ne.Select,{name:"siteProperty",label:(0,h.__)("Choose URL","google-site-kit"),onEnhancedChange:this.handleURLSelect,options:i,value:t,enhanced:!0,outlined:!0})}),(0,C.jsx)("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify",children:(0,C.jsx)(ne.Button,{onClick:this.submitPropertyEventHandler,children:(0,h.__)("Continue","google-site-kit")})})]})}static connected(){return(0,C.jsxs)("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console",children:[(0,C.jsx)(Wt.A,{as:"h3",className:"googlesitekit-setup-module__title",size:"small",type:"headline",children:(0,h._x)("Search Console","Service name","google-site-kit")}),(0,C.jsx)("p",{className:"googlesitekit-setup-module__text--no-margin",children:(0,h.__)("Your Search Console is set up with Site Kit.","google-site-kit")})]})}noSiteForm(){const{siteURL:e}=this.state;return(0,C.jsxs)(d.Fragment,{children:[(0,C.jsx)("div",{className:"googlesitekit-setup-module__inputs",children:(0,C.jsx)(ne.TextField,{label:(0,h.__)("Website Address","google-site-kit"),name:"siteProperty",value:e,outlined:!0})}),(0,C.jsx)("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify",children:(0,C.jsx)(ne.Button,{onClick:this.submitPropertyEventHandler,children:(0,h.__)("Continue","google-site-kit")})})]})}renderForm(){const{loading:e,sites:t}=this.state;return e?(0,C.jsxs)(d.Fragment,{children:[(0,C.jsx)(_e.A,{children:(0,h.__)("We’re locating your Search Console account.","google-site-kit")}),(0,C.jsx)(ne.ProgressBar,{})]}):0===t.length?this.noSiteForm():this.matchedForm()}render(){const{isAuthenticated:e,shouldSetup:t}=this.props,{errorMsg:i,connected:n}=this.state;return!t||n?SearchConsole.connected():(0,C.jsxs)("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console",children:[(0,C.jsx)(Wt.A,{as:"h3",className:"googlesitekit-setup-module__title",size:"small",type:"headline",children:(0,h._x)("Search Console","Service name","google-site-kit")}),i&&0<i.length&&(0,C.jsx)("p",{className:"googlesitekit-error-text",children:i}),e&&t&&this.renderForm()]})}}SearchConsole.propTypes={isAuthenticated:te().bool.isRequired,shouldSetup:te().bool.isRequired,searchConsoleSetup:te().func.isRequired,setErrorMessage:te().func.isRequired};const Sn=SearchConsole;class WizardStepSearchConsoleProperty extends d.Component{render(){const{isVerified:e,hasSearchConsoleProperty:t}=this.props,i=e&&!t;return(0,C.jsx)("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--four",children:(0,C.jsx)(f.xA,{children:(0,C.jsx)(f.fI,{children:(0,C.jsx)(f.fh,{size:12,children:i?(0,C.jsx)(Sn,{shouldSetup:i,...this.props}):Sn.connected()})})})})}}WizardStepSearchConsoleProperty.propTypes={searchConsoleSetup:te().func.isRequired};const An=WizardStepSearchConsoleProperty;class WizardStepCompleteSetup extends d.Component{constructor(e){super(e);const{hasSearchConsoleProperty:t}=i.g._googlesitekitLegacyData.setup;t?(0,p.sx)("plugin_setup","user_verified"):(0,p.sx)("plugin_setup","site_verified")}render(){return(0,C.jsx)("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--five",children:(0,C.jsx)(f.xA,{children:(0,C.jsx)(f.fI,{children:(0,C.jsxs)(f.fh,{size:12,children:[(0,C.jsx)(Wt.A,{as:"h3",className:"googlesitekit-wizard-step__title",size:"small",type:"headline",children:(0,h.__)("Congratulations!","google-site-kit")}),(0,C.jsx)(_e.A,{children:(0,h.__)("You successfully completed the Site Kit setup and connected Search Console. Check the dashboard for more services to connect.","google-site-kit")}),(0,C.jsx)("div",{className:"googlesitekit-wizard-step__action",children:(0,C.jsx)(ne.Button,{id:"wizard-step-five-proceed",onClick:this.props.completeSetup,children:(0,h.__)("Go to dashboard","google-site-kit")})})]})}
|
|||
|
|
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),e),{strong:(0,u.jsx)("strong",{})}),"function"==typeof e&&(0,u.jsx)(e,{})]},`note-${t}`))})]}),(0,u.jsxs)(d.DialogFooter,{children:[(0,u.jsx)(d.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:y,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),b?(0,u.jsx)(d.Button,{href:b,onClick:p,target:"_blank",danger:v,children:f}):(0,u.jsx)(d.SpinnerButton,{onClick:p,danger:v,disabled:y,isSaving:y,children:f||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:s().string,dialogActive:s().bool,handleDialog:s().func,handleConfirm:s().func.isRequired,onOpen:s().func,onClose:s().func,title:s().string,provides:s().arrayOf(s().string),confirmButton:s().string,notes:s().arrayOf(s().oneOfType([s().string,s().elementType])),danger:s().bool,small:s().bool,medium:s().bool,buttonLink:s().string};const h=ModalDialog},61983:(e,t,i)=>{i.d(t,{A:()=>DismissButton});var n=i(62688),s=i.n(n),o=i(82871),r=i(49383),a=i(62540);function DismissButton({className:e,label:t=(0,o.__)("Maybe later","google-site-kit"),onClick:i,disabled:n,tertiary:s=!0}){return i?(0,a.jsx)(r.Button,{className:e,onClick:i,disabled:n,tertiary:s,children:t}):null}DismissButton.propTypes={className:s().string,label:s().string,onClick:s().func,disabled:s().bool,tertiary:s().bool,dismissOptions:s().shape({expiresInSeconds:s().number,skipHidingFromQueue:s().bool})}},62457:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(62688),s=i.n(n),o=i(62540);function Spinner({isSaving:e,style:t={}}){return(0,o.jsx)("span",{className:"spinner",style:{display:e?"inline-block":"none",float:"none",marginTop:"0",visibility:"visible",...t}})}Spinner.propTypes={isSaving:s().bool,style:s().object};const r=Spinner},62659:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=i(63696),s=i(19826);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,n.useContext)(s.Ay)}},62779:(e,t,i)=>{i.d(t,{A:()=>k});var n=i(82871),s=i(63696),o=i(13606),r=i(7076),a=i(50539),l=i(59865),c=i(49993),d=i(94656),g=i(38432),u=i(29785),h=i(70301),p=i(65054),m=i(62659),f=i(62540);const k=function ResetButton({children:e}){const t=(0,a.useSelect)(e=>e(u.O4).getAdminURL("googlesitekit-splash",{notification:"reset_success"})),i=(0,a.useSelect)(e=>e(u.O4).isDoingReset()),k=(0,a.useSelect)(e=>e(h.M).isNavigatingTo(t||"")),[v,y]=(0,s.useState)(!1),[_,x]=(0,s.useState)(!1),b=(0,r.d)(y,3e3);(0,s.useEffect)(()=>{i||k?y(!0):b(!1)},[i,k,b]);const{reset:j}=(0,a.useDispatch)(u.O4),{navigateTo:S}=(0,a.useDispatch)(h.M),A=(0,m.A)(),N=(0,s.useCallback)(async()=>{await j(),await(0,c.IL)(),await(0,p.sx)(A,"reset_plugin"),S(t)},[S,t,j,A]),w=(0,s.useCallback)(()=>{x(!0)},[]),M=(0,s.useCallback)(()=>{x(!1)},[]);return(0,f.jsxs)(s.Fragment,{children:[(0,f.jsx)(g.A,{className:"googlesitekit-reset-button",onClick:w,children:e||(0,n.__)("Reset Site Kit","google-site-kit")}),(0,f.jsx)(d.A,{children:(0,f.jsx)(l.A,{dialogActive:_,handleConfirm:N,handleCancel:M,onClose:M,title:(0,n.__)("Reset Site Kit","google-site-kit"),subtitle:(0,o.A)((0,n.__)("Resetting will disconnect all users and remove all Site Kit settings and data within WordPress. <br />You and any other users who wish to use Site Kit will need to reconnect to restore access.","google-site-kit"),{br:(0,f.jsx)("br",{})}),confirmButton:(0,n.__)("Reset","google-site-kit"),inProgress:v,danger:!0,small:!0})})]})}},63081:(e,t,i)=>{i.d(t,{A:()=>Root});var n=i(62688),s=i.n(n),o=i(44010),r=i(77105),a=i(63696),l=i(50539),c=i.n(l),d=i(82871),g=i(6730),u=i(19826),h=i(67510),p=i(13047),m=i(62540);class ErrorHandler extends a.Component{constructor(e){super(e),this.state={error:null,info:null,copied:!1}}componentDidCatch(e,t){i.g.console.error("Caught an error:",e,t),this.setState({error:e,info:t}),(0,p.sx)("react_error",`handle_${this.context||"unknown"}_error`,`${e?.message}\n${t?.componentStack}`.slice(0,500))}render(){const{children:e}=this.props,{error:t,info:i}=this.state;return t?(0,m.jsx)(h.A,{notificationID:"googlesitekit-error",className:"googlesitekit-error-handler",typ
|
|||
|
|
(0,r.__)("%s (Please try again.)","google-site-kit"),_)),h||(_=(0,r.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
|
|||
|
|
(0,r.__)("Error: %s","google-site-kit"),_));const x=t?.data?.reconnectURL;x&&(0,a.m)(x)&&(_=(0,r.sprintf)(/* translators: 1: Original error message 2: Reconnect URL */ /* translators: 1: Original error message 2: Reconnect URL */
|
|||
|
|
(0,r.__)('%1$s To fix this, <a href="%2$s">redo the plugin setup</a>.',"google-site-kit"),_,x));return(0,u.jsx)(d.A,{className:e,type:d.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,g.p9)(_,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:y?{label:(0,r.__)("Retry","google-site-kit"),onClick:v}:void 0,hideIcon:m})}ErrorNotice.propTypes={className:s().string,error:s().shape({message:s().string}),hasButton:s().bool,storeName:s().string,message:s().string,noPrefix:s().bool,skipRetryMessage:s().bool,hideIcon:s().bool}},75662:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(62688),s=i.n(n),o=i(4452),r=i.n(o),a=i(63696),l=i(10740),c=i(38432),d=i(33052),g=i(62540);class LayoutHeader extends a.Component{render(){const{title:e,badge:t,ctaLabel:i,ctaLink:n}=this.props,s=n?{alignMiddle:!0,smSize:4,lgSize:6}:{alignMiddle:!0,smSize:4,mdSize:8,lgSize:12};return(0,g.jsx)("header",{className:"googlesitekit-layout__header",children:(0,g.jsx)(l.xA,{children:(0,g.jsxs)(l.fI,{children:[e&&(0,g.jsx)(l.fh,{...s,children:(0,g.jsxs)(d.A,{as:"h3",size:"small",type:"title",className:"googlesitekit-subheading-1 googlesitekit-layout__header-title",children:[e,t]})}),n&&(0,g.jsx)(l.fh,{smSize:4,lgSize:6,alignMiddle:!0,mdAlignRight:!0,children:(0,g.jsx)(c.A,{href:n,external:!0,children:i})})]})})})}}LayoutHeader.propTypes={title:s().string,badge:s().node,ctaLabel:s().string,ctaLink:s().string},LayoutHeader.defaultProps={title:"",badge:null,ctaLabel:"",ctaLink:""};const u=LayoutHeader;var h=i(44148);class LayoutFooter extends a.Component{render(){const{ctaLabel:e,ctaLink:t,footerContent:i}=this.props;return(0,g.jsx)("footer",{className:"googlesitekit-layout__footer",children:(0,g.jsx)(l.xA,{children:(0,g.jsx)(l.fI,{children:(0,g.jsxs)(l.fh,{size:12,children:[t&&e&&(0,g.jsx)(h.A,{className:"googlesitekit-data-block__source",name:e,href:t,external:!0}),i]})})})})}}LayoutFooter.propTypes={ctaLabel:s().string,ctaLink:s().string};const p=LayoutFooter;class Layout extends a.Component{render(){const{header:e,footer:t,children:i,title:n,badge:s,headerCTALabel:o,headerCTALink:a,footerCTALabel:l,footerCTALink:c,footerContent:d,className:h,fill:m,relative:f,rounded:k=!1,transparent:v=!1,...y}=this.props;return(0,g.jsxs)("div",{className:r()("googlesitekit-layout",h,{"googlesitekit-layout--fill":m,"googlesitekit-layout--relative":f,"googlesitekit-layout--rounded":k,"googlesitekit-layout--transparent":v}),...y,children:[e&&(0,g.jsx)(u,{title:n,badge:s,ctaLabel:o,ctaLink:a}),i,t&&(0,g.jsx)(p,{ctaLabel:l,ctaLink:c,footerContent:d})]})}}Layout.propTypes={header:s().bool,footer:s().bool,children:s().node.isRequired,title:s().string,badge:s().node,headerCTALabel:s().string,headerCTALink:s().string,footerCTALabel:s().string,footerCTALink:s().string,footerContent:s().node,className:s().string,fill:s().bool,relative:s().bool,rounded:s().bool,transparent:s().bool},Layout.defaultProps={header:!1,footer:!1,title:"",badge:null,headerCTALabel:"",headerCTALink:"",footerCTALabel:"",footerCTALink:"",footerContent:null,className:"",fill:!1,relative:!1};const m=Layout},76729:(e,t,i)=>{i.d(t,{Q:()=>n});const n="emailReportingUserSettingsSelectionPanelOpened"},76984:(e,t,i)=>{i.d(t,{Q:()=>n});const n={NEW:"new",SUCCESS:"success",WARNING:"warning",INFO:"info",INFO_ALT:"info-alt",INFO_ALT_2:"info-alt-2",ERROR:"error"}},78307:(e,t,i)=>{i.d(t,{A:()=>HelpMenu});var n=i(4452),s=i.n(n),o=i(62688),r=i.n(o),a=i(21795),l=i(63696),c=i(19266),d=i(82871),g=i(50539),u=i(49383),h=i(13047),p=i(38432),m=i(62659),f=i(30805),k=i(62540);function HelpMenuLink({children:e,href:t,gaEventLabel:i,onClick:n,icon:s}){const o=(0,m.A)(),r=(0,f.i)("setupFlowRefresh"),a=(0,l.useCallback)(async()=>{n?.(),i&&await(0,h.sx)(`${o}_headerbar_helpmenu`,r?"click_menu_item":"click_outgoing_link",i)},[n,i,o,r]);return(0,k.jsx)("li",{className:"googlesitekit-help-menu-link mdc-list-item",role:"none",children:(0,k.jsx)(p.A,{className:"mdc-list-item__text",href:t,role:"menuitem",onClick:a,leadingIcon:s,external:!0,hideExternalIndicator:!0,children:e})})}HelpMenuLink.propTypes={children:r().node.isRequired,hre
|
|||
|
|
(0,l.__)("Google Account for %1$s (Email: %2$s)","google-site-kit"),s,i)),s&&!i&&(Z=(0,l.sprintf)(/* translators: Account info text. 1: User's (full) name. */ /* translators: Account info text. 1: User's (full) name. */
|
|||
|
|
(0,l.__)("Google Account for %1$s","google-site-kit"),s)),!s&&i&&(Z=(0,l.sprintf)(/* translators: Account info text. 1: User's email address. */ /* translators: Account info text. 1: User's email address. */
|
|||
|
|
(0,l.__)("Google Account (Email: %1$s)","google-site-kit"),i)),(0,f.jsxs)(c.Fragment,{children:[(0,f.jsxs)("div",{ref:N,className:"googlesitekit-user-selector googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu mdc-menu-surface--anchor",children:[(0,f.jsx)(p.Button,{disabled:r,ref:w,className:"googlesitekit-header__dropdown mdc-button--dropdown googlesitekit-border-radius-round--tablet googlesitekit-border-radius-round--phone googlesitekit-border-radius-round googlesitekit-button-icon",onClick:U,icon:!!n&&(0,f.jsx)("i",{className:"mdc-button__icon mdc-button__account","aria-hidden":"true",children:(0,f.jsx)("img",{className:"mdc-button__icon--image",src:n,alt:(0,l.__)("User Avatar","google-site-kit")})}),"aria-haspopup":"menu","aria-expanded":j,"aria-controls":"user-menu","aria-label":r?void 0:(0,l.__)("Account","google-site-kit"),tooltipEnterDelayInMS:500,customizedTooltip:r?null:(0,f.jsxs)("span",{"aria-label":Z,children:[(0,f.jsx)("strong",{children:(0,l.__)("Google Account","google-site-kit")}),(0,f.jsx)("br",{}),(0,f.jsx)("br",{}),s,s&&(0,f.jsx)("br",{}),i]}),text:!0,tooltip:!0}),(0,f.jsxs)(p.Menu,{className:"googlesitekit-user-menu",menuOpen:j,onSelected:V,id:"user-menu",children:[(0,f.jsx)(MenuSection,{children:(0,f.jsx)(Details,{})}),e&&(0,f.jsx)(MenuItem,{id:"manage-email-reports",icon:(0,f.jsx)(T.A,{width:"24"}),label:(0,l.__)("Manage email reports","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),!!t&&(0,f.jsx)(MenuItem,{id:"manage-sites",icon:(0,f.jsx)(E,{width:"24"}),label:(0,l.__)("Manage Sites","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),(0,f.jsx)(MenuItem,{id:"disconnect",icon:(0,f.jsx)(S,{width:"24"}),label:(0,l.__)("Disconnect","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"})]})]}),(0,f.jsx)(x.A,{children:(0,f.jsx)(m.A,{dialogActive:k,handleConfirm:W,handleCancel:I,onClose:I,title:(0,l.__)("Disconnect","google-site-kit"),subtitle:(0,l.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:(0,l.__)("Disconnect","google-site-kit"),danger:!0,small:!0})})]})}var H=i(10740),U=i(4124),G=i(45257),V=i(15844),W=i(31589),Z=i(39525),Y=i(30521),$=i(20697),Q=i(7551),K=i(11883),X=i(97513);var J=i(59352),ee=i(4169);const te={[Q.Oo]:{[$.SH]:J.CONTEXT_MAIN_DASHBOARD_KEY_METRICS,[$.OT]:J.CONTEXT_MAIN_DASHBOARD_TRAFFIC,[$.en]:J.CONTEXT_MAIN_DASHBOARD_CONTENT,[$.Ej]:J.CONTEXT_MAIN_DASHBOARD_SPEED,[$.Gw]:J.CONTEXT_MAIN_DASHBOARD_MONETIZATION},[Q.oE]:{[$.OT]:J.CONTEXT_ENTITY_DASHBOARD_TRAFFIC,[$.en]:J.CONTEXT_ENTITY_DASHBOARD_CONTENT,[$.Ej]:J.CONTEXT_ENTITY_DASHBOARD_SPEED,[$.Gw]:J.CONTEXT_ENTITY_DASHBOARD_MONETIZATION}};var ie;function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},ne.apply(null,arguments)}const se=e=>c.createElement("svg",ne({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),ie||(ie=c.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18 16V2c0-1.1-1-2-2.222-2H2.222C1 0 0 .9 0 2v14c0 1.1 1 2 2.222 2h13.556C17 18 18 17.1 18 16M9 7h5V5H9zm7-5H2v14h14zM4 4h4v4H4zm10 7H9v2h5zM4 10h4v4H4z",clipRule:"evenodd"})));var oe,re,ae,le;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},ce.apply(null,arguments)}const de=e=>c.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 13 12"},e),oe||(oe=c.createElement("rect",{width:5,height:5,x:.5,fill:"currentColor",rx:1})),re||(
|