"use strict";(globalThis.webpackChunkcookiez=globalThis.webpackChunkcookiez||[]).push([[7708],{42348(e,n,t){t.r(n),t.d(n,{default:()=>X});var o=t(38516),s=t(45404),i=t(95830),a=t(39734),r=t(22863),l=t(26368),c=t(27723),d=t(10790);const g=()=>{const{settings:e,updateSettings:n}=(0,r.t0)();return(0,d.jsx)(a.jw,{label:(0,c.__)("Banner display status","cookiez"),ariaLabel:(0,c.__)("Banner display status","cookiez"),description:(0,c.__)("Disabling this will stop the cookie banner from loading and prevent its functionality from running on your site.","cookiez"),checked:e.bannerDisplayStatus,onChange:e=>{n({bannerDisplayStatus:e}),e?o.KY.sendEvent(o.mk.bannerEnabled,{...s.mo}):o.KY.sendEvent(o.mk.bannerDisabled,{...s.Ix,source:"toggle"})}})};var h=t(78048),p=t(31766),u=t(75260),m=t(85848),x=t(95231),k=t(8617),_=t(92373),b=t(86087);const v=()=>{const{settings:e,updateSettings:n}=(0,r.t0)(),{isRTL:t}=(0,k.F)(),i=(0,b.useId)();return(0,d.jsxs)(_.mG,{children:[(0,d.jsx)(m.A,{id:i,variant:"subtitle1",children:(0,c.__)("Consent Expiration","cookiez")}),(0,d.jsx)(m.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("How long a visitor's consent remains valid before the banner is shown again.","cookiez")}),(0,d.jsxs)(h.A,{display:"flex",flexDirection:"column",gap:1,children:[(0,d.jsx)(m.A,{variant:"caption",color:"text.secondary",children:(0,c.sprintf)(
// translators: %1$d: Minimum number of days. %2$d: Maximum number of days.
// translators: %1$d: Minimum number of days. %2$d: Maximum number of days.
(0,c.__)("Enter a value between %1$d and %2$d days.","cookiez"),1,365)}),(0,d.jsx)(j,{type:"number",size:"small",color:"info",value:e.consentExpiration,onChange:e=>{const t=parseInt(e.target.value,10);if(!isNaN(t)){const e=Math.min(365,Math.max(1,t));n({consentExpiration:e}),o.KY.sendEvent(o.mk.consentExpirationChanged,{...s.NK,target_value:String(e)})}},inputProps:{min:1,max:365,"aria-labelledby":i},InputProps:{[t?"startAdornment":"endAdornment"]:(0,d.jsx)(p.A,{position:"end",disableTypography:!0,sx:{fontSize:"14px"},children:(0,c.__)("Days","cookiez")})},sx:{maxWidth:130}})]})]})},j=(0,x.I)(u.A)`
	.wp-admin & .MuiInputBase-input,
	& .MuiInputBase-input:hover,
	& .MuiInputBase-input:focus {
		background-color: initial;
		box-shadow: none;
		border: 0;
		color: inherit;
		outline: 0;
		padding: ${({theme:e})=>e.spacing(1.25)};
		height: 40px;

		&.MuiInputBase-inputSizeSmall {
			padding: ${({theme:e})=>e.spacing(1,1.5)};
		}
	}
`;var f=t(86162),y=t(50602);const C=(0,b.lazy)(()=>Promise.all([t.e(4753),t.e(7563)]).then(t.bind(t,77071))),z=()=>{const{settings:e}=(0,r.t0)(),[n,t]=(0,b.useState)(!1),i=e=>()=>{e&&o.KY.sendEvent(o.mk.customDisableBannerClicked,{...s.Xi,state:0===a?"no_selection":`${a} URLs`}),t(e)},a=e.disableBannerPages.length,l=0===a?(0,c.__)("No selection","cookiez"):(0,c.sprintf)(
// translators: %d: Number of URLs added.
// translators: %d: Number of URLs added.
(0,c.__)("%d pages disabled","cookiez"),a);return(0,d.jsxs)(_.mG,{children:[(0,d.jsx)(m.A,{variant:"subtitle1",children:(0,c.__)("Disable banner on specific pages","cookiez")}),(0,d.jsx)(m.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("Disable the cookie banner, including its functionality, on the pages you specify.","cookiez")}),(0,d.jsx)(y.A,{variant:"text",size:"large",color:"info",endIcon:(0,d.jsx)(f.A,{}),onClick:i(!0),sx:{alignSelf:"flex-start"},children:l}),n&&(0,d.jsx)(b.Suspense,{fallback:null,children:(0,d.jsx)(C,{open:n,onClose:i(!1)})})]})};var A=t(92810);const w=[{value:"worldwide",label:(0,c.__)("Worldwide","cookiez")},{value:"selected-countries",label:(0,c.__)("Selected countries","cookiez"),disabled:!0,suffix:(0,d.jsx)(A.A,{label:(0,c.__)("Coming Soon","cookiez"),size:"small",color:"default"})}],S=()=>{const{settings:e,updateSettings:n}=(0,r.t0)();return(0,d.jsxs)(_.mG,{children:[(0,d.jsx)(m.A,{variant:"subtitle2",children:(0,c.__)("Geo-Targeting","cookiez")}),(0,d.jsx)(m.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("Choose which visitors see this banner based on their location.","cookiez")}),(0,d.jsx)(a.RE,{value:e.geoTargeting,options:w,onChange:e=>n({geoTargeting:e}),ariaLabel:(0,c.__)("Geo-Targeting","cookiez")})]})},G=()=>{const{settings:e,updateSettings:n}=(0,r.t0)();return(0,d.jsx)(a.jw,{label:(0,c.__)("Use advanced consent mode","cookiez"),ariaLabel:(0,c.__)("Use advanced consent mode","cookiez"),description:(0,c.__)("Google's tags load immediately without cookies. If a visitor rejects tracking, Google still gets an anonymous signal to help estimate conversions.","cookiez"),disabled:!e.supportGcm,checked:e.googleTagsBeforeConsent,onChange:e=>{n({googleTagsBeforeConsent:e}),o.KY.sendEvent(o.mk.toggleClicked,{...s.$z,area:"settings",state:e?"on":"off",type:"Advanced Consent Mode"})}})},E=()=>{const{settings:e,updateSettings:n}=(0,r.t0)();return(0,d.jsx)(_.mG,{children:(0,d.jsx)(a.jw,{label:(0,c.__)("GPC/DNT Support","cookiez"),ariaLabel:(0,c.__)("GPC/DNT Support","cookiez"),description:(0,c.__)("Automatically honor your visitors' browser-level privacy signals.","cookiez"),tooltip:(0,c.__)("Global Privacy Control (GPC) is a specification designed to allow Internet users to notify businesses of their privacy preferences, such as whether or not they want their personal information to be sold or shared. It consists of a setting or extension in the user’s browser or mobile device and acts as a mechanism that websites can use to indicate they support the specification. If a website visitor has the GPC signal enabled, then websites should honor the setting and treat the visitor as if they rejected non-essential cookies and other tracking technologies. Honoring GPC signals is enforceable and is treated as an alternative to Do Not Sell or Share My Data” in the U.S.","cookiez"),checked:e.gpcDntSupport,onChange:e=>{n({gpcDntSupport:e}),o.KY.sendEvent(o.mk.toggleClicked,{...s.hH,area:"settings",state:e?"on":"off",type:"GPC Support"})}})})},I=()=>{const{settings:e,updateSettings:n}=(0,r.t0)();return(0,d.jsx)(a.jw,{label:(0,c.__)("Enable Google consent mode","cookiez"),ariaLabel:(0,c.__)("Enable Google consent mode","cookiez"),description:(0,c.__)("Inform Google's tools whether your visitors agreed to tracking. Recommended if you use Google Analytics, Ads, or Tag Manager.","cookiez"),checked:e.supportGcm,onChange:e=>{n({supportGcm:e,...!e&&{googleTagsBeforeConsent:!1}}),o.KY.sendEvent(o.mk.toggleClicked,{...s.OG,area:"settings",state:e?"on":"off",type:"Google Consent Mode"})}})};var B=t(42645),K=t(42666),P=t(77374),T=t(74456),M=t(76656),D=t(13408),Y=t(23136),L=t(55984),R=t(59141),F=t(51274);const N=()=>{const{settings:e,updateSettings:n}=(0,r.t0)(),t=(0,b.useId)(),[i,a]=(0,b.useState)(null),l=()=>a(null);return(0,d.jsxs)(_.mG,{children:[(0,d.jsx)(m.A,{id:t,variant:"subtitle2",children:(0,c.__)("Template Type","cookiez")}),(0,d.jsx)(m.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("Select and manage the cookie consent model that matches your audience and legal needs.","cookiez")}),(0,d.jsx)(h.A,{role:"group","aria-labelledby":t,display:"flex",gap:2,children:Object.values(F.B).map(({id:n,label:t,description:o,chip:s,recommendation:i,disabled:r})=>{const l=e.templateType===n;return(0,d.jsx)(K.A,{variant:"outlined",sx:{flex:1,opacity:r?.5:1,borderColor:l?"info.main":"divider"},children:(0,d.jsxs)(_.fg,{disabled:r,onClick:()=>{return t=n,void(e.templateType!==t&&a(t));var t},children:[(0,d.jsxs)(_.BZ,{children:[(0,d.jsx)(L.A,{size:"small",color:"info",checked:l,disabled:r,sx:{padding:0},inputProps:{"aria-label":t}}),(0,d.jsx)(A.A,{label:s.label,size:"small",color:s.color,sx:{marginInline:"10px auto"},variant:r?"filled":"standard"})]}),(0,d.jsxs)(m.A,{variant:"subtitle1",mb:2,children:[t,(0,d.jsx)(m.A,{variant:"body1",component:"p",color:"text.primary",children:o})]}),(0,d.jsx)(m.A,{variant:"caption",children:(0,c.__)("Recommended for:","cookiez")}),(0,d.jsx)(m.A,{variant:"subtitle2",children:i})]})},n)})}),(0,d.jsxs)(P.A,{open:!!i,onClose:l,maxWidth:"xs","aria-labelledby":"switch-template-dialog-title",children:[(0,d.jsxs)(Y.A,{id:"switch-template-dialog-title",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,d.jsx)(B.A,{color:"warning"}),(0,c.__)("Switch consent template","cookiez")]}),(0,d.jsx)(M.A,{children:(0,d.jsx)(D.A,{children:(0,d.jsx)(m.A,{variant:"body2",children:(0,c.__)("Switching templates applies different legal requirements, which may change your banner behavior and content. You can change this anytime.","cookiez")})})}),(0,d.jsxs)(T.A,{children:[(0,d.jsx)(y.A,{color:"secondary",onClick:l,children:(0,c.__)("Keep the current","cookiez")}),(0,d.jsx)(y.A,{variant:"contained",color:"warning",onClick:()=>{i&&(n({templateType:i}),o.KY.sendEvent(o.mk.templateChanged,{...s.f1,window_name:R.Q.Settings,interaction_desc:"User changes the consent template (opt-in or opt-out) in Settings to update how consent is collected site-wide",type:i})),a(null)},children:(0,c.__)("Yes, I'm sure","cookiez")})]})]})]})},U=()=>{const{resetBannerSettings:e}=(0,r.t0)(),[n,t]=(0,b.useState)(!0);return(0,d.jsxs)(_.cZ,{expanded:n,onChange:(e,n)=>t(n),children:[(0,d.jsx)(a.QG,{label:(0,c.__)("Banner settings","cookiez"),expanded:n,handleReset:n=>{n.stopPropagation(),e()}}),(0,d.jsxs)(_.uV,{children:[(0,d.jsx)(g,{}),(0,d.jsx)(z,{}),(0,d.jsx)(l.A,{}),(0,d.jsx)(N,{}),(0,d.jsx)(S,{}),(0,d.jsx)(l.A,{}),(0,d.jsx)(v,{}),(0,d.jsx)(E,{})]})]})};var W=function(e){return e.GoogleConsentMode="google-consent-mode",e}(W||{});const $=W;var O=t(68856),Q=t(21370);const V=()=>{const{settings:e}=(0,r.t0)(),{integrations:n}=(0,k.F)(),t=(0,s.kA)(e,n);return(0,b.useEffect)(()=>{o.KY.sendEvent(o.mk.notificationShown,{...s.VL,...t})},[]),(0,d.jsxs)(O.Ay,{severity:"info",sx:{marginBlockEnd:2},children:[(0,d.jsx)(Q.A,{children:(0,c.__)("Connected to Google Site Kit","cookiez")}),(0,c.__)("Cookie Consent by Elementor and Site Kit are working together through the WP Consent API. Cookie Consent records what each visitor agrees to, and your Google tools follow it automatically.","cookiez")]})},Z=()=>{const{settings:e}=(0,r.t0)(),{integrations:n}=(0,k.F)(),t=(0,s.kA)(e,n);return(0,b.useEffect)(()=>{o.KY.sendEvent(o.mk.notificationShown,{...s.JF,...t})},[]),(0,d.jsxs)(O.Ay,{severity:"warning",sx:{marginBlockEnd:2},action:(0,d.jsx)(y.A,{variant:"contained",size:"small",color:"warning",href:n?.wpConsentApiInstallUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>{o.KY.sendEvent(o.mk.notificationClicked,{...s.vG,...t,target_value:"install_wp_consent_api"})},children:(0,c.__)("Install WP Consent API","cookiez")}),secondaryAction:(0,d.jsx)(y.A,{variant:"text",size:"small",color:"warning",href:n?.wpConsentApiLearnMoreUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>{o.KY.sendEvent(o.mk.notificationClicked,{...s.vG,...t,target_value:"learn_more"})},children:(0,c.__)("Learn more","cookiez")}),children:[(0,d.jsx)(Q.A,{children:(0,c.__)("Action needed: Connect Site Kit to Cookie Consent","cookiez")}),(0,c.__)("Site Kit's Consent Mode is on but isn't connected to Elementor's Cookie Consent, so Google may not receive your visitors' actual choices. Install the free WP Consent API plugin to connect them — as Google recommends.","cookiez")]})};var H=t(48507);const q=()=>{const{resetGoogleConsentMode:e}=(0,r.t0)(),{integrations:n,isConnected:t,planData:i}=(0,k.F)(),[l,g]=(0,b.useState)(!0),h=(0,b.useRef)(null);(0,b.useEffect)(()=>{(0,H.B)()&&h.current?.scrollIntoView({behavior:"smooth",block:"start"})},[]);const p=n?.delegateGcmToSiteKit??!1,u=(t||Boolean(i))&&n?.siteKitConsentMode&&!n?.wpConsentApiActive;return(0,d.jsxs)(_.cZ,{ref:h,id:$.GoogleConsentMode,expanded:l,onChange:(e,n)=>g(n),children:[(0,d.jsx)(a.QG,{label:(0,c.__)("Google consent mode (GCM)","cookiez"),expanded:l,handleReset:n=>{n.stopPropagation(),e(),o.KY.sendEvent(o.mk.revertToDefaultClicked,{...s.iO,area:"google_consent_mode"})}}),(0,d.jsxs)(_.uV,{children:[u&&(0,d.jsx)(Z,{}),p&&(0,d.jsx)(V,{}),(0,d.jsx)(I,{}),(0,d.jsx)(G,{})]})]})};var J=t(50458);const X=()=>{const{settings:e}=(0,r.t0)(),n=(0,o.mu)();return(0,d.jsxs)(_.fM,{children:[(0,d.jsxs)(_.ax,{children:[(0,d.jsx)(_.QP,{variant:"h4",component:"h2",children:(0,c.__)("Settings","cookiez")}),(0,d.jsxs)(_.nW,{children:[(0,d.jsx)(U,{}),(0,d.jsx)(q,{})]})]}),(0,d.jsx)(a.FM,{onSave:async()=>{try{const t=(0,J.m)(e);await i.A.updatePluginSettings(t),window.cookiezSettingsData?.settings&&Object.assign(window.cookiezSettingsData.settings,t),o.KY.sendEvent(o.mk.saveButtonClicked,{...s.m_,support_gcm:t.supportGcm,advanced_consent:t.googleTagsBeforeConsent}),n.success((0,c.__)("Settings saved. Make sure to clear your cache to see the changes.","cookiez"))}catch{n.error((0,c.__)("Failed to save settings.","cookiez"))}}})]})}},48507(e,n,t){t.d(n,{B:()=>i,Z:()=>s});const o="cookiez_pending_gcm_scroll",s=()=>{sessionStorage.setItem(o,"1")},i=()=>"1"===sessionStorage.getItem(o)&&(sessionStorage.removeItem(o),!0)}}]);