62 lines
446 KiB
JavaScript
62 lines
446 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[290,978,998],{133:(e,t,i)=>{i.d(t,{B:()=>s});i(72455);function s(e){return 400===e?.code&&e?.message?.includes("is not a valid dimension")}},674:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,n,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),s||(s=o.createElement("path",{fillRule:"evenodd",d:"m12.149 7.96-5.166 5.166a.34.34 0 0 0-.094.176l-.35 1.755a.344.344 0 0 0 .404.404l1.755-.35a.34.34 0 0 0 .175-.095l5.166-5.165zm2.301-1.814a1.03 1.03 0 0 0-1.458 0L6.497 12.64a1.03 1.03 0 0 0-.282.527l-.35 1.755a1.03 1.03 0 0 0 1.213 1.213l1.754-.35c.2-.04.383-.139.527-.283l6.495-6.494a1.03 1.03 0 0 0 0-1.459z",clipRule:"evenodd"})),n||(n=o.createElement("path",{d:"m12.149 7.96.117-.116a.165.165 0 0 0-.234 0zm-5.166 5.166-.116-.116zm-.094.176.162.033zm-.35 1.755.161.032zm.404.404.032.162zm1.755-.35.032.161zm.175-.095.117.117zm5.166-5.165.116.116a.165.165 0 0 0 0-.233zm-1.047-3.705.116.116zm1.458 0-.116.116zM6.497 12.64l.117.117zm-.282.527-.162-.032zm-.35 1.755.161.032zm1.213 1.213-.033-.162zm1.754-.35.033.161zm.527-.283.117.117zm6.495-6.494-.117-.117zm0-1.459.117-.116zm-3.822.295L6.867 13.01l.233.233 5.166-5.165zM6.867 13.01a.5.5 0 0 0-.14.26l.324.065a.2.2 0 0 1 .05-.092zm-.14.26-.35 1.754.323.065.351-1.755zm-.35 1.754a.51.51 0 0 0 .598.599l-.064-.324a.18.18 0 0 1-.21-.21zm.598.599 1.755-.35-.065-.325-1.754.351zm1.755-.35a.5.5 0 0 0 .26-.14l-.233-.233a.2.2 0 0 1-.092.048zm.26-.14 5.165-5.166-.233-.233L8.757 14.9zm3.042-7.055 1.89 1.89.233-.234-1.89-1.89zm1.076-1.816a.866.866 0 0 1 1.226 0l.233-.233a1.196 1.196 0 0 0-1.692 0zm-6.494 6.495 6.494-6.495-.233-.233-6.494 6.495zm-.237.443a.87.87 0 0 1 .237-.443l-.233-.233c-.167.167-.281.38-.328.61zm-.35 1.754.35-1.754-.324-.065-.35 1.755zm1.018 1.02a.866.866 0 0 1-1.019-1.02l-.323-.065a1.196 1.196 0 0 0 1.407 1.408zm1.755-.351-1.755.35.065.324 1.755-.35zm.443-.237a.87.87 0 0 1-.443.237l.065.323c.231-.046.444-.16.611-.327zm6.494-6.495-6.494 6.495.233.233 6.495-6.494zm0-1.225a.866.866 0 0 1 0 1.225l.234.234a1.196 1.196 0 0 0 0-1.692zm-1.403-1.404 1.403 1.404.234-.233-1.404-1.404z"})))},718:(e,t,i)=>{i.d(t,{gy:()=>SelectionPanelFooter,W4:()=>SelectionPanelHeader,y3:()=>SelectionPanelItem,DW:()=>SelectionPanelItems,Ay:()=>S});var s=i(4452),n=i.n(s),o=i(62688),r=i.n(o),a=i(4544),l=i.n(a),c=i(21795),d=i(78174),u=i(63696),g=i(19266),p=i(14007),m=i(62540);function SideSheet({className:e,children:t,isOpen:i,isLoading:s,onOpen:o=()=>{},closeSheet:r=()=>{},focusTrapOptions:a={}}){const h=(0,u.useRef)();return(0,u.useEffect)(()=>{i?(o(),document.body.classList.add("googlesitekit-side-sheet-scroll-lock")):document.body.classList.remove("googlesitekit-side-sheet-scroll-lock")},[i,o]),(0,c.A)(h,r),(0,d.A)(e=>i&&g._f===e.keyCode,r),(0,m.jsxs)(p.A,{children:[(0,m.jsx)(l(),{active:!!i&&!s,focusTrapOptions:{fallbackFocus:"body",...a},children:(0,m.jsx)("section",{ref:h,className:n()("googlesitekit-side-sheet",e,{"googlesitekit-side-sheet--open":i}),role:"dialog","aria-modal":"true","aria-hidden":!i,tabIndex:"0",children:t})}),i&&(0,m.jsx)("span",{className:"googlesitekit-side-sheet-overlay"})]})}function SelectionPanel({children:e,isOpen:t,isLoading:i,onOpen:s,closePanel:o,className:r}){const a=r?.split(/\s+/).map(e=>`.${e}`).join(""),l=a?`${a} .googlesitekit-selection-panel-item .googlesitekit-selection-box input`:".googlesitekit-selection-panel-item .googlesitekit-selection-box input";return(0,m.jsx)(SideSheet,{className:n()("googlesitekit-selection-panel",r),isOpen:t,isLoading:i,onOpen:s,closeSheet:o,focusTrapOptions:{initialFocus:l},children:e})}SideSheet.propTypes={className:r().string,children:r().node,isOpen:r().bool,isLoading:r().bool,onOpen:r().func,closeSheet:r().func,f
|
|||
|
|
(0,v.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),C,n),{MaxCount:(0,m.jsx)("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})})});return(0,m.jsx)("footer",{className:"googlesitekit-selection-panel-footer",children:(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__content",children:[T,(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,m.jsx)(_.Button,{onClick:N,disabled:o,tertiary:!0,children:(0,v.__)("Cancel","google-site-kit")}),(0,m.jsx)(_.SpinnerButton,{onClick:S,isSaving:o,disabled:C<s||C>n||o||!l&&p,children:d||k})]})]})})}SelectionPanelFooter.propTypes={savedItemSlugs:r().array,selectedItemSlugs:r().array,saveSettings:r().func,minSelectedItemCount:r().number,maxSelectedItemCount:r().number,isBusy:r().bool,onSaveSuccess:r().func,onCancel:r().func,isOpen:r().bool,closePanel:r().func};const S=SelectionPanel},1102:(e,t,i)=>{i.d(t,{w:()=>a});var s=i(35470),n=i(63696),o=i(2422);function r(){}function a(e,t){const i=(0,o.W)({sticky:!0}),a=(0,n.useRef)(),l=(0,n.useCallback)(e,t),c=(0,s.A)(i?l:r);return i&&(a.current=c),a.current}},2362:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(4452),n=i.n(s),o=i(62688),r=i.n(o),a=i(63696),l=i(62540);const c=(0,a.forwardRef)(({label:e,className:t,hasLeftSpacing:i=!1,...s},o)=>(0,l.jsx)("span",{ref:o,...s,className:n()("googlesitekit-badge",t,{"googlesitekit-badge--has-left-spacing":i}),children:e}));c.displayName="Badge",c.propTypes={label:r().string.isRequired,hasLeftSpacing:r().bool};const d=c},2390:(e,t,i)=>{i.d(t,{A:()=>SpinnerButton,k:()=>d});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(25874),l=i(9341),c=i(62540);const d={BEFORE:"before",AFTER:"after"};function SpinnerButton(e){const{className:t,onClick:i=()=>{},isSaving:s=!1,spinnerPosition:n=d.AFTER,...o}=e;return(0,c.jsx)(a.A,{className:r()(t,"googlesitekit-button-icon--spinner",{"googlesitekit-button-icon--spinner__running":s,"googlesitekit-button-icon--spinner__before":n===d.BEFORE,"googlesitekit-button-icon--spinner__after":n===d.AFTER}),icon:s&&n===d.BEFORE?(0,c.jsx)(l.A,{size:14}):void 0,trailingIcon:s&&n===d.AFTER?(0,c.jsx)(l.A,{size:14}):void 0,onClick:i,...o})}SpinnerButton.propTypes={className:n().string,onClick:n().func,isSaving:n().bool,spinnerPosition:n().oneOf(Object.values(d))}},2422:(e,t,i)=>{i.d(t,{W:()=>l});var s=i(79257),n=i(35470),o=i(63696),r=i(6732),a=i(7081);function l({sticky:e=!1}={}){const t=(0,o.useContext)(r.A),[i,l]=(0,o.useState)(!1),c=(0,n.A)(e=>e(a.n).getInViewResetCount()),d=(0,n.A)(e=>e(a.n).getValue("forceInView"));return(0,o.useEffect)(()=>{t.value&&!i&&l(!0)},[i,t,l]),(0,o.useEffect)(()=>{d&&l(!0)},[d]),(0,s.A)(()=>{l(!1)},[c]),!(!e||!i)||!!t.value}},2478:(e,t,i)=>{i.d(t,{A:()=>ChangeBadge});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(12850),l=i(62540);function ChangeBadge(e){const{previousValue:t,currentValue:i,isAbsolute:s}=e,n=s?i-t:(0,a.Zf)(t,i),o=n<0,c=0===n;return null===n?null:(0,l.jsx)("div",{className:r()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":o,"googlesitekit-change-badge--zero":c}),children:(0,a.Eo)(n,{style:"percent",signDisplay:"exceptZero",maximumFractionDigits:1})})}ChangeBadge.propTypes={isAbsolute:n().bool,previousValue:n().number.isRequired,currentValue:n().number.isRequired}},2522:(e,t,i)=>{i.d(t,{D:()=>o});var s=i(32091),n=i.n(s);function o(e,{dateRangeLength:t}){n()(Array.isArray(e),"report must be an array to partition."),n()(Number.isInteger(t)&&t>0,"dateRangeLength must be a positive integer.");const i=-1*t;return{currentRange:e.slice(i),compareRange:e.slice(2*i,i)}}},3288:(e,t,i)=>{i.d(t,{Q:()=>s});const s="emailReportingUserSettingsSelectionPanelOpened"},3714:(e,t,i)=>{i.d(t,{Kk:()=>o,SZ:()=>s,Yw:()=>r,oJ:()=>a,tT:()=>n});const s="body",n=[s,"display","headline","label","title"],o="small",r="medium",a=[o,r,"large"]},3782:(e,t,i)=>{i.d(t,{A:()=>CTAButton});var s=i(62688),n=i.n(s),o=i(49383),r=i(83366),a=i(62540);function CTAButton({label:e,ariaLabel:t,disabled:i,inProgress:s,onClick:n,href:l,external:c=!1,hideExternalIndicator:d=!1
|
|||
|
|
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),y),{strong:(0,g.jsx)("strong",{})})})]}),(0,g.jsxs)(d.DialogFooter,{children:[(0,g.jsx)(d.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:_,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),I?(0,g.jsx)(d.Button,{href:I,onClick:m,target:"_blank",danger:v,children:f}):(0,g.jsx)(d.SpinnerButton,{onClick:m,danger:v,disabled:_,isSaving:_,children:f||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:n().string,dialogActive:n().bool,handleDialog:n().func,handleConfirm:n().func.isRequired,onOpen:n().func,onClose:n().func,title:n().string,confirmButton:n().string,danger:n().bool,small:n().bool,medium:n().bool,buttonLink:n().string};const p=ModalDialog},9341:(e,t,i)=>{i.d(t,{A:()=>CircularProgress});var s=i(75762),n=i(62540);function CircularProgress(e){return(0,n.jsx)(s.A,{...e})}},9652:(e,t,i)=>{i.d(t,{A:()=>RecoverableModules});var s=i(62688),n=i.n(s),o=i(82871),r=i(50539),a=i(37226),l=i(4884),c=i(62540);function RecoverableModules({moduleSlugs:e}){const t=(0,r.useSelect)(t=>{const i=t(a.i).getModules();if(void 0!==i)return e.map(e=>i[e].name)});if(void 0===t)return null;const i=1===t.length?(0,o.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
|
|||
|
|
(0,o.__)("%s data was previously shared by an admin who no longer has access. Please contact another admin to restore it.","google-site-kit"),t[0]):(0,o.sprintf)(/* translators: %s: List of module names */ /* translators: %s: List of module names */
|
|||
|
|
(0,o.__)("The data for the following modules was previously shared by an admin who no longer has access: %s. Please contact another admin to restore it.","google-site-kit"),t.join((0,o._x)(", ","Recoverable modules","google-site-kit")));return(0,c.jsx)(l.A,{title:(0,o.__)("Data Unavailable","google-site-kit"),description:i})}RecoverableModules.propTypes={moduleSlugs:n().arrayOf(n().string).isRequired}},10072:(e,t,i)=>{i.d(t,{A:()=>ModuleIcon});var s=i(62688),n=i.n(s),o=i(50539),r=i(37226),a=i(62540);function ModuleIcon({slug:e,size:t,...i}){const s=(0,o.useSelect)(t=>t(r.i).getModuleIcon(e));return s?(0,a.jsx)(s,{width:t,height:t,...i}):null}ModuleIcon.propTypes={slug:n().string.isRequired,size:n().number},ModuleIcon.defaultProps={size:33}},10953:(e,t,i)=>{i.d(t,{A:()=>InfoTooltip});var s,n=i(4452),o=i.n(n),r=i(62688),a=i.n(r),l=i(49383),c=i(63696);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d.apply(null,arguments)}const u=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),s||(s=c.createElement("path",{fill:"currentColor",d:"M7.334 11.333h1.333v-4H7.334zM8.001 6a.658.658 0 0 0 .667-.667.6.6 0 0 0-.2-.467.6.6 0 0 0-.467-.2.66.66 0 0 0-.667.667q0 .284.183.483A.7.7 0 0 0 8.001 6m0 8.666a6.6 6.6 0 0 1-2.6-.516 6.9 6.9 0 0 1-2.117-1.434A6.9 6.9 0 0 1 1.851 10.6 6.6 6.6 0 0 1 1.334 8q0-1.385.517-2.6a6.9 6.9 0 0 1 1.433-2.117q.9-.9 2.117-1.417A6.4 6.4 0 0 1 8 1.333q1.383 0 2.6.533a6.6 6.6 0 0 1 2.116 1.417q.9.9 1.417 2.117.533 1.215.533 2.6 0 1.383-.533 2.6a6.6 6.6 0 0 1-1.417 2.116 6.9 6.9 0 0 1-2.116 1.434 6.6 6.6 0 0 1-2.6.516m0-1.333q2.233 0 3.783-1.55T13.334 8t-1.55-3.784-3.783-1.55-3.784 1.55T2.667 8t1.55 3.783 3.784 1.55"})));var g=i(62540);function InfoTooltip({onOpen:e,title:t,tooltipClassName:i}){return t?(0,g.jsx)(l.Tooltip,{className:"googlesitekit-info-tooltip",tooltipClassName:o()("googlesitekit-info-tooltip__content",i),title:t,placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,onOpen:e,interactive:!0,children:(0,g.jsx)("span",{children:(0,g.jsx)(u,{width:"16",height:"16"})})}):null}InfoTooltip.propTypes={onOpen:a().func,title:a().oneOfType([a().string,a().element]),tooltipClassName:a().string}},11106:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(63696),n=i(65214);const o=(0,s.createContext)(n.t)},11253:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,n=i(63696);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 12"},e),s||(s=n.createElement("g",{fill:"currentColor",fillRule:"evenodd"},n.createElement("path",{d:"M0 6.414 1.415 5l5.292 5.292-1.414 1.415z"}),n.createElement("path",{d:"m14.146.146 1.415 1.414L5.414 11.707 4 10.292z"}))))},11345:(e,t,i)=>{i.d(t,{A:()=>ReportError});var s=i(62688),n=i.n(s),o=i(17243),r=i(63696),a=i(82871),l=i(81375),c=i(50539),d=i(37226),u=i(67150),g=i(65311),p=i(15210),m=i(4884),h=i(35902),f=i(35323),y=i(77967),v=i(62540);function ReportError({moduleSlug:e,error:t}){const i=(0,f.A)(),s=(0,c.useSelect)(t=>t(d.i).getModule(e)),n=Array.isArray(t)?t:[t];let _;function k(e){return(0,u.SG)(e)?i?(_=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Access lost to %s","google-site-kit"),s?.name),(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("The administrator sharing this module with you has lost access to the %s service, so you won’t be able to see stats from it on the Site Kit dashboard. You can contact them or another administrator to restore access.","google-site-kit"),s?.name)):(_=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Insufficient permissions in %s","google-site-kit"),s?.name),(0,g.c)(e.message,s)):(0,u.e4)(e)}const x=(0,o.uniqWith)(n.map(e=>({...e,message:k(e),reconnectURL:e.data?.reconnectURL?(0,l.m)(e.data.reconnectURL,"code"):void 0})),(e,t)=>e.message===t.message&&e.reconnectURL===t.reconnectURL),I=n.some(e=>(0,u.SG)(e));I||1!==x.length?!I&&x.length>1&&(_=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Data errors in %s","google-site-kit"),s?.name)):_=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Data error in %s","google-site-kit"),s?.name);const j=(0,v.jsx)(r.Fragment,{children:x.map(e=>{const t=e?.data?.reconnectURL;return t?(0,v.jsx)(y.A,{error:e,message:e.message},e.message):(0,v.jsx)("p",{children:p.O.sanitize(e.message,{ALLOWED_TAGS:[]})},e.message)})});return(0,v.jsx)(m.A,{title:_,description:j,error:!0,children:(0,v.jsx)(h.A,{moduleSlug:e,error:t})})}ReportError.propTypes={moduleSlug:n().string.isRequired,error:n().oneOfType([n().arrayOf(n().object),n().object]).isRequired}},12108:(e,t,i)=>{i.d(t,{YJ:()=>o,Eq:()=>r});var s=i(32947),n=i(17243);function o(e,t){const s=document.querySelector(e);if(!s)return 0;const n=s.getBoundingClientRect().top,o=r(t);return n+i.g.scrollY-o}function r(e){let t=function(e){let t=0;const o=document.querySelector(".googlesitekit-header");t=o&&"sticky"===i.g.getComputedStyle(o).position?function(e){const t=document.querySelector(".googlesitekit-header");if(t){if(e===s.mp)return t.offsetHeight;const i=t.getBoundingClientRect().bottom;return i<0?0:i}return 0}(e):function(e){const t=document.querySelector("#wpadminbar");if(t&&e!==s.mp)return t.offsetHeight;return 0}(e);return t=function(e){return(0,n.isFinite)(e)?e:0}(t),t<0?0:t}(e);const o=document.querySelectorAll(".googlesitekit-navigation, .googlesitekit-entity-header");return t+=Array.from(o).reduce((e,t)=>e+t.offsetHeight,0),t}},12701:(e,t,i)=>{i.d(t,{A:()=>Root});var s=i(62688),n=i.n(s),o=i(44010),r=i(77105),a=i(63696),l=i(50539),c=i.n(l),d=i(82871),u=i(54312),g=i(61991),p=i(90007),m=i(12850),h=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,m.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,h.jsx)(p.A,{notificationID:"googlesitekit-error",className:"googlesitekit-error-handler",type:"error",title:(0,d.__)("Site Kit encountered an error","google-site-kit"),description:(0,h.jsxs)(a.Fragment,{children:[(0,h.jsx)(u.A,{message:t.message,componentStack:i.componentStack}),(0,h.jsxs)("pre",{className:"googlesitekit-overflow-auto",children:[t.message,i.componentStack]})]})}):e}}ErrorHandler.contextType=g.Ay,ErrorHandler.propTypes={children:n().node.isRequired};const f=ErrorHandler;var y=i(11106);const{Consumer:v,Provider:_}=y.A,k=_;var x=i(65214),I=i(4445),j=i(78340),A=i(45472),b=i(58116),M=i(64067),S=i(14007);const N=function AuthenticatedPermissionsModal(){const e=(0,l.useRegistry)(),t=(0,l.useSelect)(e=>e(b.oR).getPermissionScopeError()),s=(0,l.useSelect)(e=>e(b.oR).getUnsatisfiedScopes()),n=(0,l.useSelect)(e=>e(b.oR).getConnectURL({additionalScopes:t?.data?.scopes,redirectURL:t?.data?.redirectURL||i.g.location.href,errorRedirectURL:t?.data?.errorRedirectURL})),{clearPermissionScopeError:o}=(0,l.useDispatch)(b.oR),{navigateTo:r}=(0,l.useDispatch)(A.M),{setValues:c}=(0,l.useDispatch)(j.s),u=(0,a.useCallback)(()=>{o()},[o]),g=(0,a.useCallback)(async()=>{c(b.$8,{permissionsError:t}),await(0,M.mR)(e),r(n)},[e,n,r,t,c]);return(0,a.useEffect)(()=>{!async function(){t?.data?.skipModal&&t?.data?.scopes?.length&&await g()}()},[g,t]),t?t?.data?.scopes?.length?t?.data?.skipModal||s&&t?.data?.scopes.every(e=>s.includes(e))?null:(0,h.jsx)(S.A,{children:(0,h.jsx)(I.A,{title:(0,d.__)("Additional Permissions Required","google-site-kit"),subtitle:t.message,confirmButton:(0,d.__)("Proceed","google-site-kit"),handleConfirm:g,handleCancel:u,onClose:u,dialogActive:!0,medium:!0})}):(i.g.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",t),null):null};const E=function PermissionsModal(){return(0,l.useSelect)(e=>e(b.oR).isAuthenticated())?(0,h.jsx)(N,{}):null};const w=function RestoreSnapshots({children:e}){const t=(0,l.useRegistry)(),[i,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{i||(async()=>{await(0,M.P9)(t),s(!0)})()},[t,i]),i?e:null};var C=i(15844
|
|||
|
|
(0,d.__)("Google Account for %1$s (Email: %2$s)","google-site-kit"),n,i)),n&&!i&&(Z=(0,d.sprintf)(/* translators: Account info text. 1: User's (full) name. */ /* translators: Account info text. 1: User's (full) name. */
|
|||
|
|
(0,d.__)("Google Account for %1$s","google-site-kit"),n)),!n&&i&&(Z=(0,d.sprintf)(/* translators: Account info text. 1: User's email address. */ /* translators: Account info text. 1: User's email address. */
|
|||
|
|
(0,d.__)("Google Account (Email: %1$s)","google-site-kit"),i)),(0,j.jsxs)(u.Fragment,{children:[(0,j.jsxs)("div",{ref:A,className:"googlesitekit-user-selector googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu mdc-menu-surface--anchor",children:[(0,j.jsx)(y.Button,{disabled:r,ref:M,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:C,icon:!!s&&(0,j.jsx)("i",{className:"mdc-button__icon mdc-button__account","aria-hidden":"true",children:(0,j.jsx)("img",{className:"mdc-button__icon--image",src:s,alt:(0,d.__)("User Avatar","google-site-kit")})}),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":"user-menu","aria-label":r?void 0:(0,d.__)("Account","google-site-kit"),tooltipEnterDelayInMS:500,customizedTooltip:r?null:(0,j.jsxs)("span",{"aria-label":Z,children:[(0,j.jsx)("strong",{children:(0,d.__)("Google Account","google-site-kit")}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),n,n&&(0,j.jsx)("br",{}),i]}),text:!0,tooltip:!0}),(0,j.jsxs)(y.Menu,{className:"googlesitekit-user-menu",menuOpen:c,onSelected:O,id:"user-menu",children:[(0,j.jsx)("li",{children:(0,j.jsx)(Details,{})}),e&&(0,j.jsx)("li",{id:"manage-email-reports",className:"mdc-list-item",role:"menuitem",children:(0,j.jsx)(Item,{icon:(0,j.jsx)(L,{width:"24"}),label:(0,d.__)("Manage email reports","google-site-kit")})}),!!t&&(0,j.jsx)("li",{id:"manage-sites",className:"mdc-list-item",role:"menuitem",children:(0,j.jsx)(Item,{icon:(0,j.jsx)(T,{width:"24"}),label:(0,d.__)("Manage Sites","google-site-kit")})}),(0,j.jsx)("li",{id:"disconnect",className:"mdc-list-item",role:"menuitem",children:(0,j.jsx)(Item,{icon:(0,j.jsx)(b,{width:"24"}),label:(0,d.__)("Disconnect","google-site-kit")})})]})]}),(0,j.jsx)(x.A,{children:(0,j.jsx)(v.A,{dialogActive:a,handleConfirm:z,handleCancel:E,onClose:E,title:(0,d.__)("Disconnect","google-site-kit"),subtitle:(0,d.__)("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,d.__)("Disconnect","google-site-kit"),danger:!0,small:!0})})]})}var Z=i(55527),q=i(35323),Q=i(29898),K=i(15844),X=i(39525),$=i(30521),J=i(24558),ee=i(73874),te=i(12108),ie=i(32947);var se=i(44949),ne=i(86134);const oe={[ee.Oo]:{[J.SH]:se.CONTEXT_MAIN_DASHBOARD_KEY_METRICS,[J.OT]:se.CONTEXT_MAIN_DASHBOARD_TRAFFIC,[J.en]:se.CONTEXT_MAIN_DASHBOARD_CONTENT,[J.Ej]:se.CONTEXT_MAIN_DASHBOARD_SPEED,[J.Gw]:se.CONTEXT_MAIN_DASHBOARD_MONETIZATION},[ee.oE]:{[J.OT]:se.CONTEXT_ENTITY_DASHBOARD_TRAFFIC,[J.en]:se.CONTEXT_ENTITY_DASHBOARD_CONTENT,[J.Ej]:se.CONTEXT_ENTITY_DASHBOARD_SPEED,[J.Gw]:se.CONTEXT_ENTITY_DASHBOARD_MONETIZATION}};var re;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ae.apply(null,arguments)}const le=e=>u.createElement("svg",ae({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),re||(re=u.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 ce,de,ue,ge;function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},pe.apply(null,arguments)}const me=e=>u.createElement("svg",pe({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 13 12"},e),ce||(ce=u.createElement("rect",{width:5,height:5,x:.5,fill:"currentColor",rx:1})),de||(de=u.createElement("rect",{width:5,height:5,x:7.5,fill:"currentColor",rx:1})),ue||(ue=u.createElement("rect",{width:5,height:5,x:.5,y:7,fill:"currentColor",rx:1})),ge||(ge=u.createElement("rect",{width:5,height:5,x:7.5,y:7,fill:"currentColor",rx:1})));var h
|
|||
|
|
(0,d.__)("Shared by <strong>%s</strong>","google-site-kit"),s.login),{strong:(0,j.jsx)("strong",{title:s.login})})})]})}Service.propTypes={module:r().string.isRequired};var Be=i(15167);function SharedServices(){const e=(0,g.useSelect)(e=>e(I.oR).getViewableModules());return void 0===e?null:(0,j.jsxs)("li",{className:"googlesitekit-view-only-menu__list-item",children:[(0,j.jsx)(Be.A,{as:"h4",size:"large",type:"title",children:(0,d.__)("Shared services","google-site-kit")}),(0,j.jsx)("ul",{children:e.map(e=>(0,j.jsx)(Service,{module:e},e))})]})}var Pe=i(82167);function Tracking(){const e=(0,W.A)();return(0,j.jsxs)("li",{className:"googlesitekit-view-only-menu__list-item",children:[(0,j.jsx)(we.A,{children:(0,ze.A)((0,d.__)("Thanks for using Site Kit!<br />Help us make it even better","google-site-kit"),{br:(0,j.jsx)("br",{})})}),(0,j.jsx)(Pe.A,{trackEventCategory:`${e}_headerbar_viewonly`,alignCheckboxLeft:!0})]})}var Ge=i(74595);function ManageEmailReports(){const{setValue:e}=(0,Ge.wA)(P.n);return(0,j.jsxs)(u.Fragment,{children:[(0,j.jsx)("li",{className:"mdc-list-divider",role:"separator"}),(0,j.jsx)("li",{className:"googlesitekit-view-only-menu__list-item googlesitekit-view-only-menu__email-reporting",children:(0,j.jsx)("ul",{className:"googlesitekit-view-only-menu",children:(0,j.jsx)("li",{className:"googlesitekit-view-only-menu__email-reporting-item",children:(0,j.jsx)(y.Button,{onClick:()=>e(F.Q,!0),icon:(0,j.jsx)("span",{className:"googlesitekit-view-only-menu__email-reporting-item--icon",children:(0,j.jsx)(L,{width:"24"})}),tertiary:!0,children:(0,j.jsx)("span",{className:"googlesitekit-view-only-menu__email-reporting-item--name",children:(0,d.__)("Manage email reports","google-site-kit")})})})})})]})}function ViewOnlyMenu(){const e=(0,Y.i)("proactiveUserEngagement"),[t,i]=(0,u.useState)(!1),s=(0,u.useRef)(),n=(0,W.A)();(0,m.A)(s,()=>i(!1)),(0,V.l)([f._f,f.wn],s,()=>i(!1));const o=(0,u.useCallback)(()=>{t||(0,_.sx)(`${n}_headerbar`,"open_viewonly"),i(!t)},[t,n]),r=(0,g.useSelect)(e=>e(I.oR).hasCapability(I.ej));return(0,j.jsxs)("div",{ref:s,className:l()("googlesitekit-view-only-menu","googlesitekit-dropdown-menu","googlesitekit-dropdown-menu__icon-menu","mdc-menu-surface--anchor",{"googlesitekit-view-only-menu--user-can-authenticate":r}),children:[(0,j.jsx)(y.Button,{className:"googlesitekit-header__dropdown mdc-button--dropdown googlesitekit-border-radius-round--phone googlesitekit-button-icon",onClick:o,icon:(0,j.jsx)("span",{className:"mdc-button__icon","aria-hidden":"true",children:(0,j.jsx)(Oe,{className:"mdc-button__icon--image"})}),"aria-haspopup":"menu","aria-expanded":t,"aria-controls":"view-only-menu","aria-label":(0,d.__)("View only","google-site-kit"),tooltipEnterDelayInMS:500,text:!0,tooltip:!0,children:(0,d.__)("View only","google-site-kit")}),(0,j.jsxs)(y.Menu,{menuOpen:t,onSelected:o,id:"view-only-menu",nonInteractive:!0,children:[(0,j.jsx)(Description,{}),(0,j.jsx)(SharedServices,{}),e&&(0,j.jsx)(ManageEmailReports,{}),(0,j.jsx)("li",{className:"mdc-list-divider",role:"separator"}),(0,j.jsx)(Tracking,{})]})]})}var Ue=i(71423),Fe=i(53137),Ve=i(77513);function CoreSiteBannerNotification({id:e,...t}){const{dismissNotification:i,acceptNotification:s}=(0,g.useDispatch)(B.O4),n=(0,u.useCallback)(()=>{s(e)},[e,s]),o=(0,u.useCallback)(()=>{i(e)},[e,i]);return(0,j.jsx)(Ve.A,{onCTAClick:n,onDismissClick:o,...t,id:e})}CoreSiteBannerNotification.propTypes={content:r().string,ctaLabel:r().string,ctaTarget:r().string,ctaURL:r().string,dismissLabel:r().string,dismissible:r().bool,gaTrackingEventArgs:r().object,id:r().string.isRequired,learnMoreLabel:r().string,learnMoreURL:r().string,title:r().string.isRequired},CoreSiteBannerNotification.defaultProps={content:"",ctaLabel:"",ctaTarget:"",ctaURL:"",dismissLabel:(0,d.__)("OK, Got it!","google-site-kit"),dismissible:!0,learnMoreLabel:"",learnMoreURL:""};const We=CoreSiteBannerNotification;const He=function CoreSiteBannerNotifications(){const e=(0,W.A)(),[t,i]=(0,u.useState)(!1),[s,n]=(0,u.useState)(!1),o=(0,u.useRef)(Date.now()),r=(0,g.useSelect)(e=>e(B.O4).isUsin
|
|||
|
|
(0,_._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 N(e=""){if(!(0,s.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,s.isDate)(t)&&!isNaN(t)}function E(e){v()((0,s.isDate)(e)&&!isNaN(e),k);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 w(e){v()(N(e),x);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function C(e,t){return E(D(e,t*b))}function T(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 D(e,t){v()(N(e)||(0,s.isDate)(e)&&!isNaN(e),x);const i=N(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}var R=i(69743),O=i(94552),z=i(62540);function L(e,t={}){if(Number.isNaN(Number(e)))return"";const{invertColor:i=!1}=t;return(0,R.Ay)((0,z.jsx)(O.A,{direction:e>0?"up":"down",invertColor:i}))}function B(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}var P=i(8143);function G(e){const t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function U(e){if("number"==typeof e)return!0;const t=(e||"").toString();return!!t&&!isNaN(t)}function F(e){return Array.isArray(e)?[...e].sort():e}var V=i(2522);function W(e,t){function i(e){return"0"===e||0===e}if(i(e)&&i(t))return 0;if(i(e)||Number.isNaN(e))return null;const s=(t-e)/e;return Number.isNaN(s)||!Number.isFinite(s)?null:s}function H(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}}function Y(e){if(!e)return"";const t=e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t)).replace(/(\\)/g,"");return(0,s.unescape)(t)}},12886:(e,t,i)=>{i.d(t,{A:()=>Checkbox});var s=i(4452),n=i.n(s),o=i(62688),r=i.n(o),a=i(63696),l=i(27240),c=i(62540);function Checkbox(e){const{onChange:t,id:i,name:s,value:o,checked:r,disabled:d,children:u,tabIndex:g,onKeyDown:p,loading:m,alignLeft:h,description:f,badge:y}=e,v=y?(0,c.jsxs)("div",{className:"mdc-checkbox__label-wrapper",children:[(0,c.jsx)("label",{htmlFor:i,children:u}),y]}):(0,c.jsx)("label",{htmlFor:i,children:u});return(0,c.jsxs)("div",{className:"mdc-form-field",children:[(0,c.jsx)("div",{className:n()("mdc-checkbox",{"mdc-checkbox--disabled":d,"mdc-checkbox--align-left":h}),children:m?(0,c.jsx)(l.A,{style:{margin:"0"},isSaving:!0}):(0,c.jsxs)(a.Fragment,{children:[(0,c.jsx)("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:i,name:s,value:o,checked:r,disabled:d,onChange:t,tabIndex:g,onKeyDown:p}),(0,c.jsxs)("div",{className:"mdc-checkbox__background",children:[(0,c.jsx)("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 12 9",children:(0,c.jsx)("path",{className:"mdc-checkbox__checkmark-path",d:"M2.08301 5.28834L3.55703 7.29507C4.24647 8.23368 5.5034 8.23368 6.19285 7.29507L10.083 1.99902",fill:"none",stroke:"none"})}),(0,c.jsx)("div",{className:"mdc-checkbox__mixedmark"})]})]})}),!f&&v,f&&(0,c.jsxs)("div",{className:"mdc-checkbox__content",children:[v,(0,c.jsx)("div",{className:"mdc-checkbox__description",children:f})]})]})}Checkbox.propTypes={onChange:r().func.isRequired,onKeyDown:r().func,id:r().string.isRequired,name:r().string.isRequired,value:r().string.isRequired,checked:r().bool,disabled:r().bool,children:r().node.isRequired,tabIndex:r().oneOfType([r().number,r().string]),loading:r().bool,alignLeft:r().bool,description:r().node,badge:r().node},Checkbox.defaultProps={checked:!1,disabled:!1,tabIndex:void 0,onKeyDown:null,loading:!1,alignLeft:!1,description:""}},13719:(e,t,i)=>{i.d(t,{A:()=>ModuleDashboardEffects});var s=i(50539),n=i(37226),o=i(73874),r=i(62540);const a={[o.Oo]:"DashboardMainEffectComponent",[o.oE]:"DashboardEntityEffectComponent"};function ModuleDashboardEffects(){const e=(0,o.Ay)(),t=(0,s.useSelect)(e=>e(n.i).getModules());if(!t)return null;const i=a[e];return Object.values(t).reduce((e,t)=>{const s=t[i];return t.active&&s?[...e,(0,r.jsx)(s,{},t.s
|
|||
|
|
(0,c.__)("Select up to %d metrics","google-site-kit"),h.Hl),onCloseClick:e,children:!t&&(0,x.jsx)(k.A,{children:(0,j.A)((0,c.__)("Edit your personalized goals or deactivate this widget in <link><strong>Settings</strong></link>","google-site-kit"),{link:(0,x.jsx)(M.A,{onClick:o,disabled:s,secondary:!0}),strong:(0,x.jsx)("strong",{})})})})}Header.propTypes={closePanel:a().func.isRequired};var E=i(78340),w=i(37226),C=i(67150),T=i(77766),D=i(64067),R=i(12850),O=i(49383),z=i(23224);function SelectionPanelFooter({savedItemSlugs:e=[],selectedItemSlugs:t=[],saveSettings:i=()=>{},minSelectedItemCount:s=0,maxSelectedItemCount:n=0,isBusy:r,onSaveSuccess:a=()=>{},onCancel:d=()=>{},isOpen:g,closePanel:m=()=>{},isFullScreen:h=!1}){const[f,y]=(0,l.useState)(null),[v,_]=(0,l.useState)(!1),k=(0,u.useSelect)(e=>e(p.K9).isFetchingSyncAvailableAudiences()),I=(0,l.useMemo)(()=>!(0,o.isEqual)((0,R.N9)(t),(0,R.N9)(e)),[e,t]);let A=e?.length>0&&I?(0,c.__)("Apply changes","google-site-kit"):(0,c.__)("Save selection","google-site-kit");h&&(A=(0,c.__)("Complete setup","google-site-kit"));const b=(0,l.useCallback)(async()=>{const{error:e}=await i(t);e||(a(),m(),h||(y(A),_(!0)))},[i,t,a,m,h,A]),M=(0,l.useCallback)(()=>{m(),d()},[m,d]),[S,N]=(0,l.useState)(null);(0,l.useEffect)(()=>{null!==S&&S!==g&&g&&(y(null),_(!1)),N(g)},[g,S]);const E=t?.length||0,w=k?(0,x.jsx)(z.A,{width:"89px",height:"20px"}):(0,x.jsx)("p",{className:"googlesitekit-selection-panel-footer__item-count",children:(0,j.A)((0,c.sprintf)(/* translators: 1: Number of selected items. 2: Maximum number of items that can be selected. */ /* translators: 1: Number of selected items. 2: Maximum number of items that can be selected. */
|
|||
|
|
(0,c.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),E,n),{MaxCount:(0,x.jsx)("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})})});return(0,x.jsx)("footer",{className:"googlesitekit-selection-panel-footer",children:(0,x.jsx)("div",{className:"googlesitekit-selection-panel-footer__content",children:(0,x.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,x.jsx)(O.Button,{onClick:M,disabled:r,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),w,(0,x.jsx)(O.SpinnerButton,{onClick:b,isSaving:r,disabled:E<s||E>n||r||!g&&v,children:f||A})]})})})}function Footer({isOpen:e,closePanel:t=o.noop,savedMetrics:i,onNavigationToOAuthURL:s=()=>{},isFullScreen:n=!1}){const r=(0,u.useRegistry)(),a=(0,T.A)(),d=(0,_.A)(h.Is,h.Y0),y=(0,u.useSelect)(e=>e(g.oR).isSavingKeyMetricsSettings()),v=`${a}_kmw-sidebar`,k=d?.flatMap(e=>{const t=f.G[e];return t?.requiredCustomDimensions||[]}),I=(0,u.useInViewSelect)(e=>{if(!k?.length)return!1;return!e(p.K9).hasCustomDimensions(k)},[k]),j=(0,u.useInViewSelect)(e=>e(g.oR).hasScope(p.S9)),M=(0,u.useSelect)(e=>e(w.i).isModuleConnected(m.L1)),S=(0,u.useSelect)(e=>e(b.O4).getAdminURL("googlesitekit-dashboard",{notification:"custom_dimensions"})),N=(0,u.useSelect)(e=>{const t=e(g.oR).getConnectURL({additionalScopes:[p.S9],redirectURL:S});return!!t&&e(A.M).isNavigatingTo(t)}),O=(0,u.useSelect)(e=>e(b.O4).getAdminURL("googlesitekit-dashboard")),z=(0,u.useSelect)(e=>!!O&&e(A.M).isNavigatingTo(O)),{saveKeyMetricsSettings:L,setPermissionScopeError:B}=(0,u.useDispatch)(g.oR),{setValues:P}=(0,u.useDispatch)(E.s),{navigateTo:G}=(0,u.useDispatch)(A.M),U=(0,u.useSelect)(e=>e(p.K9).getKeyMetricsConversionEventWidgets()),F=(0,l.useCallback)(async e=>{const{error:t}=await L({widgetSlugs:e});return{error:t}},[L]),V=(0,l.useCallback)(async e=>{if(Object.values(U).flat().some(t=>e.includes(t))?(0,R.sx)(v,"metrics_sidebar_save","conversion_reporting"):(0,R.sx)(v,"metrics_sidebar_save"),M&&I){if(P(p.Kr,{autoSubmit:!0}),!j)return s(),t(),void B({code:C.db,message:(0,c.__)("Additional permissions are required to create new Analytics custom dimensions","google-site-kit"),data:{status:403,scopes:[p.S9],skipModal:!0,redirectURL:S}});n&&await(0,D.mR)(r)}n&&G(O)},[U,M,I,n,v,P,j,s,t,B,S,r,G,O]),W=(0,l.useCallback)(()=>{(0,R.sx)(v,"metrics_sidebar_cancel"),n&&G(O)},[n,O,G,v]);return(0,x.jsx)(SelectionPanelFooter,{savedItemSlugs:i,selectedItemSlugs:d,saveSettings:F,minSelectedItemCount:h.LO,maxSelectedItemCount:h.Hl,isBusy:y||N||z&&n,onSaveSuccess:()=>{V(d)},onCancel:W,isOpen:e,closePanel:t,isFullScreen:n})}SelectionPanelFooter.propTypes={savedItemSlugs:a().array,selectedItemSlugs:a().array,saveSettings:a().func,saveError:a().object,minSelectedItemCount:a().number,maxSelectedItemCount:a().number,isBusy:a().bool,onSaveSuccess:a().func,onCancel:a().func,isOpen:a().bool,closePanel:a().func,isFullScreen:a().bool},Footer.propTypes={isOpen:a().bool,closePanel:a().func,savedMetrics:a().array,onNavigationToOAuthURL:a().func,isFullScreen:a().bool};var L=i(54593);function SelectionPanelItems({savedItemSlugs:e=[],allMetricItems:t}){return(0,x.jsx)("div",{className:"googlesitekit-selection-panel-items",children:(0,x.jsx)(L.A,{savedItemSlugs:e,allMetricItems:t})})}function MetricItems({savedMetrics:e}){const t=(0,N.A)(),{isKeyMetricAvailable:i}=(0,u.useSelect)(e=>e(g.oR)),s=(0,u.useInViewSelect)(e=>i=>f.G[i].displayInSelectionPanel({select:e,isViewOnlyDashboard:t,slug:i}),[t]);const n=Object.keys(f.G).reduce(function(e,t){if(!i(t))return e;if(void 0===s||"function"==typeof f.G[t].displayInSelectionPanel&&!s(t))return e;const{title:n,description:o,metadata:{group:r}}=f.G[t];return{...e,[t]:{title:n,description:o,group:r}}},{});return(0,x.jsx)(SelectionPanelItems,{savedItemSlugs:e,allMetricItems:n})}SelectionPanelItems.propTypes={savedItemSlugs:a().array,allMetricItems:a().object.isRequired},MetricItems.propTypes={savedMetrics:a().array};var B=i(67768);const P=(0,v.A)({moduleName:m.L1})(function KeyMetricsError({savedMetrics:e}){const t=(0,_.A)(h.Is,h.Y0
|
|||
|
|
(0,c.__)("Select at least %1$d metrics (%2$d selected)","google-site-kit"),h.LO,r):r>h.Hl&&(a=(0,c.sprintf)(/* translators: 1: Maximum number of metrics that can be selected. 2: Number of selected metrics. */ /* translators: 1: Maximum number of metrics that can be selected. 2: Number of selected metrics. */
|
|||
|
|
(0,c.__)("Select up to %1$d metrics (%2$d selected)","google-site-kit"),h.Hl,r));let d=n;return s&&a&&(d={message:a}),(0,x.jsx)(B.A,{error:d,skipRetryMessage:!!a})});function PanelContent({isOpen:e=!1,closePanel:t,savedViewableMetrics:i,showHeader:s=!0,setIsNavigatingToOAuthURL:r=o.noop,isFullScreen:a=!1}){return(0,x.jsxs)(l.Fragment,{children:[s&&(0,x.jsx)(Header,{closePanel:t}),(0,x.jsx)(MetricItems,{savedMetrics:i}),(0,x.jsx)(I,{}),(0,x.jsxs)("div",{className:n()("googlesitekit-user-input__footer-container",{"googlesitekit-user-input__footer-container--fullscreen":a}),children:[(0,x.jsx)(P,{savedMetrics:i}),(0,x.jsx)(Footer,{isOpen:e,closePanel:t,savedMetrics:i,onNavigationToOAuthURL:()=>{r(!0)},isFullScreen:a})]})]})}PanelContent.propTypes={isOpen:a().bool,closePanel:a().func,savedViewableMetrics:a().array,showHeader:a().bool,setIsNavigatingToOAuthURL:a().func,isFullScreen:a().bool}},27240:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(62688),n=i.n(s),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:n().bool,style:n().object};const r=Spinner},27333:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(35470),n=i(78340);function o(e,t){return(0,s.A)(i=>{const{getValue:s}=i(n.s);return s(e,t)},[e,t])}},28663:(e,t,i)=>{i.d(t,{W:()=>A,A:()=>AudienceSegmentationIntroductoryOverlayNotification});var s,n,o=i(62688),r=i.n(o),a=i(82871),l=i(50539),c=i(63696);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d.apply(null,arguments)}const u=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 296 163"},e),s||(s=c.createElement("g",{clipPath:"url(#audience-segmentation-introductory-graphic-desktop_svg__a)"},c.createElement("path",{fill:"#B8E6CA",d:"M0 16C0 7.163 7.163 0 16 0h264c8.837 0 16 7.163 16 16v147H0z"}),c.createElement("g",{filter:"url(#audience-segmentation-introductory-graphic-desktop_svg__b)"},c.createElement("rect",{width:153,height:174,x:-10,y:25,fill:"#fff",rx:11})),c.createElement("rect",{width:53.016,height:9.516,x:9.031,y:110.641,fill:"#EBEEF0",rx:4.758}),c.createElement("rect",{width:19.031,height:9.516,x:9.031,y:95.688,fill:"#EBEEF0",rx:4.758}),c.createElement("rect",{width:19.031,height:9.516,x:9.031,y:148.703,fill:"#EBEEF0",rx:4.758}),c.createElement("path",{fill:"#B8E6CA",d:"M94.672 108.602a8.836 8.836 0 0 1 8.836-8.836h13.594a8.836 8.836 0 0 1 0 17.672h-13.594a8.836 8.836 0 0 1-8.836-8.836"}),c.createElement("rect",{width:36,height:9,x:9,y:46,fill:"#EBEEF0",rx:4.5}),c.createElement("path",{fill:"#FFDED3",d:"M94.672 161.617a8.836 8.836 0 0 1 8.836-8.836h13.594a8.836 8.836 0 1 1 0 17.672h-13.594a8.836 8.836 0 0 1-8.836-8.836"}),c.createElement("g",{filter:"url(#audience-segmentation-introductory-graphic-desktop_svg__c)"},c.createElement("rect",{width:153,height:174,x:152,y:25,fill:"#fff",rx:11})),c.createElement("rect",{width:52.805,height:9.516,x:170.955,y:110.641,fill:"#EBEEF0",rx:4.758}),c.createElement("rect",{width:18.956,height:9.516,x:170.955,y:95.688,fill:"#EBEEF0",rx:4.758}),c.createElement("rect",{width:18.956,height:9.516,x:170.955,y:148.703,fill:"#EBEEF0",rx:4.758}),c.createElement("path",{fill:"#B8E6CA",d:"M256.256 108.602a8.836 8.836 0 0 1 8.836-8.836h13.47a8.836 8.836 0 0 1 8.835 8.836 8.836 8.836 0 0 1-8.835 8.836h-13.47a8.836 8.836 0 0 1-8.836-8.836"}),c.createElement("rect",{width:36,height:9,x:171,y:46,fill:"#EBEEF0",rx:4.5}),c.createElement("path",{stroke:"#EBEEF0",strokeWidth:2,d:"M295 73.5H152"}),c.createElement("path",{fill:"#FFDED3",d:"M256.256 161.617a8.836 8.836 0 0 1 8.836-8.836h13.47a8.836 8.836 0 0 1 8.835 8.836 8.836 8.836 0 0 1-8.835 8.836h-13.47a8.836 8.836 0 0 1-8.836-8.836"}),c.createElement("path",{stroke:"#EBEEF0",strokeWidth:2,d:"M143 73.5H0"}))),n||(n=c.createElement("defs",null,c.createElement("filter",{id:"audience-segmentation-introductory-graphic-desktop_
|
|||
|
|
(0,K._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",c.length,"google-site-kit"),c.join((0,K.__)(" and ","google-site-kit")))})})}function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},J.apply(null,arguments)}MetricItem.propTypes={slug:v().string.isRequired,title:v().string.isRequired,description:v().string.isRequired,isNewlyDetected:v().bool,savedItemSlugs:v().array};const key_metrics_no_selected_items=e=>s.createElement("svg",J({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 383 238"},e),N||(N=s.createElement("path",{fill:"#B8E6CA",d:"M59.238 58.571c-2.136 20.178 4.272 29.099 20.48 53.216 16.209 24.118-29.092 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 29.443-3.208 57.819 12.98 90.86 5.9s46.385-42.599 43.153-68.059c-5.59-44.041-26.24-49.107-34.893-66.461s2.902-52.997-30.287-73.16-76.71 14.42-112.503 12.37c-20.651-1.182-40.932-4.995-59.264.86-18.53 5.918-32.662 22.571-34.335 38.621"})),E||(E=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__a)"},s.createElement("rect",{width:130.621,height:89.651,x:242.455,y:45.266,fill:"#fff",rx:10.957,transform:"rotate(15 242.455 45.266)"}))),w||(w=s.createElement("rect",{width:24.903,height:7.969,x:253.726,y:64.785,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 253.726 64.785)"})),C||(C=s.createElement("rect",{width:49.806,height:19.923,x:249.342,y:81.144,fill:"#FFDED3",rx:9.961,transform:"rotate(15 249.342 81.144)"})),T||(T=s.createElement("rect",{width:99.428,height:8.773,x:240.436,y:114.357,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 240.436 114.357)"})),D||(D=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m256.195 90.198 4.644 8.044m0 0 1.412-4.986m-1.412 4.986-5.023-1.27"})),R||(R=s.createElement("rect",{width:19.923,height:5.977,x:268.706,y:93.551,fill:"#fff",rx:1.992,transform:"rotate(15 268.706 93.55)"})),O||(O=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__b)"},s.createElement("rect",{width:130.621,height:89.68,x:13.887,y:79.094,fill:"#fff",rx:10.957,transform:"rotate(-15 13.887 79.094)"}))),z||(z=s.createElement("rect",{width:62.386,height:7.798,x:32.989,y:90.122,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 32.99 90.122)"})),L||(L=s.createElement("rect",{width:49.806,height:19.923,x:37.691,y:106.902,fill:"#FFDED3",rx:9.961,transform:"rotate(-15 37.691 106.902)"})),B||(B=s.createElement("rect",{width:99.428,height:7.798,x:46.612,y:140.967,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 46.612 140.967)"})),P||(P=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m48.152 111.318 8.044 4.645m0 0-1.27-5.024m1.27 5.024-4.986 1.411"})),G||(G=s.createElement("rect",{width:19.923,height:5.977,x:60.663,y:107.966,fill:"#fff",rx:1.992,transform:"rotate(-15 60.663 107.966)"})),U||(U=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__c)"},s.createElement("rect",{width:130.621,height:89.68,x:126.251,y:37.4,fill:"#fff",rx:10.957}))),F||(F=s.createElement("rect",{width:98.333,height:7.867,x:143.013,y:53.134,fill:"#EBEEF0",rx:3.933})),V||(V=s.createElement("rect",{width:49.806,height:19.923,x:142.369,y:70.423,fill:"#B8E6CA",rx:9.961})),W||(W=s.createElement("rect",{width:33.04,height:7.867,x:143.013,y:105.84,fill:"#EBEEF0",rx:3.933})),H||(H=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m151.336 84.036 6.568-6.567m0 0-5.182-.073m5.182.073.073 5.18"})),Y||(Y=s.createElement("rect",{width:19.923,height:5.977,x:164.287,y:77.395,fill:"#fff",rx:1.992})),s.createElement("mask",{id:"key-metrics-no-selected-items_svg__d",width:273,height:230,x:58,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},Z||(Z=s.createElement("path",{fill:"#B8E6CA",d:"M59.237 58.571C57.1 78.75 63.509 87.67 79.717 111.787c16.209 24.118-29.091 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 2
|
|||
|
|
(0,s.__)("Your Google account does not have sufficient permissions to access %s data, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit"),r)),a&&a.login&&(c=(0,s.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
|
|||
|
|
(0,s.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),a.login)),c||(c=(0,s.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},66201:(e,t,i)=>{i.d(t,{Z:()=>c});var s=i(31589),n=i(40960),o=i(42926),r=i(63696),a=i(50539),l=i(7081);function c(){const{setIsOnline:e}=(0,a.useDispatch)(l.n),t=(0,a.useSelect)(e=>e(l.n).getIsOnline()),i=(0,r.useCallback)(async()=>{if(navigator.onLine){try{await(0,o.A)({path:"/google-site-kit/v1/"})}catch(t){if("fetch_error"===t?.code)return void e(!1)}e(!0)}else e(!1)},[e]);(0,s.A)("online",i),(0,s.A)("offline",i),(0,n.A)(i,t?12e4:15e3)}},66889:(e,t,i)=>{function s(e,t){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();return!(i.bottom<s.top||s.bottom<i.top||i.right<s.left||s.right<i.left)}i.d(t,{N:()=>s})},67150:(e,t,i)=>{i.d(t,{G:()=>c,HY:()=>u,SG:()=>d,db:()=>n,e4:()=>p,vl:()=>g});i(17243);var s=i(82871);const n="missing_required_scopes",o="insufficientPermissions",r="forbidden",a="internal_server_error",l="invalid_json";function c(e){return e?.code===n}function d(e){return[o,r].includes(e?.data?.reason)}function u(e){return!!e?.data?.reconnectURL}function g(e,t){return!(!t?.storeName||d(e)||c(e)||u(e))}function p(e){return e?.code===a?(0,s.__)("There was a critical error on this website while fetching data","google-site-kit"):e?.code===l?(0,s.__)("The server provided an invalid response","google-site-kit"):e?.message}},67768:(e,t,i)=>{i.d(t,{A:()=>SelectionPanelError});var s=i(62688),n=i.n(s),o=i(63696),r=i(66889),a=i(77967),l=i(62540);function SelectionPanelError({error:e,noPrefix:t=!0,skipRetryMessage:s=!0}){const n=(0,o.useRef)();return(0,o.useEffect)(()=>{if(e){const e=i.g.document.activeElement;e&&e.closest(".googlesitekit-selection-panel-item")&&(0,r.N)(n.current,e)&&e.scrollIntoView()}},[e]),e?(0,l.jsx)("div",{ref:n,children:(0,l.jsx)(a.A,{className:"googlesitekit-notice--square googlesitekit-selection-panel-error",error:e,noPrefix:t,skipRetryMessage:s})}):null}SelectionPanelError.propTypes={error:n().shape({message:n().string}),noPrefix:n().bool,skipRetryMessage:n().bool}},68485:(e,t,i)=>{i.d(t,{r:()=>AdminScreenTooltip,i:()=>s.i});var s=i(15863),n=i(63696),o=i(50539),r=i(62688),a=i(36703),l=i(40960),c=i(60592),d=i(14007),u=i(39771),g=i(32947),p=i(62540);function JoyrideTooltip(e){const{title:t,content:s,dismissLabel:o,disableOverlay:r=!0,target:m,cta:h=!1,className:f,styles:y={},slug:v="",placement:_="auto",onDismiss:k=()=>{},onView:x=()=>{},onTourStart:I=()=>{},onTourEnd:j=()=>{}}=e;function A(){return!!i.g.document.querySelector(m)}const[b,M]=(0,n.useState)(A),S=(0,g.dv)(),N=S===g.mp||S===g.Lg,[E,w]=(0,n.useState)(!0),C=(0,n.useRef)(N);if((0,l.A)(()=>{A()&&M(!0)},b?null:250),(0,n.useEffect)(()=>{let e=()=>{};if("function"==typeof i.g.ResizeObserver){const t=i.g.document.querySelector(m);if(t){const s=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});s.observe(t),e=()=>s.disconnect()}}return e},[m,b]),(0,n.useEffect)(()=>{let e;return C.current!==N&&(w(!1),e=setTimeout(()=>{w(!0)},50),C.current=N),()=>{e&&clearTimeout(e)}},[N]),!b)return null;const T=[{title:t,target:m,content:s,disableBeacon:!0,isFixed:!0,placement:_,cta:h,className:f}],D={close:o,last:o};return(0,p.jsx)(d.A,{slug:v,children:(0,p.jsx)(a.Ay,{callback:function({type:e}){switch(e){case a.qY.TOUR_START:I(),i.g.document.body.classList.add("googlesitekit-showing-tooltip");break;case a.qY.TOUR_END:j(),i.g.document.body.classList.remove("googlesitekit-showing-tooltip");break;case a.qY.STEP_AFTER:k();break;case a.qY.TOOLTIP:x()}},disableOverlay:r,spotlightPadding:0,floaterProps:u.ei,locale:D,steps:T,styles:{...u.R0,...y,options:{...u.R0.options,...y?.options},spotlight:{...u.R0.spotlight,...y?.spotlight}},tooltipComponent:c.A,run:E,disableScrolling:!0})})}JoyrideTooltip.propTypes={title:r.PropTypes.node,content:r.PropTypes.string,disableOverlay:r.PropTypes.bool,dismissLabel:r.PropTypes.string,target:r.PropTypes.string.
|
|||
|
|
(0,o.__)("%s Gathering Data","google-site-kit"),t?.name),description:(0,o.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
|
|||
|
|
(0,o.__)("%s data is not yet available, please check back later","google-site-kit"),t?.name)})}ReportZero.propTypes={moduleSlug:n().string.isRequired}},73589:(e,t,i)=>{i.d(t,{CX:()=>n,Py:()=>r,SM:()=>s,kj:()=>o});const s="adsense-connect-cta",n="adsense-connect-cta-tooltip-state",o="adsense-ga4-top-earnings-notice",r="adsense"},73874:(e,t,i)=>{i.d(t,{Ay:()=>a,Oo:()=>o,oE:()=>r});var s=i(24558),n=i(77766);const o=s.jU,r=s.f7;function a(){const e=(0,n.A)();return e===s.jU||e===s.Ax?o:e===s.f7||e===s.Is?r:null}},74595:(e,t,i)=>{i.d(t,{wA:()=>a.A,ws:()=>g.w,WM:()=>r.A});var s=i(29725),n=i(56805),o=i(78913),r=i(35470),a=i(63737),l=i(44319),c=i(31170),d=i(30043),u=i(66293),g=i(1102),p=i(47121),m=i(97241);const h=(0,s.I)({},i.g.wp?.data);h.combineStores=p.o3,h.commonActions=p.jU,h.commonControls=p._5,h.commonStore=p.x0,h.createReducer=function(e){return(0,m.Ay)(e)},h.useInViewSelect=g.w,h.controls=n.n,h.createRegistryControl=o.b,h.createRegistrySelector=o.N,h.useSelect=r.A,h.useDispatch=a.A,h.useRegistry=l.A,h.withSelect=c.A,h.withDispatch=d.A,h.RegistryProvider=u.Ay;const f=h;void 0===i.g.googlesitekit&&(i.g.googlesitekit={}),i.g.googlesitekit.data=f},74995:(e,t,i)=>{i.d(t,{A:()=>Notifications});var s=i(62688),n=i.n(s),o=i(50539),r=i(77766),a=i(71423),l=i(53137),c=i(50532),d=i.n(c),u=i(43569),g=i(62540);const p=d()(e=>({id:e,Notification:m(e)(u.A)}));function m(e){return t=>{function WithNotificationID(i){return(0,g.jsx)(t,{...i,id:e})}return WithNotificationID.displayName="WithNotificationID",(t.displayName||t.name)&&(WithNotificationID.displayName+=`(${t.displayName||t.name})`),WithNotificationID}}function Notifications({areaSlug:e,groupID:t=l.He.DEFAULT}){const i=(0,r.A)(),s=(0,o.useSelect)(e=>e(a.D).getQueuedNotifications(i,t));if(void 0===s?.[0]||s?.[0]?.areaSlug!==e)return null;const{id:n,Component:c}=s[0],d={...p(n)};return(0,g.jsx)(c,{...d})}Notifications.propTypes={viewContext:n().string,areaSlug:n().string}},75487:(e,t,i)=>{i.d(t,{fh:()=>Cell,xA:()=>g,fI:()=>d});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(62540);function Cell(e){const{className:t,alignTop:i,alignMiddle:s,alignBottom:n,alignRight:o,alignLeft:l,smAlignRight:c,mdAlignRight:d,lgAlignRight:u,smSize:g,smStart:p,smOrder:m,mdSize:h,mdStart:f,mdOrder:y,lgSize:v,lgStart:_,lgOrder:k,size:x,children:I,...j}=e;return(0,a.jsx)("div",{...j,className:r()(t,"mdc-layout-grid__cell",{"mdc-layout-grid__cell--align-top":i,"mdc-layout-grid__cell--align-middle":s,"mdc-layout-grid__cell--align-bottom":n,"mdc-layout-grid__cell--align-right":o,"mdc-layout-grid__cell--align-left":l,"mdc-layout-grid__cell--align-right-phone":c,"mdc-layout-grid__cell--align-right-tablet":d,"mdc-layout-grid__cell--align-right-desktop":u,[`mdc-layout-grid__cell--span-${x}`]:12>=x&&x>0,[`mdc-layout-grid__cell--span-${v}-desktop`]:12>=v&&v>0,[`mdc-layout-grid__cell--start-${_}-desktop`]:12>=_&&_>0,[`mdc-layout-grid__cell--order-${k}-desktop`]:12>=k&&k>0,[`mdc-layout-grid__cell--span-${h}-tablet`]:8>=h&&h>0,[`mdc-layout-grid__cell--start-${f}-tablet`]:8>=f&&f>0,[`mdc-layout-grid__cell--order-${y}-tablet`]:8>=y&&y>0,[`mdc-layout-grid__cell--span-${g}-phone`]:4>=g&&g>0,[`mdc-layout-grid__cell--start-${p}-phone`]:4>=p&&p>0,[`mdc-layout-grid__cell--order-${m}-phone`]:4>=m&&m>0}),children:I})}Cell.propTypes={smSize:n().number,smStart:n().number,smOrder:n().number,mdSize:n().number,mdStart:n().number,mdOrder:n().number,lgSize:n().number,lgStart:n().number,lgOrder:n().number,size:n().number,alignTop:n().bool,alignMiddle:n().bool,alignBottom:n().bool,alignRight:n().bool,alignLeft:n().bool,smAlignRight:n().bool,mdAlignRight:n().bool,lgAlignRight:n().bool,className:n().string,children:n().node},Cell.defaultProps={className:"",size:0,smSize:0,smStart:0,smOrder:0,mdSize:0,mdStart:0,mdOrder:0,lgSize:0,lgStart:0,lgOrder:0};var l=i(63696);const c=(0,l.forwardRef)(({className:e,children:t,...i},s)=>(0,a.jsx)("div",{ref:s,className:r()("mdc-layout-grid__inner",e),...i,children:t}));c.displayName="Row",c.propTypes={className:n().string,children:n().node},c.defaultProps={className:""};const d=c,u=(0,l.forwardRef)((
|
|||
|
|
(0,g.__)("%s of total pageviews","google-site-kit"),(0,F.Eo)(l,{style:"percent",maximumFractionDigits:1})),metricValue:a.currentValue,Badge:()=>(0,B.jsx)(ot.A,{previousValue:a.previousValue,currentValue:a.currentValue})}),(0,B.jsx)(AudienceTileCitiesMetric,{TileIcon:ze,title:(0,g.__)("Cities with the most visitors","google-site-kit"),topCities:d}),(!j||N&&!m)&&(0,B.jsx)(AudienceTilePagesMetric,{audienceTileNumber:e,audienceSlug:t,TileIcon:Pe,title:(0,g.__)("Top content by pageviews","google-site-kit"),topContentTitles:p,topContent:u,isTopContentPartialData:S})]})]})})}function AudienceTooltipMessage({audienceSlug:e,audienceName:t}){const i=(0,c.useSelect)(e=>e(Fe.O4).getDocumentationLinkURL("visitor-group-insights"));return(0,a.useMemo)(()=>{switch(e){case"new-visitors":return(0,z.A)((0,g.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,g.__)('%s are people who visited your site for the first time. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. <link>Learn more</link>',"google-site-kit"),"<strong>New visitors</strong>"),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(L.A,{href:i,external:!0,hideExternalIndicator:!0})});case"returning-visitors":return(0,z.A)((0,g.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,g.__)('%s are people who have visited your site at least once before. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. <link>Learn more</link>',"google-site-kit"),"<strong>Returning visitors</strong>"),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(L.A,{href:i,external:!0,hideExternalIndicator:!0})});default:return(0,z.A)((0,g.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,g.__)("%s is an audience that already exists in your Analytics property. Note that it's possible for a visitor to be counted in more than one group. <link>Learn more</link>","google-site-kit"),`<strong>${t}</strong>`),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(L.A,{href:i,external:!0,hideExternalIndicator:!0})})}},[e,t,i])}var mt,ht,ft,yt,vt,_t,kt,xt,It,jt,At,bt,Mt,St,Nt,Et,wt,Ct,Tt,Dt,Rt,Ot,zt,Lt,Bt,Pt,Gt,Ut,Ft,Vt,Wt,Ht,Yt,Zt,qt,Qt,Kt,Xt,$t,Jt,ei,ti,ii,si,ni,oi,ri,ai,li,ci,di,ui,gi,pi,mi,hi,fi,yi,vi,_i,ki,xi,Ii,ji,Ai,bi,Mi,Si,Ni,Ei;function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},wi.apply(null,arguments)}AudienceTileZeroData.propTypes={Widget:r().elementType.isRequired,audienceSlug:r().string.isRequired,title:r().string.isRequired,infoTooltip:r().oneOfType([r().string,r().element]),isMobileBreakpoint:r().bool,isTileHideable:r().bool,onHideTile:r().func},AudienceTile.propTypes={audienceTileNumber:r().number,audienceSlug:r().string.isRequired,title:r().string.isRequired,infoTooltip:r().oneOfType([r().string,r().element]),visitors:r().object,visitsPerVisitor:r().object,pagesPerVisit:r().object,pageviews:r().object,percentageOfTotalPageViews:r().number,topCities:r().object,topContent:r().object,topContentTitles:r().object,hasInvalidCustomDimensionError:r().bool,Widget:r().elementType.isRequired,audienceResourceName:r().string.isRequired,isZeroData:r().bool,isPartialData:r().bool,isTileHideable:r().bool,onHideTile:r().func},AudienceTooltipMessage.propTypes={audienceSlug:r().string.isRequired};const Ci=e=>a.createElement("svg",wi({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 211 109"},e),mt||(mt=a.createElement("path",{fill:"#B8E6CA",d:"M2.675 72.31a29.3 29.3 0 0 0 5.678 8.74c9.451 9.955 23.416 10.799 36.223 8.308a88.8 88.8 0 0 0 35.776-15.752c6.09-4.513 12.104-10.113 20.167-10.363 3.027-.093 6.158.741 8.445 2.71 4.753 4.063 4.668 11.012 8.377 15.829 4.932 6.405 12.026 8.389 19.764 9.128 21.862 2.086 47.902-4.758 62.939-21.412 13.426-14.868 15.038-38.526-1.214-52.08-7.425-6.192-17.606-9.03-27.216-7.584-7.345 1.105-14.801 4.467-22.404 5.401-8.954 1.103-14.49-2.659-21.734-7.04C114.852.58 98.164-2.345 83.874 2.072 70.195 6.301 60.35 17.846 47.04 22.918c-11.502 4.385-25.089 3.717-35.082 10.86C.133 42.228-2.84 59.286 2.675 72.31"})),a.createElement("path",{fill:"#161B18",d:"M108.273 109c54.612 0 98.883-1.735 98.883-3.874s-44.271-3.875-98.883-3.875-98.882 1.735-98.882 3.875S53.66 109 108.273 109",opacity:.1,style:{mixBlendMode:"multiply"}}),ht||(ht=a.createElement("path",{fill:"#CBD0D3",d:"M108.273 109c54.612 0 98.883-1.735 98.883-3.874s-44.271-3.875-98.883-3.875-98.882 1.735-98.882 3.875S53.66 109 108.273 109"})),ft||(ft=a.createElement("path",{stroke:"#161B18",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.472,d:"M134.765 53.225c-1.065 16.927-6.936 32.112-3.012 51.193h-4.468M139.814 104.418h-4.47l7.9-51.193"})),yt||(yt=a.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeWidth:1.468,d:"M120.504 36.651c-3.814 1.73-11.135 5.58-11.135 13.398M147.266 35.787c3.493 1.787 11.06 7.678 11.977 13.225"})),vt||(vt=a.createElement("path",{fill:"#77AD8C",d:"m151.555 75.952-3.102.282-18.926 1.719-11.063 1.002-1.049-24.735-1.825-43.046 34.528-1.262.697 32.058.094 4.316.642 29.565z"})),_t||(_t=a.createElement("path",{fill:"#5C9271",d:"m148.453 76.234 1.78-.162 1.323-.12-1.439-66.042-1.983.091 1.281 63.2-24.976 2.127.862-19.15-7.844-1.074.86 20.438.107 2.465.041.946 11.063-1.002 18.927-1.719z"})),kt||(kt=a.createElement("path",{fill:"#CBD0D3",d:"M135.891 70.752c.032.916-.392-20.197-.629-27.044-6.628-3.008-13.797-3.559-20.67-1.228l.628 27.043c6.874-2.33 14.043-1.779 20.671 1.23"})),xt||(xt=a.createElement("path",{fill:"#EBEEF0",d:"M135.926 70.752c.01.916-.547-20.194-.629-27.044 6.481-3.306 13.617-4.182 20.592-2.166l.629 27.043c-6.975-2.015-14.111-1.139-20.592 2.167"})),It||(It=a.createElement("path",{fill:"#CBD0D3",fillRule:"evenodd",d:"M133.233 60.796c-.083-3
|
|||
|
|
(0,g._n)("Select at least %1$d group (%2$d selected)","Select at least %1$d groups (%2$d selected)",Gi,"google-site-kit"),Gi,r):r>Ui&&(l=(0,g.sprintf)(/* translators: 1: Maximum number of groups that can be selected. 2: Number of selected groups. */ /* translators: 1: Maximum number of groups that can be selected. 2: Number of selected groups. */
|
|||
|
|
(0,g.__)("Select up to %1$d groups (%2$d selected)","google-site-kit"),Ui,r));const c=(0,a.useMemo)(()=>!(0,n.isEqual)((0,F.N9)(t),(0,F.N9)(e)),[t,e]);if(!l&&!o&&!i)return null;let d=o||i;return c&&l&&(d={message:l}),(0,B.jsx)(hs.A,{error:d})}function Panel(){const e=(0,V.A)(),t=(0,c.useSelect)(e=>e(u.n).getValue(Di)),i=(0,c.useSelect)(e=>e(q.K9).isFetchingSyncAvailableAudiences()),s=(0,c.useInViewSelect)(e=>{const{getConfigurableAudiences:t}=e(q.K9),{getConfiguredAudiences:i}=e(Q.oR),s=i()||[],n=t()||[];return n.length&&s.length?n.filter(({name:e})=>s.includes(e)).map(({name:e})=>e):[]}),n=(0,qe.A)(Vi,"autoSubmit"),{setValues:o}=(0,c.useDispatch)(Ue.s),{setValue:r}=(0,c.useDispatch)(u.n),l=(0,a.useCallback)(()=>{o(Ri,{[Oi]:s,[zi]:!1}),(0,F.sx)(`${e}_audiences-sidebar`,"audiences_sidebar_view")},[s,o,e]),d=(0,a.useCallback)(()=>{t&&(r(Di,!1),r(Pi,!1))},[r,t]);return(0,B.jsxs)(ss.Ay,{className:"googlesitekit-audience-selection-panel",closePanel:d,isOpen:t||n,isLoading:i,onOpen:l,children:[(0,B.jsx)(Header_Header,{closePanel:d}),(0,B.jsx)(AudienceItems,{savedItemSlugs:s}),(0,B.jsx)(LearnMoreLink,{}),(0,B.jsx)(SaveErrorNotice,{savedItemSlugs:s}),(0,B.jsx)(SyncErrorNotice,{}),(0,B.jsx)(AudienceCreationSuccessNotice,{}),(0,B.jsx)(Footer,{closePanel:d,isOpen:t,savedItemSlugs:s})]})}function AudienceSelectionPanel(){const e=(0,c.useSelect)(e=>e(u.n).getValue(Di));return(0,B.jsx)(es.Ay,{value:{key:"AudienceSelectionPanel",value:!!e},children:(0,B.jsx)(Panel,{})})}var fs=i(91560);function AudienceAreaFooter(){const e=(0,pe.A)(),t=(0,c.useSelect)(e=>e(Q.oR).getDateRangeDates({offsetDays:q.f2})),i=(0,c.useSelect)(i=>e?null:i(q.K9).getServiceReportURL("audiences",{dates:t}));return(0,c.useSelect)(e=>e(Wi.i).isModuleConnected(W.L1))?(0,B.jsx)(fs.A,{className:"googlesitekit-audience-widget__source",name:(0,g._x)("Analytics","Service name","google-site-kit"),href:i,external:!0}):null}var ys,vs,_s,ks,xs=i(674);function ChangeGroupsLink(){const e=(0,V.A)(),t=(0,c.useInViewSelect)(e=>e(q.K9).getConfigurableAudiences(),[]),{setValue:i}=(0,c.useDispatch)(u.n),s=(0,a.useCallback)(()=>{i(Di,!0),(0,F.sx)(`${e}_audiences-sidebar`,"change_groups")},[i,e]);return Array.isArray(t)&&t?.length>0?(0,B.jsx)(L.A,{className:"googlesitekit-widget-area__cta-link",onClick:s,leadingIcon:(0,B.jsx)(xs.A,{width:22,height:22}),secondary:!0,linkButton:!0,children:(0,g.__)("Change groups","google-site-kit")}):null}function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Is.apply(null,arguments)}const js=e=>a.createElement("svg",Is({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"-3 1 333.666 149.252"},e),ys||(ys=a.createElement("defs",null,a.createElement("filter",{id:"audience-connect-analytics-cta-graphic_svg__c",width:144.59,height:185.064,x:109.551,y:18.171,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},a.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a.createElement("feOffset",{dy:4}),a.createElement("feGaussianBlur",{stdDeviation:8}),a.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),a.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),a.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1731_24094"}),a.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1731_24094",result:"shape"})),a.createElement("filter",{id:"audience-connect-analytics-cta-graphic_svg__d",width:144.59,height:185.064,x:236.859,y:18.171,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},a.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a.createElement("feOffset",{dy:4}),a.createElement("feGaussianBlur",{stdDeviation:8}),a.createElement("feComposit
|
|||
|
|
(0,r.__)("%s (Please try again.)","google-site-kit"),k)),p||(k=(0,r.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
|
|||
|
|
(0,r.__)("Error: %s","google-site-kit"),k));const x=t?.data?.reconnectURL;x&&(0,a.m)(x)&&(k=(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"),k,x));return(0,g.jsx)(d.A,{className:e,type:d.A.TYPES.ERROR,description:(0,g.jsx)("span",{dangerouslySetInnerHTML:(0,u.p9)(k,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:_?{label:(0,r.__)("Retry","google-site-kit"),onClick:v}:void 0,hideIcon:h})}ErrorNotice.propTypes={className:n().string,error:n().shape({message:n().string}),hasButton:n().bool,storeName:n().string,message:n().string,noPrefix:n().bool,skipRetryMessage:n().bool,hideIcon:n().bool}},78340:(e,t,i)=>{i.d(t,{s:()=>s});const s="core/forms"},78464:(e,t,i)=>{i.d(t,{Z:()=>C,A:()=>T});var s=i(62688),n=i.n(s),o=i(82871),r=i(39016),a=i(63696),l=i(50539),c=i(78340),d=i(58116),u=i(93896),g=i(71423),p=i(53137),m=i(72455),h=i(77766),f=i(68485),y=i(12850),v=i(33566),_=i(80869),k=i(34375);var x=i(99897),I=i(16196),j=i(93934),A=i(54349),b=i(49655),M=i(12108),S=i(32947),N=i(62540);const E="setup-success-notification-audiences";function AudienceSegmentationSetupSuccessSubtleNotification({id:e,Notification:t}){const s=(0,S.dv)(),{dismissNotification:n}=(0,l.useDispatch)(g.D),r=(0,l.useSelect)(e=>e(d.oR).isAudienceSegmentationWidgetHidden());return(0,a.useEffect)(()=>{r&&n(E)},[n,r]),void 0===r?null:(0,N.jsx)(t,{children:(0,N.jsx)(A.A,{notificationID:e,type:b.Q.SUCCESS,title:(0,o.__)("Success! Visitor groups added to your dashboard","google-site-kit"),description:(0,o.__)("Get to know how different types of visitors interact with your site, e.g. which pages they visit and for how long","google-site-kit"),ctaButton:{label:(0,o.__)("Show me","google-site-kit"),onClick:function(e){e.preventDefault(),n(E),setTimeout(()=>{i.g.scrollTo({top:(0,M.YJ)(".googlesitekit-widget-area--mainDashboardTrafficAudienceSegmentation",s),behavior:"smooth"})},50)}},dismissButton:!0})})}AudienceSegmentationSetupSuccessSubtleNotification.propTypes={id:n().string.isRequired,Notification:n().elementType.isRequired};var w=i(27333);const C="audience_segmentation_setup_cta-notification";function AudienceSegmentationSetupCTABanner({id:e,Notification:t}){const i=(0,h.A)(),s=`${i}_audiences-setup-cta-dashboard`,{dismissNotification:n,registerNotification:r,pinNotification:x}=(0,l.useDispatch)(g.D),{setValues:I}=(0,l.useDispatch)(c.s),j={tooltipSlug:e,title:(0,o.__)("You can always enable groups in Settings later","google-site-kit"),content:(0,o.__)("The visitors group section will be added to your dashboard once you set it up.","google-site-kit"),dismissLabel:(0,o.__)("Got it","google-site-kit")},A=(0,f.i)(j),b=(0,l.useSelect)(t=>t(g.D).isNotificationDismissalFinal(e)),M=(0,w.A)(m.PW,"autoSubmit"),[S,C]=(0,a.useState)(!1),T=(0,a.useCallback)(()=>{r(E,{Component:AudienceSegmentationSetupSuccessSubtleNotification,areaSlug:p.bI.DASHBOARD_TOP}),n(e)},[r,n,e]),D=(0,a.useCallback)(()=>{C(!0)},[C]),R=(0,a.useCallback)(()=>x(e,p.He.SETUP_CTAS),[e,x]),{apiErrors:O,failedAudiences:z,isSaving:L,onEnableGroups:B}=(0,v.A)({onSuccess:T,onError:D,onOAuthNavigation:R}),{clearPermissionScopeError:P}=(0,l.useDispatch)(d.oR),{setSetupErrorCode:G}=(0,l.useDispatch)(u.O4),U=(0,a.useCallback)(()=>{I(m.PW,{autoSubmit:!1}),P(),G(null),C(!1)},[P,G,I]),F=(0,l.useSelect)(e=>e(u.O4).getSetupErrorCode()),V=(0,l.useSelect)(e=>e(u.O4).getDocumentationLinkURL("visitor-groups")),W=M&&"access_denied"===F,H={gaTrackingEventArgs:{category:s}};return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(t,{...H,children:(0,N.jsx)(k.A,{notificationID:e,title:(0,o.__)("Learn how different types of visitors interact with your site","google-site-kit"),description:(0,o.__)('Understand what brings new visitors to your site and keeps them coming back. Site Kit can now group your site visitors into relevant segments like "new" and "returning". To set up these new groups, Site Kit needs to update your Google Analytics property.',"google-site-kit"),learnMoreLink:{href:V},ctaButton:{label:L?(0,o.__)("Enabling groups","google-site-kit"):(0,o.__)("Enable groups","google-site-kit"),onClick:B,disabled:L,inProgress:L},dismissButton:{label:b?(0,o.__)("Don’t show again","go
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),n?p(n,{...l,unit:"second"}):"",s?p(s,{...l,unit:"minute"}):"",i?p(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"),n);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"),s),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"),n?t:"",s?o:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return s()}}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,s.isPlainObject)(e)&&(t={...e}),t}function u(e,t={}){e=(0,s.isFinite)(e)?e:Number(e),(0,s.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=d(t),{style:n="metric"}=i;return"metric"===n?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"),p(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"),p(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"),p(c(e),e%10==0?{}:t)):p(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===n?a(e,i):"durationISO"===n?function(e){let{hours:t,minutes:i,seconds:s}=l(e);return s=("0"+s).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${s}`:`${t}:${i}:${s}`}(e):p(e,i)}const g=o()(console.warn);function p(e,t={}){const{locale:i=h(),...s}=t;try{return new Intl.NumberFormat(i,s).format(e)}catch(t){g(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(s)} ).format( ${typeof e} )`,t.message)}const n={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],r={};for(const[e,t]of Object.entries(s))n[e]&&t===n[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 m(e,t={}){const{locale:i=h(),style:s="long",type:n="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:n}).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 h(e=i.g){const t=(0,s.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}},80035:(e,t,i)=>{i.d(t,{A:()=>_});var s,n=i(62688),o=i.n(n),r=i(4452),a=i.n(r),l=i(63696),c=i(19793);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d.apply(null,arguments)}const warning_notice=e=>l.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),s||(s=l.createElement("path",{fill:"currentColor",d:"M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1m0 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m-1-2h2V6h-2z"})));var u=i(42343),g=i(49655),p=i(62540);const m={[g.Q.NEW]:u.A,[g.Q.SUCCESS]:c.A,[g.Q.INFO]:warning_notice,[g.Q.WARNING]:warning_notice,[g.Q.ERROR]:warning_notice};function Icon({type:e}){const t=m[e]||warning_notice;return(0,p.jsx)(t,{width:24,height:24})}function Title({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__title",e),children:t})}function Description({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__description",e),children:t})}Icon.propTypes={type:o().oneOf(Object.values(g.Q))},Title.propTypes={className:o().string,children:o().node},Description.propTypes={className:o().string,children:o().node};var h=i(49383),f=i(83366);function CTAButton({label:e,disabled:t,inProgress:i,onClick:s,href:n,external:o=!1,hideExternalIndicator:r=!1}){let a;return o&&!r&&(a=(0,p.jsx)(f.A,{width:14,height:14})),(0,p.jsx)(h.SpinnerButton,{className:"googlesitekit-notice__cta",disabled:t,isSaving:i,onClick:s,href:n,target:o?"_blank":void 0,trailingIcon:a,children:e})}CTAButton.propTypes={label:o().string.isRequired,disabled:o().bool,inProgress:o().bool,onClick:o().func,href:o().string,external:o().bool,hideExternalIndicator:o().bool};var y=i(82871);function DismissButton({label:e=(0,y.__)("Got it","google-site-kit"),onClick:t,disabled:i}){return(0,p.jsx)(h.Button,{onClick:t,disabled:i,tertiary:!0,children:e})}DismissButton.propTypes={label:o().string,onClick:o().func.isRequired,disabled:o().bool};const v=(0,l.forwardRef)(({className:e,title:t,description:i,dismissButton:s,ctaButton:n,type:o=g.Q.INFO,children:r,hideIcon:l},c)=>(0,p.jsxs)("div",{ref:c,className:a()("googlesitekit-notice",`googlesitekit-notice--${o}`,e),children:[!l&&(0,p.jsx)("div",{className:"googlesitekit-notice__icon",children:(0,p.jsx)(Icon,{type:o})}),(0,p.jsxs)("div",{className:"googlesitekit-notice__content",children:[t&&(0,p.jsx)(Title,{children:t}),i&&(0,p.jsx)(Description,{children:i})]}),(s?.label||s?.onClick||n?.label&&(n?.onClick||n?.href)||r)&&(0,p.jsxs)("div",{className:"googlesitekit-notice__action",children:[r,(s?.label||s?.onClick)&&(0,p.jsx)(DismissButton,{label:s.label,onClick:s.onClick,disabled:s.disabled}),n?.label&&(n?.onClick||n?.href)&&(0,p.jsx)(CTAButton,{label:n.label,onClick:n.onClick,inProgress:n.inProgress,disabled:n.disabled,href:n.href,external:n.external,hideExternalIndicator:n.hideExternalIndicator})]})]}));v.TYPES=g.Q,v.propTypes={className:o().string,title:o().oneOfType([o().string,o().object]),description:o().node,type:o().oneOf(Object.values(g.Q)),dismissButton:o().shape(DismissButton.propTypes),ctaButton:o().shape({...CTAButton.propTypes,label:o().string}),children:o().node,hideIcon:o().bool};const _=v},80452:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,n=i(63696);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 9"},e),s||(s=n.createE
|
|||
|
|
(0,p.__)("Text input for option %s","google-site-kit"),t)})}),(0,E.jsx)(N.TextField,{id:`${n}-write-in`,onChange:t=>function(e,t){const i={...d,[t]:{...d[t],answer_text:e.target.value?.slice(0,200)}};u(i)}(t,e),value:s.answer_text,disabled:!s.selected})]})]},n)})}),(0,E.jsxs)("div",{className:"googlesitekit-survey__footer",children:[n>1&&(0,E.jsx)(N.HelperText,{persistent:!0,children:(0,p.sprintf)(/* translators: %s: the number of answers. */ /* translators: %s: the number of answers. */
|
|||
|
|
(0,p.__)("Choose at least %s answers","google-site-kit"),n)}),(0,E.jsx)(N.Button,{onClick:function(){const e=Object.values(d).filter(({selected:e})=>e).map(({answer_ordinal:e,answer_text:t})=>t?{answer_ordinal:e,answer_text:t}:{answer_ordinal:e});i({answer:e})},disabled:y,children:r})]})]})}SurveyQuestionMultiSelect.propTypes={question:c().string.isRequired,choices:c().arrayOf(c().shape({answer_ordinal:c().oneOfType([c().string,c().number]),text:c().string,write_in:c().bool})).isRequired,answerQuestion:c().func.isRequired,dismissSurvey:c().func.isRequired,minChoices:c().number,maxChoices:c().number,submitButtonText:c().string.isRequired};const pe=SurveyQuestionMultiSelect;function SurveyQuestionSingleSelectChoice({value:e,setValue:t,writeIn:i,setWriteIn:s,choice:n}){const{answer_ordinal:o,text:r,write_in:a}=n,l=e===o,c=`googlesitekit-survey__multi-select-${o}-${r}`;return(0,E.jsxs)("div",{className:"googlesitekit-single-select__choice",children:[(0,E.jsx)(N.Radio,{id:r.replace(/ /g,"-"),value:o,checked:l,name:r,onClick:()=>t(o),children:r}),a&&(0,E.jsxs)(g.Fragment,{children:[(0,E.jsx)(de.A,{children:(0,E.jsx)("label",{htmlFor:c,children:(0,p.sprintf)(/* translators: %s: Option name */ /* translators: %s: Option name */
|
|||
|
|
(0,p.__)("Text input for option %s","google-site-kit"),r)})}),(0,E.jsx)(N.TextField,{id:c,onChange:e=>s(e.target.value.slice(0,200)),value:i,disabled:!l})]})]})}SurveyQuestionSingleSelectChoice.propTypes={choice:c().shape({answer_ordinal:c().oneOfType([c().string,c().number]),text:c().string,write_in:c().bool}),value:c().string.isRequired,setValue:c().func.isRequired,writeIn:c().string.isRequired,setWriteIn:c().func.isRequired};const me=SurveyQuestionSingleSelectChoice;function SurveyQuestionSingleSelect({question:e,choices:t,answerQuestion:i,dismissSurvey:s,submitButtonText:n}){const[o,r]=(0,g.useState)(""),[a,l]=(0,g.useState)(""),c=t.map(e=>({...e,answer_ordinal:`${e.answer_ordinal}`})),d=!!o&&c.filter(({answer_ordinal:e,write_in:t})=>e===o&&t).length>0;const u=""===o||d&&""===a;return(0,E.jsxs)("div",{className:"googlesitekit-single-select",children:[(0,E.jsx)(Z,{title:e,dismissSurvey:s}),(0,E.jsx)("div",{className:"googlesitekit-survey__body",children:c.map((e,t)=>(0,E.jsx)(me,{value:o,setValue:r,writeIn:a,setWriteIn:l,choice:e},t))}),(0,E.jsx)("div",{className:"googlesitekit-survey__footer",children:(0,E.jsx)(N.Button,{onClick:function(){const e=d?{answer_text:a}:{};i({answer:{answer_ordinal:Number(o),...e}})},disabled:u,children:n})})]})}SurveyQuestionSingleSelect.propTypes={question:c().string.isRequired,choices:c().arrayOf(c().shape({answer_ordinal:c().oneOfType([c().string,c().number]),text:c().string,write_in:c().bool})).isRequired,answerQuestion:c().func.isRequired,dismissSurvey:c().func.isRequired};const he=SurveyQuestionSingleSelect,fe={MULTI_SELECT:"multi_select",OPEN_TEXT:"open_text",RATING:"rating",SINGLE_SELECT:"single_select"};function SurveyQuestion({currentQuestion:e,answerQuestion:t,dismissSurvey:i,isLastQuestion:s}){const n={key:e.question_text,answerQuestion:t,dismissSurvey:i,question:e.question_text,submitButtonText:s?(0,p.__)("Submit","google-site-kit"):(0,p.__)("Next","google-site-kit")};return(0,E.jsxs)(g.Fragment,{children:[e.question_type===fe.MULTI_SELECT&&(0,E.jsx)(pe,{...n,choices:e.question.answer_choice,minChoices:e.question.min_choices,maxChoices:e.question.max_choices}),e.question_type===fe.OPEN_TEXT&&(0,E.jsx)(ue,{...n,subtitle:e.question.subtitle,placeholder:e.question.placeholder}),e.question_type===fe.RATING&&(0,E.jsx)(le,{...n,choices:e.question.answer_choice}),e.question_type===fe.SINGLE_SELECT&&(0,E.jsx)(he,{...n,choices:e.question.answer_choice})]})}function ye(e,t){return!1===e.some(({trigger_condition:e})=>!(!Array.isArray(e)||0===e.length)&&e.some(e=>e.question_ordinal===t.question_ordinal))}function ve(e){return e.reduce((e,{question_ordinal:t,answer:i})=>({...e,[t]:i.answer.answer_ordinal||i.answer}),{})}SurveyQuestion.propTypes={currentQuestion:c().object.isRequired,answerQuestion:c().func.isRequired,dismissSurvey:c().func.isRequired,isLastQuestion:c().bool.isRequired};var _e=i(27333);const ke=Object.freeze([]);function CurrentSurvey(){const[e,t]=(0,g.useState)(!1),[i,s]=(0,g.useState)(!1),[n,o]=(0,g.useState)(!1),[r,a]=(0,g.useState)(!1),l=(0,m.useSelect)(e=>e(G.oR).getCurrentSurveyCompletions()),c=(0,m.useSelect)(e=>e(G.oR).getCurrentSurveyQuestions()),u=(0,m.useSelect)(e=>e(G.oR).getCurrentSurveySession()),p=(0,m.useSelect)(e=>e(G.oR).isTrackingEnabled()),h=u?`survey-${u.session_id}`:null,f=(0,_e.A)(h,"hideSurvey"),y=(0,_e.A)(h,"answers")||ke,{setValues:v}=(0,m.useDispatch)(F.s),{sendSurveyEvent:_}=(0,m.useDispatch)(G.oR);(0,g.useEffect)(()=>{c?.length&&!e&&(t(!0),_("survey_shown"))},[c,e,_]);const{currentQuestion:k,currentQuestionOrdinal:x}=function(e,t){const i=ve(t);let s=Math.max(0,...t.map(e=>e.question_ordinal))+1;const n=e?.find(e=>{const{question_ordinal:t,trigger_condition:n}=e;if(t<s)return!1;if(Array.isArray(n)&&n.length>0)for(const e of n){const t=i[e.question_ordinal];if(!t)return s++,!1;const n=e.answer_ordinal||[];if(!Array.isArray(t)&&!n.includes(t))return s++,!1;if(Array.isArray(t)&&!t.some(({answer_ordinal:e})=>n.includes(e))){s++;break}}return t===s});return{currentQuestion:n,currentQuestionOrdinal:s}}(c,y),I=(0,g.useCallback)(e=>{r||(a(!0),_("ques
|
|||
|
|
(0,o.__)("<span>Managed by</span> <strong>%s</strong>","google-site-kit"),i),{span:(0,b.jsx)("span",{}),strong:(0,b.jsx)("strong",{})}),(0,b.jsx)(k.Tooltip,{title:s?(0,o.sprintf)(/* translators: %s: name of the user who manages the module. */ /* translators: %s: name of the user who manages the module. */
|
|||
|
|
(0,o.__)("%s has connected this and given managing permissions to all admins. You can change who can view this on the dashboard.","google-site-kit"),i):(0,o.sprintf)(/* translators: %s: name of the user who manages the module. */ /* translators: %s: name of the user who manages the module. */
|
|||
|
|
(0,o.__)("Contact %s to change who can manage view access for this module","google-site-kit"),i),children:(0,b.jsx)("span",{className:"googlesitekit-dashboard-sharing-settings__tooltip-icon",children:(0,b.jsx)(T.A,{icon:D.A,size:18})})})]}):null}function Module({moduleSlug:e,moduleName:t,ownerUsername:i,recoverable:s}){const o=(0,u.A)(),a=(0,c.useRef)(),[l,v]=(0,c.useState)(void 0),_=(0,r.useSelect)(e=>e(g.i).hasRecoverableModules()),k=(0,r.useSelect)(e=>e(p.O4).hasMultipleAdmins()),x=_||k,I=(0,r.useSelect)(t=>{var i;return null!==(i=t(g.i).getSharingManagement(e))&&void 0!==i?i:"owner"}),j=(0,r.useSelect)(t=>t(y.oR).hasCapability(y.Ml,e)),A=(0,r.useSelect)(t=>t(y.oR).hasCapability(y.hz,e)),M=(0,r.useSelect)(e=>e(g.i).getSharedOwnershipModules()),S=(0,r.useSelect)(e=>e(m.n).getValue(h.zP)),N=(0,r.useSelect)(e=>e(g.i).isDoingSubmitSharingChanges()),E=(0,r.useSelect)(e=>e(p.O4).getDocumentationLinkURL("dashboard-sharing-module-recovery")),{setSharingManagement:w}=(0,r.useDispatch)(g.i),T=M&&Object.keys(M).includes(e);(0,c.useEffect)(()=>{v(T?"all_admins":I)},[I,T]);const D=(0,r.useSelect)(t=>t(g.i).haveModuleSharingSettingsChanged(e,"management"));(0,c.useEffect)(()=>{D&&(0,f.sx)(`${o}_sharing`,`change_management_${I}`,e)},[D,I,e,o]);const R=(0,c.useCallback)(t=>{const i=t.target.value;v(i),w(e,i)},[w,v,e]),O=e===S,z=!O&&void 0!==S||N;return(0,b.jsxs)("div",{className:n()("googlesitekit-dashboard-sharing-settings__module","googlesitekit-dashboard-sharing-settings__row",{"googlesitekit-dashboard-sharing-settings__row--editing":O,"googlesitekit-dashboard-sharing-settings__row--disabled":z}),ref:a,children:[(0,b.jsxs)("div",{className:"googlesitekit-dashboard-sharing-settings__column--product",children:[(0,b.jsx)(d.A,{slug:e,size:48}),(0,b.jsx)("span",{className:"googlesitekit-dashboard-sharing-settings__module-name",children:t})]}),(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__column--view",children:(0,b.jsx)(C,{moduleSlug:e,isLocked:z,hasSharingCapability:A,recoverable:s,recoverableModuleSupportLink:E,ref:a})}),x&&(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__column--manage",children:(0,b.jsx)(ModuleManageAccess,{sharedOwnershipModule:T,hasOwnedModule:j,ownerUsername:i,hasSharingCapability:A,manageViewAccess:l,onChange:R})})]})}function DashboardSharingSettings(){const t=(0,r.useSelect)(e=>e(g.i).hasRecoverableModules()),i=(0,r.useSelect)(e=>e(p.O4).hasMultipleAdmins()),s=t||i,a=(0,r.useSelect)(t=>{const i=t(y.oR).getID(),s=t(g.i).getShareableModules(),n=[],o=[],r=[];for(e of Object.values(s))e.owner?.id===i?n.push(e):t(y.oR).hasCapability(y.hz,e.slug)?o.push(e):r.push(e);return[...n,...o,...r]});return void 0===a?null:(0,b.jsxs)("div",{className:n()("googlesitekit-dashboard-sharing-settings",{"googlesitekit-dashboard-sharing-settings--has-multiple-admins":s}),children:[(0,b.jsxs)("header",{className:"googlesitekit-dashboard-sharing-settings__header googlesitekit-dashboard-sharing-settings__row",children:[(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__column--product",children:(0,o.__)("Product","google-site-kit")}),(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__column--view",children:(0,o.__)("Who can view","google-site-kit")}),s&&(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__column--manage",children:(0,o.__)("Who can manage view access","google-site-kit")})]}),(0,b.jsx)("div",{className:"googlesitekit-dashboard-sharing-settings__main",children:a.map(({slug:e,name:t,owner:i,recoverable:s})=>(0,b.jsx)(Module,{moduleSlug:e,moduleName:t,ownerUsername:i?.login,recoverable:s},e))})]})}ModuleManageAccess.propTypes={sharedOwnershipModule:l().bool,hasOwnedModule:l().bool,ownerUsername:l().string,hasSharingCapability:l().bool,manageViewAccess:l().string,onChange:l().func.isRequired},Module.propTypes={moduleSlug:l().string.isRequired,moduleName:l().string.isRequired,ownerUsername:l().string,recoverable:l().bool},e=i.hmd(e)},88933:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,n=i(63696);function o(){retur
|
|||
|
|
(0,s.__)("Sent every %s","google-site-kit"),function(e){const i=Number.isInteger(e)&&e>=0&&e<=6?e:1;return t[i]}(i)),u={weekly:{label:(0,s.__)("Weekly","google-site-kit"),period:(0,s.__)("Last 7 days","google-site-kit"),description:d},monthly:{label:(0,s.__)("Monthly","google-site-kit"),period:(0,s.__)("Last 28 days","google-site-kit"),description:(0,s.__)("Sent on the 1st of each month","google-site-kit")},quarterly:{label:(0,s.__)("Quarterly","google-site-kit"),period:(0,s.__)("Last 90 days","google-site-kit"),description:(0,s.__)("Sent on the 1st of each quarter","google-site-kit")}};return(0,k.jsxs)(n.Fragment,{children:[(0,k.jsx)(I.A,{className:"googlesitekit-frequency-selector-title",type:"label",size:"small",as:"h3",children:(0,s.__)("Frequency","google-site-kit")}),(0,k.jsx)("div",{className:"googlesitekit-frequency-selector",role:"radiogroup","aria-label":(0,s.__)("Frequency","google-site-kit"),children:a.lV.map(t=>{const i=r===t,{label:s,period:n,description:o}=u[t]||{};return(0,k.jsxs)("div",{className:A()("googlesitekit-frequency-selector__card",{"googlesitekit-frequency-selector__card--selected":i}),role:"radio","aria-checked":i,tabIndex:0,onClick:()=>c(t),onKeyDown:e=>function(e,t){" "!==e.key&&"Spacebar"!==e.key&&"Enter"!==e.key||(e.preventDefault(),c(t))}(e,t),children:[(0,k.jsxs)("div",{className:"googlesitekit-frequency-selector__label-row",children:[(0,k.jsx)(I.A,{className:"googlesitekit-frequency-selector__label",type:"label",size:"large",as:"div",children:s}),l===t&&e&&(0,k.jsx)("div",{className:"googlesitekit-frequency-selector__saved-indicator",children:(0,k.jsx)(b.A,{className:"googlesitekit-frequency-selector__label-tick","aria-hidden":"true"})})]}),(0,k.jsx)(I.A,{className:"googlesitekit-frequency-selector__period",type:"body",size:"small",as:"div",children:n}),(0,k.jsx)(I.A,{className:"googlesitekit-frequency-selector__description",type:"body",size:"small",as:"div",children:o})]},t)})})]})}FrequencySelector.propTypes={isUserSubscribed:u().bool};var M=i(2390);const S={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",UPDATE_SETTINGS:"update_settings"};function SubscribeActions({isSubscribed:e,onSubscribe:t,onUnsubscribe:i,updateSettings:o,isLoading:r}){const[a,l]=(0,n.useState)("");function c(e){switch(l(e),e){case S.UPDATE_SETTINGS:o();break;case S.SUBSCRIBE:t();break;case S.UNSUBSCRIBE:i()}}return(0,k.jsxs)("div",{className:"googlesitekit-selection-panel-subscribe-actions",children:[e&&(0,k.jsx)(M.A,{onClick:()=>c(S.UNSUBSCRIBE),isSaving:r&&a===S.UNSUBSCRIBE,disabled:r,tertiary:!0,children:(0,s.__)("Unsubscribe","google-site-kit")}),(0,k.jsx)(M.A,{onClick:()=>c(e?S.UPDATE_SETTINGS:S.SUBSCRIBE),isSaving:r&&a!==S.UNSUBSCRIBE,disabled:r,children:e?(0,s.__)("Update Settings","google-site-kit"):(0,s.__)("Subscribe","google-site-kit")})]})}function PanelContent({notice:e,isUserSubscribed:t,isSavingSettings:i,onSaveCallback:r,onSubscribe:l,onUnsubscribe:c,onNoticeDismiss:d,closePanel:u}){const g=(0,o.useSelect)(e=>e(a.oR).getUser()),p=g?.wpEmail;return(0,k.jsxs)(n.Fragment,{children:[(0,k.jsxs)("div",{className:"googlesitekit-user-settings-selection__panel-content",children:[(0,k.jsx)(Header,{closePanel:u}),(0,k.jsx)("div",{className:"googlesitekit-user-settings-selection__panel-description",children:(0,k.jsxs)(y.A,{type:"body",size:"small",children:[(0,s.__)("You’ll receive the report to your WordPress user email","google-site-kit"),p&&(0,k.jsx)(I.A,{type:"body",size:"medium",children:p})]})}),(0,k.jsx)(FrequencySelector,{isUserSubscribed:t}),(0,k.jsx)(SubscribeActions,{onSubscribe:l,onUnsubscribe:c,updateSettings:r,isSubscribed:t,isLoading:i})]}),(0,k.jsx)(SelectionPanelFooter,{notice:e,onNoticeDismiss:d})]})}function UserSettingsSelectionPanel(){const e=(0,o.useSelect)(e=>e(r.n).getValue(l.Q)),t=(0,o.useSelect)(t=>e?t(a.oR).getEmailReportingSettings():{}),i=(0,o.useSelect)(t=>!!e&&t(a.oR).isSavingEmailReportingSettings()),[d,u]=(0,n.useState)(null),{setValue:g}=(0,o.useDispatch)(r.n),{saveEmailReportingSettings:p,resetEmailReportingSettings:m}=(0,o.useDispatch)(a.oR),h=(0,n.useCallback)(()=>{e&&
|
|||
|
|
(0,l.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:(0,u.jsx)(c.A,{href:t,external:s},"link")})})}SourceLink.propTypes={name:n().string,href:n().string,className:n().string,external:n().bool},SourceLink.defaultProps={name:"",href:"",className:"",external:!1};const g=SourceLink},92368:(e,t,i)=>{i.d(t,{$n:()=>z});var s=i(12786),n=i.n(s),o=i(91310),r=i.n(o),a=i(26805),l=i.n(a),c=i(65165),d=i.n(c),u=i(25874),g=i(12886),p=i(39525),m=i(4452),h=i.n(m),f=i(62688),y=i.n(f),v=i(62540);function Chip({id:e,label:t,onClick:i,selected:s,className:n,CheckMark:o=p.ChipCheckmark,disabled:r,...a}){return(0,v.jsx)(p.Chip,{chipCheckmark:(0,v.jsx)(o,{}),"data-chip-id":e,id:e,label:t,onClick:e=>{r||i?.(e)},selected:s,className:h()("googlesitekit-chip",n,{"googlesitekit-chip--disabled":r}),...a})}Chip.propTypes={id:y().string.isRequired,label:y().string.isRequired,onClick:y().func,selected:y().bool,className:y().string,CheckMark:y().elementType};var _=i(9341),k=i(47485),x=i(63696),I=i(55527);const j=(0,x.forwardRef)(({children:e,className:t,menuOpen:i,menuItems:s,onSelected:n,nonInteractive:o,id:r},a)=>{const[l,c]=(0,x.useState)(null),d=(0,x.useRef)(null),u=(0,k.A)(a,d),g=(0,x.useCallback)(e=>{const{detail:{index:t}}=e;n(t,e)},[n]);return(0,x.useEffect)(()=>{if(!d?.current)return()=>{};const e=new I.CR(d.current);return e.listen("MDCMenu:selected",g),e.quickOpen=!0,c(e),()=>{e.unlisten("MDCMenu:selected",g),e.destroy()}},[d,g,o]),(0,x.useEffect)(()=>{l&&(l.open=i,l.setDefaultFocusState(1))},[l,i]),(0,v.jsx)("div",{className:h()("mdc-menu","mdc-menu-surface",t),ref:u,children:(0,v.jsxs)("ul",{"aria-hidden":!i,"aria-orientation":"vertical",className:h()("mdc-list",{"mdc-list--non-interactive":o}),id:r,role:"menu",tabIndex:"-1",children:[!e&&s.map((e,t)=>(0,v.jsx)("li",{className:"mdc-list-item",role:"menuitem",children:(0,v.jsx)("span",{className:"mdc-list-item__text",children:e})},t)),e]})})});j.displayName="Menu",j.propTypes={className:y().string,children:y().node,menuOpen:y().bool.isRequired,menuItems:y().array,id:y().string.isRequired,onSelected:y().func,nonInteractive:y().bool},j.defaultProps={onSelected:()=>{},nonInteractive:!1};const A=j;var b=i(32947);function ProgressBar({className:e,small:t,compress:i,indeterminate:s,height:n,verticalSpacing:o,mobileVerticalSpacing:r,tabletVerticalSpacing:a,desktopVerticalSpacing:l,progress:c}){const d=(0,b.dv)();let u,g=o;b.mp===d&&void 0!==r?g=r:b.Lg===d&&void 0!==a?g=a:b.Qb!==d&&b.Fo!==d||void 0===l||(g=l),void 0!==g&&(u=0===g?0:Math.round(g/2));const p=c?`scaleX(${c})`:void 0;return(0,v.jsxs)("div",{role:"progressbar",style:{marginTop:u,marginBottom:u,...n&&{height:`${n}px`}},className:h()("mdc-linear-progress",e,{"mdc-linear-progress--indeterminate":s,"mdc-linear-progress--small":t,"mdc-linear-progress--compress":i}),children:[(0,v.jsx)("div",{className:"mdc-linear-progress__buffering-dots"}),(0,v.jsx)("div",{className:"mdc-linear-progress__buffer"}),(0,v.jsx)("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar",style:{transform:p},children:(0,v.jsx)("span",{className:"mdc-linear-progress__bar-inner"})}),(0,v.jsx)("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar",children:(0,v.jsx)("span",{className:"mdc-linear-progress__bar-inner"})})]})}function Radio(e){const{id:t,name:i,value:s,checked:n=!1,disabled:o=!1,children:r,tabIndex:a,onKeyDown:l=null,onClick:c=null,onChange:d=null,alignLeft:u=!1,description:g}=e,p=(0,x.useCallback)(e=>{if(null!==e){const t=new I.$z(e),i=e.querySelector(".mdc-radio");i&&(t.input=new I.Si(i))}},[]);return(0,v.jsxs)("div",{className:"mdc-form-field",ref:p,children:[(0,v.jsxs)("div",{className:h()("mdc-radio",{"mdc-radio--disabled":o,"mdc-radio--align-left":u}),children:[(0,v.jsx)("input",{className:"mdc-radio__native-control",onClick:c,onKeyDown:l,type:"radio",id:t,name:i,value:s,checked:n,disabled:o,tabIndex:a,onChange:d,readOnly:!0}),(0,v.jsxs)("div",{className:"mdc-radio__background",children:[(0,v.jsx)("div",{className:"mdc-radio__outer-circle"}),(0,v.jsx)("div",{className:"mdc-radio__inner-circle"})]})]}),
|