at path:
ROOT
/
wp-content
/
plugins
/
wordpress-seo
/
js
/
dist
/
ai-consent.js
run:
R
W
Run
externals
DIR
2026-04-15 05:43:04
R
W
Run
languages
DIR
2026-04-15 05:43:04
R
W
Run
academy.js
16.88 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
addon-installation.js
4.06 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
admin-global.js
6.07 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
admin-modules.js
29.13 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
ai-consent.js
19.62 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
ai-generator.js
101.4 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
analysis-worker.js
617 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
api-client.js
579 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
block-editor.js
199.04 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
bulk-editor.js
2.49 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
classic-editor.js
140.52 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
crawl-settings.js
571 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
dashboard-widget.js
1.99 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
dynamic-blocks.js
1.01 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
edit-page.js
545 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
editor-modules.js
124.93 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
elementor.js
210.95 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-components.js
146.57 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-contexts.js
823 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-redux.js
56.13 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
faq-block.js
52.4 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
filter-explanation.js
200 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
frontend-inspector-resources.js
3.79 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
general-page.js
324.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
help-scout-beacon.js
4.83 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
how-to-block.js
62.82 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
import.js
5.76 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
indexation.js
7.05 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
installation-success.js
6.43 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
integrations-page.js
160.73 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
introductions.js
35.33 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
network-admin.js
2.25 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
new-settings.js
498.92 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
plans.js
40.6 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
post-edit.js
101.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
quick-edit-handler.js
949 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
redirect-old-features-tab.js
237 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
redirects.js
71.96 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
reindex-links.js
2.71 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
settings.js
17.82 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
support.js
35.36 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
term-edit.js
58.97 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
used-keywords-assessment.js
782 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
wincher-dashboard-widget.js
20.18 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
workouts.js
38.21 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
error_log
up
📄
ai-consent.js
Save
(()=>{var e={2485(e,t){var s;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var i=typeof s;if("string"===i||"number"===i)e.push(s);else if(Array.isArray(s)){if(s.length){var o=n.apply(null,s);o&&e.push(o)}}else if("object"===i){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)r.call(s,a)&&s[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(s=function(){return n}.apply(t,[]))||(e.exports=s)}()}},t={};function s(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.data,t=window.wp.domReady;var r=s.n(t);const n=window.wp.element,i=window.wp.i18n,o=window.yoast.uiLibrary;var a=s(2485),l=s.n(a);const c=window.lodash,d=window.yoast.reduxJsToolkit,u="adminUrl",p=(0,d.createSlice)({name:u,initialState:"",reducers:{setAdminUrl:(e,{payload:t})=>t}}),y=(p.getInitialState,{selectAdminUrl:e=>(0,c.get)(e,u,"")});y.selectAdminLink=(0,d.createSelector)([y.selectAdminUrl,(e,t)=>t],(e,t="")=>{try{return new URL(t,e).href}catch(t){return e}}),p.actions,p.reducer;const m=window.wp.apiFetch;var g=s.n(m);const h="hasConsent",w=`${h}/storeConsent`,f=(0,d.createSlice)({name:h,initialState:{hasConsent:!1,endpoint:""},reducers:{giveAiGeneratorConsent:(e,{payload:t})=>{e.hasConsent=t},setAiGeneratorConsentEndpoint:(e,{payload:t})=>{e.endpoint=t}}}),v=f.getInitialState,x={selectHasAiGeneratorConsent:e=>(0,c.get)(e,[h,"hasConsent"],f.getInitialState().hasConsent),selectAiGeneratorConsentEndpoint:e=>(0,c.get)(e,[h,"endpoint"],f.getInitialState().endpoint)},k={...f.actions,storeAiGeneratorConsent:function*(e,t){try{yield{type:w,payload:{consent:e,endpoint:t}}}catch(e){return!1}return yield{type:`${h}/giveAiGeneratorConsent`,payload:e},!0}},R={[w]:async({payload:e})=>await g()({path:e.endpoint,method:"POST",data:{consent:e.consent},parse:!1})},S=f.reducer,_=window.wp.url,b="linkParams",j=(0,d.createSlice)({name:b,initialState:{},reducers:{setLinkParams:(e,{payload:t})=>t}}),C=j.getInitialState,L={selectLinkParam:(e,t,s={})=>(0,c.get)(e,`${b}.${t}`,s),selectLinkParams:e=>(0,c.get)(e,b,{})};L.selectLink=(0,d.createSelector)([L.selectLinkParams,(e,t)=>t,(e,t,s={})=>s],(e,t,s)=>(0,_.addQueryArgs)(t,{...e,...s}));const q=j.actions,A=j.reducer,N=(0,d.createSlice)({name:"notifications",initialState:{},reducers:{addNotification:{reducer:(e,{payload:t})=>{e[t.id]={id:t.id,variant:t.variant,size:t.size,title:t.title,description:t.description}},prepare:({id:e,variant:t="info",size:s="default",title:r,description:n})=>({payload:{id:e||(0,d.nanoid)(),variant:t,size:s,title:r||"",description:n}})},removeNotification:(e,{payload:t})=>(0,c.omit)(e,t)}}),E=(N.getInitialState,N.actions,N.reducer,"pluginUrl"),O=(0,d.createSlice)({name:E,initialState:"",reducers:{setPluginUrl:(e,{payload:t})=>t}}),P=O.getInitialState,I={selectPluginUrl:e=>(0,c.get)(e,E,"")};I.selectImageLink=(0,d.createSelector)([I.selectPluginUrl,(e,t,s="images")=>s,(e,t)=>t],(e,t,s)=>[(0,c.trimEnd)(e,"/"),(0,c.trim)(t,"/"),(0,c.trimStart)(s,"/")].join("/"));const M=O.actions,T=O.reducer,B="loading",G="wistiaEmbedPermission",U=(0,d.createSlice)({name:G,initialState:{value:!1,status:"idle",error:{}},reducers:{setWistiaEmbedPermissionValue:(e,{payload:t})=>{e.value=Boolean(t)}},extraReducers:e=>{e.addCase(`${G}/request`,e=>{e.status=B}),e.addCase(`${G}/success`,(e,{payload:t})=>{e.status="success",e.value=Boolean(t&&t.value)}),e.addCase(`${G}/error`,(e,{payload:t})=>{e.status="error",e.value=Boolean(t&&t.value),e.error={code:(0,c.get)(t,"error.code",500),message:(0,c.get)(t,"error.message","Unknown")}})}});var z;U.getInitialState,U.actions,U.reducer;const $=(0,d.createSlice)({name:"documentTitle",initialState:(0,c.defaultTo)(null===(z=document)||void 0===z?void 0:z.title,""),reducers:{setDocumentTitle:(e,{payload:t})=>t}}),F=($.getInitialState,$.actions,$.reducer,window.React),H=(F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))}),(e,t)=>{try{return(0,n.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}}),V=window.yoast.propTypes;var W=s.n(V);const Y=window.ReactJSXRuntime;W().string.isRequired,F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))});const D=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))});W().string.isRequired,W().string.isRequired,W().shape({src:W().string.isRequired,width:W().string,height:W().string}).isRequired,W().shape({value:W().bool.isRequired,status:W().string.isRequired,set:W().func.isRequired}).isRequired,W().string,W().string,W().string;const J=({handleRefreshClick:e,supportLink:t})=>(0,Y.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,Y.jsx)(o.Button,{onClick:e,children:(0,i.__)("Refresh this page","wordpress-seo")}),(0,Y.jsx)(o.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,i.__)("Contact support","wordpress-seo")})]});J.propTypes={handleRefreshClick:W().func.isRequired,supportLink:W().string.isRequired};const Q=({handleRefreshClick:e,supportLink:t})=>(0,Y.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,Y.jsx)(o.Button,{className:"yst-order-last",onClick:e,children:(0,i.__)("Refresh this page","wordpress-seo")}),(0,Y.jsx)(o.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,i.__)("Contact support","wordpress-seo")})]});Q.propTypes={handleRefreshClick:W().func.isRequired,supportLink:W().string.isRequired};const X=({error:e,children:t=null})=>(0,Y.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,Y.jsx)(o.Title,{children:(0,i.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,Y.jsx)("p",{children:(0,i.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,Y.jsx)(o.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,i.__)("Undefined error message.","wordpress-seo")}),(0,Y.jsx)("p",{children:(0,i.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")}),t]});X.propTypes={error:W().object.isRequired,children:W().node},X.VerticalButtons=Q,X.HorizontalButtons=J;W().string,W().node.isRequired,W().node.isRequired,W().node,W().oneOf(Object.keys({lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}));const K=window.ReactDOM;var Z,ee,te;(ee=Z||(Z={})).Pop="POP",ee.Push="PUSH",ee.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(te||(te={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const se=["post","put","patch","delete"],re=(new Set(se),["get",...se]);new Set(re),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),F.Component,F.startTransition,new Promise(()=>{}),F.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var ne,ie,oe,ae;new Map,F.startTransition,K.flushSync,F.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(ae=ne||(ne={})).UseScrollRestoration="useScrollRestoration",ae.UseSubmit="useSubmit",ae.UseSubmitFetcher="useSubmitFetcher",ae.UseFetcher="useFetcher",ae.useViewTransitionState="useViewTransitionState",(oe=ie||(ie={})).UseFetcher="useFetcher",oe.UseFetchers="useFetchers",oe.UseScrollRestoration="useScrollRestoration",W().string.isRequired,W().string;const le=({href:e,children:t=null,...s})=>(0,Y.jsxs)(o.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,Y.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]});le.propTypes={href:W().string.isRequired,children:W().node};F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}),(0,i.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,i.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,i.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,i.__)("Optimize pages for multiple keywords with guidance","wordpress-seo"),(0,i.__)("Add product details to help your listings stand out","wordpress-seo"),(0,i.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,i.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,i.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo"),(0,i.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,i.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,i.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,i.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,i.__)("Internal links and redirect management, easy","wordpress-seo"),(0,i.__)("Access to friendly help when you need it, day or night","wordpress-seo");W().string.isRequired,W().object.isRequired,W().func.isRequired,F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))}),W().string.isRequired,W().object,W().func.isRequired,W().bool.isRequired,W().string.isRequired,W().object.isRequired,W().string.isRequired,W().func.isRequired,W().bool.isRequired;const ce=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});W().bool.isRequired,W().func,W().func,W().string.isRequired,W().string.isRequired,W().string.isRequired,W().string.isRequired;window.yoast.reactHelmet;W().string.isRequired,W().shape({src:W().string.isRequired,width:W().string,height:W().string}).isRequired,W().shape({value:W().bool.isRequired,status:W().string.isRequired,set:W().func.isRequired}).isRequired,W().bool,F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}),W().bool.isRequired,W().func.isRequired,W().func,W().string;const de=({onGiveConsent:e,learnMoreLink:t,privacyPolicyLink:s,termsOfServiceLink:r,imageLink:a})=>{const{onClose:l,initialFocus:c}=(0,o.useModalContext)(),[d,u]=(0,o.useToggleState)(!1),p=(0,n.useMemo)(()=>({src:a,width:"432",height:"244"}),[a]),y=H((0,i.sprintf)(/* translators: %1$s and %2$s are a set of anchor tags and %3$s and %4$s are a set of anchor tags. */ /* translators: %1$s and %2$s are a set of anchor tags and %3$s and %4$s are a set of anchor tags. */ (0,i.__)("I approve the %1$sTerms of Service%2$s & %3$sPrivacy Policy%4$s of the Yoast AI service. This includes consenting to the collection and use of data to improve user experience.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,Y.jsx)(le,{href:r}),a2:(0,Y.jsx)(le,{href:s})}),[m,g]=(0,o.useToggleState)(!1),h=(0,n.useCallback)(async()=>{g(),await e(),g()},[e]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,Y.jsx)("div",{className:"yst-relative yst-w-full",children:(0,Y.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...p})})}),(0,Y.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,Y.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,Y.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,i.sprintf)(/* translators: %s expands to Yoast AI. */ /* translators: %s expands to Yoast AI. */ (0,i.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")}),(0,Y.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:H((0,i.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */ /* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */ (0,i.__)("Enable AI-powered SEO! Use all Yoast AI features to boost your efficiency. Just give us the green light. %1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),{a:(0,Y.jsx)(le,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,Y.jsx)(D,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,Y.jsx)("br",{})})})]}),(0,Y.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,Y.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,Y.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,Y.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:d,value:d?"true":"false",onChange:u,className:"yst-checkbox__input",ref:c}),(0,Y.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:y})]}),(0,Y.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,Y.jsxs)(o.Button,{as:"button",className:"yst-grow",size:"large",disabled:!d,onClick:h,children:[m&&(0,Y.jsx)(o.Spinner,{className:"yst-me-2"}),(0,i.__)("Grant consent","wordpress-seo")]})}),(0,Y.jsx)(o.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:l,children:(0,i.__)("Close","wordpress-seo")})]})]})};de.propTypes={onGiveConsent:W().func.isRequired,learnMoreLink:W().string.isRequired,privacyPolicyLink:W().string.isRequired,termsOfServiceLink:W().string.isRequired,imageLink:W().string.isRequired};const ue="yoast-seo/ai-consent",pe=({onStartGenerating:t})=>{const{termsOfServiceLink:s,privacyPolicyLink:r,learnMoreLink:i,imageLink:o,endpoint:a}=(0,e.useSelect)(e=>{const t=e(ue);return{termsOfServiceLink:t.selectLink("https://yoa.st/ai-fix-assessments-terms-of-service"),privacyPolicyLink:t.selectLink("https://yoa.st/ai-fix-assessments-privacy-policy"),learnMoreLink:t.selectLink("https://yoa.st/ai-fix-assessments-consent-learn-more"),imageLink:t.selectImageLink("ai-consent.png"),endpoint:t.selectAiGeneratorConsentEndpoint()}},[]),{storeAiGeneratorConsent:l}=(0,e.useDispatch)(ue),c=(0,n.useCallback)(()=>{l(!0,a),t()},[l,t]);return(0,Y.jsx)(de,{imageLink:o,onGiveConsent:c,learnMoreLink:i,termsOfServiceLink:s,privacyPolicyLink:r})},ye=({onClose:t})=>{const{storeAiGeneratorConsent:s}=(0,e.useDispatch)(ue),r=(0,e.useSelect)(e=>e(ue).selectAiGeneratorConsentEndpoint(),[]),[a,l]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),u=(0,n.useCallback)(async()=>{if(d(!1),l(!0),!1===(await s(!1,r)).consent)return d(!0),void l(!1);t(),l(!1)},[s,l,t,r]);return(0,Y.jsxs)("div",{className:"yst-flex yst-flex-row",children:[(0,Y.jsx)("span",{className:"yst-shrink-0 yst-h-12 yst-w-12 yst-rounded-full yst-flex yst-justify-center yst-items-center yst-mb-3 yst-me-5 yst-bg-red-100",children:(0,Y.jsx)(ce,{className:"yst-w-6 yst-h-6 yst-align-center yst-text-red-600"})}),(0,Y.jsxs)("div",{children:[(0,Y.jsx)(o.Modal.Title,{className:"yst-font-semibold",as:"h3",size:"4",children:(0,i.__)("Revoke AI consent","wordpress-seo")}),c&&(0,Y.jsx)(o.Alert,{className:"yst-mt-2",variant:"error",children:(0,i.__)("Something went wrong, please try again later.","wordpress-seo")}),(0,Y.jsx)("p",{className:"yst-mt-2 yst-text-slate-600",children:(0,i.__)("By revoking your consent, you will no longer have access to Yoast AI features. Are you sure you want to revoke your consent?","wordpress-seo")}),(0,Y.jsxs)("footer",{className:"yst-mt-6 sm:yst-flex sm:yst-flex-row-reverse",children:[(0,Y.jsx)(o.Button,{variant:"error",isLoading:a,className:"yst-w-full sm:yst-w-auto yst-revoke-button",onClick:u,children:(0,i.__)("Yes, revoke consent","wordpress-seo")}),(0,Y.jsx)(o.Button,{variant:"secondary",className:"yst-w-full sm:yst-w-auto yst-me-3",onClick:t,children:(0,i.__)("Close","wordpress-seo")})]})]})]})};r()(()=>{((t={})=>{(0,e.register)((t=>(0,e.createReduxStore)(ue,{actions:{...k,...M,...q},selectors:{...x,...I,...L},initialState:(0,c.merge)({},{[h]:v(),[E]:P(),[b]:C()},t),reducer:(0,e.combineReducers)({[h]:S,[E]:T,[b]:A}),controls:{...R}}))(t))})({[h]:{hasConsent:"1"===(0,c.get)(window,"wpseoAiConsent.hasConsent",!1),endpoint:(0,c.get)(window,"wpseoAiConsent.endpoints.consent","")},[E]:(0,c.get)(window,"wpseoAiConsent.pluginUrl",""),[b]:(0,c.get)(window,"wpseoAiConsent.linkParams",{})});const t=()=>{const t=(0,e.useSelect)(e=>e(ue).selectHasAiGeneratorConsent(),[]),[s,,,r,a]=(0,o.useToggleState)(!1),c=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{if(e.isTrusted)return e.currentTarget===e.target&&void r()},[r]);return(0,Y.jsxs)(n.Fragment,{children:[(0,Y.jsx)(o.Modal,{className:"yst-introduction-modal",isOpen:s,onClose:a,initialFocus:c,children:(0,Y.jsxs)(o.Modal.Panel,{className:l()(!t&&"yst-p-0 yst-max-w-lg yst-rounded-3xl",t&&"yst-max-w-xl yst-rounded-lg"),children:[!t&&(0,Y.jsx)(pe,{onStartGenerating:a,focusElementRef:c}),t&&(0,Y.jsx)(ye,{onClose:a})]})}),(0,Y.jsx)("button",{className:"button",id:"ai-generator-consent-button",type:"button",onClick:d,children:t?(0,i.__)("Revoke consent","wordpress-seo"):(0,i.__)("Grant consent","wordpress-seo")})]})},s=document.getElementById("ai-generator-consent");s&&(0,n.render)((0,Y.jsx)(t,{}),s)})})()})();