__("%s not included","jetpack-protect"),a)})(t,e,_),P=y?S.lg:S.default;returnm().createElement("div",{className:i()(g.Z.item,g.Z.value)},m().createElement(c.Z,{className:i()(g.Z.icon,C?g.Z["icon-check"]:g.Z["icon-cross"]),size:32,icon:C?r.Z:l.Z}),m().createElement(h.ZP,{variant:"body-small"},s||P),N&&m().createElement(d.Z,{title:w||j,iconClassName:g.Z["popover-icon"],className:i()(g.Z.popover,b),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(w&&p)},m().createElement(h.ZP,{variant:"body-small",component:"div"},p||R)))},b=({children:e})=>m().createElement("div",{className:g.Z.header},e),y=({primary:e=!1,children:t})=>{leta=0;returnm().createElement("div",{className:i()(g.Z.card,{[g.Z["is-primary"]]:e})},o.Children.map(t,(e=>{constt=e;returnt.type===w?(a++,(0,o.cloneElement)(t,{index:a-1})):t})))},Z=({title:e,items:t,children:a,showIntroOfferDisclaimer:n=!1})=>{const[c]=(0,u.Z)("lg");returnm().createElement(k.Provider,{value:t},m().createElement("div",{className:i()(g.Z.container,{[g.Z["is-viewport-large"]]:c}),style:{"--rows":t.length+1,"--columns":o.Children.toArray(a).length+1}},m().createElement("div",{className:g.Z.table},m().createElement(h.ZP,{variant:"headline-small"},e),c&&t.map(((e,a)=>m().createElement("div",{className:i()(g.Z.item,{[g.Z["last-feature"]]:a===t.length-1}),key:a},m().createElement(h.ZP,{variant:"body-small"},m().createElement("strong",null,e.name)),e.tooltipInfo&&m().createElement(d.Z,{title:e.tooltipTitle,iconClassName:g.Z["popover-icon"],className:g.Z.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo)},m().createElement(h.ZP,{variant:"body-small"},e.tooltipInfo))))),a)),m().createElement("div",{className:g.Z["tos-container"]},m().createElement("div",{className:g.Z.tos},n&&m().createElement(h.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-protect")),m().createElement(p.Z,{multipleButtons:!0}))))}},5347:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});varn=a(5736),c=a(5235),r=a.n(c),l=a(5106),s=a(3789),i=a(9184);const__=n.__,o=({price:e,offPrice:t,currency:a="",showNotOffPrice:n=!0,hideDiscountLabel:c=!0,promoLabel:o="",legend:m=__("/month, paid yearly","jetpack-protect"),isNotConvenientPrice:d=!1,hidePriceFraction:u=!1,children:p})=>{if(null==e&&null==t||!a)returnnull;n=n&&null!=t;consth="number"==typeofe&&"number"==typeoft?Math.floor((e-t)/e*100):0,g=!c&&h&&h>0?h+__("% off","jetpack-protect"):null;returnReact.createElement(React.Fragment,null,React.createElement("div",{className:i.Z.container},React.createElement("div",{className:r()(i.Z["price-container"],"product-price_container")},React.createElement(s.t,{value:t??e,currency:a,isOff:!d,hidePriceFraction:u}),n&&React.createElement(s.t,{value:e,currency:a,isOff:!1,hidePriceFraction:u}),g&&React.createElement(l.ZP,{className:r()(i.Z["promo-label"],"product-price_promo_label")},g))),React.createElement("div",{className:i.Z.footer},p||React.createElement(l.ZP,{className:r()(i.Z.legend,"product-price_legend")},m),o&&React.createElement(l.ZP,{className:r()(i.Z["promo-label"],"product-price_promo_label")},o)))}},3789:(e,t,a)=>{"use strict";a.d(t,{t:()=>i});varn=a(8899),c=a(5235),r=a.n(c),l=a(5106),s=a(9184);consti=({value:e,currency:t,isOff:a,hidePriceFraction:c})=>{consti=r()(s.Z.price,"product-price_price",{[s.Z["is-not-off-price"]]:!a}),{symbol:o,integer:m,fraction:d}=(0,n.LR)(e,t),u=!c||!d.endsWith("00");returnReact.createElement(l.ZP,{className:i,variant:"headline-medium",component:"p"},React.createElement(l.ZP,{className:s.Z.symbol,component:"sup",variant:"title-medium"},o),m,u&&React.createElement(l.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,d)))}},5033:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});varn=a(5162),c=a.n(n),r=a(9196),l=a.n(r);a(1683);consts=e=>{constt=e.className+" jp-components-spinner",a={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},n={borderTopColor:e.color,borderRightColor
__("By clicking the <strong>%s</strong> button, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-protect"),e),{strong:React.createElement("strong",null),tosLink:React.createElement(d,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(d,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),d=({slug:e,children:t})=>React.createElement("a",{className:"terms-of-service__link",href:(0,s.Z)(e),rel:"noopener noreferrer",target:"_blank"},t),u=({className:e,multipleButtons:t,agreeButtonLabel:a})=>React.createElement(i.ZP,{className:l()(e,"terms-of-service")},t?React.createElement(o,null):React.createElement(m,{agreeButtonLabel:a}))},6017:(e,t,a)=>{"use strict";a.d(t,{h:()=>n,s:()=>c});constn={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},c=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>h,H3:()=>p,ZP:()=>u});varn=a(2674),c=a.n(n),r=a(5235),l=a.n(r),s=a(9196),i=a.n(s),o=a(6017),m=a(3280);constd=(0,s.forwardRef)((({variant:e="body",children:t,component:a,className:n,...r},d)=>{constu=a||o.h[e]||"span",p=(0,s.useMemo)((()=>o.s.reduce(((e,t)=>(void0!==r[t]&&(e+=m.Z[`${t}-${r[t]}`]+" ",deleter[t]),e)),"")),[r]);returnr.ref=d,i().createElement(u,c()({className:l()(m.Z.reset,m.Z[e],n,p)},r),t)}));d.displayName="Text";constu=d,p=({children:e,weight:t="bold",...a})=>{constn="headline-small"+("bold"===t?"":`-${t}`);returni().createElement(d,c()({variant:n,mb:3},a),e)},h=({children:e,size:t="medium",...a})=>i().createElement(d,c()({variant:`title-${t}`,mb:1},a),e)},8275:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>u});varn=a(9196),c=a.n(n),r=a(3591);constl={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},s={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},i={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},o={"--spacing-base":"8px"},m={},d=(e,t,a)=>{constn={...l,...s,...i,...o};for(consttinn)e.style.setProperty(t,n[t]);a&&e.classList.add(r.Z.global),t&&(m[t]={provided:!0,root:e})},u=({children:e=null,targetDom:t,id:a,withGlobalStyles:r=!0})=>{constl=(0,n.useRef)(),s=m?.[a]?.provided;return(0,n.useLayoutEffect)((()=>{if(!s)returnt?d(t,a,r):void(l?.current&&d(l.current,a,r))}),[t,l,s,a,r]),t?c().createElement(c().Fragment,null,e):c().createElement("div",{ref:l},e)}},2497:(e,t,a)=>{"use strict";functionn(){returnwindow.Initial_
__("There was an error reconnecting Jetpack. Error: %s","jetpack-protect"),i))):null;returnm().createElement(m().Fragment,null,h,m().createElement(r.Notice,{status:"error",isDismissible:!1,className:u},m().createElement("div",{className:d.Z.message},p,t),s&&m().createElement("a",{onClick:s,onKeyDown:s,className:d.Z.button,href:"#"},__("Restore Connection","jetpack-protect"))))};u.propTypes={message:i().string.isRequired,restoreConnectionCallback:i().func,isRestoringConnection:i().bool,restoreConnectionError:i().string};constp=u},1294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});varn=a(4743),c=a(9818),r=a(9196),l=a(428);consts=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},i=({registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:a=s.apiNonce,redirectUri:i,autoTrigger:o,from:m,skipUserConnection:d}={})=>{const{registerSite:u,connectUser:p,refreshConnectedPlugins:h}=(0,c.useDispatch)(l.t),g=(0,c.useSelect)((e=>e(l.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:v,userConnectionData:E,connectedPlugins:k,connectionErrors:w,isRegistered:b,isUserConnected:y,hasConnectedOwner:Z,isOfflineMode:C}=(0,c.useSelect)((e=>({siteIsRegistering:e(l.t).getSiteIsRegistering(),userIsConnecting:e(l.t).getUserIsConnecting(),userConnectionData:e(l.t).getUserConnectionData(),connectedPlugins:e(l.t).getConnectedPlugins(),connectionErrors:e(l.t).getConnectionErrors(),isOfflineMode:e(l.t).getIsOfflineMode(),...e(l.t).getConnectionStatus()}))),_=()=>d?i?(window.location=i,Promise.resolve(i)):Promise.resolve():p({from:m,redirectUri:i}),R=t=>(t&&t.preventDefault(),b?_():u({registrationNonce:e,redirectUri:i}).then((()=>_())));return(0,r.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(a)}),[t,a]),(0,r.useEffect)((()=>{!o||f||v||R()}),[]),{handleRegisterSite:R,handleConnectUser:_,refreshConnectedPlugins:h,isRegistered:b,isUserConnected:y,siteIsRegistering:f,userIsConnecting:v,registrationError:g,userConnectionData:E,hasConnectedOwner:Z,connectedPlugins:k,connectionErrors:w,isOfflineMode:C}}},7711:(e,t,a)=>{"use strict";functionn(){switch("undefined"!=typeofwindow&&window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv){case"development":return"http://calypso.localhost:3000/";case"wpcalypso":return"https://wpcalypso.wordpress.com/";case"horizon":return"https://horizon.wordpress.com/";default:return"https://wordpress.com/"}}a.d(t,{Z:()=>n})},3329:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l,h:()=>s});varn=a(6186),c=a(1294),r=a(1045);functionl(){const{connectionErrors:e}=(0,c.Z)({}),t=Object.values(e).shift(),a=t&&Object.values(t).length&&Object.values(t).shift().error_message;return{hasConnectionError:Boolean(a),connectionErrorMessage:a}}consts=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=l(),{restoreConnection:a,isRestoringConnection:c,restoreConnectionError:s}=(0,r.Z)();returne?React.createElement(n.Z,{isRestoringConnection:c,restoreConnectionError:s,restoreConnectionCallback:a,message:t}):null}},8258:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});varn=a(4743),c=a(7711),r=a(9818),l=a(951),s=a.n(l),i=a(9196),o=a(1294),m=a(428);constd=s()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:u,apiRoot:p,apiNonce:h,siteSuffix:g}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},f="undefined"!=typeofwindow?window?.myJetpackInitialState?.adminUrl:null;functionv({productSlug:e,redirectUrl:t,siteSuffix:a=g,adminUrl:l=f,connectAfterCheckout:s=!1,siteProductAvailabilityHandler:v=null,quantity:E=null,from:k,useBlogIdSuffix:w=!1}={}){d("productSlug is %s",e),d("redirectUrl is %s",t),d("siteSuffix is %s",a),d("from is %s",k);const[b,y]=(0,i.useState)(!1),{registerSite:Z}=(0,r.useDispatch)(m.t),C=(0,r.useSelect)((e=>e(m.t).getBlogId()),[m.t]);d("blogID is %s",C??"undefined"),w=w&&!!C;const{isUserConnected:_,isRegistered:R,handleConnectUser:j}=(0,o.Z)({redirectUri:t,from:k}),N=(0,i.useMemo)((()=>{constn=(0,c.Z)(),r=(!R||!_)&&s,i=r?"checkout/jetpack/":`checkout/${w?C.toString():a}/`,o=newURL(`${n}${i}${e}${null!=E?`:-q-${E}`:""}`);returnr?(o.searchParams.set("con
__("Last updated on %s.","jetpack-protect"),k().unix(X).format("MMMM D, YYYY")))),ie&&React.createElement(React.Fragment,null,React.createElement(r.ZP,{className:M.Z["automatic-rules-stats__failed-install"],variant:"body-small",mt:2},__("Failed to update automatic firewall rules.","jetpack-protect")," ",fe(ie)),React.createElement(l.Z,{variant:"link",href:y.K},React.createElement(r.ZP,{variant:"body-small"},__("Contact support","jetpack-protect"))))))),!ne&&React.createElement("div",{className:M.Z["upgrade-trigger-section"]},React.createElement(s.Z,{className:M.Z["upgrade-trigger"],description:se?__("Your site is not receiving the latest updates to automatic rules","jetpack-protect",0):__("Set up automatic rules with one click","jetpack-protect"),cta:se?__("Upgrade to keep your site secure with up-to-date firewall rules","jetpack-protect",0):__("Upgrade to enable automatic firewall protection","jetpack-protect"),onClick:Ee}))),Pe=React.createElement(React.Fragment,null,React.createElement("div",{className:M.Z["brute-force-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement(React.Fragment,null,React.createElement(r.ZP,{mb:1},__("IP addresses added to this list will never be blocked by Jetpack's brute force protection.","jetpack-protect")),React.createElement("div",{className:M.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,p.createInterpolateElement)((0,h.sprintf)(
__("Your current IP: <strong>%s</strong>","jetpack-protect"),D),{strong:React.createElement("strong",null)})),React.createElement(l.Z,{variant:"secondary",size:"small",onClick:je,disabled:ue||Re},__("+ Add to Allow List","jetpack-protect")))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_allow_list,onChange:we,disabled:ue})),React.createElement(l.Z,{onClick:ke,isLoading:ue,disabled:ue},__("Save changes","jetpack-protect"))),xe=React.createElement(React.Fragment,null,React.createElement("div",{className:M.Z["toggle-section"]},React.createElement("div",{className:M.Z["toggle-section__control"]},React.createElement(P.Z,{id:"brute_force_protection",checked:me.brute_force_protection,onChange:ye,disabled:ue})),React.createElement("div",{className:M.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable brute force protection","jetpack-protect")),React.createElement(r.ZP,null,__("Prevent bots and hackers from attempting to log in to your website with common username and password combinations.","jetpack-protect")))),!G&&me.brute_force_protection&&Pe),ze=React.createElement("div",{className:M.Z["toggle-wrapper"]},G&&Se,xe,G&&React.createElement("div",{className:`${M.Z["toggle-section"]}${H||U?"":M.Z["toggle-section--disabled"]}`},React.createElement("div",{className:M.Z["toggle-section__control"]},React.createElement(P.Z,{id:"jetpack_waf_ip_list",checked:(U||H)&&me.jetpack_waf_ip_list,onChange:Ze,disabled:ue||!U&&!H})),React.createElement("div",{className:M.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable manual block and allow lists","jetpack-protect")),React.createElement(r.ZP,null,__("Manually block or allow traffic from specific IP addresses.","jetpack-protect")),A&&React.createElement("div",{className:M.Z["toggle-section__details"]},React.createElement("div",{className:M.Z["manual-rules-stats"]},0===q&&0===K&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__no-rules"],variant:"body-small",mt:2},__("No manual rules are being applied.","jetpack-protect")),K>0&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__block-list-count"],variant:"body-small",mt:2},(0,h.sprintf)(
_n("%s IP is being blocked. ","%s IPs are being blocked. ",K,"jetpack-protect"),1===K?"One":K)),q>0&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__allow-list-count"],variant:"body-small",mt:2},(0,h.sprintf)(
_n("%s IP is being allowed.","%s IPs are being allowed.",q,"jetpack-protect"),1===q?"One":q))),React.createElement(l.Z,{variant:"link",disabled:!U&&!H},React.createElement(r.ZP,{variant:"body-small",onClick:Ce},__("Edit manual rules","jetpack-protect"))))))),Me=React.createElement("div",null,React.createElement(l.Z,{className:M.Z["go-back-button"],variant:"icon",icon:v.Z,onClick:Ce},React.createElement(r.ZP,null,__("Go back","jetpack-protect"))),React.createElement(r.ZP,{variant:"title-medium",mt:4,mb:2},__("Manual rules","jetpack-protect")),React.createElement(r.ZP,{mb:4},__("Add manual rules for what IP traffic the Jetpack Firewall and brute force protection should block or allow.","jetpack-protect")),G&&React.createElement("div",{className:M.Z["manual-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_block_list",label:__("Blocked IP addresses","jetpack-protect"),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_block_list,onChange:we,disabled:ue})),React.createElement("div",{className:M.Z["manual-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement("div",{className:M.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,p.createInterpolateElement)((0,h.sprintf)(
__("Your current IP: <strong>%s</strong>","jetpack-protect"),D),{strong:React.createElement("strong",null)})),React.createElement(l.Z,{variant:"secondary",size:"small",onClick:je,disabled:ue||Re},__("+ Add to Allow List","jetpack-protect"))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_allow_list,onChange:we,disabled:ue})),React.createElement(l.Z,{onClick:ke,isLoading:ue,disabled:ue},__("Save changes","jetpack-protect")));returnReact.createElement(j.Z,null,React.createElement(S.Z,null),React.createElement(i.Z,{className:M.Z.container,horizontalSpacing:8,horizontalGap:4},G&&!U&&React.createElement(o.Z,null,Ne," "),React.createElement(o.Z,null,he?Me:ze)),G?React.createElement(N.Z,null):React.createElement(x.Z,null))}},8840:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});varn=a(5106),c=a(526),r=a(9818),l=a(5736),s=a(9196),i=a(4633),o=a(9974),m=a(8891),d=a(2854),u=a(5823);const__=l.__,p=({threatList:e=[]})=>{const{setModal:t,fixThreats:a}=(0,r.useDispatch)(i.t),{threatsUpdating:l}=(0,r.useSelect)((e=>e(i.t).getThreatsUpdating())),[p,h]=(0,s.useState)(e.map((({id:e})=>e))),g=(0,s.useCallback)(((e,t)=>{h(e?p.push(t.id):p.filter((e=>e!==t.id)))}),[p]);returnReact.createElement(d.Z,null,React.createElement(o.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix all threats","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threats:","jetpack-protect")),React.createElement("div",{className:u.Z.list},e.map((e=>React.createElement(m.Z,{key:e.id,threat:e,fixAllDialog:!0,onCheckFix:g})))),React.createElement("div",{className:u.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),t({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(l)&&l[p[0]],onClick:asynce=>{e.preventDefault(),a(p,(()=>{t({type:null})}))}},__("Fix all threats","jetpack-protect")))))}},1593:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});varn=a(5106),c=a(526),r=a(9818),l=a(5736),s=a(4633),i=a(9974),o=a(8891),m=a(2854),d=a(7279);const__=l.__,u=({id:e,fixable:t,label:a,icon:l,severity:u})=>{const{setModal:p,fixThreats:h}=(0,r.useDispatch)(s.t),g=(0,r.useSelect)((e=>e(s.t).getThreatsUpdating()));returnReact.createElement(m.Z,null,React.createElement(i.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix Threat","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threat:","jetpack-protect")),React.createElement("div",{className:d.Z.list},React.createElement(o.Z,{threat:{id:e,fixable:t,label:a,icon:l,severity:u},fixAllDialog:!1})),React.createElement("div",{className:d.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),p({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(g&&g[e]),onClick:asynct=>{t.preventDefault(),h([e],(()=>{p({type:null})}))}},__("Fix threat","jetpack-protect")))))}},5678:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});varn=a(9196),c=a(1234);constr=({ariaLabel:e,checked:t=!1,className:a="",disabled:r=!1,id:l,onChange:s=(()=>{}),onKeyDown:i=(()=>{}),switchClassNames:o="",toggling:m})=>{constd=(0,n.useCallback)((e=>{r||s(e)}),[r,s]),u=(0,n.useCallback)((e=>{r||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(e)),i(e))}),[r,s,i]);returnReact.createElement(React.Fragment,null,React.createElement("div",null,React.createElement("input",{className:`${c.Z["form-toggle"]}${a}${m?c.Z["is-toggling"]:""}`,type:"checkbox",checked:t,readOnly:!0,disabled:r}),React.createElement("span",{className:`${c.Z["form-toggle__switch"]}${o}`,disabled:r,id:l,onClick:d,onKeyDown:u,role:"checkbox","aria-checked":t,"aria-label":e,tabIndex:r?-1:0})))}},3584:(e,t,a)=>{"use strict";a.d(t,{U:()=>p,Z:()=>h});varn=a(5106),c=a(1074),r=a(7489),l=a(2229),s=a(5235),i=a.n(s),o=a(9196),m=a.n(o),d=a(9122);constu=m().createContext(),p=({id:e,title:t,label:a,icon:s,children:p,onOpen:h})=>{constg=(0,o.useContext)(u),f=g?.open===e,v=g?.setOpen,E=i()(d.Z["accordion-body"],{[d.Z["accordi
__("Show %s more","jetpack-protect"),g):(0,c.sprintf)(/* translators: %s: Number of hide items */
__("Latest results as of %s","jetpack-protect"),(0,o.dateI18n)("F jS",t))),e>0&&u().createElement(l.ZP,{variant:"headline-small",component:"h1"},(0,m.sprintf)(/* translators: %s: Total number of threats */
__("%1$s %2$s found","jetpack-protect"),e,1===e?"threat":"threats"))),a&&0===e&&u().createElement(s.Z,{variant:"secondary",className:g.Z["summary__scan-button"],isLoading:d,onClick:e=>{e.preventDefault(),f()}},__("Scan now","jetpack-protect")))))}},3324:(e,t,a)=>{"use strict";a.d(t,{O:()=>r,Z:()=>l});varn=a(554),c=a(5714);constr=({label:e,link:t})=>React.createElement(n.OL,{to:t,className:({isActive:e})=>e?`${c.Z.tab}${c.Z["tab--active"]}`:c.Z.tab},e),l=({children:e,className:t=""})=>React.createElement("nav",{className:`${c.Z.tabs}${t}`},e)},9265:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});varn=a(8063);constc=({disabled:e=!1,id:t,label:a="",description:c="",placeholder:r="",rows:l=3,value:s="",onChange:i=(()=>{})})=>React.createElement("div",null,Boolean(a)&&React.createElement("label",{className:n.Z.label,htmlFor:t},a),Boolean(c)&&c,React.createElement("textarea",{className:n.Z.textarea,disabled:e,placeholder:r,rows:l,id:t,name:t,onChange:i,value:s||""}))},8891:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});varn=a(5106),c=a(5736),r=a(1074),l=a(9196),s=a.n(l),i=a(2251),o=a(9971);const__=c.__,m=e=>{switch(e.fixer){case"replace":return__("Jetpack Scan will replace the affected file or directory.","jetpack-protect");case"delete":return__("Jetpack Scan will delete the affected file or directory.","jetpack-protect");case"update":returne.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */
__("Jetpack Scan will update to a newer version %s.","jetpack-protect"),e.target):__("Jetpack Scan will update to a newer version.","jetpack-protect");case"edit":return__("Jetpack Scan will edit the affected file or directory.","jetpack-protect");case"rollback":returne.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */
__("Jetpack Scan will rollback the affected file to the version from %s.","jetpack-protect"),e.target):__("Jetpack Scan will rollback the affected file to an older (clean) version.","jetpack-protect");default:return__("Jetpack Scan will resolve the threat.","jetpack-protect")}};functiond({threat:e,fixAllDialog:t,onCheckFix:a}){const[c,d]=(0,l.useState)(!0),u=(0,l.useCallback)((t=>{d(t.target.checked),a(t.target.checked,e)}),[a,e]);returns().createElement(s().Fragment,null,s().createElement("div",{className:o.Z.threat},s().createElement(r.Z,{icon:e.icon,className:o.Z.threat__icon}),s().createElement("div",{className:o.Z.threat__summary},s().createElement(n.ZP,{className:o.Z.threat__summary__label,mb:1},e.label),s().createElement(n.ZP,{className:o.Z.threat__summary__title},m(e.fixable))),s().createElement("div",{className:o.Z.threat__severity},s().createElement(i.Z,{severity:e.severity})),t&&s().createElement("div",{className:o.Z.threat__checkbox},s().createElement("input",{type:"checkbox",checked:c,onChange:u,value:e.id}))))}},5658:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});varn=a(5106),c=a(9307),r=a(5736),l=a(9196),s=a(5773),i=a(9709);const__=r.__,_n=r._n,o=()=>React.createElement("svg",{width:"80",height:"96",viewBox:"0 0 80 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 0.00634766L80 17.7891V44.2985C80 66.8965 65.1605 88.2927 44.2352 95.0425C41.4856 95.9295 38.5144 95.9295 35.7648 95.0425C14.8395 88.2927 0 66.8965 0 44.2985V17.7891L40 0.00634766Z",fill:"#069E08"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9 33.6909L35.375 67.9124L19.2047 55.9263L22.7848 51.1264L34.1403 59.5436L56.0851 30.122L60.9 33.6909Z",fill:"white"})),m=()=>{const{lastChecked:e}=(0,s.Z)(),t=(0,l.useMemo)((()=>e?(e=>{constt=newDate,a=6e4*t.getTimezoneOffset(),n=Math.floor((newDate(t.getTime()+a).getTime()-e)/1e3);letc=n/31536e3;returnc>1?(0,r.sprintf)(
_n("%s minute ago","%s minutes ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):__("a few seconds ago","jetpack-protect")))))})(Date.parse(e)):null),[e]);returnReact.createElement("div",{className:i.Z.empty},React.createElement(o,null),React.createElement(n.H3,{weight:"bold",mt:8},__("Don't worry about a thing","jetpack-protect")),React.createElement(n.ZP,null,(0,c.createInterpolateElement)((0,r.sprintf)(
__("The last Protect scan ran <strong>%s</strong> and everything looked great.","jetpack-protect"),t),{strong:React.createElement("strong",null)})))}},2831:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});varn=a(526),c=a(5106),r=a(857),l=a(8258),s=a(5736),i=a(9196),o=a.n(i),m=a(3898),d=a(6477),u=a(3584),p=a(9709);const__=s.__,h=({description:e,filename:t,fixedIn:a,icon:h,id:g,name:f,source:v,table:E,title:k,type:w,version:b})=>{const{adminUrl:y}=window.jetpackProtectInitialState||{},{run:Z}=(0,l.Z)({productSlug:m.o,redirectUrl:y}),{recordEventHandler:C}=(0,d.Z)(),_=C("jetpack_protect_threat_list_get_scan_link_click",Z),R=v?o().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:v},__("See more technical details of this threat","jetpack-protect")):null,j=(0,i.useCallback)((()=>f&&b?`${f} (${b})`:t?t.split("/").pop():E||void0),[t,f,E,b]);returno().createElement(u.U,{id:g,label:j(),title:k,icon:h,onOpen:(0,i.useCallback)((()=>{["core","plugin","theme"].includes(w)&&C(`jetpack_protect_${w}_threat_open`)}),[C,w])},e&&o().createElement("div",{className:p.Z["threat-section"]},o().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),o().createElement(c.ZP,{mb:2},e),R),a&&o().createElement("div",{className:p.Z["threat-section"]},o().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),o().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version *//* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,s.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),f,a)),o().createElement(r.Z,{description:__("Looking for advanced scan results and one-click fixes?","jetpack-protect"),cta:__("Upgrade Jetpack Protect now","jetpack-protect"),onClick:_,className:p.Z["threat-item-cta"]})),!e&&o().createElement("div",{className:p.Z["threat-section"]},R))},g=({list:e})=>o().createElement(u.Z,null,e.map((({description:e,fixedIn:t,icon:a,id:n,name:c,source:r,table:l,title:s,type:i,version:m})=>o().createElement(h,{description:e,fixedIn:t,icon:a,id:n,key:n,name:c,source:r,table:l,title:s,type:i,version:m}))))},5207:(e,t,a)=>{"use strict";a.d(t,{Z:()=>k});varn=a(3363),c=a(3846),r=a(5106),l=a(526),s=a(9818),i=a(5736),o=a(9196),m=a.n(o),d=a(5773),u=a(4633),p=a(5658),h=a(2831),g=a(4289),f=a(1400),v=a(9709),E=a(7930);const__=i.__,k=()=>{const{hasRequiredPlan:e}=(0,d.Z)(),{item:t,list:a,selected:k,setSelected:w}=(0,E.Z)(),b=a.filter((e=>e.fixable)),{setModal:y}=(0,s.useDispatch)(u.t),{scan:Z}=(0,s.useDispatch)(u.t),C=(0,s.useSelect)((e=>e(u.t).getScanIsEnqueuing())),_=(0,o.useCallback)((()=>{switch(k){case"all":return1===a.length?__("All threats","jetpack-protect"):(0,i.sprintf)(/* translators: placeholder is the amount of threats found on the site. */
__("All %s threats","jetpack-protect"),a.length);case"files":return(0,i.sprintf)(/* translators: placeholder is the amount of file threats found on the site. */
__("%1$s file %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");case"database":return(0,i.sprintf)(/* translators: placeholder is the amount of database threats found on the site. */
__("%1$s database %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");default:return(0,i.sprintf)(/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
__("%1$s %2$s in your %3$s %4$s","jetpack-protect"),a.length,1===a.length?"threat":"threats",t?.name,t?.version)}}),[k,a,t]);returnm().createElement(n.Z,{fluid:!0,horizontalSpacing:0,horizontalGap:3},m().createElement(c.Z,{lg:4},m().createElement(g.Z,{selected:k,onSelect:w})),m().createElement(c.Z,{lg:8},a?.length>0?m().createElement(m().Fragment,null,m().createElement("div",{className:v.Z["list-header"]},m().createElement(r.Dx,{className:v.Z["list-title"]},_()),e&&m().createElement(m().Fragment,null,b.length>0&&m().createElement(l.Z,{variant:"primary",className:v.Z["list-header-button"],onClick:(R=b,e=>{e.preventDefault(),y({type:"FIX_ALL_THREATS",props:{threatList:R}})})},/* translators: Translates to Auto fix all. $s: Number of fixable threats. *//* translators: Translates to Auto fix all. $s: Number of fixable threats. */
(0,i.sprintf)(__("Auto fix all (%s)","jetpack-protect"),b.length)),m().createElement(l.Z,{variant:"secondary",className:v.Z["list-header-button"],isLoading:C,onClick:e=>{e.preventDefault(),Z()}},__("Scan now","jetpack-protect")))),e?m().createElement(f.Z,{list:a}):m().createElement(h.Z,{list:a})):m().createElement(p.Z,null)));varR}},4289:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});varn=a(2054),c=a(5736),r=a(797),l=a(2817),s=a(7663),i=a(8960),o=a(4160),m=a(6376),d=a(9196),u=a(6477),p=a(5773),h=a(5338);const__=c.__,g=({selected:e,onSelect:t})=>{const{plugins:a,themes:c,numThreats:g,numCoreThreats:f,numFilesThreats:v,numDatabaseThreats:E,hasRequiredPlan:k}=(0,p.Z)(),{recordEvent:w}=(0,u.Z)(),[b]=(0,n.Z)("lg","<"),y=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_all_click")}),[w]),Z=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_core_click")}),[w]),C=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_plugin_click")}),[w]),_=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_theme_click")}),[w]),R=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_file_click")}),[w]),j=(0,d.useCallback)((()=>{w("jetpack_protect_navigation_database_click")}),[w]);returnReact.createElement(h.ZP,{selected:e,onSelect:t,mode:b?"dropdown":"list"},React.createElement(h.Dx,{initial:!0,id:"all",label:__("All threats","jetpack-protect"),icon:r.Z,badge:g,disabled:g<=0,onClick:y,checked:!0}),React.createElement(h.Dx,{id:"wordpress",label:__("WordPress","jetpack-protect"),icon:l.Z,badge:f,disabled:f<=0,onClick:Z,checked:!0}),React.createElement(h.KB,{label:__("Plugins","jetpack-protect"),icon:s.Z},a.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:C})))),React.createElement(h.KB,{label:__("Themes","jetpack-protect"),icon:i.Z},c.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:_})))),k&&React.createElement(React.Fragment,null,React.createElement(h.Dx,{id:"files",label:__("Files","jetpack-protect"),icon:o.Z,badge:v,disabled:v<=0,onClick:R,checked:!0}),React.createElement(h.Dx,{id:"database",label:__("Database","jetpack-protect"),icon:m.Z,badge:E,disabled:E<=0,onClick:j,checked:!0})))}},1400:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});varn=a(526),c=a(5106),r=a(2054),l=a(9818),s=a(9307),i=a(5736),o=a(9196),m=a.n(o),d=a(6477),u=a(4633),p=a(7127),h=a(4257),g=a(289),f=a(9709);const__=i.__,v=({context:e,description:t,diff:a,filename:r,fixedIn:s,icon:v,fixable:E,id:k,label:w,name:b,source:y,title:Z,type:C,severity:_})=>{const{setModal:R}=(0,l.useDispatch)(u.t),{recordEvent:j}=(0,d.Z)(),N=y?m().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:y},__("See more technical details of this threat","jetpack-protect")):null;returnm().createElement(g.c,{id:k,label:w,title:Z,icon:v,fixable:E,severity:_,onOpen:(0,o.useCallback)((()=>{["core","plugin","theme","file","database"].includes(C)&&j(`jetpack_protect_${C}_threat_open`)}),[j,C])},t&&m().createElement("div",{className:f.Z["threat-section"]},m().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),m().createElement(c.ZP,{mb:2},t),N),(r||e||a)&&m().createElement(c.ZP,{variant:"title-small",mb:2},__("The technical details","jetpack-protect")),r&&m().createElement(m().Fragment,null,m().createElement(c.ZP,{mb:2},/* translators: filename follows in separate line; e.g. "PHP.Injection.5 in: `post.php`" */
__("Threat found in file:","jetpack-protect")),m().createElement("pre",{className:f.Z["threat-filename"]},r)),e&&m().createElement(h.Z,{context:e}),a&&m().createElement(p.C,{diff:a}),s&&m().createElement("div",{className:f.Z["threat-section"]},m().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),m().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version *//* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */
(0,i.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),b,s))),!t&&m().createElement("div",{className:f.Z["threat-section"]},N),m().createElement("div",{className:f.Z["threat-footer"]},m().createElement(n.Z,{isDestructive:!0,variant:"secondary",onClick:e=>{e.preventDefault(),R({type:"IGNORE_THREAT",props:{id:k,label:w,title:Z,icon:v,severity:_}})}},__("Ignore threat","jetpack-protect")),E&&m().createElement(n.Z,{onClick:e=>{e.preventDefault(),R({type:"FIX_THREAT",props:{id:k,label:w,title:Z,icon:v,severity:_,fixable:E}})}},__("Fix threat","jetpack-protect"))))},E=({list:e})=>{const{scan:t}=(0,l.useDispatch)(u.t),a=(0,s.createInterpolateElement)(__("If you have manually fixed any of the threats listed above, <manualScanLink>you can run a manual scan now</manualScanLink> or wait for Jetpack to scan your site later today.","jetpack-protect"),{manualScanLink:m().createElement(n.Z,{variant:"link",onClick:e=>{e.preventDefault(),t()}})}),[i]=(0,r.Z)(["sm","lg"],[null,"<"]),o=e=>e.name&&e.version?`${e.name} (${e.version})`:e.filename?e.filename.split("/").pop():e.table?e.table:void0;returne=e.map((e=>({label:o(e),...e}))),m().createElement(m().Fragment,null,!i&&m().createElement("div",{className:f.Z["accordion-heading"]},m().createElement("span",null,__("Details","jetpack-protect")),m().createElement("span",null,__("Severity","jetpack-protect")),m().createElement("span",null,__("Auto-fix","jetpack-protect")),m().createElement("span",null)),m().createElement(g.Z,null,e.map((({context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:l,id:s,label:i,name:o,severity:d,source:u,table:p,title:h,type:g,version:f})=>m().createElement(v,{context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:l,id:s,key:s,label:i,name:o,severity:d,source:u,table:p,title:h,type:g,version:f})))),m().createElement(c.ZP,{className:f.Z["manual-scan"],variant:"body-small"},a))}},7930:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});varn=a(2817),c=a(4160),r=a(6376),l=a(7663),s=a(8960),i=a(9196),o=a(5773);constm=(e,t)=>t.severity-e.severity,d=(e,t)=>Array.isArray(e)?e.map((e=>d(e,t))).flat():e?.threats.map((a=>({...a,...e,...t}))),u=()=>{const{plugins:e,themes:t,core:a,files:u,database:p}=(0,o.Z)(),[h,g]=(0,i.useState)("all"),{unsortedList:f,item:v}=(0,i.useMemo)((()=>{if(h&&"all"!==h){switch(h){case"wordpress":return{unsortedList:d(a,{icon:n.Z}),item:a};case"files":return{unsortedList:d(u,{icon:c.Z}),item:u};case"database":return{unsortedList:d(p,{icon:r.Z}),item:p}}consti=e.find((e=>e?.name===h));if(i)return{unsortedList:d(i,{icon:l.Z}),item:i};consto=t.find((e=>e?.name===h));if(o)return{unsortedList:d(o,{icon:s.Z}),item:o}}return{unsortedList:[...d(a,{icon:n.Z}),...d(e,{icon:l.Z}),...d(t,{icon:s.Z}),...d(u,{icon:c.Z}),...d(p,{icon:r.Z})],item:null}}),[a,p,u,e,h,t]);return{item:v,list:(0,i.useMemo)((()=>f.sort(m)),[f]),selected:h,setSelected:g}}},2854:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});varn=a(1294),c=a(8227);constr=({children:e})=>{const{isUserConnected:t,hasConnectedOwner:a}=(0,n.Z)();returnt&&a?e:React.createElement(c.Z,null)}},8227:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});varn=a(5106),c=a(526),r=a(1294),l=a(9818),s=a(5736),i=a(4633),o=a(291),m=a(541);const__=s.__,d=()=>{const{setModal:e}=(0,l.useDispatch)(i.t),{userIsConnecting:t,handleConnectUser:a}=(0,r.Z)({redirectUri:"admin.php?page=jetpack-protect"});returnReact.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("User connection needed","jetpack-protect")),React.createElement(o.Z,{type:"info",message:__("Before Jetpack Protect can ignore and auto-fix threats on your site, a user connection is needed.","jetpack-protect")}),React.createElement(n.ZP,{mb:3},__("A user connection provides Jetpack Protect the access necessary to perform these tasks.","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Once you’ve secured a user connection, all Jetpack Protect features will be available for use.","jetpack-protect")),React.createElement("div",{className:m.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:t=>{t.preventDefa
_n("%s threat was fixed successfully","%s threats were fixed successfully",e.length,"jetpack-protect"),e.length)}))})).catch((()=>{t(J({type:"error",message:__("Not all threats could be fixed. Please contact our support.","jetpack-protect")}))})).finally((()=>{t(B([]))}))},J=e=>({type:Z,payload:e}),G=e=>({type:_,hasRequiredPlan:e}),$={checkCredentials:()=>async({dispatch:e})=>awaitnewPromise(((t,a)=>(e(O(!0)),c()({path:"jetpack-protect/v1/check-credentials",method:"POST"}).then((a=>{e(V(a)),t(a)})).catch((e=>{a(e)})).finally((()=>{e(O(!1))}))))),setCredentials:V,setCredentialsIsFetching:O,setStatus:M,setStatusProgress:e=>({type:d,currentProgress:e}),startScanOptimistically:I,refreshStatus:T,setStatusIsFetching:F,setScanIsEnqueuing:D,setInstalledPlugins:e=>({type:f,plugins:e}),setInstalledThemes:e=>({type:v,themes:e}),setwpVersion:e=>({type:E,version:e}),setJetpackScan:e=>({type:k,scan:e}),ignoreThreat:(e,t=(()=>{}))=>async({dispatch:a})=>(a(U(e,!0)),awaitnewPromise((()=>c()({path:`jetpack-protect/v1/ignore-threat?threat_id=${e}`,method:"POST"}).then((()=>a(T()))).then((()=>a(J({type:"success",message:__("Threat ignored","jetpack-protect")})))).catch((()=>a(J({type:"error",message:__("An error ocurred ignoring the threat.","jetpack-protect")})))).finally((()=>{a(U(e,!1)),t()}))))),setModal:e=>({type:y,payload:e}),setNotice:J,clearNotice:()=>({type:C}),fixThreats:(e,t=(()=>{}))=>async({dispatch:a})=>(e.forEach((e=>{a(U(e,!0))})),awaitnewPromise((()=>c()({path:`jetpack-protect/v1/fix-threats?threat_ids=${e}`,method:"POST",data:{threatIds:e}}).then((()=>a(J({type:"success",message:__("We're hard at work fixing this threat in the background. Please check back shortly.","jetpack-protect")})))).then((()=>{setTimeout((()=>a(W(e))),1e3)})).catch((()=>a(J({type:"error",message:__("Error fixing threats. Please contact support.","jetpack-protect")})))).finally((()=>{e.forEach((e=>{a(U(e,!1))})),t()}))))),scan:(e=(()=>{}))=>async({dispatch:t})=>(t(D(!0)),awaitnewPromise((()=>c()({path:"jetpack-protect/v1/scan",method:"POST"}).then((()=>{t(I()),setTimeout((()=>t(T(!0))),5e3)})).catch((()=>t(J({type:"error",message:__("An error ocurred enqueuing the scan","jetpack-protect")})))).finally((()=>{t(D(!1)),e()}))))),setThreatsAreFixing:B,refreshPlan:()=>({dispatch:e})=>{c()({path:"jetpack-protect/v1/check-plan",method:"GET"}).then((t=>e(G(t))))},setHasRequiredPlan:G,setScanIsUnavailable:H,setWafIsEnabled:e=>({type:N,isEnabled:e}),setWafIsSeen:e=>({type:R,isSeen:e}),setWafUpgradeIsSeen:e=>({type:j,upgradeIsSeen:e}),setWafIsUpdating:e=>({type:S,isUpdating:e}),setWafIsToggling:e=>({type:P,isToggling:e}),setWafConfig:e=>({type:x,config:e}),setWafStats:e=>({type:z,stats:e})}},3638:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});varn=a(9818),c=a(5230);constr={wafSupported:null,bruteForceSupported:null,isSeen:!1,upgradeIsSeen:!1,isEnabled:!1,isUpdating:!1,isToggling:!1,config:void0,stats:void0},l=(0,n.combineReducers)({credentials:(e=null,t)=>t.type===c.jA?t.credentials:e,credentialsIsFetching:(e=!1,t)=>t.type===c._N?t.isFetching:e,status:(e={},t)=>{switch(t.type){casec.d0:returnt.status;casec.o9:return{...e,currentProgress:t.currentProgress};casec.Y2:return{...e,currentProgress:0,status:"optimistically_scanning"}}returne},statusIsFetching:(e=!1,t)=>t.type===c.Gk?t.status:e,scanIsUnavailable:(e=!1,t)=>t.type===c.eG?t.status:e,scanIsEnqueuing:(e=!1,t)=>t.type===c.hI?t.isEnqueuing:e,installedPlugins:(e={},t)=>t.type===c.RR?t.plugins:e,installedThemes:(e={},t)=>t.type===c.U2?t.themes:e,wpVersion:(e={},t)=>t.type===c.P_?t.version:e,jetpackScan:(e={},t)=>t.type===c.tu?t.scan:e,threatsUpdating:(e={},t)=>t.type===c.Xm?{...e,[t.payload.threatId]:t.payload.isUpdating}:e,modal:(e={},t)=>t.type===c.i0?{...e,...t.payload}:e,notice:(e={},t)=>{switch(t.type){casec.VF:return{...e,...t.payload};casec.dG:return{}}returne},setThreatsFixing:(e=[],t)=>t.type===c.BZ?t.threatIds:e,hasRequiredPlan:(e=!1,t)=>t.type===c.r0?t.hasRequiredPlan:e,waf:(e=r,t)=>{switch(t.type){casec.Rj:return{...e,isSeen:t.isSeen};casec.kd:return{...e,upgradeIsSeen:t.upgradeIsSee