PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | js/dist/block-editor.js +210 -127 28.3 → trunk View file →
@@ -1,8 +1,8 @@
1 1 (()=>{var e={16(e,t,s){"use strict";s.d(t,{q:()=>p});var r=s(6087),o=s(7723),n=s(5831),i=s(8468),a=s(1802),l=s.n(a),c=s(2441),d=s(4658),u=s(790);const p=({isOpen:e=!0,onClose:t=i.noop})=>{const s=(0,r.useCallback)(()=>window.location.reload(),[]);return(0,u.jsxs)(d.ZF,{isOpen:e,title:c.D,onClose:t,children:[(0,u.jsx)(d.mw,{children:(0,u.jsx)(c.n,{})}),(0,u.jsxs)(d.En,{children:[(0,u.jsx)(d.Jn,{onClose:t}),(0,u.jsx)(n.Button,{variant:"primary",onClick:s,children:(0,o.__)("Refresh page","wordpress-seo")})]})]})};p.propTypes={isOpen:l().bool,onClose:l().func}},227(e,t,s){"use strict";s.d(t,{O:()=>c});var r=s(8468),o=s(1802),n=s.n(o),i=s(3054),a=s(4658),l=s(790);const c=({isOpen:e=!0,onClose:t=r.noop})=>(0,l.jsxs)(a.ZF,{isOpen:e,title:i.D,onClose:t,children:[(0,l.jsx)(a.mw,{children:(0,l.jsx)(i.n,{})}),(0,l.jsx)(a.En,{children:(0,l.jsx)(a.Jn,{onClose:t})})]});c.propTypes={isOpen:n().bool,onClose:n().func}},244(e,t,s){"use strict";s.d(t,{t:()=>m});var r=s(818),o=s.n(r),n=s(6087),i=s(7723),a=s(9672),l=s(5831),c=s(1802),d=s.n(c),u=s(3657),p=s(2458),h=s(790);const m=({onGiveConsent:e,learnMoreLink:t,privacyPolicyLink:s,termsOfServiceLink:r,imageLink:c,linkStoreName:d})=>{const{onClose:m,initialFocus:g}=(0,l.useModalContext)(),[y,f]=(0,l.useToggleState)(!1),[x,w]=(0,n.useState)(!1),b=(0,n.useMemo)(()=>({src:c,width:"432",height:"244"}),[c]),v=(0,p.x)((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. */
2 -(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,h.jsx)(u.rd,{href:r}),a2:(0,h.jsx)(u.rd,{href:s})}),[_,k]=(0,l.useToggleState)(!1),j=(0,n.useCallback)(async()=>{k();const t=await e();w(!1===t),k()},[e]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,h.jsx)("div",{className:"yst-relative yst-w-full",children:(0,h.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...b})})}),(0,h.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,h.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,h.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. */
2 +(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,h.jsx)(u.rd,{href:r}),a2:(0,h.jsx)(u.rd,{href:s})}),[k,_]=(0,l.useToggleState)(!1),j=(0,n.useCallback)(async()=>{_();const t=await e();w(!1===t),_()},[e]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,h.jsx)("div",{className:"yst-relative yst-w-full",children:(0,h.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...b})})}),(0,h.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,h.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,h.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. */
3 3 (0,i.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")}),(0,h.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:(0,p.x)((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. */
4 -(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,h.jsx)(u.rd,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,h.jsx)(o(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,h.jsx)("br",{})})})]}),(0,h.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,h.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,h.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,h.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:y,value:y?"true":"false",onChange:f,className:"yst-checkbox__input",ref:g}),(0,h.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:v})]}),x&&(0,h.jsx)(a.K2,{className:"yst-mt-3",linkStoreName:d}),(0,h.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,h.jsxs)(l.Button,{as:"button",className:"yst-grow",size:"large",disabled:!y||x,onClick:j,children:[_&&!x&&(0,h.jsx)(l.Spinner,{className:"yst-me-2"}),(0,i.__)("Grant consent","wordpress-seo")]})}),(0,h.jsx)(l.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:m,children:(0,i.__)("Close","wordpress-seo")})]})]})};m.propTypes={onGiveConsent:d().func.isRequired,learnMoreLink:d().string.isRequired,privacyPolicyLink:d().string.isRequired,termsOfServiceLink:d().string.isRequired,imageLink:d().string.isRequired,linkStoreName:d().string.isRequired}},465(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))});e.exports=o},476(e,t,s){"use strict";s(5687),s(7723),s(5831);var r=s(1802),o=s.n(r);s(4370),s(3550),s(790),o().bool.isRequired,o().func.isRequired,o().func,o().string},708(e,t,s){"use strict";s.d(t,{k:()=>c});var r=s(8468),o=s(1802),n=s.n(o),i=s(1721),a=s(4658),l=s(790);const c=({isOpen:e=!0,onClose:t=r.noop})=>(0,l.jsxs)(a.ZF,{isOpen:e,title:i.D,onClose:t,children:[(0,l.jsx)(a.mw,{children:(0,l.jsx)(i.n,{})}),(0,l.jsx)(a.En,{children:(0,l.jsx)(a.Jn,{onClose:t})})]});c.propTypes={isOpen:n().bool,onClose:n().func}},790(e){"use strict";e.exports=window.ReactJSXRuntime},817(e,t,s){"use strict";s.d(t,{I:()=>i});var r=s(5831),o=s(1169),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},818(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},889(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1679);const o=s.n(r)().p`
4 +(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,h.jsx)(u.rd,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,h.jsx)(o(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,h.jsx)("br",{})})})]}),(0,h.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,h.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,h.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,h.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:y,value:y?"true":"false",onChange:f,className:"yst-checkbox__input",ref:g}),(0,h.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:v})]}),x&&(0,h.jsx)(a.K2,{className:"yst-mt-3",linkStoreName:d}),(0,h.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,h.jsxs)(l.Button,{as:"button",className:"yst-grow",size:"large",disabled:!y||x,onClick:j,children:[k&&!x&&(0,h.jsx)(l.Spinner,{className:"yst-me-2"}),(0,i.__)("Grant consent","wordpress-seo")]})}),(0,h.jsx)(l.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:m,children:(0,i.__)("Close","wordpress-seo")})]})]})};m.propTypes={onGiveConsent:d().func.isRequired,learnMoreLink:d().string.isRequired,privacyPolicyLink:d().string.isRequired,termsOfServiceLink:d().string.isRequired,imageLink:d().string.isRequired,linkStoreName:d().string.isRequired}},465(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))});e.exports=o},476(e,t,s){"use strict";s(5687),s(7723),s(5831);var r=s(1802),o=s.n(r);s(4370),s(3550),s(790),o().bool.isRequired,o().func.isRequired,o().func,o().string},708(e,t,s){"use strict";s.d(t,{k:()=>c});var r=s(8468),o=s(1802),n=s.n(o),i=s(1721),a=s(4658),l=s(790);const c=({isOpen:e=!0,onClose:t=r.noop})=>(0,l.jsxs)(a.ZF,{isOpen:e,title:i.D,onClose:t,children:[(0,l.jsx)(a.mw,{children:(0,l.jsx)(i.n,{})}),(0,l.jsx)(a.En,{children:(0,l.jsx)(a.Jn,{onClose:t})})]});c.propTypes={isOpen:n().bool,onClose:n().func}},790(e){"use strict";e.exports=window.ReactJSXRuntime},817(e,t,s){"use strict";s.d(t,{I:()=>i});var r=s(5831),o=s(1169),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},818(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},889(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1679);const o=s.n(r)().p`
5 5 line-height: ${16}px;
6 6 min-height : ${16}px;
7 7 color: #606770;
8 8 font-size: 14px;
@@ -92,12 +92,12 @@
92 92 fill: currentcolor;
93 93 display: flex;
94 94 flex-direction: row;
95 95 align-items: flex-end;
96 -`,c=e=>(0,a.jsx)(l,{children:(0,a.jsx)("span",{children:e.siteUrl})});c.propTypes={siteUrl:i().string.isRequired};const d=c},4289(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",viewBox:"0 0 16 12"},e),r||(r=o.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74z"})))},4370(e,t,s){"use strict";s.d(t,{h:()=>be});var r,o,n,i,a,l,c,d,u,p,h,m,g,y,f,x,w,b,v,_,k,j,S,C,T,R,E,A,I,L,N,P,M,O,F,D,q,$,B,U,H,W,z,K,Y,V,G,X,Z,J,Q,ee,te,se,re,oe,ne,ie,ae,le,ce,de,ue,pe,he,me,ge,ye,fe,xe=s(1609);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},we.apply(null,arguments)}const be=e=>xe.createElement("svg",we({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",fill:"none","aria-hidden":"true",viewBox:"0 0 252 60"},e),r||(r=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__a"},xe.createElement("stop",{offset:0,stopColor:"#570732"}),xe.createElement("stop",{offset:.04,stopColor:"#610b39"}),xe.createElement("stop",{offset:.15,stopColor:"#79164b"}),xe.createElement("stop",{offset:.29,stopColor:"#8c1e59"}),xe.createElement("stop",{offset:.44,stopColor:"#9a2463"}),xe.createElement("stop",{offset:.63,stopColor:"#a22768"}),xe.createElement("stop",{offset:1,stopColor:"#a4286a"}))),o||(o=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__b",x1:49.556,x2:49.556,y1:36.267,y2:23.152,gradientUnits:"userSpaceOnUse"})),n||(n=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__c",x1:82.801,x2:82.801,y1:38.819,y2:20.113,gradientUnits:"userSpaceOnUse"})),i||(i=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__d",x1:62.504,x2:62.504,y1:36.222,y2:23.113,gradientUnits:"userSpaceOnUse"})),a||(a=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__e",x1:73.951,x2:73.951,y1:36.276,y2:23.046,gradientUnits:"userSpaceOnUse"})),l||(l=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__f",x1:25.237,x2:25.237,y1:16.169,y2:36.914,gradientUnits:"userSpaceOnUse"},xe.createElement("stop",{offset:0,stopColor:"#77b227"}),xe.createElement("stop",{offset:.47,stopColor:"#75b027"}),xe.createElement("stop",{offset:.64,stopColor:"#6eab27"}),xe.createElement("stop",{offset:.75,stopColor:"#63a027"}),xe.createElement("stop",{offset:.85,stopColor:"#529228"}),xe.createElement("stop",{offset:.93,stopColor:"#3c8028"}),xe.createElement("stop",{offset:1,stopColor:"#246b29"}))),c||(c=xe.createElement("clipPath",{id:"yoast-connect-google-site-kit_svg__g"},xe.createElement("path",{d:"M169.334 22h14.973v15.909h-14.973z"}))),d||(d=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__b)",fillRule:"evenodd",d:"M36.765 29.643c0-3.42 1.83-6.49 6.405-6.49 4.402 0 6.375 2.8 6.386 6.698.008 3.2-1.785 6.416-6.386 6.416-4.602 0-6.405-3.072-6.405-6.624zm8.432-2.74c-1.174-1.64-4.688-1.64-4.8 2.932.046 2.582 1.245 3.614 2.773 3.63 3.316.039 3.092-5.067 2.027-6.562z",clipRule:"evenodd"})),u||(u=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__c)",d:"M80.278 33.094v-6.631h2.368v-2.874h-2.368v-3.476h-3.66v3.476h-1.856v2.876h1.857v6.258c0 3.553 2.477 5.665 5.092 6.102l1.092-2.949c-1.524-.192-2.51-1.332-2.525-2.782z"})),p||(p=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__d)",fillRule:"evenodd",d:"M61.81 27.062v4.981c0 .7.196 1.67.426 2.803.088.436.182.897.27 1.376h-3.523l-.611-1.472c-4.118 2.994-8.053.974-8.053-2.168 0-4.131 4.01-4.632 7.777-4.632l.003-.249c.01-.465.02-.985-.24-1.336v-.007l-.034-.04-.011-.013c-.602-.675-2.327-1.028-5.21.341l-1.283-2.575c4.428-1.546 10.143-1.555 10.46 2.47.019.174.028.347.03.52zm-6.52 3.81c-2.718 1.331-.064 4.384 2.835 1.14v-1.425c-.949 0-2.035.012-2.835.284z",clipRule:"evenodd"})),h||(h=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__e)",d:"M67.439 26.794c0-1.227 1.966-1.8 5.064-.386l1.072-2.605c-4.17-1.262-9.866-1.371-9.904 2.991-.017 2.091 1.324 3.216 3.255 3.934 1.337.497 3.268.754 3.262 1.82-.007 1.391-3 1.604-5.725-.268l-1.101 2.823c3.716 1.85 10.627 1.902 10.59-2.734-.03-4.583-6.513-3.798-6.513-5.575z"})),m||(m=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__f)",d:"m35.218 16.875-5.305 14.734-2.54-7.956h-3.779l4.23 10.866a3.956 3.956 0 0 1 0 2.877c-.474 1.213-1.26 2.25-3.177 2.508v3.221c3.734 0 5.753-2.295 7.554-7.326l7.06-18.924z"})),g||(g=xe.createElement("path",{fill:"#f0ecf0",d:"M124.088 57.357c15.427 0 27.934-12.506 27.934-27.933S139.515 1.49 124.088 1.49 96.155 13.997 96.155 29.424s12.506 27.933 27.933 27.933z"})),y||(y=xe.createElement("path",{fill:"#9e005d",d:"M122.68 23.422c5.075-5.662 3.282-.196 13.081-2.26 2.792-.587 7.802-1.905 9.067.833 1.427 3.092 4.014 3.471 3.211 5.47-1.412 3.512-6.46 4.52-7.887.556-1.819-1.232-8.98 2.24-11.167 2.775-.813.198-.868-2.038-1.675-2.168-.529-.085-.462-.17-.939-.575-4.613-3.918-4.904-3.277-5.22-4.126.482-.115.95-.396 1.531-.503z"})),f||(f=xe.createElement("path",{fill:"#6c2548",d:"M145.465 25.27c-1.744-.556-3.859.788-3.015 2.668.204.456 1.233 2.392 1.665 2.536 1.633.552 5.651-2.227 1.35-5.204z"})),x||(x=xe.createElement("path",{fill:"#ffc399",d:"M145.972 26.652c-.452-.226-2.526.313-2.3 1.188.281 1.084.758 1.655 1.395 1.998 1.627.875 1.365 2.531 3.684 2.5 1.12-.015 4.022-1.557 4.118-.456.157 1.823.464 3.564.792 3.17.792-.951 1.109-1.03 1.188-4.2.021-.887-2.14-1.506-3.013-2.854-.473-.733-2.932-.714-5.866-1.348z"})),w||(w=xe.createElement("path",{fill:"#be1e2d",d:"M109.348 16.345c-2.102-1.797-8.454 4.23-7.974 6.137.479-.51 1.186-1.505 1.973-1.316-2.719 1.838-3.191 6.484-1.784 9.259.158-.735.439-1.525.897-2.123-.778 3.037.466 8.256 4.271 10.873-.26-1.915-1.201-5.028.477-6.267 2.485-1.836 5.651-2.398 7.153-5.43 3.716-7.506-7.675-12.913-5.013-11.135z"})),b||(b=xe.createElement("path",{fill:"#9e005d",d:"M111.503 27.227c-1.65.136-7.152 11.633.475 20.361 1.067 1.223 2.372 3.57 3.92 3.78 3.256.443 11.848-1.812 15.059-3.188 12.146-5.202 1.267-10.842-.308-16.792-1.421-5.366-1.725-8.762-7.928-8.997-2.92-.11-11.15 1.768-11.95 5.058-.224.108-.109-.08.732-.224z"})),v||(v=xe.createElement("path",{fill:"#6c2548",d:"M123.196 23.817c3.828 1.233 6.256 5.375 7.755 8.771-1.38-4.316-2.059-8.262-7.932-8.95-.013-.072.419-.694.177.18z"})),_||(_=xe.createElement("path",{fill:"#6c2548",d:"M127.718 23.362c1.071.893 1.961 2.794 2.438 3.984.522 1.306.088 3.329.571 4.638-1.292-3.232-1.307-5.14-3.007-8.622z"})),k||(k=xe.createElement("path",{fill:"#ffc399",d:"M125.772 33.468c-1.058.375-2.898.677-4.103 1.248-2.187 1.037-4.936-1.725-7.313-1.188-.858.194-3.845-.873-4.082-1.942-.293-1.325-.745-1.352-.078-2.22 2.619-3.402 2.815-1.566 2.932-6.896.019-.886-.2-1.312.079-2.061.279-.75.21.017 1.09-.143.879-.16 2.996-1.05 3.869-.652 1.533.699.513 3.972 1.61 5.107 1.139 1.177 3.841-.028 4.989 1.128 1.439 1.45 1.324 6.848 1.005 7.621z"})),j||(j=xe.createElement("path",{fill:"#e57c57",d:"M123.021 27.88c.285-.57.221-1.564-.026-2.586-1.175-.034-2.504.164-3.217-.575-.65-.671-.558-2.085-.692-3.277a3.502 3.502 0 0 1-.607-.122c-1.263-.372-2.67-.835-4.069-1.077-.039.008-.077.017-.111.023-.405.075-.605-.057-.733-.143l-.213-.017c-.04.05-.085.141-.144.303-.271.728-.073 1.156-.079 1.995 1.386 3.614 6.644 11.98 9.895 5.477z"})),S||(S=xe.createElement("path",{fill:"#f1f2f2",d:"M116.06 33.648c7.293 3.488 11.969 5.47 13.635 9.989-1.031-4.757-.893-8.622-4.459-15.161.675 7.425-8.761 5.37-9.176 5.172z"})),C||(C=xe.createElement("path",{fill:"#6c2548",d:"M129.697 43.002c.157-3.884-1.057-18.564-4.44-20.057-1.056-.466-10.726 1.174-7.768 1.348 4.625.27 7.293 2.775 7.928 4.28.792 1.11 3.081 8.599 4.28 14.427z"})),T||(T=xe.createElement("path",{fill:"#9e005d",d:"M129.616 43.001c.157-3.884-1.93-18.724-5.311-20.214-1.056-.467-9.776 1.333-6.819 1.505 4.626.27 7.294 2.775 7.928 4.28.792 1.11 3.003 8.599 4.202 14.427z"})),R||(R=xe.createElement("path",{fill:"#ffc399",d:"M126.288 12.877c.555 2.457-.397 1.902.078 3.488.375 1.25.729 2.066.635 3.488-.241 3.656-2.983 6.876-3.086 6.978-1.45 1.45-3.132 1.295-5.476.077-4.364-2.266-6.898-4.994-7.532-11.823-.471-5.072 3.763-8.847 9.014-8.313 3.249.332 5.449 2.04 6.367 6.103z"})),E||(E=xe.createElement("path",{fill:"#be1e2d",d:"M114.461 9.389c3.944-.179 3.02 1.925 6.539 2.973 2.794.832 5.707-1.012 5.173 3.745-.475 4.212 9.401-4.116 1.46-7.591-1.269-.556-1.137-1.414-2.378-3.013-2.598-3.343-11.337-7.055-15.061-.873-.944 1.567 2.657 4.101 4.265 4.757z"})),A||(A=xe.createElement("path",{fill:"#be1e2d",d:"M114.282 9.508c.912 3.597-.161 4.23-.653 5.47-.541 1.364-.803 2.65-1.487 3.925-.992-2.07-2.184-.317-5.276-4.36-5.537-7.24 9.782-16.915 7.416-5.035z"})),I||(I=xe.createElement("path",{fill:"#ffc399",d:"M112.336 19.497c.617-1.633-4.029-4.43-3.599-1.043.209 1.642 1.516 2.574 2.913 3.151 2.294.946 1.195-1.675.569-3.057l.119.952z"})),L||(L=xe.createElement("path",{fill:"#be1e2d",d:"M113.168 14.026c.309 1.25-.03 6.814 1.785 8.997-3.152-1.714-2.37-5.13-1.785-8.997z"})),N||(N=xe.createElement("path",{fill:"#be1e2d",d:"M112.691 15.573c-.728.415-1.441 3.388-.323 5.705.006-.021.483-4.91.323-5.705z"})),P||(P=xe.createElement("path",{fill:"#9e005d",d:"M117.012 34.121c-2.877-1.74-5.509-2.068-4.725-7.2.867-1.004.747-1.897.807-3.383-1.109.396-4.086 1.948-5.434 2.655-1.985 1.04-4.361 3.41-2.458 5.39.703.73-1.758 1.923.937 6.759 1.506-2.617 2.711-4.855 3.661-4.934 3.33-.079 4.431 1.667 7.372 2.378 7.214 1.744 11.654 6.501 12.525 8.164.036-1.051-1.269-4.914-12.683-9.829z"})),M||(M=xe.createElement("path",{fill:"#9e005d",d:"M108.45 34.202c-8.258 11.429 2.709 12.432 5.351 22.998.119.48.656 1.17 1.503 1.322 5.051.903 10.884-1.744 15.862-6.92 1.408-1.463.247-4.902-1.546-5.648-2.319-1.546-7.378 4.023-13.006 2.992-.677-1.02-1.505-13.477-8.164-14.744z"})),O||(O=xe.createElement("path",{fill:"#a0c9cb",d:"m155.213 40.425-.27 9.99-6.399-1.368-.094-9.712z"})),F||(F=xe.createElement("path",{fill:"#75b0b3",d:"m155.48 50.235-.509.238c.085-11.096-.171-10.3.509-10.166v9.93z"})),D||(D=xe.createElement("path",{fill:"#66a7ab",d:"M150.965 40.959c2.473.277 3.211 6.54 2.498 9.037-.119-.12-3.567-.833-3.686-.713-1.718-1.964-.992-8.57 1.188-8.324z"})),q||(q=xe.createElement("path",{fill:"#467d7f",d:"M154.983 40.783s.153-1.902 0-2.02c-.153-.12-6.641-.655-6.641-.655-.776 1.706-.431 1.282 6.641 2.675z"})),$||($=xe.createElement("path",{fill:"#67a8ac",d:"m152.371 30.436 2.881 8.443-6.729-1.15-3.307-9.016z"})),B||(B=xe.createElement("path",{fill:"#55989b",d:"m152.988 32.518.101.02-.716-2.1-7.155-1.725.656 1.786z"})),U||(U=xe.createElement("path",{fill:"#519093",d:"m148.766 37.79-1.127.713-2.679-8.541 1.25-.893z"})),H||(H=xe.createElement("path",{fill:"#b1d3d4",d:"m152.794 30.08-.922 1.069-6.552-1.01.869-1.011z"})),W||(W=xe.createElement("path",{fill:"#a0c9cb",d:"M155.648 39.988c0 1.052-1.046 1.052-1.046 0s1.046-1.052 1.046 0z"})),z||(z=xe.createElement("path",{fill:"#a0c9cb",d:"M147.639 38.502c1.501-.95.058-.881 7.713.317-1.38 1.189-.053 1.07-7.713-.317z"})),K||(K=xe.createElement("path",{fill:"#75b0b3",d:"m155.354 38.879-1.037.832-2.444-8.681.922-1.07z"})),Y||(Y=xe.createElement("path",{fill:"#6b1523",d:"M117.374 55.11c1.071-.299.06-1.962.713-4.862-1.972 4.042-1.699 5.134-.713 4.862z"})),V||(V=xe.createElement("path",{fill:"#6b1523",d:"M119.989 48.095c.059-.594-2.913-8.918-9.097-9.276 3.448.12 10.494 9.176 8.452 9.395-1.853.535-6.076 2.32-4.41 3.925 1.307.773 1.605-3.152 4.627-3.895 4.567.882 7.438-3.94 10.415-1.874-2.809-3.503-5.362 2.14-9.989 1.725z"})),G||(G=xe.createElement("path",{fill:"#6c2548",d:"M127.793 46.647c.309-.639 1.427-.396 2.336-1.56.449-.576.948-.203 1.687-.222 1.541-.043 2.544 2.996 1.737 4.15-.445.635-2.745 1.297-3.62 1.518-1.771.445-3.511-3.036-2.14-3.884z"})),X||(X=xe.createElement("path",{fill:"#c44c31",d:"M123.081 15.099c-.993 1.109 1.35 4.64.988 6.262-.284 1.27-1.827.705-2.617-.157.694.027 1.78.445 1.982.078.76-1.384-1.539-4.914-.353-6.183z"})),Z||(Z=xe.createElement("path",{fill:"#be1e2d",d:"M124.031 23.074c-2.5.504-4.483.504-5.69-.194.579.55 1.976 1.906 3.268 1.887 1.293-.02 1.235-.569 1.355-1.11.076-.206.528-.326 1.064-.586z"})),J||(J=xe.createElement("path",{fill:"#e57c57",d:"M117.389 23.045c0-.616.545-.83 1.075-.93-.441.295-.092.88-.098.904-.481-.272-.62-.174-.977.026z"})),Q||(Q=xe.createElement("path",{fill:"#35602c",d:"m150.614 40.5-2.973-.396.428 8.839 2.736-.024c2.241-.23 2.479-8.077-.191-8.42z"})),ee||(ee=xe.createElement("path",{fill:"#569d48",d:"M149.867 44.427c.285 5.88-3.738 6.075-4.023.194-.285-5.88 3.737-6.075 4.023-.194z"})),te||(te=xe.createElement("path",{fill:"#e57c57",d:"M136.434 42.288c5.055-.658 5.866-2.932 6.341-1.11.315.786-1.069 1.442-1.903 1.755-.443.164-1.044-.055-1.551-.104-1.12-.109-1.822.562-2.885.65-.123-.631.296-1.046 0-1.189z"})),se||(se=xe.createElement("path",{fill:"#35602c",d:"M139.873 43.184c.168-.905 5.647-1.784 7.051-1.867 1.803-.107 2.161 6.066.475 6.184-2.362.164-4.487.357-6.872-.392-1.388-.435-1.904-.588-1.927-2.106-.017-1.12.749-2.068 1.273-1.819z"})),re||(re=xe.createElement("g",{fill:"#ffc399"},xe.createElement("path",{d:"M131.123 45.597c3.759-1.073 7.006-4.783 7.689-4.023 1.091 1.212-.543 2.16-1.06 3.489-.698 1.797 1.054-.037-.403 1.784-.634.792-1.961.179-2.793.179-.556.157-1.863 1.328-2.498 1.486-1.031-.158-2.364-2.042-.937-2.913z"}),xe.createElement("path",{d:"M138.898 41.243c3.239.682 4.923-.098 5.189 1.152.181.856 1.606 3.358 1.559 4.323-1.725.462-2.504-2.683-3.13-3.156-.426-.321-2.909.188-3.733.077-.824-.111-1.378-2.191.115-2.396z"}),xe.createElement("path",{d:"M141.004 43.042c.573 1.983 2.144 3.145 1.51 3.79-.848.863-1.691 1.404-2.013 1.263-1.976-.87.322-1.169-.004-1.496-.326-.328-1.995-2.12-2.34-2.198.24-.924-.094-1.263-.303-2.212.211.07 2.865.35 3.152.853z"}),xe.createElement("path",{d:"M137.707 42.446c.958-.115 1.457 1.48 1.546 1.784.166.567 1.348 1.806 1.427 2.379.179 1.277-1.071 1.188-1.755 1.456-.564.298-1.991-.743-.683-1.576-.935-.019-3.073-1.497-2.694-2.016.241-.004 1.148-2.383 2.157-2.025z"}),xe.createElement("path",{d:"M137.599 43.08c.556 1.11 1.03 3.964.873 4.28-.271.544-.865 1.07-1.51 1.34s-1.026-.943-1.978-1.893c.792-.713 1.691-.128 1.665.239-.03.438.079-.318.396-.239-.238-.317-.884-1.365-1.188-1.982-.434-.88.635-2.536 1.744-1.744zm6.311-14.765c.475 1.744-.187 2.5-.238 3.092-.085.99.758 1.205 1.348 1.901.873 1.031.792 2.22 1.505 2.775 1.983-.873.015-3.264-.193-3.786-.158-.396.034-2.875 2.016-3.032-1.348-1.665-3.249-2.22-4.44-.952z"}))),oe||(oe=xe.createElement("path",{fill:"#6b1523",d:"M112.653 25.483c-1.903.93-5.883 2.474-6.737 4.518-.599 1.431 5.707 1.11 13.081 5.31-3.805-2.774-9.996-4.01-10.307-4.992-.106-.335 2.715-4.87 3.963-4.836zm-7.374 6.024c.839 1.118 2.3 1.11 4.202 1.586-.878-.434-4.779.837-4.361 0 .157-.317-.167-.875.157-1.586z"})),ne||(ne=xe.createElement("path",{fill:"#f1f2f2",d:"M116.341 17.639c.007-.03.462-.848 2.206-1.014.678-.064 1.896.509 1.795 1.169-1.007.43-1.888.675-4.001-.155z"})),ie||(ie=xe.createElement("path",{fill:"#231f20",d:"M120.347 17.688c-.062-.337-.441-.754-.918-.767-.526-.015-1.035.55-1.044.897-.004.153.086.276.224.37.684.015 1.19-.162 1.733-.394a.422.422 0 0 0 .005-.106z"})),ae||(ae=xe.createElement("path",{fill:"#231f20",d:"M120.368 17.667c-.102-.768-1.512-1.3-2.404-1.303-1.244 0-1.491 1.171-2.272.735.177.703 1.141.928 1.801.933-2.327-.695 2.14-2.302 2.875-.365z"})),le||(le=xe.createElement("path",{fill:"#f1f2f2",d:"M123.27 17.549c.977.332 2.076-.19 2.44-.741.592-.899-1.629-2.066-2.44.74z"})),ce||(ce=xe.createElement("path",{fill:"#231f20",d:"M124.226 17.238a.33.33 0 0 0 .122.373c.604-.115 1.132-.452 1.365-.803a.576.576 0 0 0 .093-.245c-.323-.585-1.245-.539-1.58.675z"})),de||(de=xe.createElement("path",{fill:"#231f20",d:"M123.249 17.568c.092-.724.417-1.478 1.329-1.887 1.175-.528 1.537.92 1.938-.268-.147 1.467-.592 1.476-1.523 1.987 1.022-.356.958-1.906-.373-1.403-1.062.402-1.196 1.152-1.369 1.571z"})),ue||(ue=xe.createElement("path",{fill:"#be1e2d",d:"M126.024 14.621c.517.586-.337-.17-1.304-.06-.321.039-.841.352-1.122.365.554-1.076 1.663-1.17 2.426-.305zm-6.316.317c-3.103-.775-3.531.177-4.685 1.791 2.238-2.446 3.518-.587 5.132-1.94-.245.024-.473.103-.447.15z"})),pe||(pe=xe.createElement("path",{fill:"#6b1523",d:"M106.375 37.808c.416-1.427 1.651-3.48 2.315-3.607 4.108-.792 14.097 5.034 17.246 5.866-5.053-1.248-12.544-5.41-17.122-4.876-.586.192-2.081 1.901-2.439 2.617z"})),he||(he=xe.createElement("path",{fill:"#642243",d:"M140.501 28.713c-.421-1.256-1.179-2.587-.805-4.042.379-1.475 2.232-2.05 2.815-3.43-1.65-.713-1.58 1.923-2.468 2.349-.038-.782-.142-1.516-.129-2.324-1.54 2.028-.703 4.913.589 7.45zm-13.317-7.491c7.849.713 7.253 7.135 12.485 6.303-5.471 1.426-7.017-6.303-12.485-6.303z"})),me||(me=xe.createElement("path",{fill:"#c44c31",d:"M120.525 19.497c0 .236-.594.236-.594 0s.594-.237.594 0zm-1.903.355c0 .236-.358.236-.358 0s.358-.236.358 0zm5.768-.832c0 .316-.474.316-.474 0 0-.315.474-.315.474 0zm.89.952c0 .237-.475.237-.475 0s.475-.236.475 0zm.358-1.188c0 .236-.474.236-.474 0 0-.237.474-.237.474 0zm-5.232 1.901c0 .236-.475.236-.475 0s.475-.236.475 0z"})),ge||(ge=xe.createElement("path",{fill:"#569d48",d:"M136.975 46.802c-.364-.268-.53-.656-.498-1.16-4.862.762-12.996 10.236-26.102 8.07.919.613 1.743 1.082 2.706 1.382 10.638 1.337 19.676-7.332 23.896-8.292z"})),ye||(ye=xe.createElement("path",{fill:"#5f6368",d:"M238.632 23.564h2.267v.075l-5.066 5.844 5.405 7.63v.075h-2.151l-4.437-6.357-2.094 2.419v3.94h-1.754V23.563h1.754v7.028h.074zm5.892 1.085c0 .339-.124.637-.364.877s-.529.364-.877.364c-.34 0-.638-.124-.877-.364a1.198 1.198 0 0 1-.365-.877c0-.348.124-.637.365-.878.239-.24.53-.364.877-.364.339 0 .637.124.877.364.248.249.364.538.364.878zm-.355 3.22v9.327h-1.755v-9.328zm5.604 9.477c-.762 0-1.392-.232-1.896-.704-.505-.472-.762-1.126-.77-1.962v-5.215h-1.639v-1.597h1.639v-2.856h1.754v2.856h2.285v1.597h-2.284v4.644c0 .62.124 1.043.364 1.266.24.224.513.332.819.332.141 0 .273-.017.414-.05a2.19 2.19 0 0 0 .373-.124l.554 1.564c-.471.166-1.001.249-1.613.249zm-55.489-.878c-.969-.704-1.631-1.697-1.995-2.972l2.151-.878c.216.803.597 1.448 1.151 1.962.547.505 1.209.761 1.978.761.721 0 1.324-.182 1.829-.554.505-.373.754-.886.754-1.531 0-.596-.224-1.085-.662-1.474-.439-.389-1.209-.778-2.31-1.167l-.91-.323c-.977-.338-1.796-.827-2.459-1.464-.662-.637-.992-1.473-.992-2.515 0-.721.198-1.383.587-1.995.389-.613.935-1.093 1.639-1.458.695-.355 1.482-.538 2.367-.538 1.275 0 2.293.306 3.046.927.761.621 1.266 1.308 1.522 2.087l-2.051.868c-.15-.464-.43-.87-.853-1.217-.421-.356-.96-.53-1.622-.53s-1.224.166-1.68.505c-.455.34-.679.77-.679 1.3 0 .504.207.91.612 1.241.406.323 1.043.638 1.913.935l.911.306c1.249.431 2.209 1.002 2.896 1.698.687.695 1.027 1.63 1.027 2.797 0 .952-.241 1.747-.729 2.383a4.482 4.482 0 0 1-1.862 1.433 5.981 5.981 0 0 1-2.326.463c-1.209 0-2.293-.348-3.253-1.05zm9.924-11.571a1.45 1.45 0 0 1-.439-1.067c0-.423.149-.779.439-1.069a1.444 1.444 0 0 1 1.067-.439c.422 0 .778.15 1.067.44.291.289.439.645.439 1.067 0 .422-.149.778-.438 1.067a1.455 1.455 0 0 1-1.067.44c-.423-.01-.779-.15-1.068-.44zm-.05 1.937h2.234v10.362h-2.234zm7.093 10.304a2.898 2.898 0 0 1-.993-.588c-.579-.579-.878-1.373-.878-2.375v-5.372h-1.812v-1.97h1.812v-2.92h2.235v2.93h2.517v1.97h-2.517v4.874c0 .555.108.952.323 1.176.207.273.555.405 1.06.405.231 0 .43-.033.612-.091.174-.058.364-.157.571-.298v2.177c-.447.207-.985.306-1.622.306a3.735 3.735 0 0 1-1.308-.224zm6.133-.33a4.946 4.946 0 0 1-1.887-1.962c-.455-.836-.679-1.771-.679-2.814 0-.994.224-1.904.662-2.756.439-.845 1.052-1.523 1.838-2.02s1.68-.754 2.682-.754c1.043 0 1.945.232 2.714.688a4.572 4.572 0 0 1 1.747 1.887c.397.803.596 1.697.596 2.707 0 .19-.017.43-.058.711h-7.946c.083.96.423 1.706 1.026 2.227.58.512 1.33.79 2.103.778.637 0 1.192-.141 1.655-.439a3.185 3.185 0 0 0 1.126-1.192l1.887.894a5.577 5.577 0 0 1-1.912 2.011c-.786.489-1.73.729-2.823.729-1.018.016-1.927-.215-2.731-.695zm5.397-6.01a2.497 2.497 0 0 0-.348-1.084 2.486 2.486 0 0 0-.927-.902c-.413-.24-.918-.364-1.515-.364-.72 0-1.324.215-1.821.637-.496.422-.836 1.001-1.026 1.714z"})),fe||(fe=xe.createElement("g",{fillRule:"evenodd",clipPath:"url(#yoast-connect-google-site-kit_svg__g)",clipRule:"evenodd"},xe.createElement("path",{fill:"#fbbc05",d:"m170.119 26.56 2.576 1.97a4.563 4.563 0 0 0 0 2.85l-2.576 1.97a7.667 7.667 0 0 1-.785-3.395c0-1.22.283-2.373.785-3.394z"}),xe.createElement("path",{fill:"#ea4335",d:"m172.696 28.53-2.577-1.97a7.64 7.64 0 0 1 6.877-4.266c1.95 0 3.691.731 5.049 1.915l-2.229 2.229a4.428 4.428 0 0 0-2.82-1.01 4.518 4.518 0 0 0-4.3 3.103z"}),xe.createElement("path",{fill:"#34a853",d:"m170.118 33.347 2.576-1.975a4.514 4.514 0 0 0 4.301 3.11c2.124 0 3.726-1.08 4.109-2.96h-4.109v-2.96h7.139c.104.452.174.94.174 1.392 0 4.875-3.482 7.661-7.313 7.661a7.637 7.637 0 0 1-6.877-4.268z"}),xe.createElement("path",{fill:"#4285f4",d:"m181.988 35.707-2.446-1.893c.8-.505 1.357-1.284 1.562-2.293h-4.109v-2.96h7.138c.105.453.175.94.175 1.393 0 2.497-.914 4.446-2.32 5.753z"}))))},4432(e,t,s){"use strict";var r=s(1802),o=s.n(r);s(3657),s(790),o().string.isRequired,o().object.isRequired,o().string.isRequired,o().func.isRequired,o().bool.isRequired},4578(e,t,s){"use strict";s.d(t,{K:()=>c});var r=s(5831),o=s(1802),n=s.n(o),i=s(5431),a=s(8572),l=s(790);const c=({linkStoreName:e=i.sH,className:t=""})=>(0,l.jsxs)(r.Alert,{variant:"error",className:t,children:[(0,l.jsx)("span",{className:"yst-block yst-font-medium",children:a.D}),(0,l.jsx)(a.n,{linkStoreName:e})]});c.propTypes={linkStoreName:n().string,className:n().string}},4658(e,t,s){"use strict";s.d(t,{En:()=>p,Jn:()=>h,Kw:()=>m,ZF:()=>g,mw:()=>u});var r=s(5074),o=s.n(r),n=s(7723),i=s(5831),a=s(8468),l=s(1802),c=s.n(l),d=s(790);const u=({children:e})=>(0,d.jsx)("div",{className:"yst-mt-1 yst-text-sm yst-text-slate-500",children:e});u.propTypes={children:c().node.isRequired};const p=({children:e})=>(0,d.jsx)("div",{className:"yst-mt-6 yst-flex yst-flex-row yst-justify-end yst-gap-3",children:e});p.propTypes={children:c().node.isRequired};const h=({onClose:e})=>(0,d.jsx)(i.Button,{variant:"secondary",onClick:e,children:(0,n.__)("Close","wordpress-seo")});h.propTypes={onClose:c().func.isRequired};const m=({showActions:e=!1,onRetry:t,onClose:s})=>(0,d.jsxs)(p,{children:[(0,d.jsx)(h,{onClose:s}),e&&(0,d.jsx)(i.Button,{variant:"primary",onClick:t,children:(0,n.__)("Try again","wordpress-seo")})]});m.propTypes={showActions:c().bool,onRetry:c().func.isRequired,onClose:c().func.isRequired};const g=({isOpen:e,title:t,onClose:s=a.noop,children:r})=>{const l=(0,i.useSvgAria)();return(0,d.jsx)(i.Modal,{isOpen:e,onClose:s,children:(0,d.jsx)(i.Modal.Panel,{className:"yst-max-w-lg",closeButtonScreenReaderText:(0,n.__)("Dismiss","wordpress-seo"),children:(0,d.jsxs)("div",{className:"yst-flex yst-items-start yst-gap-4",children:[(0,d.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,d.jsx)(o(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...l})}),(0,d.jsxs)("div",{className:"yst-text-start yst-flex-1 yst-min-w-0",children:[(0,d.jsx)(i.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900",children:t}),r]})]})})})};g.propTypes={isOpen:c().bool.isRequired,title:c().string.isRequired,onClose:c().func,children:c().node.isRequired}},4719(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.exports=o},4730(e,t,s){"use strict";s.d(t,{v:()=>k});var r=s(7143),o=s(7723),n=s(818),i=s.n(n),a=s(6702),l=s.n(a),c=s(5831),d=s(8468),u=s(1802),p=s.n(u),h=s(2458),m=s(3657),g=s(5431),y=s(7753),f=s(2027),x=s(4658),w=s(790);const b=({learnMoreUrl:e=""})=>(0,w.jsx)(f.f,{children:(0,h.x)((0,o.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */ /* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
97 -(0,o.__)("%1$sLearn more about connecting with MyYoast.%2$s","wordpress-seo"),"<a>","</a>"),{a:(0,w.jsx)(m.rd,{variant:"error",href:e})})});b.propTypes={learnMoreUrl:p().string};const v=()=>{const e=(0,c.useSvgAria)(),{commonErrorsLink:t,supportLink:s}=(0,r.useSelect)(e=>{const t=e(g.sH);return{commonErrorsLink:t.selectLink("https://yoa.st/ai-common-errors"),supportLink:t.selectAdminLink("?page=wpseo_page_support")}},[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x.mw,{children:(0,w.jsx)(f.f,{children:(0,o.__)("This feature requires a publicly accessible site. Check that your site (including any password-protected REST APIs or test environments) is visible to the public, then try again.","wordpress-seo")})}),(0,w.jsxs)(x.En,{children:[(0,w.jsxs)(c.Button,{as:"a",href:s,target:"_blank",rel:"noopener noreferrer",variant:"secondary",children:[(0,o.__)("Still need help?","wordpress-seo"),(0,w.jsx)(l(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 yst-text-slate-400 rtl:yst-rotate-[270deg]",...e}),(0,w.jsx)("span",{className:"yst-sr-only",children:(0,o.__)("(Opens in a new browser tab)","wordpress-seo")})]}),(0,w.jsxs)(c.Button,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",variant:"primary",children:[(0,o.__)("Learn more","wordpress-seo"),(0,w.jsx)(i(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 rtl:yst-rotate-180",...e})]})]})]})},_=({isAvailable:e,canConnect:t,connectUrl:s,learnMoreUrl:r},n,i)=>e&&t&&s?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(x.mw,{children:[(0,w.jsx)(f.f,{children:(0,o.__)("This feature requires a publicly accessible site. Connect to MyYoast to use Yoast AI even when your site is offline, behind a firewall, or with the REST API disabled.","wordpress-seo")}),(0,w.jsx)(b,{learnMoreUrl:r})]}),(0,w.jsxs)(x.En,{children:[(0,w.jsx)(x.Jn,{onClose:n}),(0,w.jsxs)(c.Button,{as:"a",href:s,target:"_blank",rel:"noopener noreferrer",variant:"primary",children:[(0,o.__)("Connect to MyYoast","wordpress-seo"),(0,w.jsx)(l(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 rtl:yst-rotate-[270deg]",...i}),(0,w.jsx)("span",{className:"yst-sr-only",children:(0,o.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]}):e&&!t?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(x.mw,{children:[(0,w.jsx)(f.f,{children:(0,o.__)("Your site isn't publicly accessible. Ask your site administrator to connect to MyYoast. They can find it on the Integrations page in Yoast SEO. This allows Yoast AI to work even when your site is offline, behind a firewall, or with the REST API disabled.","wordpress-seo")}),(0,w.jsx)(b,{learnMoreUrl:r})]}),(0,w.jsx)(x.En,{children:(0,w.jsx)(x.Jn,{onClose:n})})]}):(0,w.jsx)(v,{}),k=({isOpen:e=!0,onClose:t=d.noop})=>{const s=(0,c.useSvgAria)(),o=(0,r.useSelect)(e=>e(g.XA).selectMyyoastConnection(),[]);return(0,w.jsx)(x.ZF,{isOpen:e,title:y.D,onClose:t,children:_(o,t,s)})};k.propTypes={isOpen:p().bool,onClose:p().func}},4739(e,t,s){"use strict";s.d(t,{f:()=>i});var r=s(5831),o=s(1721),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},4788(e,t,s){"use strict";s.d(t,{D:()=>p,n:()=>h});var r=s(7143),o=s(7723),n=s(1802),i=s.n(n),a=s(2458),l=s(3657),c=s(5431),d=s(2027),u=s(790);const p=(0,o.__)("Something went wrong","wordpress-seo"),h=({errorMessage:e=""})=>{const t=(0,r.useSelect)(e=>e(c.sH).selectAdminLink("?page=wpseo_page_support"),[]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(d.f,{children:(0,o.sprintf)(/* translators: %s is the error response of the request. */ /* translators: %s is the error response of the request. */
96 +`,c=e=>(0,a.jsx)(l,{children:(0,a.jsx)("span",{children:e.siteUrl})});c.propTypes={siteUrl:i().string.isRequired};const d=c},4289(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",viewBox:"0 0 16 12"},e),r||(r=o.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74z"})))},4370(e,t,s){"use strict";s.d(t,{h:()=>be});var r,o,n,i,a,l,c,d,u,p,h,m,g,y,f,x,w,b,v,k,_,j,S,C,T,E,R,A,I,L,P,N,M,O,F,D,q,$,B,U,H,W,z,K,Y,V,G,X,Z,J,Q,ee,te,se,re,oe,ne,ie,ae,le,ce,de,ue,pe,he,me,ge,ye,fe,xe=s(1609);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},we.apply(null,arguments)}const be=e=>xe.createElement("svg",we({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",fill:"none","aria-hidden":"true",viewBox:"0 0 252 60"},e),r||(r=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__a"},xe.createElement("stop",{offset:0,stopColor:"#570732"}),xe.createElement("stop",{offset:.04,stopColor:"#610b39"}),xe.createElement("stop",{offset:.15,stopColor:"#79164b"}),xe.createElement("stop",{offset:.29,stopColor:"#8c1e59"}),xe.createElement("stop",{offset:.44,stopColor:"#9a2463"}),xe.createElement("stop",{offset:.63,stopColor:"#a22768"}),xe.createElement("stop",{offset:1,stopColor:"#a4286a"}))),o||(o=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__b",x1:49.556,x2:49.556,y1:36.267,y2:23.152,gradientUnits:"userSpaceOnUse"})),n||(n=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__c",x1:82.801,x2:82.801,y1:38.819,y2:20.113,gradientUnits:"userSpaceOnUse"})),i||(i=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__d",x1:62.504,x2:62.504,y1:36.222,y2:23.113,gradientUnits:"userSpaceOnUse"})),a||(a=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__e",x1:73.951,x2:73.951,y1:36.276,y2:23.046,gradientUnits:"userSpaceOnUse"})),l||(l=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__f",x1:25.237,x2:25.237,y1:16.169,y2:36.914,gradientUnits:"userSpaceOnUse"},xe.createElement("stop",{offset:0,stopColor:"#77b227"}),xe.createElement("stop",{offset:.47,stopColor:"#75b027"}),xe.createElement("stop",{offset:.64,stopColor:"#6eab27"}),xe.createElement("stop",{offset:.75,stopColor:"#63a027"}),xe.createElement("stop",{offset:.85,stopColor:"#529228"}),xe.createElement("stop",{offset:.93,stopColor:"#3c8028"}),xe.createElement("stop",{offset:1,stopColor:"#246b29"}))),c||(c=xe.createElement("clipPath",{id:"yoast-connect-google-site-kit_svg__g"},xe.createElement("path",{d:"M169.334 22h14.973v15.909h-14.973z"}))),d||(d=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__b)",fillRule:"evenodd",d:"M36.765 29.643c0-3.42 1.83-6.49 6.405-6.49 4.402 0 6.375 2.8 6.386 6.698.008 3.2-1.785 6.416-6.386 6.416-4.602 0-6.405-3.072-6.405-6.624zm8.432-2.74c-1.174-1.64-4.688-1.64-4.8 2.932.046 2.582 1.245 3.614 2.773 3.63 3.316.039 3.092-5.067 2.027-6.562z",clipRule:"evenodd"})),u||(u=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__c)",d:"M80.278 33.094v-6.631h2.368v-2.874h-2.368v-3.476h-3.66v3.476h-1.856v2.876h1.857v6.258c0 3.553 2.477 5.665 5.092 6.102l1.092-2.949c-1.524-.192-2.51-1.332-2.525-2.782z"})),p||(p=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__d)",fillRule:"evenodd",d:"M61.81 27.062v4.981c0 .7.196 1.67.426 2.803.088.436.182.897.27 1.376h-3.523l-.611-1.472c-4.118 2.994-8.053.974-8.053-2.168 0-4.131 4.01-4.632 7.777-4.632l.003-.249c.01-.465.02-.985-.24-1.336v-.007l-.034-.04-.011-.013c-.602-.675-2.327-1.028-5.21.341l-1.283-2.575c4.428-1.546 10.143-1.555 10.46 2.47.019.174.028.347.03.52zm-6.52 3.81c-2.718 1.331-.064 4.384 2.835 1.14v-1.425c-.949 0-2.035.012-2.835.284z",clipRule:"evenodd"})),h||(h=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__e)",d:"M67.439 26.794c0-1.227 1.966-1.8 5.064-.386l1.072-2.605c-4.17-1.262-9.866-1.371-9.904 2.991-.017 2.091 1.324 3.216 3.255 3.934 1.337.497 3.268.754 3.262 1.82-.007 1.391-3 1.604-5.725-.268l-1.101 2.823c3.716 1.85 10.627 1.902 10.59-2.734-.03-4.583-6.513-3.798-6.513-5.575z"})),m||(m=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__f)",d:"m35.218 16.875-5.305 14.734-2.54-7.956h-3.779l4.23 10.866a3.956 3.956 0 0 1 0 2.877c-.474 1.213-1.26 2.25-3.177 2.508v3.221c3.734 0 5.753-2.295 7.554-7.326l7.06-18.924z"})),g||(g=xe.createElement("path",{fill:"#f0ecf0",d:"M124.088 57.357c15.427 0 27.934-12.506 27.934-27.933S139.515 1.49 124.088 1.49 96.155 13.997 96.155 29.424s12.506 27.933 27.933 27.933z"})),y||(y=xe.createElement("path",{fill:"#9e005d",d:"M122.68 23.422c5.075-5.662 3.282-.196 13.081-2.26 2.792-.587 7.802-1.905 9.067.833 1.427 3.092 4.014 3.471 3.211 5.47-1.412 3.512-6.46 4.52-7.887.556-1.819-1.232-8.98 2.24-11.167 2.775-.813.198-.868-2.038-1.675-2.168-.529-.085-.462-.17-.939-.575-4.613-3.918-4.904-3.277-5.22-4.126.482-.115.95-.396 1.531-.503z"})),f||(f=xe.createElement("path",{fill:"#6c2548",d:"M145.465 25.27c-1.744-.556-3.859.788-3.015 2.668.204.456 1.233 2.392 1.665 2.536 1.633.552 5.651-2.227 1.35-5.204z"})),x||(x=xe.createElement("path",{fill:"#ffc399",d:"M145.972 26.652c-.452-.226-2.526.313-2.3 1.188.281 1.084.758 1.655 1.395 1.998 1.627.875 1.365 2.531 3.684 2.5 1.12-.015 4.022-1.557 4.118-.456.157 1.823.464 3.564.792 3.17.792-.951 1.109-1.03 1.188-4.2.021-.887-2.14-1.506-3.013-2.854-.473-.733-2.932-.714-5.866-1.348z"})),w||(w=xe.createElement("path",{fill:"#be1e2d",d:"M109.348 16.345c-2.102-1.797-8.454 4.23-7.974 6.137.479-.51 1.186-1.505 1.973-1.316-2.719 1.838-3.191 6.484-1.784 9.259.158-.735.439-1.525.897-2.123-.778 3.037.466 8.256 4.271 10.873-.26-1.915-1.201-5.028.477-6.267 2.485-1.836 5.651-2.398 7.153-5.43 3.716-7.506-7.675-12.913-5.013-11.135z"})),b||(b=xe.createElement("path",{fill:"#9e005d",d:"M111.503 27.227c-1.65.136-7.152 11.633.475 20.361 1.067 1.223 2.372 3.57 3.92 3.78 3.256.443 11.848-1.812 15.059-3.188 12.146-5.202 1.267-10.842-.308-16.792-1.421-5.366-1.725-8.762-7.928-8.997-2.92-.11-11.15 1.768-11.95 5.058-.224.108-.109-.08.732-.224z"})),v||(v=xe.createElement("path",{fill:"#6c2548",d:"M123.196 23.817c3.828 1.233 6.256 5.375 7.755 8.771-1.38-4.316-2.059-8.262-7.932-8.95-.013-.072.419-.694.177.18z"})),k||(k=xe.createElement("path",{fill:"#6c2548",d:"M127.718 23.362c1.071.893 1.961 2.794 2.438 3.984.522 1.306.088 3.329.571 4.638-1.292-3.232-1.307-5.14-3.007-8.622z"})),_||(_=xe.createElement("path",{fill:"#ffc399",d:"M125.772 33.468c-1.058.375-2.898.677-4.103 1.248-2.187 1.037-4.936-1.725-7.313-1.188-.858.194-3.845-.873-4.082-1.942-.293-1.325-.745-1.352-.078-2.22 2.619-3.402 2.815-1.566 2.932-6.896.019-.886-.2-1.312.079-2.061.279-.75.21.017 1.09-.143.879-.16 2.996-1.05 3.869-.652 1.533.699.513 3.972 1.61 5.107 1.139 1.177 3.841-.028 4.989 1.128 1.439 1.45 1.324 6.848 1.005 7.621z"})),j||(j=xe.createElement("path",{fill:"#e57c57",d:"M123.021 27.88c.285-.57.221-1.564-.026-2.586-1.175-.034-2.504.164-3.217-.575-.65-.671-.558-2.085-.692-3.277a3.502 3.502 0 0 1-.607-.122c-1.263-.372-2.67-.835-4.069-1.077-.039.008-.077.017-.111.023-.405.075-.605-.057-.733-.143l-.213-.017c-.04.05-.085.141-.144.303-.271.728-.073 1.156-.079 1.995 1.386 3.614 6.644 11.98 9.895 5.477z"})),S||(S=xe.createElement("path",{fill:"#f1f2f2",d:"M116.06 33.648c7.293 3.488 11.969 5.47 13.635 9.989-1.031-4.757-.893-8.622-4.459-15.161.675 7.425-8.761 5.37-9.176 5.172z"})),C||(C=xe.createElement("path",{fill:"#6c2548",d:"M129.697 43.002c.157-3.884-1.057-18.564-4.44-20.057-1.056-.466-10.726 1.174-7.768 1.348 4.625.27 7.293 2.775 7.928 4.28.792 1.11 3.081 8.599 4.28 14.427z"})),T||(T=xe.createElement("path",{fill:"#9e005d",d:"M129.616 43.001c.157-3.884-1.93-18.724-5.311-20.214-1.056-.467-9.776 1.333-6.819 1.505 4.626.27 7.294 2.775 7.928 4.28.792 1.11 3.003 8.599 4.202 14.427z"})),E||(E=xe.createElement("path",{fill:"#ffc399",d:"M126.288 12.877c.555 2.457-.397 1.902.078 3.488.375 1.25.729 2.066.635 3.488-.241 3.656-2.983 6.876-3.086 6.978-1.45 1.45-3.132 1.295-5.476.077-4.364-2.266-6.898-4.994-7.532-11.823-.471-5.072 3.763-8.847 9.014-8.313 3.249.332 5.449 2.04 6.367 6.103z"})),R||(R=xe.createElement("path",{fill:"#be1e2d",d:"M114.461 9.389c3.944-.179 3.02 1.925 6.539 2.973 2.794.832 5.707-1.012 5.173 3.745-.475 4.212 9.401-4.116 1.46-7.591-1.269-.556-1.137-1.414-2.378-3.013-2.598-3.343-11.337-7.055-15.061-.873-.944 1.567 2.657 4.101 4.265 4.757z"})),A||(A=xe.createElement("path",{fill:"#be1e2d",d:"M114.282 9.508c.912 3.597-.161 4.23-.653 5.47-.541 1.364-.803 2.65-1.487 3.925-.992-2.07-2.184-.317-5.276-4.36-5.537-7.24 9.782-16.915 7.416-5.035z"})),I||(I=xe.createElement("path",{fill:"#ffc399",d:"M112.336 19.497c.617-1.633-4.029-4.43-3.599-1.043.209 1.642 1.516 2.574 2.913 3.151 2.294.946 1.195-1.675.569-3.057l.119.952z"})),L||(L=xe.createElement("path",{fill:"#be1e2d",d:"M113.168 14.026c.309 1.25-.03 6.814 1.785 8.997-3.152-1.714-2.37-5.13-1.785-8.997z"})),P||(P=xe.createElement("path",{fill:"#be1e2d",d:"M112.691 15.573c-.728.415-1.441 3.388-.323 5.705.006-.021.483-4.91.323-5.705z"})),N||(N=xe.createElement("path",{fill:"#9e005d",d:"M117.012 34.121c-2.877-1.74-5.509-2.068-4.725-7.2.867-1.004.747-1.897.807-3.383-1.109.396-4.086 1.948-5.434 2.655-1.985 1.04-4.361 3.41-2.458 5.39.703.73-1.758 1.923.937 6.759 1.506-2.617 2.711-4.855 3.661-4.934 3.33-.079 4.431 1.667 7.372 2.378 7.214 1.744 11.654 6.501 12.525 8.164.036-1.051-1.269-4.914-12.683-9.829z"})),M||(M=xe.createElement("path",{fill:"#9e005d",d:"M108.45 34.202c-8.258 11.429 2.709 12.432 5.351 22.998.119.48.656 1.17 1.503 1.322 5.051.903 10.884-1.744 15.862-6.92 1.408-1.463.247-4.902-1.546-5.648-2.319-1.546-7.378 4.023-13.006 2.992-.677-1.02-1.505-13.477-8.164-14.744z"})),O||(O=xe.createElement("path",{fill:"#a0c9cb",d:"m155.213 40.425-.27 9.99-6.399-1.368-.094-9.712z"})),F||(F=xe.createElement("path",{fill:"#75b0b3",d:"m155.48 50.235-.509.238c.085-11.096-.171-10.3.509-10.166v9.93z"})),D||(D=xe.createElement("path",{fill:"#66a7ab",d:"M150.965 40.959c2.473.277 3.211 6.54 2.498 9.037-.119-.12-3.567-.833-3.686-.713-1.718-1.964-.992-8.57 1.188-8.324z"})),q||(q=xe.createElement("path",{fill:"#467d7f",d:"M154.983 40.783s.153-1.902 0-2.02c-.153-.12-6.641-.655-6.641-.655-.776 1.706-.431 1.282 6.641 2.675z"})),$||($=xe.createElement("path",{fill:"#67a8ac",d:"m152.371 30.436 2.881 8.443-6.729-1.15-3.307-9.016z"})),B||(B=xe.createElement("path",{fill:"#55989b",d:"m152.988 32.518.101.02-.716-2.1-7.155-1.725.656 1.786z"})),U||(U=xe.createElement("path",{fill:"#519093",d:"m148.766 37.79-1.127.713-2.679-8.541 1.25-.893z"})),H||(H=xe.createElement("path",{fill:"#b1d3d4",d:"m152.794 30.08-.922 1.069-6.552-1.01.869-1.011z"})),W||(W=xe.createElement("path",{fill:"#a0c9cb",d:"M155.648 39.988c0 1.052-1.046 1.052-1.046 0s1.046-1.052 1.046 0z"})),z||(z=xe.createElement("path",{fill:"#a0c9cb",d:"M147.639 38.502c1.501-.95.058-.881 7.713.317-1.38 1.189-.053 1.07-7.713-.317z"})),K||(K=xe.createElement("path",{fill:"#75b0b3",d:"m155.354 38.879-1.037.832-2.444-8.681.922-1.07z"})),Y||(Y=xe.createElement("path",{fill:"#6b1523",d:"M117.374 55.11c1.071-.299.06-1.962.713-4.862-1.972 4.042-1.699 5.134-.713 4.862z"})),V||(V=xe.createElement("path",{fill:"#6b1523",d:"M119.989 48.095c.059-.594-2.913-8.918-9.097-9.276 3.448.12 10.494 9.176 8.452 9.395-1.853.535-6.076 2.32-4.41 3.925 1.307.773 1.605-3.152 4.627-3.895 4.567.882 7.438-3.94 10.415-1.874-2.809-3.503-5.362 2.14-9.989 1.725z"})),G||(G=xe.createElement("path",{fill:"#6c2548",d:"M127.793 46.647c.309-.639 1.427-.396 2.336-1.56.449-.576.948-.203 1.687-.222 1.541-.043 2.544 2.996 1.737 4.15-.445.635-2.745 1.297-3.62 1.518-1.771.445-3.511-3.036-2.14-3.884z"})),X||(X=xe.createElement("path",{fill:"#c44c31",d:"M123.081 15.099c-.993 1.109 1.35 4.64.988 6.262-.284 1.27-1.827.705-2.617-.157.694.027 1.78.445 1.982.078.76-1.384-1.539-4.914-.353-6.183z"})),Z||(Z=xe.createElement("path",{fill:"#be1e2d",d:"M124.031 23.074c-2.5.504-4.483.504-5.69-.194.579.55 1.976 1.906 3.268 1.887 1.293-.02 1.235-.569 1.355-1.11.076-.206.528-.326 1.064-.586z"})),J||(J=xe.createElement("path",{fill:"#e57c57",d:"M117.389 23.045c0-.616.545-.83 1.075-.93-.441.295-.092.88-.098.904-.481-.272-.62-.174-.977.026z"})),Q||(Q=xe.createElement("path",{fill:"#35602c",d:"m150.614 40.5-2.973-.396.428 8.839 2.736-.024c2.241-.23 2.479-8.077-.191-8.42z"})),ee||(ee=xe.createElement("path",{fill:"#569d48",d:"M149.867 44.427c.285 5.88-3.738 6.075-4.023.194-.285-5.88 3.737-6.075 4.023-.194z"})),te||(te=xe.createElement("path",{fill:"#e57c57",d:"M136.434 42.288c5.055-.658 5.866-2.932 6.341-1.11.315.786-1.069 1.442-1.903 1.755-.443.164-1.044-.055-1.551-.104-1.12-.109-1.822.562-2.885.65-.123-.631.296-1.046 0-1.189z"})),se||(se=xe.createElement("path",{fill:"#35602c",d:"M139.873 43.184c.168-.905 5.647-1.784 7.051-1.867 1.803-.107 2.161 6.066.475 6.184-2.362.164-4.487.357-6.872-.392-1.388-.435-1.904-.588-1.927-2.106-.017-1.12.749-2.068 1.273-1.819z"})),re||(re=xe.createElement("g",{fill:"#ffc399"},xe.createElement("path",{d:"M131.123 45.597c3.759-1.073 7.006-4.783 7.689-4.023 1.091 1.212-.543 2.16-1.06 3.489-.698 1.797 1.054-.037-.403 1.784-.634.792-1.961.179-2.793.179-.556.157-1.863 1.328-2.498 1.486-1.031-.158-2.364-2.042-.937-2.913z"}),xe.createElement("path",{d:"M138.898 41.243c3.239.682 4.923-.098 5.189 1.152.181.856 1.606 3.358 1.559 4.323-1.725.462-2.504-2.683-3.13-3.156-.426-.321-2.909.188-3.733.077-.824-.111-1.378-2.191.115-2.396z"}),xe.createElement("path",{d:"M141.004 43.042c.573 1.983 2.144 3.145 1.51 3.79-.848.863-1.691 1.404-2.013 1.263-1.976-.87.322-1.169-.004-1.496-.326-.328-1.995-2.12-2.34-2.198.24-.924-.094-1.263-.303-2.212.211.07 2.865.35 3.152.853z"}),xe.createElement("path",{d:"M137.707 42.446c.958-.115 1.457 1.48 1.546 1.784.166.567 1.348 1.806 1.427 2.379.179 1.277-1.071 1.188-1.755 1.456-.564.298-1.991-.743-.683-1.576-.935-.019-3.073-1.497-2.694-2.016.241-.004 1.148-2.383 2.157-2.025z"}),xe.createElement("path",{d:"M137.599 43.08c.556 1.11 1.03 3.964.873 4.28-.271.544-.865 1.07-1.51 1.34s-1.026-.943-1.978-1.893c.792-.713 1.691-.128 1.665.239-.03.438.079-.318.396-.239-.238-.317-.884-1.365-1.188-1.982-.434-.88.635-2.536 1.744-1.744zm6.311-14.765c.475 1.744-.187 2.5-.238 3.092-.085.99.758 1.205 1.348 1.901.873 1.031.792 2.22 1.505 2.775 1.983-.873.015-3.264-.193-3.786-.158-.396.034-2.875 2.016-3.032-1.348-1.665-3.249-2.22-4.44-.952z"}))),oe||(oe=xe.createElement("path",{fill:"#6b1523",d:"M112.653 25.483c-1.903.93-5.883 2.474-6.737 4.518-.599 1.431 5.707 1.11 13.081 5.31-3.805-2.774-9.996-4.01-10.307-4.992-.106-.335 2.715-4.87 3.963-4.836zm-7.374 6.024c.839 1.118 2.3 1.11 4.202 1.586-.878-.434-4.779.837-4.361 0 .157-.317-.167-.875.157-1.586z"})),ne||(ne=xe.createElement("path",{fill:"#f1f2f2",d:"M116.341 17.639c.007-.03.462-.848 2.206-1.014.678-.064 1.896.509 1.795 1.169-1.007.43-1.888.675-4.001-.155z"})),ie||(ie=xe.createElement("path",{fill:"#231f20",d:"M120.347 17.688c-.062-.337-.441-.754-.918-.767-.526-.015-1.035.55-1.044.897-.004.153.086.276.224.37.684.015 1.19-.162 1.733-.394a.422.422 0 0 0 .005-.106z"})),ae||(ae=xe.createElement("path",{fill:"#231f20",d:"M120.368 17.667c-.102-.768-1.512-1.3-2.404-1.303-1.244 0-1.491 1.171-2.272.735.177.703 1.141.928 1.801.933-2.327-.695 2.14-2.302 2.875-.365z"})),le||(le=xe.createElement("path",{fill:"#f1f2f2",d:"M123.27 17.549c.977.332 2.076-.19 2.44-.741.592-.899-1.629-2.066-2.44.74z"})),ce||(ce=xe.createElement("path",{fill:"#231f20",d:"M124.226 17.238a.33.33 0 0 0 .122.373c.604-.115 1.132-.452 1.365-.803a.576.576 0 0 0 .093-.245c-.323-.585-1.245-.539-1.58.675z"})),de||(de=xe.createElement("path",{fill:"#231f20",d:"M123.249 17.568c.092-.724.417-1.478 1.329-1.887 1.175-.528 1.537.92 1.938-.268-.147 1.467-.592 1.476-1.523 1.987 1.022-.356.958-1.906-.373-1.403-1.062.402-1.196 1.152-1.369 1.571z"})),ue||(ue=xe.createElement("path",{fill:"#be1e2d",d:"M126.024 14.621c.517.586-.337-.17-1.304-.06-.321.039-.841.352-1.122.365.554-1.076 1.663-1.17 2.426-.305zm-6.316.317c-3.103-.775-3.531.177-4.685 1.791 2.238-2.446 3.518-.587 5.132-1.94-.245.024-.473.103-.447.15z"})),pe||(pe=xe.createElement("path",{fill:"#6b1523",d:"M106.375 37.808c.416-1.427 1.651-3.48 2.315-3.607 4.108-.792 14.097 5.034 17.246 5.866-5.053-1.248-12.544-5.41-17.122-4.876-.586.192-2.081 1.901-2.439 2.617z"})),he||(he=xe.createElement("path",{fill:"#642243",d:"M140.501 28.713c-.421-1.256-1.179-2.587-.805-4.042.379-1.475 2.232-2.05 2.815-3.43-1.65-.713-1.58 1.923-2.468 2.349-.038-.782-.142-1.516-.129-2.324-1.54 2.028-.703 4.913.589 7.45zm-13.317-7.491c7.849.713 7.253 7.135 12.485 6.303-5.471 1.426-7.017-6.303-12.485-6.303z"})),me||(me=xe.createElement("path",{fill:"#c44c31",d:"M120.525 19.497c0 .236-.594.236-.594 0s.594-.237.594 0zm-1.903.355c0 .236-.358.236-.358 0s.358-.236.358 0zm5.768-.832c0 .316-.474.316-.474 0 0-.315.474-.315.474 0zm.89.952c0 .237-.475.237-.475 0s.475-.236.475 0zm.358-1.188c0 .236-.474.236-.474 0 0-.237.474-.237.474 0zm-5.232 1.901c0 .236-.475.236-.475 0s.475-.236.475 0z"})),ge||(ge=xe.createElement("path",{fill:"#569d48",d:"M136.975 46.802c-.364-.268-.53-.656-.498-1.16-4.862.762-12.996 10.236-26.102 8.07.919.613 1.743 1.082 2.706 1.382 10.638 1.337 19.676-7.332 23.896-8.292z"})),ye||(ye=xe.createElement("path",{fill:"#5f6368",d:"M238.632 23.564h2.267v.075l-5.066 5.844 5.405 7.63v.075h-2.151l-4.437-6.357-2.094 2.419v3.94h-1.754V23.563h1.754v7.028h.074zm5.892 1.085c0 .339-.124.637-.364.877s-.529.364-.877.364c-.34 0-.638-.124-.877-.364a1.198 1.198 0 0 1-.365-.877c0-.348.124-.637.365-.878.239-.24.53-.364.877-.364.339 0 .637.124.877.364.248.249.364.538.364.878zm-.355 3.22v9.327h-1.755v-9.328zm5.604 9.477c-.762 0-1.392-.232-1.896-.704-.505-.472-.762-1.126-.77-1.962v-5.215h-1.639v-1.597h1.639v-2.856h1.754v2.856h2.285v1.597h-2.284v4.644c0 .62.124 1.043.364 1.266.24.224.513.332.819.332.141 0 .273-.017.414-.05a2.19 2.19 0 0 0 .373-.124l.554 1.564c-.471.166-1.001.249-1.613.249zm-55.489-.878c-.969-.704-1.631-1.697-1.995-2.972l2.151-.878c.216.803.597 1.448 1.151 1.962.547.505 1.209.761 1.978.761.721 0 1.324-.182 1.829-.554.505-.373.754-.886.754-1.531 0-.596-.224-1.085-.662-1.474-.439-.389-1.209-.778-2.31-1.167l-.91-.323c-.977-.338-1.796-.827-2.459-1.464-.662-.637-.992-1.473-.992-2.515 0-.721.198-1.383.587-1.995.389-.613.935-1.093 1.639-1.458.695-.355 1.482-.538 2.367-.538 1.275 0 2.293.306 3.046.927.761.621 1.266 1.308 1.522 2.087l-2.051.868c-.15-.464-.43-.87-.853-1.217-.421-.356-.96-.53-1.622-.53s-1.224.166-1.68.505c-.455.34-.679.77-.679 1.3 0 .504.207.91.612 1.241.406.323 1.043.638 1.913.935l.911.306c1.249.431 2.209 1.002 2.896 1.698.687.695 1.027 1.63 1.027 2.797 0 .952-.241 1.747-.729 2.383a4.482 4.482 0 0 1-1.862 1.433 5.981 5.981 0 0 1-2.326.463c-1.209 0-2.293-.348-3.253-1.05zm9.924-11.571a1.45 1.45 0 0 1-.439-1.067c0-.423.149-.779.439-1.069a1.444 1.444 0 0 1 1.067-.439c.422 0 .778.15 1.067.44.291.289.439.645.439 1.067 0 .422-.149.778-.438 1.067a1.455 1.455 0 0 1-1.067.44c-.423-.01-.779-.15-1.068-.44zm-.05 1.937h2.234v10.362h-2.234zm7.093 10.304a2.898 2.898 0 0 1-.993-.588c-.579-.579-.878-1.373-.878-2.375v-5.372h-1.812v-1.97h1.812v-2.92h2.235v2.93h2.517v1.97h-2.517v4.874c0 .555.108.952.323 1.176.207.273.555.405 1.06.405.231 0 .43-.033.612-.091.174-.058.364-.157.571-.298v2.177c-.447.207-.985.306-1.622.306a3.735 3.735 0 0 1-1.308-.224zm6.133-.33a4.946 4.946 0 0 1-1.887-1.962c-.455-.836-.679-1.771-.679-2.814 0-.994.224-1.904.662-2.756.439-.845 1.052-1.523 1.838-2.02s1.68-.754 2.682-.754c1.043 0 1.945.232 2.714.688a4.572 4.572 0 0 1 1.747 1.887c.397.803.596 1.697.596 2.707 0 .19-.017.43-.058.711h-7.946c.083.96.423 1.706 1.026 2.227.58.512 1.33.79 2.103.778.637 0 1.192-.141 1.655-.439a3.185 3.185 0 0 0 1.126-1.192l1.887.894a5.577 5.577 0 0 1-1.912 2.011c-.786.489-1.73.729-2.823.729-1.018.016-1.927-.215-2.731-.695zm5.397-6.01a2.497 2.497 0 0 0-.348-1.084 2.486 2.486 0 0 0-.927-.902c-.413-.24-.918-.364-1.515-.364-.72 0-1.324.215-1.821.637-.496.422-.836 1.001-1.026 1.714z"})),fe||(fe=xe.createElement("g",{fillRule:"evenodd",clipPath:"url(#yoast-connect-google-site-kit_svg__g)",clipRule:"evenodd"},xe.createElement("path",{fill:"#fbbc05",d:"m170.119 26.56 2.576 1.97a4.563 4.563 0 0 0 0 2.85l-2.576 1.97a7.667 7.667 0 0 1-.785-3.395c0-1.22.283-2.373.785-3.394z"}),xe.createElement("path",{fill:"#ea4335",d:"m172.696 28.53-2.577-1.97a7.64 7.64 0 0 1 6.877-4.266c1.95 0 3.691.731 5.049 1.915l-2.229 2.229a4.428 4.428 0 0 0-2.82-1.01 4.518 4.518 0 0 0-4.3 3.103z"}),xe.createElement("path",{fill:"#34a853",d:"m170.118 33.347 2.576-1.975a4.514 4.514 0 0 0 4.301 3.11c2.124 0 3.726-1.08 4.109-2.96h-4.109v-2.96h7.139c.104.452.174.94.174 1.392 0 4.875-3.482 7.661-7.313 7.661a7.637 7.637 0 0 1-6.877-4.268z"}),xe.createElement("path",{fill:"#4285f4",d:"m181.988 35.707-2.446-1.893c.8-.505 1.357-1.284 1.562-2.293h-4.109v-2.96h7.138c.105.453.175.94.175 1.393 0 2.497-.914 4.446-2.32 5.753z"}))))},4432(e,t,s){"use strict";var r=s(1802),o=s.n(r);s(3657),s(790),o().string.isRequired,o().object.isRequired,o().string.isRequired,o().func.isRequired,o().bool.isRequired},4578(e,t,s){"use strict";s.d(t,{K:()=>c});var r=s(5831),o=s(1802),n=s.n(o),i=s(5431),a=s(8572),l=s(790);const c=({linkStoreName:e=i.sH,className:t=""})=>(0,l.jsxs)(r.Alert,{variant:"error",className:t,children:[(0,l.jsx)("span",{className:"yst-block yst-font-medium",children:a.D}),(0,l.jsx)(a.n,{linkStoreName:e})]});c.propTypes={linkStoreName:n().string,className:n().string}},4658(e,t,s){"use strict";s.d(t,{En:()=>r.En,Jn:()=>r.Jn,Kw:()=>c,ZF:()=>r.ZF,mw:()=>r.mw});var r=s(5750),o=s(7723),n=s(5831),i=s(1802),a=s.n(i),l=s(790);const c=({showActions:e=!1,onRetry:t,onClose:s})=>(0,l.jsxs)(r.En,{children:[(0,l.jsx)(r.Jn,{onClose:s}),e&&(0,l.jsx)(n.Button,{variant:"primary",onClick:t,children:(0,o.__)("Try again","wordpress-seo")})]});c.propTypes={showActions:a().bool,onRetry:a().func.isRequired,onClose:a().func.isRequired}},4719(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.exports=o},4730(e,t,s){"use strict";s.d(t,{v:()=>_});var r=s(7143),o=s(7723),n=s(818),i=s.n(n),a=s(6702),l=s.n(a),c=s(5831),d=s(8468),u=s(1802),p=s.n(u),h=s(2458),m=s(3657),g=s(5431),y=s(7753),f=s(2027),x=s(4658),w=s(790);const b=({learnMoreUrl:e=""})=>(0,w.jsx)(f.f,{children:(0,h.x)((0,o.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */ /* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
97 +(0,o.__)("%1$sLearn more about connecting with MyYoast.%2$s","wordpress-seo"),"<a>","</a>"),{a:(0,w.jsx)(m.rd,{variant:"error",href:e})})});b.propTypes={learnMoreUrl:p().string};const v=()=>{const e=(0,c.useSvgAria)(),{commonErrorsLink:t,supportLink:s}=(0,r.useSelect)(e=>{const t=e(g.sH);return{commonErrorsLink:t.selectLink("https://yoa.st/ai-common-errors"),supportLink:t.selectAdminLink("?page=wpseo_page_support")}},[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x.mw,{children:(0,w.jsx)(f.f,{children:(0,o.__)("This feature requires a publicly accessible site. Check that your site (including any password-protected REST APIs or test environments) is visible to the public, then try again.","wordpress-seo")})}),(0,w.jsxs)(x.En,{children:[(0,w.jsxs)(c.Button,{as:"a",href:s,target:"_blank",rel:"noopener noreferrer",variant:"secondary",children:[(0,o.__)("Still need help?","wordpress-seo"),(0,w.jsx)(l(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 yst-text-slate-400 rtl:yst-rotate-[270deg]",...e}),(0,w.jsx)("span",{className:"yst-sr-only",children:(0,o.__)("(Opens in a new browser tab)","wordpress-seo")})]}),(0,w.jsxs)(c.Button,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",variant:"primary",children:[(0,o.__)("Learn more","wordpress-seo"),(0,w.jsx)(i(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 rtl:yst-rotate-180",...e})]})]})]})},k=({isAvailable:e,canConnect:t,connectUrl:s,learnMoreUrl:r},n,i)=>e&&t&&s?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(x.mw,{children:[(0,w.jsx)(f.f,{children:(0,o.__)("This feature requires a publicly accessible site. Connect to MyYoast to use Yoast AI even when your site is offline, behind a firewall, or with the REST API disabled.","wordpress-seo")}),(0,w.jsx)(b,{learnMoreUrl:r})]}),(0,w.jsxs)(x.En,{children:[(0,w.jsx)(x.Jn,{onClose:n}),(0,w.jsxs)(c.Button,{as:"a",href:s,target:"_blank",rel:"noopener noreferrer",variant:"primary",children:[(0,o.__)("Connect to MyYoast","wordpress-seo"),(0,w.jsx)(l(),{className:"yst--me-1 yst-ms-1 yst-h-4 yst-w-4 rtl:yst-rotate-[270deg]",...i}),(0,w.jsx)("span",{className:"yst-sr-only",children:(0,o.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]}):e&&!t?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(x.mw,{children:[(0,w.jsx)(f.f,{children:(0,o.__)("Your site isn't publicly accessible. Ask your site administrator to connect to MyYoast. They can find it on the Integrations page in Yoast SEO. This allows Yoast AI to work even when your site is offline, behind a firewall, or with the REST API disabled.","wordpress-seo")}),(0,w.jsx)(b,{learnMoreUrl:r})]}),(0,w.jsx)(x.En,{children:(0,w.jsx)(x.Jn,{onClose:n})})]}):(0,w.jsx)(v,{}),_=({isOpen:e=!0,onClose:t=d.noop})=>{const s=(0,c.useSvgAria)(),o=(0,r.useSelect)(e=>e(g.XA).selectMyyoastConnection(),[]);return(0,w.jsx)(x.ZF,{isOpen:e,title:y.D,onClose:t,children:k(o,t,s)})};_.propTypes={isOpen:p().bool,onClose:p().func}},4739(e,t,s){"use strict";s.d(t,{f:()=>i});var r=s(5831),o=s(1721),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},4788(e,t,s){"use strict";s.d(t,{D:()=>p,n:()=>h});var r=s(7143),o=s(7723),n=s(1802),i=s.n(n),a=s(2458),l=s(3657),c=s(5431),d=s(2027),u=s(790);const p=(0,o.__)("Something went wrong","wordpress-seo"),h=({errorMessage:e=""})=>{const t=(0,r.useSelect)(e=>e(c.sH).selectAdminLink("?page=wpseo_page_support"),[]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(d.f,{children:(0,o.sprintf)(/* translators: %s is the error response of the request. */ /* translators: %s is the error response of the request. */
98 98 (0,o.__)("The request came back with the following error: '%s'.","wordpress-seo"),e)}),(0,u.jsx)(d.f,{children:(0,a.x)((0,o.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */ /* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
99 -(0,o.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,u.jsx)(l.rd,{variant:"error",href:t})})})]})};h.propTypes={errorMessage:i().string}},4976(e,t,s){"use strict";s.d(t,{N_:()=>u});var r=s(1609),o=s(5795),n=s(7767),i=s(5588);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},a.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const l=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map,r.startTransition,o.flushSync,r.useId;const c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,u=r.forwardRef(function(e,t){let s,{onClick:o,relative:u,reloadDocument:p,replace:h,state:m,target:g,to:y,preventScrollReset:f,unstable_viewTransition:x}=e,w=function(e,t){if(null==e)return{};var s,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(o[s]=e[s]);return o}(e,l),{basename:b}=r.useContext(n.jb),v=!1;if("string"==typeof y&&d.test(y)&&(s=y,c))try{let e=new URL(window.location.href),t=y.startsWith("//")?new URL(e.protocol+y):new URL(y),s=(0,i.pb)(t.pathname,b);t.origin===e.origin&&null!=s?y=s+t.search+t.hash:v=!0}catch(e){}let _=(0,n.$P)(y,{relative:u}),k=function(e,t){let{target:s,replace:o,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d}=void 0===t?{}:t,u=(0,n.Zp)(),p=(0,n.zy)(),h=(0,n.x$)(e,{relative:c});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,s)){t.preventDefault();let s=void 0!==o?o:(0,i.AO)(p)===(0,i.AO)(h);u(e,{replace:s,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d})}},[p,u,h,o,a,s,e,l,c,d])}(y,{replace:h,state:m,target:g,preventScrollReset:f,relative:u,unstable_viewTransition:x});return r.createElement("a",a({},w,{href:s||_,onClick:v||p?o:function(e){o&&o(e),e.defaultPrevented||k(e)},ref:t,target:g}))});var p,h;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p||(p={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(h||(h={}))},4997(e){"use strict";e.exports=window.wp.blocks},5011(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"}))});e.exports=o},5074(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.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"}))});e.exports=o},5103(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(790);const c=n().p`
99 +(0,o.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,u.jsx)(l.rd,{variant:"error",href:t})})})]})};h.propTypes={errorMessage:i().string}},4976(e,t,s){"use strict";s.d(t,{N_:()=>u});var r=s(1609),o=s(5795),n=s(7767),i=s(5588);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},a.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const l=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map,r.startTransition,o.flushSync,r.useId;const c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,u=r.forwardRef(function(e,t){let s,{onClick:o,relative:u,reloadDocument:p,replace:h,state:m,target:g,to:y,preventScrollReset:f,unstable_viewTransition:x}=e,w=function(e,t){if(null==e)return{};var s,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(o[s]=e[s]);return o}(e,l),{basename:b}=r.useContext(n.jb),v=!1;if("string"==typeof y&&d.test(y)&&(s=y,c))try{let e=new URL(window.location.href),t=y.startsWith("//")?new URL(e.protocol+y):new URL(y),s=(0,i.pb)(t.pathname,b);t.origin===e.origin&&null!=s?y=s+t.search+t.hash:v=!0}catch(e){}let k=(0,n.$P)(y,{relative:u}),_=function(e,t){let{target:s,replace:o,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d}=void 0===t?{}:t,u=(0,n.Zp)(),p=(0,n.zy)(),h=(0,n.x$)(e,{relative:c});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,s)){t.preventDefault();let s=void 0!==o?o:(0,i.AO)(p)===(0,i.AO)(h);u(e,{replace:s,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d})}},[p,u,h,o,a,s,e,l,c,d])}(y,{replace:h,state:m,target:g,preventScrollReset:f,relative:u,unstable_viewTransition:x});return r.createElement("a",a({},w,{href:s||k,onClick:v||p?o:function(e){o&&o(e),e.defaultPrevented||_(e)},ref:t,target:g}))});var p,h;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p||(p={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(h||(h={}))},4997(e){"use strict";e.exports=window.wp.blocks},5011(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"}))});e.exports=o},5074(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.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"}))});e.exports=o},5103(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(790);const c=n().p`
100 100 color: #606770;
101 101 flex-shrink: 0;
102 102 font-size: 12px;
103 103 line-height: 16px;
@@ -107,37 +107,9 @@
107 107 text-transform: uppercase;
108 108 white-space: nowrap;
109 109 margin: 0;
110 110 position: ${e=>"landscape"===e.mode?"relative":"static"};
111 -`,d=e=>{const{siteUrl:t}=e;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("span",{className:"screen-reader-text",children:t}),(0,l.jsx)(c,{"aria-hidden":"true",children:(0,l.jsx)("span",{children:t})})]})};d.propTypes={siteUrl:a().string.isRequired};const u=d},5169(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))});e.exports=o},5221(e,t,s){"use strict";s.d(t,{Z:()=>i});var r=s(5831),o=s(6405),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},5424(e,t,s){"use strict";s.d(t,{Ay:()=>Fr});var r=s(4997),o=s(7143),n=s(2619);const i=window.wp.domReady;var a=s.n(i),l=s(6087),c=s(2279),d=s(8468),u=s(5831),p=s(7723),h=s(9491);const m=window.wp.wordcount;var g=s(818),y=s.n(g),f=s(2514),x=s.n(f),w=s(2458),b=s(3657),v=s(2485),_=s.n(v),k=s(790);const j=({className:e})=>{const t=(0,u.useSvgAria)();return(0,k.jsxs)("span",{className:_()("yst-text-sm yst-flex yst-items-center yst-gap-1 yst-justify-center yst-text-slate-500 yst-italic",e),children:[(0,k.jsx)(u.GradientSparklesIcon,{className:"yst-h-3 yst-w-3",...t}),(0,p.__)("Using 1 spark","wordpress-seo")]})};var S=s(3301),C=s(5431);const T=(0,h.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t}=e(S.bw),s=e("core/editor").getEditedPostContent(),{getIsPremium:r,selectLink:o}=e("yoast-seo/editor"),{isUsageCountLimitReached:n,selectPremiumSubscription:i}=e(C.XA),a=i(),l=r();return{isEmptyPost:0===(0,m.count)(s,"words",{}),isOpen:t()===S.Qo.idle,isPremium:l,upsellLink:o("https://yoa.st/content-planner-approve-modal"),learnMoreLink:o("https://yoa.st/content-planner-learn-more"),isUpsell:n()&&!a&&!l}}),(0,o.withDispatch)(e=>{const{closeModal:t,setFeatureModalStatus:s}=e(S.bw);return{onClose:t,setStatus:s}})])(({isEmptyPost:e,isPremium:t,isUpsell:s,onClick:r,upsellLink:o,learnMoreLink:n,isOpen:i,onClose:a})=>{const{title:l,description:c}=((e,t)=>t?{title:(0,p.__)("You're out of free sparks","wordpress-seo"),description:(0,p.__)("Upgrade to keep finding content gaps, generating AI-powered titles and meta descriptions, and giving your content the best chance of being found.","wordpress-seo")}:e?{title:(0,p.__)("Looking for inspiration?","wordpress-seo"),description:(0,p.__)("The Yoast AI Content Planner identifies content gaps in your site structure and recommends topics that strengthen your topical authority.","wordpress-seo")}:{title:(0,p.__)("Get content suggestions","wordpress-seo"),description:(0,w.x)((0,p.sprintf)(
112 -/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
113 - %2$s and %3$s are opening and closing italic HTML tags respectively. */
114 -/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
115 - %2$s and %3$s are opening and closing italic HTML tags respectively. */
116 -(0,p.__)("The Yoast AI Content Planner will analyze your site and recommend topics.%1$s%2$sNote: Applying a content suggestion will replace your current blogpost content & metadata.%3$s%4$s","wordpress-seo"),"<p>","<i>","</i>","</p>"),{i:(0,k.jsx)("i",{}),p:(0,k.jsx)("p",{className:"yst-mt-4"})})})(e,s),d=(0,u.useSvgAria)();return(0,k.jsx)(u.Modal,{isOpen:i,onClose:a,children:(0,k.jsxs)(u.Modal.Panel,{className:"yst-text-center yst-w-96",closeButtonScreenReaderText:(0,p.__)("Close modal","wordpress-seo"),children:[(0,k.jsx)("div",{className:"yst-w-12 yst-h-12 yst-rounded-full yst-bg-ai-100 yst-flex yst-items-center yst-justify-center yst-mx-auto yst-mb-4",children:(0,k.jsx)(u.GradientSparklesIcon,{className:"yst-h-6 yst-w-6",...d})}),(0,k.jsx)(u.Modal.Title,{className:"yst-text-slate-900 yst-font-medium yst-text-lg yst-mb-2",children:l}),(0,k.jsx)(u.Modal.Description,{as:"div",className:"yst-text-slate-600 yst-text-sm yst-mb-6 yst-mx-10",children:c}),!t&&!s&&(0,k.jsx)(j,{className:"yst-mb-2"}),s?(0,k.jsxs)(u.Button,{variant:"upsell",as:"a",href:o,target:"_blank",className:"yst-w-full",rel:"noopener noreferrer",children:[(0,k.jsx)(x(),{className:"yst-w-4 yst-h-4 yst-me-2 yst-shrink-0",...d}),(0,p.sprintf)(/* translators: %s is the name of the premium product, Yoast SEO Premium. */ /* translators: %s is the name of the premium product, Yoast SEO Premium. */
117 -(0,p.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),(0,k.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
118 -(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]}):(0,k.jsxs)(u.Button,{onClick:r,variant:"ai-primary",className:"yst-w-full",children:[" ",(0,p.__)("Get content suggestions","wordpress-seo")," "]}),(0,k.jsx)("div",{className:"yst-mt-2 yst-text-sm",children:(0,k.jsxs)(u.Link,{as:b.rd,href:n,variant:"primary",className:"yst-inline yst-no-underline yst-font-medium",children:[(0,p.__)("Learn more","wordpress-seo"),(0,k.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]})})]})})}),R=e=>{const t=[];return e.forEach(({heading:e,contentNotes:s})=>{t.push((0,r.createBlock)("core/heading",{content:e,level:2})),t.push((0,r.createBlock)("yoast-seo/content-suggestion",{suggestions:s})),t.push((0,r.createBlock)("core/paragraph"))}),t},E=["_formal","_informal","_ao90"],A=e=>{for(const t of E)if(e.endsWith(t))return e.slice(0,-t.length);return e},I=e=>({bottom:`calc( (${e+"px"} - 100vh) / 2 + 32px )`}),L=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,recentContent:n,selectContentOutlineCache:i}=(0,o.useSelect)(e=>({endpoint:e(S.bw).selectContentOutlineEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),recentContent:e(S.bw).selectRecentContent(),selectContentOutlineCache:e(S.bw).selectContentOutlineCache}),[]),{fetchContentOutline:a,restoreContentOutlineFromCache:c,setFeatureModalStatus:d}=(0,o.useDispatch)(S.bw);return(0,l.useCallback)(o=>{const l=i(o.id);if(l)return c({suggestion:o,outline:l}),void d(S.Qo.contentOutline);const u=A(s).replace("_","-");a({endpoint:e,postType:t,language:u,editor:r,recentContent:n,suggestion:{...o}})},[e,t,s,r,n,a,c,i,d])};var N=s(8334);const P=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,isUsageCountLimitReached:n,usageCountEndpoint:i,hasValidPremiumSubscription:a,isPremium:c}=(0,o.useSelect)(e=>({endpoint:e(S.bw).selectContentSuggestionsEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),usageCountEndpoint:e(C.XA).selectUsageCountEndpoint(),isUsageCountLimitReached:e(C.XA).isUsageCountLimitReached(),hasValidPremiumSubscription:e(C.XA).selectPremiumSubscription(),isPremium:e("yoast-seo/editor").getIsPremium()}),[]),{fetchContentPlannerSuggestions:d,setFeatureModalStatus:u,setContentSuggestionsStatus:p,setSuggestionsError:h}=(0,o.useDispatch)(S.bw),{fetchUsageCount:m,addUsageCount:g}=(0,o.useDispatch)(C.XA);return(0,l.useCallback)(async()=>{if(c&&!a)return u(S.Qo.contentSuggestions),void h({errorCode:402,errorIdentifier:"PAYMENT_REQUIRED",missingLicenses:["Yoast SEO Premium"]});if(n&&!a)return void u(S.Qo.idle);u(S.Qo.contentSuggestions),p(N.$H.loading);const{payload:o}=await m({endpoint:i,isWooProductEntity:!1});if((429===(null==o?void 0:o.errorCode)&&"USAGE_LIMIT_REACHED"===(null==o?void 0:o.errorIdentifier)||o.count>=o.limit)&&!a)return u(S.Qo.idle),void p(N.$H.idle);const l=A(s).replace("_","-");d({endpoint:e,postType:t,language:l,editor:r}),g()},[e,t,s,r,n,a,c,i,d,g,m,u,p,h])};var M=s(6692),O=s(1609);function F(...e){return e.filter(Boolean).join(" ")}function D(e,t,...s){if(e in t){let r=t[e];return"function"==typeof r?r(...s):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,D),r}var q,$,B=(($=B||{})[$.None=0]="None",$[$.RenderStrategy=1]="RenderStrategy",$[$.Static=2]="Static",$),U=((q=U||{})[q.Unmount=0]="Unmount",q[q.Hidden=1]="Hidden",q);function H({ourProps:e,theirProps:t,slot:s,defaultTag:r,features:o,visible:n=!0,name:i}){let a=z(t,e);if(n)return W(a,s,r,i);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=a;if(e)return W(t,s,r,i)}if(1&l){let{unmount:e=!0,...t}=a;return D(e?0:1,{0:()=>null,1:()=>W({...t,hidden:!0,style:{display:"none"}},s,r,i)})}return W(a,s,r,i)}function W(e,t={},s,r){var o;let{as:n=s,children:i,refName:a="ref",...l}=V(e,["unmount","static"]),c=void 0!==e.ref?{[a]:e.ref}:{},d="function"==typeof i?i(t):i;l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,s=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&s.push(r);e&&(u["data-headlessui-state"]=s.join(" "))}if(n===O.Fragment&&Object.keys(Y(l)).length>0){if(!(0,O.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"));let e=F(null==(o=d.props)?void 0:o.className,l.className),t=e?{className:e}:{};return(0,O.cloneElement)(d,Object.assign({},z(d.props,Y(V(l,["ref"]))),u,c,function(...e){return{ref:e.every(e=>null==e)?void 0:t=>{for(let s of e)null!=s&&("function"==typeof s?s(t):s.current=t)}}}(d.ref,c.ref),t))}return(0,O.createElement)(n,Object.assign({},V(l,["ref"]),n!==O.Fragment&&c,n!==O.Fragment&&u),d)}function z(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},s={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=s[e]||(s[e]=[]),s[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(s).map(e=>[e,void 0])));for(let e in s)Object.assign(t,{[e](t,...r){let o=s[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function K(e){var t;return Object.assign((0,O.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Y(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function V(e,t=[]){let s=Object.assign({},e);for(let e of t)e in s&&delete s[e];return s}let G=(0,O.createContext)(null);G.displayName="OpenClosedContext";var X=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(X||{});function Z(){return(0,O.useContext)(G)}function J({value:e,children:t}){return O.createElement(G.Provider,{value:e},t)}var Q=Object.defineProperty,ee=(e,t,s)=>(((e,t,s)=>{t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s);let te=new class{constructor(){ee(this,"current",this.detect()),ee(this,"handoffState","pending"),ee(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},se=(e,t)=>{te.isServer?(0,O.useEffect)(e,t):(0,O.useLayoutEffect)(e,t)};function re(){let e=(0,O.useRef)(!1);return se(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function oe(e){let t=(0,O.useRef)(e);return se(()=>{t.current=e},[e]),t}function ne(){let[e,t]=(0,O.useState)(te.isHandoffComplete);return e&&!1===te.isHandoffComplete&&t(!1),(0,O.useEffect)(()=>{!0!==e&&t(!0)},[e]),(0,O.useEffect)(()=>te.handoff(),[]),e}let ie=function(e){let t=oe(e);return O.useCallback((...e)=>t.current(...e),[t])},ae=Symbol();function le(...e){let t=(0,O.useRef)(e);(0,O.useEffect)(()=>{t.current=e},[e]);let s=ie(e=>{for(let s of t.current)null!=s&&("function"==typeof s?s(e):s.current=e)});return e.every(e=>null==e||(null==e?void 0:e[ae]))?void 0:s}function ce(){let e=[],t=[],s={enqueue(e){t.push(e)},addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),s.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return s.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>s.requestAnimationFrame(()=>s.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return s.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}(()=>{t.current&&e[0]()}),s.add(()=>{t.current=!1})},add:t=>(e.push(t),()=>{let s=e.indexOf(t);if(s>=0){let[t]=e.splice(s,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return s}function de(e,...t){e&&t.length>0&&e.classList.add(...t)}function ue(e,...t){e&&t.length>0&&e.classList.remove(...t)}function pe(){let[e]=(0,O.useState)(ce);return(0,O.useEffect)(()=>()=>e.dispose(),[e]),e}function he({container:e,direction:t,classes:s,onStart:r,onStop:o}){let n=re(),i=pe(),a=oe(t);se(()=>{let t=ce();i.add(t.dispose);let l=e.current;if(l&&"idle"!==a.current&&n.current)return t.dispose(),r.current(a.current),t.add(function(e,t,s,r){let o=s?"enter":"leave",n=ce(),i=void 0!==r?function(e){let t={called:!1};return(...s)=>{if(!t.called)return t.called=!0,e(...s)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let a=D(o,{enter:()=>t.enter,leave:()=>t.leave}),l=D(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=D(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ue(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),de(e,...a,...c),n.nextFrame(()=>{ue(e,...c),de(e,...l),function(e,t){let s=ce();if(!e)return s.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[n,i]=[r,o].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t});if(n+i!==0){let r=s.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();s.add(()=>t()),s.dispose}(e,()=>(ue(e,...a),de(e,...t.entered),i()))}),n.dispose}(l,s.current,"enter"===a.current,()=>{t.dispose(),o.current(a.current)})),t.dispose},[t])}function me(e=""){return e.split(" ").filter(e=>e.trim().length>1)}let ge=(0,O.createContext)(null);ge.displayName="TransitionContext";var ye,fe=((ye=fe||{}).Visible="visible",ye.Hidden="hidden",ye);let xe=(0,O.createContext)(null);function we(e){return"children"in e?we(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function be(e,t){let s=oe(e),r=(0,O.useRef)([]),o=re(),n=pe(),i=ie((e,t=U.Hidden)=>{let i=r.current.findIndex(({el:t})=>t===e);-1!==i&&(D(t,{[U.Unmount](){r.current.splice(i,1)},[U.Hidden](){r.current[i].state="hidden"}}),n.microTask(()=>{var e;!we(r)&&o.current&&(null==(e=s.current)||e.call(s))}))}),a=ie(e=>{let t=r.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>i(e,U.Unmount)}),l=(0,O.useRef)([]),c=(0,O.useRef)(Promise.resolve()),d=(0,O.useRef)({enter:[],leave:[],idle:[]}),u=ie((e,s,r)=>{l.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(d.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?c.current=c.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(s)):r(s)}),p=ie((e,t,s)=>{Promise.all(d.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>s(t))});return(0,O.useMemo)(()=>({children:r,register:a,unregister:i,onStart:u,onStop:p,wait:c,chains:d}),[a,i,r,u,p,d,c])}function ve(){}xe.displayName="NestingContext";let _e=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ke(e){var t;let s={};for(let r of _e)s[r]=null!=(t=e[r])?t:ve;return s}let je=B.RenderStrategy,Se=K(function(e,t){let{beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n,enter:i,enterFrom:a,enterTo:l,entered:c,leave:d,leaveFrom:u,leaveTo:p,...h}=e,m=(0,O.useRef)(null),g=le(m,t),y=h.unmount?U.Unmount:U.Hidden,{show:f,appear:x,initial:w}=function(){let e=(0,O.useContext)(ge);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[b,v]=(0,O.useState)(f?"visible":"hidden"),_=function(){let e=(0,O.useContext)(xe);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:k,unregister:j}=_,S=(0,O.useRef)(null);(0,O.useEffect)(()=>k(m),[k,m]),(0,O.useEffect)(()=>{if(y===U.Hidden&&m.current)return f&&"visible"!==b?void v("visible"):D(b,{hidden:()=>j(m),visible:()=>k(m)})},[b,m,k,j,f,y]);let C=oe({enter:me(i),enterFrom:me(a),enterTo:me(l),entered:me(c),leave:me(d),leaveFrom:me(u),leaveTo:me(p)}),T=function(e){let t=(0,O.useRef)(ke(e));return(0,O.useEffect)(()=>{t.current=ke(e)},[e]),t}({beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n}),R=ne();(0,O.useEffect)(()=>{if(R&&"visible"===b&&null===m.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,b,R]);let E=w&&!x,A=!R||E||S.current===f?"idle":f?"enter":"leave",I=ie(e=>D(e,{enter:()=>T.current.beforeEnter(),leave:()=>T.current.beforeLeave(),idle:()=>{}})),L=ie(e=>D(e,{enter:()=>T.current.afterEnter(),leave:()=>T.current.afterLeave(),idle:()=>{}})),N=be(()=>{v("hidden"),j(m)},_);he({container:m,classes:C,direction:A,onStart:oe(e=>{N.onStart(m,e,I)}),onStop:oe(e=>{N.onStop(m,e,L),"leave"===e&&!we(N)&&(v("hidden"),j(m))})}),(0,O.useEffect)(()=>{!E||(y===U.Hidden?S.current=null:S.current=f)},[f,E,b]);let P=h,M={ref:g};return x&&f&&te.isServer&&(P={...P,className:F(h.className,...C.current.enter,...C.current.enterFrom)}),O.createElement(xe.Provider,{value:N},O.createElement(J,{value:D(b,{visible:X.Open,hidden:X.Closed})},H({ourProps:M,theirProps:P,defaultTag:"div",features:je,visible:"visible"===b,name:"Transition.Child"})))}),Ce=K(function(e,t){let{show:s,appear:r=!1,unmount:o,...n}=e,i=(0,O.useRef)(null),a=le(i,t);ne();let l=Z();if(void 0===s&&null!==l&&(s=D(l,{[X.Open]:!0,[X.Closed]:!1})),![!0,!1].includes(s))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=(0,O.useState)(s?"visible":"hidden"),u=be(()=>{d("hidden")}),[p,h]=(0,O.useState)(!0),m=(0,O.useRef)([s]);se(()=>{!1!==p&&m.current[m.current.length-1]!==s&&(m.current.push(s),h(!1))},[m,s]);let g=(0,O.useMemo)(()=>({show:s,appear:r,initial:p}),[s,r,p]);(0,O.useEffect)(()=>{if(s)d("visible");else if(we(u)){let e=i.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")},[s,u]);let y={unmount:o};return O.createElement(xe.Provider,{value:u},O.createElement(ge.Provider,{value:g},H({ourProps:{...y,as:O.Fragment,children:O.createElement(Se,{ref:a,...y,...n})},theirProps:{},defaultTag:O.Fragment,features:je,visible:"visible"===c,name:"Transition"})))}),Te=K(function(e,t){let s=null!==(0,O.useContext)(ge),r=null!==Z();return O.createElement(O.Fragment,null,!s&&r?O.createElement(Ce,{ref:t,...e}):O.createElement(Se,{ref:t,...e}))}),Re=Object.assign(Ce,{Child:Te,Root:Ce});var Ee=s(1802),Ae=s.n(Ee),Ie=s(9672),Le=s(7753);const Ne=()=>(0,k.jsxs)(u.Alert,{variant:"error",children:[(0,k.jsx)("span",{className:"yst-block yst-font-medium",children:Le.D}),(0,k.jsx)(Le.n,{})]}),Pe=({errorCode:e,errorIdentifier:t="",errorMessage:s="",missingLicenses:r=[],onRetry:n=d.noop})=>{const{onClose:i}=(0,u.useModalContext)();if((0,o.useSelect)(e=>e("yoast-seo/editor").getIsPremium(),[])&&(402===e||429===e&&"USAGE_LIMIT_REACHED"===t)){const e=r.length>0?r:["Yoast SEO Premium"];return(0,k.jsx)(Ie.AA,{invalidSubscriptions:e})}let a;switch(e){case 400:switch(t){case"SITE_UNREACHABLE":a=(0,k.jsx)(Ne,{});break;case"WP_HTTP_REQUEST_ERROR":a=(0,k.jsx)(Ie.W7,{errorMessage:s});break;default:a=(0,k.jsx)(Ie.K2,{})}break;case 408:a=(0,k.jsx)(Ie.Am,{});break;case 429:a=(0,k.jsx)(Ie.IT,{});break;default:a=(0,k.jsx)(Ie.K2,{})}return(0,k.jsxs)(k.Fragment,{children:[a,(0,k.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,k.jsx)(u.Button,{variant:"secondary",onClick:i,children:(0,p.__)("Close","wordpress-seo")}),(0,k.jsx)(u.Button,{variant:"primary",onClick:n,children:(0,p.__)("Try again","wordpress-seo")})]})]})};Pe.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string,errorMessage:Ae().string,missingLicenses:Ae().arrayOf(Ae().string),onRetry:Ae().func};var Me=s(2580),Oe=s.n(Me),Fe=s(2509),De=s.n(Fe),qe=s(8393),$e=s.n(qe),Be=s(5011),Ue=s.n(Be);const He={informational:{classes:"yst-bg-blue-200 yst-text-blue-900",calloutClasses:"yst-bg-blue-50 yst-border-blue-200",calloutTextClasses:"yst-text-blue-900",Icon:Oe(),label:(0,p.__)("Informational","wordpress-seo"),tooltip:(0,p.__)("The user wants to find an answer to a specific question.","wordpress-seo")},navigational:{classes:"yst-bg-violet-200 yst-text-violet-900",calloutClasses:"yst-bg-violet-50 yst-border-violet-200",calloutTextClasses:"yst-text-violet-900",Icon:$e(),label:(0,p.__)("Navigational","wordpress-seo"),tooltip:(0,p.__)("The user wants to find a specific page or site.","wordpress-seo")},commercial:{classes:"yst-bg-amber-200 yst-text-amber-900",calloutClasses:"yst-bg-amber-50 yst-border-amber-200",calloutTextClasses:"yst-text-amber-900",Icon:De(),label:(0,p.__)("Commercial","wordpress-seo"),tooltip:(0,p.__)("The user wants to investigate brands or services.","wordpress-seo")},transactional:{classes:"yst-bg-green-200 yst-text-green-900",calloutClasses:"yst-bg-green-50 yst-border-green-200",calloutTextClasses:"yst-text-green-900",Icon:Ue(),label:(0,p.__)("Transactional","wordpress-seo"),tooltip:(0,p.__)("The user wants to complete an action (conversion).","wordpress-seo")}},We=({intent:e,className:t,tooltipPosition:s="top-right",cursor:r="default"})=>{const o=He[e],n=(0,u.useSvgAria)(),i=`intent-tooltip-${e}-${(0,l.useId)()}`;if(!o)return(0,k.jsx)(u.Badge,{children:e});const{Icon:a}=o,c="pointer"===r?"yst-cursor-pointer":"yst-cursor-default";return(0,k.jsxs)(u.TooltipContainer,{children:[(0,k.jsx)(u.TooltipTrigger,{as:"span",ariaDescribedby:i,className:"yst-inline-flex yst-w-fit",children:(0,k.jsxs)(u.Badge,{className:_()("yst-relative yst-flex yst-items-center yst-gap-1 yst-w-fit",c,o.classes,t),children:[(0,k.jsx)(a,{className:_()("yst-w-3",o.classes),...n})," ",o.label]})}),(0,k.jsx)(u.TooltipWithContext,{id:i,className:"yst-max-w-48 yst-z-50 yst-text-center",position:s,children:o.tooltip})]})},ze=({suggestion:e,onClick:t})=>{const{intent:s,title:r,explanation:o}=e,n=(0,l.useCallback)(()=>t(e),[t,e]);return(0,k.jsxs)("button",{type:"button",onClick:n,className:"hover:yst-bg-slate-50 yst-group yst-text-start yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",children:[(0,k.jsx)(We,{intent:s,className:"yst-mb-2",cursor:"pointer"}),(0,k.jsx)("div",{className:"yst-font-medium yst-text-sm yst-mb-2 yst-text-slate-800 group-hover:yst-text-slate-900",children:(0,k.jsx)("span",{className:"group-hover:yst-border-b group-hover:yst-border-slate-900",children:r})}),(0,k.jsx)("p",{className:"yst-text-slate-600",children:o})]})},Ke=()=>(0,k.jsxs)("div",{className:"yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm",children:[(0,k.jsxs)("div",{className:"yst-px-2 yst-py-1 yst-bg-white yst-inline-flex yst-gap-1 yst-items-center yst-justify-start yst-mb-2 yst-rounded-3xl yst-border yst-border-slate-300",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-2 yst-h-2 yst-rounded-full"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-20 yst-h-3 yst-rounded"})]}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-64 yst-h-[18px] yst-rounded yst-mb-3"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-[13px] yst-rounded yst-mb-2"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-2/3 yst-h-[13px] yst-rounded"})]}),Ye=({suggestions:e,onSuggestionClick:t})=>(0,k.jsxs)("div",{children:[(0,k.jsx)(u.Modal.Description,{className:"yst-mb-4",children:(0,p.__)("Select a suggestion to generate a structured outline for your post.","wordpress-seo")}),e.map((e,s)=>(0,k.jsx)(ze,{suggestion:e,onClick:t},`suggestion-${s}`))]}),Ve=()=>{const e=(0,u.useSvgAria)(),[t,s]=(0,l.useState)(0),[r,o]=(0,l.useState)(!0),[n,i]=(0,l.useState)(!0),a=[(0,p.__)("Analyzing your site content…","wordpress-seo"),(0,p.__)("Composing your content suggestions…","wordpress-seo"),(0,p.__)("Writing compelling headlines…","wordpress-seo")],c=(0,l.useRef)(null);return(0,l.useEffect)(()=>{const e=setInterval(()=>{o(!1),c.current=setTimeout(()=>{s(e=>(e+1)%a.length),o(!0)},300)},3e3);return()=>{clearInterval(e),clearTimeout(c.current)}},[]),(0,l.useEffect)(()=>{const e=setInterval(()=>{i(e=>!e)},1e3);return()=>clearInterval(e)},[]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-pb-8",children:[(0,k.jsx)(M.h,{className:"yst-w-24 yst-mb-2 yst-mt-6 yst-transition-colors yst-duration-1000 "+(n?"yst-text-primary-300":"yst-text-primary-500"),...e}),(0,k.jsxs)(u.Modal.Description,{className:"yst-italic yst-text-slate-500 yst-transition-opacity yst-duration-300 "+(r?"yst-opacity-100":"yst-opacity-0"),children:[(0,k.jsx)("span",{className:"yst-sr-only",children:" Yoast "}),a[t]]})]}),(0,k.jsxs)("div",{className:"yst-relative",children:[[...Array(5)].map((e,t)=>(0,k.jsx)(Ke,{},t)),(0,k.jsx)("div",{className:"yst-absolute yst-inset-0 yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity","aria-hidden":"true"})]})]})},Ge=(0,h.compose)([(0,o.withSelect)(e=>{const{selectSuggestions:t,selectSuggestionsStatus:s,selectSuggestionsError:r}=e(S.bw);return{suggestions:t(),status:s(),error:r()}})])(({status:e,onSuggestionClick:t=d.noop,suggestions:s,error:r,closeButtonRef:o})=>{const n=P(),i=e===N.$H.loading,a=e===N.$H.success;return(0,l.useEffect)(()=>{null!=o&&o.current&&o.current.focus()},[i]),(0,k.jsx)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,k.jsxs)("div",{className:"yst-relative","aria-live":"polite",children:[(0,k.jsx)(Re,{as:"div",show:i,enter:"yst-transition-opacity yst-duration-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300 yst-absolute yst-top-0 yst-left-0 yst-right-0",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,k.jsx)(Ve,{})}),(0,k.jsx)(Re,{as:"div",show:a,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,k.jsx)(Ye,{suggestions:s,onSuggestionClick:t})}),e===N.$H.error&&(0,k.jsx)(Pe,{errorCode:r.errorCode,errorIdentifier:r.errorIdentifier,errorMessage:r.errorMessage,missingLicenses:r.missingLicenses,onRetry:n})]})})});var Xe=s(4719),Ze=s.n(Xe),Je=s(3838);const Qe=({intent:e,description:t})=>{const s=He[e],r=s?s.calloutClasses:"yst-bg-slate-50 yst-border-slate-200",o=s?s.calloutTextClasses:"yst-text-slate-900";return(0,k.jsxs)("div",{role:"note",className:_()("yst-border yst-rounded-md yst-p-4 yst-flex yst-flex-col yst-gap-2",r),children:[(0,k.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,k.jsx)(We,{intent:e,tooltipPosition:"bottom-right"}),(0,k.jsx)("span",{className:_()("yst-font-medium yst-text-sm",o),children:(0,p.__)("Why this content?","wordpress-seo")})]}),(0,k.jsx)("p",{className:_()("yst-text-sm",o),children:t})]})},et=({children:e,className:t,dragProps:s,buttonProps:r})=>{const o=(0,u.useSvgAria)();return(0,k.jsx)("li",{...s,children:(0,k.jsxs)("button",{type:"button",className:_()("yst-h-10 yst-w-full yst-border yst-rounded-md yst-shadow yst-flex yst-items-center yst-gap-3 yst-px-3 yst-select-none",t),...r,children:[(0,k.jsxs)("svg",{className:"yst-w-2.5 yst-h-4 yst-shrink-0",viewBox:"0 0 10 16",fill:"currentColor",...o,children:[(0,k.jsx)("circle",{cx:"2",cy:"2",r:"1.5"}),(0,k.jsx)("circle",{cx:"8",cy:"2",r:"1.5"}),(0,k.jsx)("circle",{cx:"2",cy:"8",r:"1.5"}),(0,k.jsx)("circle",{cx:"8",cy:"8",r:"1.5"}),(0,k.jsx)("circle",{cx:"2",cy:"14",r:"1.5"}),(0,k.jsx)("circle",{cx:"8",cy:"14",r:"1.5"})]}),(0,k.jsx)("div",{className:"yst-flex yst-items-center yst-gap-3 yst-flex-1 yst-min-w-0",children:e})]})})},tt=({heading:e,index:t,dragOverIndex:s,onDragStart:r,onDragOver:o,onDrop:n,onDragEnd:i,onMoveUp:a,onMoveDown:c,totalItems:d,onAnnounce:u})=>{const h=(0,l.useCallback)(e=>r(e,t),[r,t]),m=(0,l.useCallback)(e=>o(e,t),[o,t]),g=(0,l.useCallback)(e=>n(e,t),[n,t]),y=(0,l.useCallback)(s=>{s.altKey&&("ArrowUp"===s.key&&t>0&&(s.preventDefault(),a(t),u(e,t)),"ArrowDown"===s.key&&t<d-1&&(s.preventDefault(),c(t),u(e,t+2)))},[t,d,a,c,u,e]),f={draggable:"true",onDragStart:h,onDragOver:m,onDrop:g,onDragEnd:i};return(0,k.jsxs)(et,{className:_()("yst-bg-slate-50 yst-text-slate-400 yst-border-slate-300 yst-text-sm yst-cursor-grab yst-transition-all focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",s===t&&"yst-border-primary-500 yst-border-2"),buttonProps:{onKeyDown:y},dragProps:f,children:[(0,k.jsx)("span",{className:"yst-font-medium yst-text-slate-500",children:"H2"}),(0,k.jsx)("span",{className:"yst-text-slate-600",children:e}),(0,k.jsx)("span",{className:"yst-sr-only",children:(0,p.sprintf)(/* translators: 1: current position, 2: total items. */ /* translators: 1: current position, 2: total items. */
119 -(0,p.__)("Position %1$d out of %2$d. Use Alt+Arrow Up/Down to reorder.","wordpress-seo"),t+1,d)})]})},st=()=>(0,k.jsxs)(et,{className:"yst-bg-white yst-text-slate-300 yst-border-slate-200",buttonProps:{disabled:!0},dragProps:{"aria-hidden":!0},children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3.5 yst-w-5 yst-rounded yst-shrink-0"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3.5 yst-w-32 yst-rounded"})]}),rt=({categoryName:e,isEnabled:t,isLoading:s})=>s?(0,k.jsx)("div",{className:"yst-inline-flex yst-items-center yst-w-20 yst-h-5 yst-px-2 yst-py-1 yst-rounded-full yst-border yst-border-slate-300",children:(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-16 yst-h-3 yst-rounded"})}):t&&e?(0,k.jsx)(u.Badge,{variant:"plain",className:"yst-w-fit",children:e}):null,ot=({category:e,isEnabled:t=!1,onToggle:s=d.noop,isLoading:r=!1})=>(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-3 yst-max-w-sm yst-mb-6",children:[(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-1.5",children:[(0,k.jsxs)("div",{className:"yst-flex yst-items-center yst-justify-between",children:[(0,k.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,p.__)("Suggest category","wordpress-seo")}),(0,k.jsx)(u.Toggle,{id:"suggest-category-toggle",checked:t,onChange:s,disabled:r,screenReaderLabel:(0,p.__)("Suggest category","wordpress-seo")})]}),(0,k.jsx)("p",{className:"yst-text-sm yst-text-slate-600",children:(0,p.__)("Adds post to an existing category, when applicable.","wordpress-seo")})]}),(0,k.jsx)(rt,{categoryName:null==e?void 0:e.name,isEnabled:t,isLoading:r})]}),nt=()=>(0,k.jsxs)("div",{className:"yst-flex yst-items-end yst-justify-between yst-mb-2",children:[(0,k.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,p.__)("Blog post structure","wordpress-seo")}),(0,k.jsx)("span",{className:"yst-text-xs yst-text-slate-500",children:(0,p.__)("Drag to reorder","wordpress-seo")})]}),it=({value:e,date:t="",locale:s,isCornerstone:r})=>{const{actual:o,score:n,max:i}=(0,Je.getDescriptionProgress)(e,t,r,!1,s),a=Math.min(o/i*100,100);return(0,k.jsx)("div",{className:"yst-w-full yst-h-1.5 yst-bg-slate-200 yst-rounded-full yst-overflow-hidden","aria-hidden":"true",children:(0,k.jsx)("div",{className:"yst-h-full yst-rounded-full yst-transition-all yst-duration-300",style:{width:`${a}%`,backgroundColor:(0,Je.getProgressColor)(n)}})})},at=({label:e,multiline:t=!1})=>(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-2",children:[(0,k.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:e}),(0,k.jsx)("div",{className:_()("yst-bg-white yst-border yst-border-slate-300 yst-rounded-md yst-shadow-sm yst-px-3 yst-py-2",t?"yst-min-h-20 yst-flex yst-flex-col yst-gap-1":"yst-h-10 yst-flex yst-items-center"),children:t?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-1/2 yst-h-4 yst-rounded"})]}):(0,k.jsx)(u.SkeletonLoader,{className:"yst-w-1/3 yst-h-4 yst-rounded"})})]}),lt=()=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ot,{isLoading:!0}),(0,k.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,k.jsx)(at,{label:(0,p.__)("Focus Keyphrase","wordpress-seo")}),(0,k.jsx)(at,{label:(0,p.__)("Title","wordpress-seo")}),(0,k.jsx)(at,{label:(0,p.__)("Meta description","wordpress-seo"),multiline:!0})]}),(0,k.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,k.jsx)(nt,{}),(0,k.jsx)("ul",{"aria-label":(0,p.__)("Blog post structure","wordpress-seo"),"aria-busy":!0,className:"yst-list-none yst-p-0 yst-m-0 yst-flex yst-flex-col yst-gap-2",children:Array.from({length:S.Tf}).map((e,t)=>(0,k.jsx)(st,{},`structure-row-skeleton-${t}`))})]})]}),ct=(0,h.compose)([(0,o.withSelect)(e=>{const{selectSuggestion:t,selectContentOutline:s,selectContentOutlineStatus:r,selectFeatureModalStatus:o,selectContentOutlineError:n}=e(S.bw),{getIsPremium:i}=e("yoast-seo/editor"),{isCornerstoneContent:a,getDateFromSettings:l,getContentLocale:c}=e("yoast-seo/editor");return{suggestion:t(),outline:s(),status:r(),error:n(),isPremium:i(),isActive:o()===S.Qo.contentOutline,locale:c(),date:l(),isCornerstone:a()}}),(0,o.withDispatch)(e=>{const{setFeatureModalStatus:t,saveOutlineEditsToCache:s,setSuggestion:r}=e(S.bw);return{onBackToSuggestions:(e,o)=>{s({id:e.id,structure:o}),r(e),t(S.Qo.contentSuggestions)}}})])(({status:e,onBackToSuggestions:t,onApplyOutline:s,suggestion:r,error:n,isCornerstone:i,date:a,locale:c,closeButtonRef:d})=>{const h=e===N.$H.loading,m=L(),g=(0,l.useCallback)(()=>m(r),[m,r]),[y,f]=(0,l.useState)(!0),[x,w]=(0,l.useState)(r.keyphrase),[b,v]=(0,l.useState)(r.title),[j,C]=(0,l.useState)(r.meta_description),{structure:T,dragOverIndex:R,reorderMessage:E,handleAnnounce:A,handleDragStart:I,handleDragOver:P,handleDrop:M,handleDragEnd:O,handleMoveUp:F,handleMoveDown:D}=(()=>{const e=(0,o.useSelect)(e=>e(S.bw).selectContentOutline(),[]),[t,s]=(0,l.useState)(e),[r,n]=(0,l.useState)(null),[i,a]=(0,l.useState)(""),c=(0,l.useRef)(null),d=(0,l.useCallback)((e,s)=>{a((0,p.sprintf)(/* translators: 1: heading text, 2: new 1-based position, 3: total items. */ /* translators: 1: heading text, 2: new 1-based position, 3: total items. */
120 -(0,p.__)("H2 %1$s moved to position %2$d of %3$d.","wordpress-seo"),e,s,t.length))},[t.length]);(0,l.useEffect)(()=>{s(e),a(""),n(null),c.current=null},[e]);const u=(0,l.useCallback)((e,t)=>{c.current=t,e.dataTransfer.effectAllowed="move"},[]),h=(0,l.useCallback)((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",n(t)},[]),m=(0,l.useCallback)((e,t)=>{e.preventDefault();const r=c.current;null!==r&&r!==t?(s(e=>{const s=[...e],[o]=s.splice(r,1),n=r<t?t-1:t;return s.splice(n,0,o),s}),n(null),c.current=null):n(null)},[]),g=(0,l.useCallback)(()=>{n(null),c.current=null},[]),y=(0,l.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e-1,0,r),s})},[]),f=(0,l.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e+1,0,r),s})},[]);return{structure:t,dragOverIndex:r,reorderMessage:i,handleAnnounce:d,handleDragStart:u,handleDragOver:h,handleDrop:m,handleDragEnd:g,handleMoveUp:y,handleMoveDown:f}})(),q=(0,l.useCallback)(e=>P(e,T.length),[P,T.length]),$=(0,l.useCallback)(e=>M(e,T.length),[M,T.length]);(0,l.useEffect)(()=>{w(r.keyphrase),v(r.title),C(r.meta_description)},[r]),(0,l.useEffect)(()=>{null!=d&&d.current&&d.current.focus()},[h]);const B=(0,l.useCallback)(e=>w(e.target.value),[]),U=(0,l.useCallback)(e=>v(e.target.value),[]),H=(0,l.useCallback)(e=>C(e.target.value),[]),W=(0,l.useCallback)(()=>{f(e=>!e)},[]),z=(0,l.useCallback)(()=>{t({...r,title:b,keyphrase:x,meta_description:j},T)},[t,r,b,x,j,T]),K=(0,l.useCallback)(()=>{s({title:b,metaDescription:j,focusKeyphrase:x,category:y?r.category:{name:"",id:-1},structure:T})},[s,b,j,x,y,r.category,T]),Y=Boolean(r.category&&-1!==r.category.id);return e===N.$H.error?(0,k.jsx)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,k.jsx)(Pe,{errorCode:n.errorCode,errorIdentifier:n.errorIdentifier,errorMessage:n.errorMessage,missingLicenses:n.missingLicenses,onRetry:g})}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-pt-6 yst-px-6 yst-pb-0 yst-m-0 yst-relative","aria-busy":h,children:[(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-6",children:[(0,k.jsx)(Qe,{intent:r.intent,description:r.explanation}),(0,k.jsx)(u.Modal.Description,{className:"yst-text-sm yst-text-slate-600",children:(0,p.__)("Review and customize your content outline before adding it to your post","wordpress-seo")}),(0,k.jsx)("hr",{className:"yst-border-slate-200"}),(0,k.jsx)(Re,{as:"div",show:h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,k.jsx)(lt,{})}),(0,k.jsxs)(Re,{as:"div",show:!h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:[Y&&(0,k.jsx)(ot,{category:r.category,isEnabled:y,onToggle:W}),(0,k.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,k.jsx)(u.TextField,{id:"content-outline-focus-keyphrase",label:(0,p.__)("Focus Keyphrase","wordpress-seo"),value:x,onChange:B}),(0,k.jsx)(u.TextField,{id:"content-outline-title",label:(0,p.__)("Title","wordpress-seo"),value:b,onChange:U}),(0,k.jsxs)("div",{children:[(0,k.jsx)(u.TextareaField,{id:"content-outline-meta-description",label:(0,p.__)("Meta description","wordpress-seo"),value:j,onChange:H,className:"yst-mb-2"}),(0,k.jsx)(it,{value:j,date:a,locale:c,isCornerstone:i})]})]}),(0,k.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,k.jsx)(nt,{}),(0,k.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:"yst-sr-only",children:E}),(0,k.jsx)("ul",{"aria-label":(0,p.__)("Blog post structure","wordpress-seo"),className:"yst-flex yst-flex-col yst-gap-2 yst-list-none yst-p-0 yst-m-0",children:T.map((e,t)=>(0,k.jsx)(tt,{index:t,heading:e.heading,dragOverIndex:R,onDragStart:I,onDragOver:P,onDrop:M,onDragEnd:O,onMoveUp:F,onMoveDown:D,totalItems:T.length,onAnnounce:A},e.id))}),(0,k.jsx)("div",{className:"yst-h-8",onDragOver:q,onDrop:$})]})]})]}),(0,k.jsx)("div",{className:_()(h?"yst-sticky":"yst-hidden","-yst-left-6 -yst-right-6 yst-bottom-0 yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity"),"aria-hidden":"true"})]}),(0,k.jsxs)(u.Modal.Container.Footer,{className:"yst-flex yst-items-center yst-justify-between yst-p-6 yst-border-t yst-border-slate-200",children:[(0,k.jsxs)(u.Button,{variant:"secondary",onClick:z,className:"yst-flex yst-items-center yst-gap-1.5",disabled:h,children:[(0,k.jsx)(Ze(),{className:"yst-w-4 yst-h-4"}),(0,p.__)("Content suggestions","wordpress-seo")]}),(0,k.jsx)(u.Button,{variant:"ai-primary",onClick:K,className:"[&>.yst-button--sparkles-icon]:yst-hidden yst-ps-3",disabled:h,children:(0,p.__)("Add outline to post","wordpress-seo")})]})]})}),dt="yst-mt-1 yst-mb-3",ut="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",pt=({onClose:e})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{className:dt,children:(0,p.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")}),(0,k.jsx)("div",{className:ut,children:(0,k.jsx)(u.Button,{type:"button",variant:"primary",size:"small",onClick:e,children:(0,p.__)("Got it!","wordpress-seo")})})]}),ht=({onClose:e,upsellLink:t,isWooProductEntity:s=!1,ctbId:r="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const o=(0,u.useSvgAria)();return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{className:dt,children:(0,p.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
121 -(0,p.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium")}),(0,k.jsxs)("div",{className:ut,children:[(0,k.jsx)(u.Button,{type:"button",variant:"tertiary",size:"small",onClick:e,children:(0,p.__)("Close","wordpress-seo")}),(0,k.jsxs)(u.Button,{as:"a",size:"small",variant:"upsell",href:t,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":r,children:[(0,k.jsx)(x(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...o}),(0,p.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
122 -(0,p.__)("Unlock with %1$s","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,k.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
123 -(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]})},mt=({className:e=""})=>{const{isUsageCountLimitReached:t,usageCount:s,usageCountLimit:r,premiumUpsellLink:n,wooUpsellLink:i,isWooProductEntity:a,hasValidPremiumSubscription:c,hasValidWooSubscription:d}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),premiumUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks"),wooUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks-woo"),isWooProductEntity:s.getIsWooProductEntity(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}},[]),h=(0,l.useMemo)(()=>c&&!a||a&&d&&c,[c,a,d]),[m,,g,,y]=(0,u.useToggleState)(s===r),f=Math.max(0,r-s);(0,l.useEffect)(()=>{g(h&&s===r||!h&&f<=5)},[s,r,h,t]);const x=(0,l.useMemo)(()=>a?i:n,[a,i,n]),w=(0,l.useMemo)(()=>a&&!d,[a,d]);return m&&(0,k.jsx)(u.Notifications.Notification,{id:"ai-sparks-limit",className:e,variant:"info",dismissScreenReaderLabel:(0,p.__)("Close","wordpress-seo"),title:h?(0,p.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
124 -(0,p._n)("You've used %s spark this month.","You've used %s sparks this month.",s,"wordpress-seo"),s):f<=5&&!t?(0,p.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
125 -(0,p._n)("%s free spark left!","%s free sparks left!",f,"wordpress-seo"),f):(0,p.__)("You're out of free sparks!","wordpress-seo"),size:h?"default":"large",children:h?(0,k.jsx)(pt,{onClose:y}):(0,k.jsx)(ht,{onClose:y,upsellLink:x,isWooUpsell:w})})};var gt=s(6752),yt=s(5979),ft=s(1455),xt=s.n(ft);let wt,bt=!1;const vt="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。。!‼?⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽{}|~⦅⦆「」、[]・¥$%@&'()*/:;<>\\\<>";vt.split(""),new RegExp("^["+vt+"]+"),new RegExp("["+vt+"]+$");const _t=new RegExp("["+vt+"#$%&*+/=@^`{|}~ -¿–-⁊ -₠-⃀]","g"),kt=e=>{const t={...e};return""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(t.value="%%"+e.name+"%%"),t.badge=`<badge>${e.label}</badge>`,t},jt={editType:C.gC.title,previewType:C.i0.google,postType:C.M$.post,contentType:C.Ty.post},St=(0,l.createContext)(jt),Ct=(St.Provider,()=>(0,l.useContext)(St));var Tt=s(5986);const Rt=()=>(0,l.useContext)(Tt.LocationContext),Et=e=>{const t=(0,l.useRef)(null);return(0,l.useCallback)(s=>{(0,d.attempt)(()=>t.current&&t.current.disconnect()),null!==s&&(t.current=new ResizeObserver(t=>{(0,d.forEach)(t,t=>e(t))}),t.current.observe(s))},[e])},At=({errorCode:e,errorIdentifier:t="",isOpen:s=!0,invalidSubscriptions:r=[],showActions:o=!1,onRetry:n=d.noop,errorMessage:i="",onClose:a=d.noop})=>{if("SEO_ANALYSIS_INACTIVE"===t)return(0,k.jsx)(Ie.qt,{isOpen:s,onClose:a});if(402===e||429===e&&"USAGE_LIMIT_REACHED"===t)return(0,k.jsx)(Ie.Vq,{isOpen:s,invalidSubscriptions:r,onClose:a});switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,k.jsx)(Ie.O7,{isOpen:s,onClose:a});case"NOT_ENOUGH_CONTENT":return(0,k.jsx)(Ie.Y$,{isOpen:s,onClose:a});case"SITE_UNREACHABLE":return(0,k.jsx)(Ie.vL,{isOpen:s,onClose:a});case"WP_HTTP_REQUEST_ERROR":return(0,k.jsx)(Ie.T5,{isOpen:s,errorMessage:i,showActions:o,onRetry:n,onClose:a});default:return(0,k.jsx)(Ie.zW,{isOpen:s,showActions:o,onRetry:n,onClose:a})}case 408:return(0,k.jsx)(Ie.xk,{isOpen:s,showActions:o,onRetry:n,onClose:a});case 429:return(0,k.jsx)(Ie.vA,{isOpen:s,onClose:a});case 410:return(0,k.jsx)(Ie.kr,{isOpen:s,onClose:a});default:return(0,k.jsx)(Ie.zW,{isOpen:s,showActions:o,onRetry:n,onClose:a})}};At.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string,isOpen:Ae().bool,invalidSubscriptions:Ae().arrayOf(Ae().string),showActions:Ae().bool,onRetry:Ae().func,errorMessage:Ae().string,onClose:Ae().func};var It=s(2863),Lt=s.n(It);const Nt=window.yoast.aiFrontend;var Pt=s(8213);const Mt="usageCount",Ot="fetchUsageCount",Ft=`${Ot}/${N.fJ.success}`,Dt=`${Ot}/${N.fJ.error}`,qt={errorCode:null,errorIdentifier:null,errorMessage:null},$t=(0,Pt.createSlice)({name:Mt,initialState:{status:N.$H.idle,count:0,limit:10,endpoint:"",error:qt},reducers:{addUsageCount:(e,{payload:t=1})=>{e.count+=t},setUsageCount:(e,{payload:t})=>{e.count=t},setUsageCountEndpoint:(e,{payload:t})=>{e.endpoint=t},setUsageCountLimit:(e,{payload:t})=>{e.limit=t}},extraReducers:e=>{e.addCase(`${Ot}/${N.fJ.request}`,e=>{e.status=N.$H.loading,e.error=qt}),e.addCase(Ft,(e,{payload:t})=>{e.status=N.$H.success,e.count=t.count,e.limit=t.limit,e.error=qt}),e.addCase(`${Ot}/${N.fJ.error}`,(e,{payload:t})=>{e.status=N.$H.error,e.error={errorCode:502,...t}})}}),Bt=($t.getInitialState,{selectUsageCountStatus:e=>(0,d.get)(e,[Mt,"status"],$t.getInitialState()),selectUsageCount:e=>(0,d.get)(e,[Mt,"count"],$t.getInitialState().count),selectUsageCountLimit:e=>(0,d.get)(e,[Mt,"limit"],$t.getInitialState().limit),selectUsageCountEndpoint:e=>(0,d.get)(e,[Mt,"endpoint"],$t.getInitialState().endpoint),selectUsageCountError:e=>(0,d.get)(e,[Mt,"error"],$t.getInitialState().error)});Bt.selectUsageCountRemaining=(0,Pt.createSelector)([Bt.selectUsageCount,Bt.selectUsageCountLimit],(e,t)=>Math.max(t-e,0)),Bt.isUsageCountLimitReached=(0,Pt.createSelector)([Bt.selectUsageCount,Bt.selectUsageCountLimit,Bt.selectUsageCountError],(e,t,s)=>429===s.errorCode||e>=t),$t.actions,$t.reducer;const Ut=({onStartGenerating:e})=>(0,k.jsx)(b.ve,{storeName:C.XA,linkStoreName:C.sH,onConsentGranted:e});Ut.propTypes={onStartGenerating:Ae().func.isRequired};var Ht=s(7219),Wt=s.n(Ht),zt=s(1480);const Kt=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,Yt=({total:e,current:t,onNavigate:s,disabled:r=!1,...o})=>(0,k.jsxs)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start",children:[(0,k.jsx)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1",children:(0,p.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")}),e>1&&(0,k.jsx)(u.Pagination,{className:"yst-shrink-0",current:t,total:e,onNavigate:s,disabled:r,variant:"text"
126 -/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,p.__)("Previous","wordpress-seo")
127 -/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,p.__)("Next","wordpress-seo"),...o})]}),Vt=({height:e,onFatalError:t})=>{const[s,r]=(0,l.useState)(""),{onClose:n}=(0,u.useModalContext)(),{editType:i,previewType:a,contentType:c}=Ct(),h=(()=>{const{editType:e,previewType:t}=Ct();let s="SEO";switch(t){case C.i0.social:s="social";break;case C.i0.twitter:s="X"}switch(e){case C.gC.title:return(0,p.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
128 -(0,p.__)("Generated %s titles","wordpress-seo"),s);case C.gC.description:return t===C.i0.google&&(s="meta"),(0,p.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
129 -(0,p.__)("Generated %s descriptions","wordpress-seo"),s)}})(),m=(()=>{const{editType:e,previewType:t}=Ct();let s="SEO";switch(t){case C.i0.social:s="social";break;case C.i0.twitter:s="X"}switch(e){case C.gC.title:return(0,p.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
130 -(0,p.__)("Apply %s title","wordpress-seo"),s);case C.gC.description:return t===C.i0.google&&(s="meta"),(0,p.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
131 -(0,p.__)("Apply %s description","wordpress-seo"),s)}})(),g=Rt(),{suggestions:y,fetchSuggestions:f,setSelectedSuggestion:x}=js(),b=bs(),{addAppliedSuggestion:v,addUsageCount:_}=(0,o.useDispatch)(C.XA),{isUsageCountLimitReached:j,isWooProductEntity:S,hasValidPremiumSubscription:T,hasValidWooSubscription:R}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}},[]),E=(0,l.useMemo)(()=>y.status===C.$H.loading||!(R||!j||!S)||!(T||!j),[T,j,y.status,S,R]),A=(0,u.usePrevious)(e),L=y.status===C.$H.success?e:A,{bottom:N}=I(L),[P,M]=(0,l.useState)(!1),O=(0,l.useCallback)(e=>{M(e.target.offsetHeight!==e.target.scrollHeight)},[M]),F=Et(O),D=Cs(),q=(()=>{const e=(()=>{const{previewType:e}=Ct();return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return()=>(0,o.select)(C.sH).getSnippetEditorData().description;case C.i0.social:return(0,o.select)(C.sH).getFacebookDescriptionOrFallback;case C.i0.twitter:return(0,o.select)(C.sH).getTwitterDescriptionOrFallback;default:return(0,d.constant)("")}},[e])})();return(0,l.useMemo)(e,[e])})(),$=(()=>{const e=(0,o.useSelect)(e=>e(C.sH).getReplaceVars(),[]),t=(0,l.useMemo)(()=>e.map(kt),[e]);return(0,l.useCallback)((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:n=C.gC.title,contentType:i=C.Ty.post}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,d.escapeRegExp)(o.name)+"%%","g"),(0,d.get)(r,o.name,o[s]));return i===C.Ty.term&&(e=e.replace(" Archives","")),o?((e,t=C.gC.title)=>{const s=(0,yt.applyReplaceUsingPlugin)({title:"",description:"",[t]:gt.languageProcessing.stripSpaces(e)});return(0,d.get)(s,t,e)})(e,n):e},[t])})(),B=(0,l.useMemo)(()=>i===C.gC.title?{[C.uv[c]]:y.selected}:{},[i,c,y.selected]),U=(0,l.useMemo)(()=>$(D,{overrides:B,contentType:c}),[$,D,i,c,y.selected]),H=(0,l.useMemo)(()=>$(D,{overrides:{...B,sep:"",sitename:""},contentType:c}),[$,D,i,c,y.selected]),W=(0,l.useMemo)(()=>i===C.gC.description?y.selected:$(q,{editType:C.gC.description}),[$,q,i,y.selected]),z=(0,l.useCallback)(e=>$(D,{overrides:{[C.uv[c]]:e},key:"badge",applyPluggable:!1,contentType:c}),[$,D,c]),{currentPage:K,setCurrentPage:Y,isOnLastPage:V,totalPages:G,getItemsOnCurrentPage:X}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,l.useState)(1),o=(0,l.useMemo)(()=>Math.ceil(e/t),[e,t]),n=(0,l.useMemo)(()=>s*t,[s,t]),i=(0,l.useMemo)(()=>n-t,[n,t]),a=(0,l.useMemo)(()=>1===s,[s]),c=(0,l.useMemo)(()=>s===o,[s,o]),u=(0,l.useCallback)(()=>{s>1&&r(s-1)},[s,r]),p=(0,l.useCallback)(()=>{s<o&&r(s+1)},[s,r,o]),h=(0,l.useCallback)(e=>(0,d.slice)(e,i,n),[i,n]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:a,isOnLastPage:c,previousPage:u,nextPage:p,firstOnPage:i,lastOnPage:n,getItemsOnCurrentPage:h}})({totalItems:y.status===C.$H.loading||y.status===C.$H.error?y.entities.length+C.Gu:y.entities.length,perPage:C.Gu}),Z=(0,l.useMemo)(()=>(0,d.map)(X(y.entities),e=>{let t=e;return i===C.gC.title&&(t=z(e),t=t.replace(Kt,(e,t,s,r,o,n,{start:i,wrap:a,end:l})=>{const c=a.trim();return 0===c.length?`${i}${a}${l}`:`${i}<span>${c}</span>${l}`}),t=(0,w.x)(t,{badge:(0,k.jsx)(u.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain",children:" "}),span:(0,k.jsx)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:e,label:t}}),[y.entities,X,i,z]),J=(0,l.useMemo)(()=>y.status!==C.$H.error||y.status===C.$H.error&&!V,[y.status,V]),Q=(0,l.useMemo)(()=>y.status===C.$H.loading&&V,[y.status,V]),ee=(0,l.useMemo)(()=>y.status===C.$H.error&&V,[y.status,V]),te=(0,l.useCallback)(()=>{E||(Y(y.status===C.$H.error?G:G+1),f().then(e=>{e===C.Sf.success&&_()}))},[f,y.status,G,Y,x,j]),se=vs(),re=(0,zt.Z)(!0),oe=(0,l.useCallback)(()=>{const e=i===C.gC.title?D.replace(new RegExp(C.Zc[c]+"( Archives)?"),y.selected):y.selected;se(e),v({editType:i,previewType:a,suggestion:y.selected}),n(),"pre-publish"===g&&re()},[se,i,a,y.selected,D,n,v,re,g]);((e,t=[])=>{const s=(0,l.useRef)(!1);(0,l.useEffect)(()=>{s.current||(s.current=!0,e().finally(()=>{s.current=!1}))},[e,t])})(()=>""===s?f().then(e=>{r(e),e===C.Sf.success&&_()}):Promise.resolve(),[s,_,f]);const ne=s===C.Sf.error||y.status===C.$H.error&&402===y.error.code;return(0,l.useEffect)(()=>{var e,s,r,o,n,i,a,l;ne&&t({errorCode:null!==(e=null===(s=y.error)||void 0===s?void 0:s.code)&&void 0!==e?e:0,errorIdentifier:null!==(r=null===(o=y.error)||void 0===o?void 0:o.errorIdentifier)&&void 0!==r?r:"",invalidSubscriptions:null!==(n=null===(i=y.error)||void 0===i?void 0:i.missingLicenses)&&void 0!==n?n:[],errorMessage:null!==(a=null===(l=y.error)||void 0===l?void 0:l.message)&&void 0!==a?a:""})},[ne,y.error,t]),ne?null:(0,k.jsxs)(l.Fragment,{children:[(0,k.jsxs)(u.Modal.Container.Content,{ref:F,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2",children:[(0,k.jsx)(b,{title:U,description:W,status:y.status,titleForLength:H,showPreviewSkeleton:""===s,showLengthProgress:!Q}),J&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("div",{className:"yst-flex yst-space-y-4",children:[(0,k.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto",children:h}),(0,k.jsx)(u.Button,{variant:"ai-secondary",size:"small",onClick:y.status===C.$H.loading?d.noop:te,isLoading:y.status===C.$H.loading,disabled:E,children:(0,p.__)("Generate 5 more","wordpress-seo")})]}),Q?(0,k.jsx)(ms,{idSuffix:g,suggestionClassNames:i===C.gC.title?[["yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-8/12"]]:void 0}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ps,{idSuffix:g,suggestions:Z,selected:y.selected,onChange:x}),(0,k.jsx)(Yt,{current:K,total:G,onNavigate:Y,disabled:y.status===C.$H.loading||ee})]})]}),ee&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{className:"yst-mt-8"}),(0,k.jsx)(cs,{errorCode:y.error.code,errorIdentifier:y.error.errorIdentifier,invalidSubscriptions:y.error.missingLicenses,errorMessage:y.error.message}),(0,k.jsx)(Yt,{current:K,total:G,onNavigate:Y,disabled:y.status===C.$H.loading})]})]}),(0,k.jsxs)(u.Modal.Container.Footer,{children:[P&&(0,k.jsx)("div",{className:"yst-absolute yst-inset-x-0 yst--mt-10 yst-me-[calc(2.5rem-1px)] yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-slate-50"}),(0,k.jsx)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,k.jsxs)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse",children:[(0,k.jsx)("div",{className:"yst-hidden sm:yst-inline",children:(0,k.jsx)(u.Button,{variant:"secondary",onClick:n,children:(0,p.__)("Close","wordpress-seo")})}),(0,k.jsx)("div",{className:"yst-block sm:yst-inline",children:(0,k.jsxs)(u.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:oe,disabled:""===y.selected||y.status===C.$H.loading||ee,children:[(0,k.jsx)(Wt(),{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),m]})}),(0,k.jsx)("div",{className:"yst-mt-3 sm:yst-hidden",children:(0,k.jsx)(u.Button,{variant:"secondary",onClick:n,className:"yst-w-full sm:yst-w-auto",children:(0,p.__)("Close","wordpress-seo")})})]})]}),(0,k.jsxs)(u.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:N},position:"bottom-left",children:[y.status!==C.$H.loading&&(0,k.jsx)(mt,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(y.status===C.$H.success||y.status===C.$H.loading)&&(0,k.jsx)(ys,{})]})]})};Vt.propTypes={height:Ae().number.isRequired,onFatalError:Ae().func.isRequired};const Gt=({onActivateFreeSparks:e})=>{const{premiumUpsellLink:t,wooUpsellLink:s,isWooCommerceActive:r,isProductPost:n,learnMoreLink:i,imageLink:a,wistiaEmbedPermissionValue:c,wistiaEmbedPermissionStatus:d,isUsageCountLimitReached:h,activateFreeSparksEndpoint:m}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{premiumUpsellLink:s.selectLink("https://yoa.st/ai-generator-upsell"),wooUpsellLink:s.selectLink("https://yoa.st/ai-generator-upsell-woo-seo"),isWooCommerceActive:s.getIsWooCommerceActive(),isProductPost:s.getIsProduct(),learnMoreLink:s.selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:s.selectImageLink("ai-generator-preview.jpg"),wistiaEmbedPermissionValue:s.selectWistiaEmbedPermissionValue(),wistiaEmbedPermissionStatus:s.selectWistiaEmbedPermissionStatus(),isUsageCountLimitReached:t.isUsageCountLimitReached(),activateFreeSparksEndpoint:t.selectFreeSparksActiveEndpoint()}},[]),{onClose:g,initialFocus:f}=(0,u.useModalContext)(),{title:v,upsellLabel:j,upsellLink:S,ctbId:T,newToText:R}=Ts({premium:t,woo:s}),E=(0,l.useMemo)(()=>r&&n,[r,n]),A=(0,l.useMemo)(()=>({src:a,width:"432",height:"244"}),[a]),{setWistiaEmbedPermission:I}=(0,o.useDispatch)(C.sH),{activateFreeSparks:L}=(0,o.useDispatch)(C.XA),N=(0,l.useMemo)(()=>({value:c,status:d,set:I}),[c,d,I]),P=(0,l.useCallback)(()=>{L({endpoint:m}),e()},[L,m,g,e]),M={a:(0,k.jsx)(b.rd,{href:i,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,k.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"})};return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:[(0,k.jsxs)("div",{className:"yst-relative yst-w-full",children:[(0,k.jsx)(b.qc,{videoId:"vmrahpfjxp",thumbnail:A,wistiaEmbedPermission:N}),(0,k.jsx)(u.Badge,{className:"yst-absolute yst--top-2 yst-end-4",variant:"info",children:"Beta"})]}),(0,k.jsx)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center",children:(0,k.jsxs)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center",children:[(0,k.jsx)("span",{className:"yst-logo-icon"}),R]})})]}),(0,k.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,k.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,k.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:v}),(0,k.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:E?(0,w.x)((0,p.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */ /* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
132 -(0,p.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for product titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),M):(0,w.x)((0,p.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */ /* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
133 -(0,p.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),M)})]}),h&&(0,k.jsx)(u.Alert,{className:"yst-my-4",children:(0,p.sprintf)(/* translators: %s is for Yoast SEO Premium. */ /* translators: %s is for Yoast SEO Premium. */
134 -(0,p.__)("Oh no! Its seems like you're out of free Sparks. Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),"Yoast SEO Premium")}),(0,k.jsxs)("div",{className:_()("yst-w-full yst-flex yst-flex-col",h?"yst-mt-0":"yst-mt-6"),children:[(0,k.jsxs)(u.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:S,target:"_blank",ref:f,"data-action":"load-nfd-ctb","data-ctb-id":T,children:[(0,k.jsx)(x(),{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),j,(0,k.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
135 -(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]}),!h&&(0,k.jsx)(u.Button,{variant:"ai-secondary",onClick:P,className:"yst-mt-2 yst-w-full yst-text-base yst-text-slate-800 yst-font-medium yst-h-11",children:(0,p.__)("Try for free","wordpress-seo")})]}),(0,k.jsx)(u.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:g,children:(0,p.__)("Close","wordpress-seo")})]})]})},Xt=({isOpen:e,onClose:t,closeButtonScreenReaderText:s,panelRef:r,title:o,aiModalHelperLink:n,children:i})=>{const a=(0,u.useSvgAria)();return(0,k.jsx)(u.Modal,{className:"yst-ai-modal",isOpen:e,onClose:t,children:(0,k.jsx)(u.Modal.Panel,{ref:r,className:"yst-max-w-3xl yst-relative",closeButtonScreenReaderText:s,children:(0,k.jsxs)(u.Modal.Container,{children:[(0,k.jsxs)(u.Modal.Container.Header,{children:[(0,k.jsxs)("div",{className:"yst-flex yst-items-center",children:[(0,k.jsx)("span",{className:"yst-logo-icon yst-h-5 yst-w-5"}),(0,k.jsx)(u.Modal.Title,{className:"yst-ms-3 yst-me-1.5",as:"h1",size:"2",children:o}),(0,k.jsx)(u.Link,{id:"ai-modal-learn-more",href:n,variant:"primary",className:"yst-no-underline yst-me-2",target:"_blank",rel:"noopener"
136 -/* translators: Hidden accessibility text. */,"aria-label":(0,p.__)("Learn more about AI (Opens in a new browser tab)","wordpress-seo"),children:(0,k.jsx)(Lt(),{...a,className:"yst-w-4 yst-h-4 yst-text-slate-500 yst-shrink-0"})}),(0,k.jsx)(u.Badge,{variant:"info",children:(0,p.__)("Beta","wordpress-seo")})]}),(0,k.jsx)("hr",{className:"yst-mt-6 yst--mx-6"})]}),i]})})})},Zt=({isOpen:e,onClose:t,closeButtonScreenReaderText:s,children:r})=>(0,k.jsx)(u.Modal,{className:"yst-introduction-modal",isOpen:e,onClose:t,children:(0,k.jsx)(u.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl",closeButtonScreenReaderText:s,children:r})}),Jt={inactive:"inactive",askConsent:"askConsent",upsell:"upsell",generate:"generate"};(({onUseAi:e})=>{const[t,s]=(0,l.useState)(Jt.inactive),{editType:r,previewType:n}=Ct(),i=Rt(),a=(()=>{const{editType:e,previewType:t}=Ct();switch(t){case C.i0.social:return e===C.gC.description?(0,p.__)("AI social description generator","wordpress-seo"):(0,p.__)("AI social title generator","wordpress-seo");case C.i0.twitter:return e===C.gC.description?(0,p.__)("AI X description generator","wordpress-seo"):(0,p.__)("AI X title generator","wordpress-seo");default:return e===C.gC.description?(0,p.__)("AI description generator","wordpress-seo"):(0,p.__)("AI title generator","wordpress-seo")}})(),{hasConsent:c,promptContentInitialized:d,currentSubscriptions:h,usageCountStatus:m,usageCount:g,usageCountLimit:y,usageCountEndpoint:f,hasValidPremiumSubscription:x,hasValidWooSubscription:w,focusKeyphrase:b,isPremium:v,isSeoAnalysisActive:_,aiModalHelperLink:j,isWooProductEntity:S,isFreeSparksActive:T,isWooSeoActive:R}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{hasConsent:t.selectHasAiGeneratorConsent(),promptContentInitialized:t.selectPromptContentInitialized(),currentSubscriptions:t.selectProductSubscriptions(),usageCountStatus:t.selectUsageCountStatus(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),usageCountEndpoint:t.selectUsageCountEndpoint(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription(),focusKeyphrase:s.getFocusKeyphrase(),isPremium:s.getIsPremium(),isWooSeoActive:s.getIsWooSeoActive(),isSeoAnalysisActive:s.getPreference("isKeywordAnalysisActive",!0),aiModalHelperLink:s.selectLink("https://yoa.st/ai-generator-help-button-modal"),isWooProductEntity:s.getIsWooProductEntity(),isFreeSparksActive:e(C.XA).selectIsFreeSparksActive()}},[]),{fetchUsageCount:E}=(0,o.useDispatch)(C.XA),{closeEditorModal:A}=(0,o.useDispatch)(C.sH),I=(0,p.__)("Close modal","wordpress-seo"),[L,P]=(0,l.useState)(!1),[M,O]=(0,l.useState)(0),F=(0,l.useCallback)(e=>O(e.borderBoxSize[0].blockSize),[O]),D=Et(F),[q,$]=(0,l.useState)(null),B=(0,l.useCallback)(({currentSubscriptions:e,isSeoAnalysisActive:t})=>{const s=(e=>{const t=(0,o.select)(C.sH),s=[];return((e,t)=>(e.getIsPremium()||e.getIsWooProductEntity())&&!t.premiumSubscription)(t,e)&&s.push("Yoast SEO Premium"),((e,t)=>e.getIsWooProductEntity()&&e.getIsWooSeoActive()&&!t.wooCommerceSubscription)(t,e)&&s.push("Yoast WooCommerce SEO"),s})(e);return s.length>0?{errorCode:402,errorIdentifier:"",invalidSubscriptions:s,errorMessage:""}:t?(()=>{var e,t;const s=(0,o.select)(C.XA);if(s.selectUsageCountStatus()!==N.$H.error)return null;const r=s.selectUsageCountError();return{errorCode:r.errorCode,errorIdentifier:null!==(e=r.errorIdentifier)&&void 0!==e?e:"",invalidSubscriptions:[],errorMessage:null!==(t=r.errorMessage)&&void 0!==t?t:""}})():{errorCode:0,errorIdentifier:"SEO_ANALYSIS_INACTIVE",invalidSubscriptions:[],errorMessage:""}},[]),U=(0,l.useCallback)(()=>{s(Jt.inactive)},[]),H=(0,l.useCallback)(()=>$(null),[]),W=(0,l.useCallback)(()=>{$(null),s(Jt.generate)},[]),z=(0,l.useCallback)(()=>{$(B({currentSubscriptions:h,isSeoAnalysisActive:_})),s(Jt.inactive)},[B,h,_]),K=(0,l.useCallback)(e=>{$(e),s(Jt.inactive)},[]),Y={onClose:U,closeButtonScreenReaderText:I},V=(0,l.useCallback)(()=>!(0===b.replace(_t,"").trim().length),[b]),G=(0,zt.Z)(!1),X=(0,l.useCallback)(()=>{A(),"pre-publish"===i&&G(),setTimeout(()=>(e=>{const t=`focus-keyword-input-${["modal","pre-publish"].includes(e)?"sidebar":e}`;if("metabox"===e){const e=document.getElementById("wpseo-meta-tab-content");e&&e.click()}const s=document.getElementById(t);s&&s.focus()})(i),0)},[A,i,G]),Z=(0,l.useCallback)(()=>S?w&&x:x,[x,w,S]),J=(0,l.useCallback)(async()=>{if(e(),!_)return void z();if(!V())return s(Jt.inactive),void X();const t=Z();if(!t&&v&&R&&S)return void z();if(!t&&v&&!S)return void z();if(!c&&(T||t))return void s(Jt.askConsent);P(!0);const{type:r,payload:o}=await E({endpoint:f,isWooProductEntity:S}),n=429===(null==o?void 0:o.errorCode)&&!(null!=o&&o.errorIdentifier)&&0===(null==o?void 0:o.missingLicenses.length),i=429===(null==o?void 0:o.errorCode)&&"USAGE_LIMIT_REACHED"===(null==o?void 0:o.errorIdentifier)||o.count>=o.limit;P(!1),n?z():403!==(null==o?void 0:o.errorCode)||!T&&!t?r!==Dt||429===(null==o?void 0:o.errorCode)||403===(null==o?void 0:o.errorCode)?r===Dt&&429===(null==o?void 0:o.errorCode)&&t?z():!t&&!T||!t&&i?s(Jt.upsell):(t&&c&&s(Jt.generate),!t&&T&&!i&&c&&s(Jt.generate)):z():s(Jt.askConsent)},[e,v,T,c,_,V,X,z,f,E,R,S,L]),Q=(0,l.useCallback)(async()=>{const{type:e,payload:t}=await E({endpoint:f,isWooProductEntity:S}),r=429===(null==t?void 0:t.errorCode)||t.count>=t.limit,o=Z();!r||o?e!==Dt?s(Jt.generate):z():s(Jt.upsell)},[s,z,f,E,Z,S]),ee=(0,l.useCallback)(()=>{s(c?Jt.generate:Jt.askConsent)},[s,c]),te=(0,l.useMemo)(()=>"google"===n?"title"===r?(0,p.__)("Generate SEO title","wordpress-seo"):(0,p.__)("Generate meta description","wordpress-seo"):"social"===n||"twitter"===n?"title"===r?(0,p.__)("Generate social title","wordpress-seo"):(0,p.__)("Generate social description","wordpress-seo"):void 0,[n,r]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(u.Button,{type:"button",variant:"ai-secondary",size:"small",id:`yst-replacevar__use-ai-button__${r}__${i}`,onClick:J,disabled:m===N.$H.loading||!d,isLoading:L&&m===N.$H.loading,children:te}),(0,k.jsxs)(Zt,{...Y,isOpen:[Jt.askConsent,Jt.upsell].includes(t),children:[t===Jt.askConsent&&(0,k.jsx)(Ut,{onStartGenerating:Q}),t===Jt.upsell&&(0,k.jsx)(Gt,{onActivateFreeSparks:ee})]}),(0,k.jsx)(Xt,{...Y,isOpen:t===Jt.generate,aiModalHelperLink:j,panelRef:D,title:a,children:t===Jt.generate&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Nt.UsageCounter,{limit:y,requests:g,isSkeleton:!1,className:"yst-absolute yst-top-[-11px] yst-end-12 sm:yst-end-16",mentionBetaInTooltip:v,mentionResetInTooltip:v}),(0,k.jsx)(Vt,{height:M,onFatalError:K})]})}),q&&(0,k.jsx)(At,{isOpen:!0,errorCode:q.errorCode,errorIdentifier:q.errorIdentifier,invalidSubscriptions:q.invalidSubscriptions,errorMessage:q.errorMessage,showActions:!0,onRetry:W,onClose:H})]})}).propTypes={onUseAi:Ae().func.isRequired};const Qt=({title:e,description:t,status:s,titleForLength:r,showPreviewSkeleton:n,showLengthProgress:i})=>{const a=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorMode(),[]),[c,d]=(0,l.useState)(a),{editType:h}=Ct(),m=Rt(),g=Ss({editType:h,title:r,description:t});return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Je.ModeSwitcher,{onChange:d,active:c,id:`yst-ai-google-preview-mode-switcher-${m}`,disabled:s===C.$H.loading}),n?(0,k.jsx)(ss,{}):(0,k.jsx)(ts,{mode:c,title:e,description:t}),(0,k.jsxs)("div",{className:"yst-pt-4",children:[(0,k.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:h===C.gC.title?(0,p.__)("SEO title width","wordpress-seo"):(0,p.__)("Meta description length","wordpress-seo")}),(0,k.jsx)(rs,{className:"yst-mt-2",progress:i?g.actual:0,min:0,max:g.max,score:g.score})]})]})};Qt.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,status:Ae().oneOf(Object.keys(C.$H)).isRequired,titleForLength:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired,showLengthProgress:Ae().bool.isRequired};const es=/mobi/i,ts=({mode:e,title:t,description:s})=>{var r,n;const i=(0,o.useSelect)(e=>e(C.sH).getBaseUrlFromSettings(),[]),a=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorData().slug||"",[]),c=(0,o.useSelect)(e=>e(C.sH).getDateFromSettings(),[]),u=(0,o.useSelect)(e=>e(C.sH).getFocusKeyphrase(),[]),p=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorPreviewImageUrl(),[]),h=(0,o.useSelect)(e=>e(C.sH).getSiteIconUrlFromSettings(),[]),m=(0,o.useSelect)(e=>e(C.sH).getShoppingData(),[]),g=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorWordsToHighlight(),[]),y=(0,o.useSelect)(e=>e(C.sH).getSiteName(),[]),f=(0,o.useSelect)(e=>e(C.sH).getContentLocale(),[]),x=(0,l.useMemo)(()=>i+a,[i,a]),w=(0,l.useMemo)(()=>{var e,t;return es.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)},[null===(r=window)||void 0===r||null===(n=r.navigator)||void 0===n?void 0:n.userAgent]);return(0,k.jsx)("div",{className:`yst-ai-generator-preview-section ${e}${w?" yst-user-agent__mobile":""}`,children:(0,k.jsx)(Je.SnippetPreview,{title:t,description:s,mode:e,url:x,keyword:u,date:c,faviconSrc:h,mobileImageSrc:p,wordsToHighlight:g,siteName:y,locale:f,shoppingData:m,onMouseUp:d.noop})})};ts.propTypes={mode:Ae().oneOf(Object.keys(C.Zv)).isRequired,title:Ae().string.isRequired,description:Ae().string.isRequired};const ss=()=>(0,k.jsxs)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto",children:[(0,k.jsxs)("div",{className:"yst-flex yst-gap-x-3",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"})]})]}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})]}),rs=({className:e="",progress:t,max:s,score:r})=>{const o=(0,l.useMemo)(()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(r),[r]);return(0,k.jsx)(u.ProgressBar,{className:_()("yst-length-progress-bar",o,e),progress:t,min:0,max:s})};rs.propTypes={className:Ae().string,progress:Ae().number.isRequired,max:Ae().number.isRequired,score:Ae().number.isRequired};const os=({title:e,description:t,showPreviewSkeleton:s})=>(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,k.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,p.__)("Social preview","wordpress-seo")})}),s?(0,k.jsx)(as,{}):(0,k.jsx)(is,{title:e,description:t})]});os.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired};var ns=s(1426);const is=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(C.sH).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(C.sH).getFacebookImageUrl(),[]),n=(0,o.useSelect)(e=>e(C.sH).getEditorDataImageFallback(),[]),i=(0,o.useSelect)(e=>e(C.sH).getFacebookAltText(),[]);return(0,k.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,k.jsx)(ns.Xi,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n,alt:i,onSelect:d.noop,onImageClick:d.noop,onMouseHover:d.noop})})};is.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired};const as=()=>(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,k.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),ls=({children:e,onRetry:t})=>{const{onClose:s}=(0,u.useModalContext)();return(0,k.jsxs)(l.Fragment,{children:[e,(0,k.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,k.jsx)(u.Button,{variant:"secondary",onClick:s,children:(0,p.__)("Close","wordpress-seo")}),(0,k.jsx)(u.Button,{variant:"primary",onClick:t,children:(0,p.__)("Try again","wordpress-seo")})]})]})};ls.propTypes={children:Ae().node.isRequired,onRetry:Ae().func.isRequired};const cs=({errorCode:e,errorIdentifier:t,invalidSubscriptions:s=[],showActions:r=!1,onRetry:o=d.noop,errorMessage:n=""})=>{switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,k.jsx)(Ie.Ri,{});case"NOT_ENOUGH_CONTENT":return(0,k.jsx)(Ie.Zd,{});case"SITE_UNREACHABLE":return(0,k.jsx)(Ne,{});case"WP_HTTP_REQUEST_ERROR":return r?(0,k.jsx)(ls,{onRetry:o,children:(0,k.jsx)(Ie.W7,{errorMessage:n})}):(0,k.jsx)(Ie.W7,{errorMessage:n});default:return r?(0,k.jsx)(ls,{onRetry:o,children:(0,k.jsx)(Ie.K2,{})}):(0,k.jsx)(Ie.K2,{})}case 402:return(0,k.jsx)(Ie.AA,{invalidSubscriptions:s});case 408:return r?(0,k.jsx)(ls,{onRetry:o,children:(0,k.jsx)(Ie.Am,{})}):(0,k.jsx)(Ie.Am,{});case 429:return"USAGE_LIMIT_REACHED"===t?(0,k.jsx)(Ie.AA,{invalidSubscriptions:s}):(0,k.jsx)(Ie.IT,{});case 410:return(0,k.jsx)(Ie.fQ,{});default:return r?(0,k.jsx)(ls,{onRetry:o,children:(0,k.jsx)(Ie.K2,{})}):(0,k.jsx)(Ie.K2,{})}};cs.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string.isRequired,invalidSubscriptions:Ae().array,showActions:Ae().bool,onRetry:Ae().func,errorMessage:Ae().string};const ds=Ae().shape({value:Ae().string.isRequired,label:Ae().node.isRequired}),us=({id:e,name:t,suggestion:s,isChecked:r,onChange:o})=>{const n=(0,l.useCallback)(()=>o(s.value),[s,o]);return(0,k.jsxs)("label",{htmlFor:e,className:_()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",r&&"yst-z-10 yst-border-primary-500"),children:[(0,k.jsx)("input",{type:"radio",id:e,name:t,className:"yst-radio__input",value:s.value,checked:r,onChange:n}),(0,k.jsx)("div",{className:_()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!r&&"yst-text-slate-600"),children:s.label})]})};us.propTypes={id:Ae().string.isRequired,name:Ae().string.isRequired,suggestion:ds.isRequired,isChecked:Ae().bool.isRequired,onChange:Ae().func.isRequired};const ps=({idSuffix:e,suggestions:t,selected:s,onChange:r})=>(0,k.jsx)("div",{children:(0,k.jsx)(u.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${e}`,children:t.map((t,o)=>(0,k.jsx)(us,{id:`yst-ai-suggestions-radio-${e}__${o}`,name:`ai-suggestion__${e}`,isChecked:t.value===s,onChange:r,suggestion:t},`yst-ai-suggestions-radio-${e}__${o}`))})});ps.propTypes={idSuffix:Ae().string.isRequired,suggestions:Ae().arrayOf(ds).isRequired,selected:Ae().string.isRequired,onChange:Ae().func.isRequired};const hs=[["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-8/12"]],ms=({suggestionClassNames:e=hs})=>(0,k.jsx)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]",children:e.map((e,t)=>(0,k.jsxs)("div",{className:"yst-flex yst-p-4 yst-gap-x-3 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",children:[(0,k.jsx)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,k.jsx)("div",{className:"yst-flex yst-flex-col yst-w-full",children:e.map((e,s)=>(0,k.jsx)(u.SkeletonLoader,{className:e},`yst-ai-suggestion-radio-skeleton-${t}__${s}`))})]},`yst-ai-suggestion-radio-skeleton__${t}`))});ms.propTypes={suggestionClassNames:Ae().arrayOf(Ae().arrayOf(Ae().string))};const gs="ai_generator_tip_notification",ys=()=>{const e=(0,o.useSelect)(e=>e(C.sH).isAlertDismissed(gs),[]),t=(0,o.useSelect)(e=>e(C.sH).getEditorDataContent(),[]),s=(0,o.useSelect)(e=>e(C.sH).getIsWooProductEntity(),[]),[r,,,n]=(0,u.useToggleState)(!1),{editType:i,contentType:a}=Ct(),{dismissAlert:c}=(0,o.useDispatch)(C.sH),d=(0,l.useCallback)(()=>{c(gs)},[c]),h=(0,l.useMemo)(()=>i===C.gC.description?(0,p.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,p.__)("%1$sTip%2$s: Improve the accuracy of your generated AI titles by writing more content in your page.","wordpress-seo")
137 -/* translators: %1$s and %2$s expand to opening and closing of a span in order to emphasise the word. */,[i]),m=(0,l.useMemo)(()=>((e,t)=>e||t===C.Ty.term?C.C$:C.W1)(s,a),[a,s]);return e||r||t.length>m?null:(0,k.jsxs)(u.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,p.__)("Dismiss","wordpress-seo"),children:[(0,w.x)((0,p.sprintf)(h,"<span>","</span>"),{span:(0,k.jsx)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,k.jsxs)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1",children:[(0,k.jsx)(u.Button,{type:"button",variant:"tertiary",onClick:d,children:(0,p.__)("Don’t show again","wordpress-seo")}),(0,k.jsx)(u.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:n,children:(0,p.__)("Dismiss","wordpress-seo")})]})]})},fs=({title:e,description:t,showPreviewSkeleton:s})=>(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,k.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,p.__)("X preview","wordpress-seo")})}),s?(0,k.jsx)(ws,{}):(0,k.jsx)(xs,{title:e,description:t})]});fs.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired};const xs=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(C.sH).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(C.sH).getTwitterImageUrl(),[]),n=(0,o.useSelect)(e=>e(C.sH).getFacebookImageUrl(),[]),i=(0,o.useSelect)(e=>e(C.sH).getEditorDataImageFallback(),[]),a=(0,o.useSelect)(e=>e(C.sH).getTwitterImageType(),[]),l=(0,o.useSelect)(e=>e(C.sH).getTwitterAltText(),[]);return(0,k.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,k.jsx)(ns.WG,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n||i,isLarge:"summary"!==a,alt:l,onSelect:d.noop,onImageClick:d.noop,onMouseHover:d.noop})})};xs.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired};const ws=()=>(0,k.jsxs)("div",{className:"yst-flex yst-flex-col yst-max-h-[370px] yst-w-[507px] yst-border yst-rounded-t-[14px] yst-overflow-hidden yst-mx-auto",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,k.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,k.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]});Ae().number.isRequired,Ae().string,Ae().string,Ae().object.isRequired,Ae().bool;const bs=()=>{const{previewType:e}=Ct();switch(e){case C.i0.social:return os;case C.i0.twitter:return fs;default:return Qt}},vs=()=>{const{editType:e}=Ct();switch(e){case C.gC.title:return(()=>{const{previewType:e}=Ct(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,o.useDispatch)(C.sH);return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return e=>t({title:e});case C.i0.social:return s;case C.i0.twitter:return r;default:return d.noop}},[e,t,s,r])})();case C.gC.description:return(()=>{const{previewType:e}=Ct(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,o.useDispatch)(C.sH);return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return e=>t({description:e});case C.i0.social:return s;case C.i0.twitter:return r;default:return d.noop}},[e,t,s,r])})();default:return d.noop}},_s=(0,Pt.createSlice)({name:"suggestions",initialState:{status:C.$H.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=C.$H.loading},setSuccess:(e,{payload:t})=>{e.status=C.$H.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=C.$H.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),ks=e=>{switch(e){case C.i0.social:return"Facebook";case C.i0.twitter:return"Twitter";default:return"Google"}},js=()=>{const[e,t]=(0,l.useReducer)(_s.reducer,_s.getInitialState()),{editType:s,previewType:r,postType:n,contentType:i}=Ct(),a=(0,o.useSelect)(e=>e(C.XA).selectPromptContent(),[]),c=(0,o.useSelect)(e=>e(C.XA).selectGetSuggestionsEndpoint(),[]),{contentLocale:u,focusKeyphrase:p,isWooCommerceActive:h,isGutenberg:m,isElementor:g}=(0,o.useSelect)(e=>({contentLocale:e(C.sH).getContentLocale(),focusKeyphrase:e(C.sH).getFocusKeyphrase(),isWooCommerceActive:e(C.sH).getIsWooCommerceActive(),isGutenberg:e(C.sH).getIsBlockEditor(),isElementor:e(C.sH).getIsElementorEditor()}),[]);let y,f=gt.languageProcessing.helpers.processExactMatchRequest(p).keyphrase;f.length>191&&(f=f.slice(0,191)),y=g?"elementor":m?"gutenberg":"classic";const x=((e,t,s,r)=>{const o=e===C.gC.description?"meta-description":"seo-title";let n=((e,t)=>{if(e)switch(t){case C.M$.product:return"product-";case C.M$.productCategory:case C.M$.productTag:return"product-taxonomy-"}return""})(t,s);return n&&t||r!==C.Ty.term||(n="taxonomy-"),`${n}${o}`})(s,h,n,i);return{suggestions:e,fetchSuggestions:(0,l.useCallback)(async(e=!0)=>{t(_s.actions.setLoading());const{status:s,payload:o}=await(async({endpoint:e,data:t})=>{let s;const r=1e3*(0,d.get)(window,"wpseoAiGenerator.requestTimeout",30);try{wt&&wt.abort(),wt=new AbortController,bt=!1,s=setTimeout(()=>{bt=!0,wt.abort()},r);const o=await xt()({path:e,method:"POST",data:t,parse:!1,signal:wt.signal}),n=await o.json();return{status:C.Sf.success,payload:n}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return bt?{status:C.Sf.error,payload:{message:"timeout",code:408}}:{status:C.Sf.abort};const{message:t,missingLicenses:s,errorIdentifier:r}=await(async e=>{try{const t=e.body.getReader(),{value:s}=await t.read(),r=new TextDecoder("utf-8").decode(s);return console.error(r),JSON.parse(r)}catch(e){return{message:"Unknown"}}})(e);return{status:C.Sf.error,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}})({endpoint:c,canAbort:e,data:{type:x,prompt_content:a,focus_keyphrase:f,platform:ks(r),language:A(u).replace("_","-"),editor:y}});switch(s){case C.Sf.abort:break;case C.Sf.error:t(_s.actions.setError(o));break;case C.Sf.success:t(_s.actions.setSuccess(o))}return s},[t]),setSelectedSuggestion:(0,l.useCallback)(e=>t(_s.actions.setSelected(e)),[t])}},Ss=({editType:e,title:t,description:s})=>{const r=(0,o.useSelect)(e=>e(C.sH).getDateFromSettings(),[]),n=(0,o.useSelect)(e=>e(C.sH).getContentLocale(),[]),i=(0,o.useSelect)(e=>e(C.sH).isCornerstoneContent(),[]),a=(0,o.useSelect)(e=>e(C.sH).getIsTerm(),[]);return(0,l.useMemo)(()=>e===C.gC.description?(0,Je.getDescriptionProgress)(s,r,i,a,n):(0,Je.getTitleProgress)(t),[e,t,s,r,i,a,n])},Cs=()=>{const{editType:e,previewType:t,contentType:s}=Ct(),r=(()=>{const{previewType:e}=Ct();return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return()=>(0,o.select)(C.sH).getSnippetEditorData().title;case C.i0.social:return(0,o.select)(C.sH).getFacebookTitleOrFallback;case C.i0.twitter:return(0,o.select)(C.sH).getTwitterTitleOrFallback;default:return(0,d.constant)("")}},[e])})(),n=(0,o.useSelect)(s=>s(C.XA).selectAppliedSuggestionFor({editType:e,previewType:t}),[e,t]);return(0,l.useMemo)(()=>{let t=r();return e===C.gC.description?t:(n&&(t=t.replace(n,C.Zc[s])),((e,t)=>e.includes(C.Zc[t])?e:C.Zc[t])(t,s))},[e,r])},Ts=e=>{const{isWooProductEntity:t,isProductPost:s,hasValidWooSubscription:r}=(0,o.useSelect)(e=>{const t=e(C.sH),s=e(C.XA);return{isWooProductEntity:t.getIsWooProductEntity(),isProductPost:t.getIsProduct(),hasValidWooSubscription:s.selectWooCommerceSubscription()}},[]);return(0,l.useMemo)(()=>{const o={upsellLink:e.premium,upsellLabel:(0,p.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
138 -(0,p.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",title:(0,p.__)("Use AI to generate your titles & descriptions!","wordpress-seo")};return t&&(s&&(o.title=(0,p.__)("Generate product titles & descriptions with AI!","wordpress-seo")),r||(o.newToText="Yoast WooCommerce SEO",o.upsellLabel=(0,p.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
139 -(0,p.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO"),o.upsellLink=e.woo,o.ctbId="5b32250e-e6f0-44ae-ad74-3cefc8e427f9")),o},[t,s,e.premium,e.woo])};var Rs=s(4080),Es=s(5074),As=s.n(Es);const Is=({onConfirm:e,isOpen:t,onClose:s})=>{const r=(0,u.useSvgAria)();return(0,k.jsx)(u.Modal,{isOpen:t,onClose:s,className:"yst-flex yst-items-center yst-justify-center",children:(0,k.jsxs)(u.Modal.Panel,{closeButtonScreenReaderText:(0,p.__)("Close replace content confirmation","wordpress-seo"),children:[(0,k.jsxs)("div",{className:"yst-flex yst-items-start",children:[(0,k.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,k.jsx)(As(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...r})}),(0,k.jsxs)("div",{className:"yst-ms-4 yst-text-start",children:[(0,k.jsx)(u.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900 yst-mb-3",children:(0,p.__)("Replace existing content with this outline?","wordpress-seo")}),(0,k.jsx)(u.Modal.Description,{className:"yst-text-sm yst-text-slate-500",children:(0,p.__)("This will replace everything in your post with the generated outline and content notes. You can revert this action by clicking the 'undo' button in the Gutenberg editor.","wordpress-seo")})]})]}),(0,k.jsxs)("div",{className:"yst-flex yst-flex-row yst-justify-end yst-gap-3 yst-mt-6",children:[(0,k.jsx)(u.Button,{type:"button",variant:"secondary",onClick:s,children:(0,p.__)("Cancel","wordpress-seo")}),(0,k.jsx)(u.Button,{type:"button",variant:"error",onClick:e,children:(0,p.__)("Replace content","wordpress-seo")})]})]})})},Ls=(0,h.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t,selectSuggestionsStatus:s,selectContentOutlineStatus:r}=e(S.bw),o=e("core/editor").getEditedPostContent(),{getIsPremium:n,selectLink:i}=e("yoast-seo/editor"),{selectUsageCount:a,selectUsageCountLimit:l,selectUsageCountStatus:c}=e(C.XA);return{isEmptyPost:0===(0,m.count)(o,"words",{}),isPremium:n(),status:t(),modalHelpLink:i("https://yoa.st/ai-content-planner-help-button-modal"),usageCount:a(),usageCountLimit:l(),contentSuggestionsStatus:s(),contentOutlineStatus:r(),usageCountStatus:c()}}),(0,o.withDispatch)(e=>{const{closeModal:t}=e(S.bw);return{onClose:t}})])(({onClose:e,isEmptyPost:t,isPremium:s,status:r,modalHelpLink:o,usageCount:n,usageCountLimit:i,contentSuggestionsStatus:a,contentOutlineStatus:c,usageCountStatus:d,openReplaceContentModal:h,setHasVisitedReplace:m,editedOutlineRef:g,handleApplyOutline:y,isReplaceModalOpen:f=!1,onCloseReplace:x})=>{const w=L(),b=r===S.Qo.consent,v=(0,u.useSvgAria)(),_=(0,l.useRef)(null),j=r===S.Qo.contentSuggestions,C=a===N.$H.error,T=r===S.Qo.contentOutline,R=c===N.$H.error,[E,A]=(0,l.useState)(0),P=(0,l.useCallback)(e=>A(e.borderBoxSize[0].blockSize),[A]),M=Et(P),{bottom:O}=I(E),F=(0,l.useCallback)(e=>{w(e)},[w]),D=(0,l.useCallback)(e=>{g.current=e,t?y():(m(!0),h())},[t,y,h,m]);return(0,k.jsx)(u.Modal,{isOpen:!b&&(j||T),onClose:e,children:(0,k.jsxs)(u.Modal.Panel,{ref:M,className:"yst-p-0 yst-max-w-2xl yst-overflow-visible",hasCloseButton:!1,children:[(0,k.jsx)(u.Modal.CloseButton,{ref:_,screenReaderText:j?(0,p.__)("Close content suggestions modal","wordpress-seo"):(0,p.__)("Close content outline modal","wordpress-seo")}),(0,k.jsxs)(u.Modal.Container,{children:[(0,k.jsxs)(u.Modal.Container.Header,{className:"yst-flex yst-items-center yst-gap-2 yst-pe-14 yst-py-6 yst-ps-6 yst-border-b yst-border-slate-200",children:[(0,k.jsx)(Rs.h,{className:"yst-fill-primary-500 yst-w-4 yst-mb-[1px]",...v}),(0,k.jsx)(u.Modal.Title,{size:"2",children:j?(0,p.__)("Content suggestions","wordpress-seo"):(0,p.__)("Content outline","wordpress-seo")}),(0,k.jsx)(u.Link,{href:o,variant:"primary",className:"yst-no-underline",target:"_blank",rel:"noopener noreferrer","aria-label":(0,p.__)("Learn more about AI (Opens in a new browser tab)","wordpress-seo"),children:(0,k.jsx)(Lt(),{...v,className:"yst-w-4 yst-h-4 yst-text-slate-500 yst-shrink-0"})}),(0,k.jsx)("span",{className:"yst-flex-grow"}),(0,k.jsx)(u.Badge,{size:"small",children:(0,p.__)("Beta","wordpress-seo")}),(j&&!C||T&&!R)&&(0,k.jsx)(Nt.UsageCounter,{className:"yst-relative yst-flex yst-items-center",limit:i,requests:n,mentionBetaInTooltip:s,mentionResetInTooltip:s,isSkeleton:a===N.$H.loading||d===N.$H.loading})]}),j&&(0,k.jsx)(Ge,{onSuggestionClick:F,closeButtonRef:_}),T&&(0,k.jsx)(ct,{onApplyOutline:D,closeButtonRef:_})]}),(0,k.jsx)(u.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:O},position:"bottom-left",children:a===N.$H.success&&!R&&(0,k.jsx)(mt,{})}),(0,k.jsx)(Is,{isOpen:f,onConfirm:y,onClose:x})]})})}),Ns=({hasConsent:e})=>{const t=(0,o.useSelect)(e=>e(S.bw).selectFeatureModalStatus(),[]),{setFeatureModalStatus:s,closeModal:r}=(0,o.useDispatch)(S.bw),[n,i]=(0,l.useState)(!1),[a,c,,d]=(0,u.useToggleState)(!1),h=(0,l.useRef)(null),m=(({editedOutlineRef:e})=>{const{editPost:t}=(0,o.useDispatch)("core/editor"),{closeModal:s,setBannerDismissed:r}=(0,o.useDispatch)(S.bw);return(0,l.useCallback)(()=>{var n;const i=e.current,a=(0,o.select)(S.bw).selectContentOutline(),l=(0,o.select)(S.bw).selectSuggestion(),c=i?{title:i.title,metaDescription:i.metaDescription,focusKeyphrase:i.focusKeyphrase,category:i.category}:{title:l.title,metaDescription:l.meta_description,focusKeyphrase:l.keyphrase,category:l.category},d=i?i.structure:a,u={title:c.title,blocks:R(d),meta:{_yoast_wpseo_title:c.title,_yoast_wpseo_metadesc:c.metaDescription,_yoast_wpseo_focuskw:c.focusKeyphrase}};null!==(n=c.category)&&void 0!==n&&n.id&&-1!==c.category.id&&(u.categories=[c.category.id]),t(u),r(),s()},[t,s,r])})({editedOutlineRef:h}),g=P(),y=t===S.Qo.consent,f=(0,l.useCallback)(()=>{e?g():s(S.Qo.consent)},[e,s,g]);(0,l.useEffect)(()=>{t||i(!1)},[t]);const x=a&&n;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(T,{onClick:f}),(0,k.jsx)(Ls,{editedOutlineRef:h,handleApplyOutline:m,openReplaceContentModal:d,setHasVisitedReplace:i,isReplaceModalOpen:x,onCloseReplace:c}),(0,k.jsx)(u.Modal,{isOpen:y,onClose:r,className:"yst-introduction-modal",children:(0,k.jsx)(u.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl",closeButtonScreenReaderText:(0,p.__)("Close modal","wordpress-seo"),children:(0,k.jsx)(b.ve,{storeName:C.XA,linkStoreName:C.sH,onConsentGranted:g})})})]})},Ps=window.wp.blockEditor;var Ms=s(6883),Os=s.n(Ms),Fs=s(2127),Ds=s.n(Fs);const qs=({contentNotes:e})=>{const t=(0,u.useSvgAria)();return(0,k.jsxs)("div",{className:"yst-bg-slate-50 yst-font-sans yst-rounded-sm yst-shadow-sm yst-border yst-border-solid yst-border-slate-200 yst-p-4",children:[(0,k.jsxs)("div",{className:"yst-text-slate-500 yst-text-xs yst-flex yst-items-center yst-mb-4",children:[(0,k.jsx)(Os(),{className:"yst-inline-block yst-w-3 yst-h-3 yst-me-1 yst-shrink-0",...t}),(0,k.jsx)("span",{className:"yst-text-xs yst-leading-3",children:(0,p.__)("Only visible to you","wordpress-seo")})]}),(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:"yst-flex yst-justify-start yst-items-center yst-gap-2 yst-mb-1 yst-ps-4",children:[(0,k.jsx)("div",{className:"yst-flex yst-items-center yst-justify-center yst-w-4 yst-h-4 yst-bg-ai-500 yst-rounded-[1.5px]",children:(0,k.jsx)(Ds(),{className:"yst-w-3 yst-h-3 yst-shrink-0 yst-text-white yst-flex yst-items-center yst-justify-center",...t})}),(0,k.jsx)("h3",{className:"yst-text-slate-800 yst-text-sm yst-leading-5 yst-font-medium yst-m-0",children:(0,p.__)("Content notes","wordpress-seo")})]}),e.length>0&&(0,k.jsx)("ul",{className:"yst-text-sm yst-text-slate-600 yst-font-normal yst-my-0 yst-ps-5 yst-leading-5 yst-list-none",children:e.map((e,t)=>(0,k.jsxs)("li",{className:"yst-flex yst-justify-start yst-gap-2",children:[(0,k.jsx)("span",{"aria-hidden":"true",children:"•"}),e]},`${t}-${e}`))})]})]})};(0,r.getBlockType)("yoast-seo/content-suggestion")||(0,r.registerBlockType)("yoast-seo/content-suggestion",{apiVersion:3,title:(0,p.__)("Content Suggestion","wordpress-seo"),category:"text",supports:{inserter:!1},transforms:{to:[{type:"block",blocks:["core/list"],transform:({suggestions:e})=>(0,r.createBlock)("core/list",{},e.map(e=>(0,r.createBlock)("core/list-item",{content:e})))}]},attributes:{title:{type:"string",default:""},suggestions:{type:"array",items:{type:"string"},default:[]}},edit:({attributes:e})=>{const t=(0,l.useRef)(null),s=(0,Ps.useBlockProps)({ref:t});return(0,l.useEffect)(()=>{var e,s;const r=null!==(e=null===(s=t.current)||void 0===s?void 0:s.ownerDocument)&&void 0!==e?e:document;if(r===window.document||r.getElementById("yoast-seo-tailwind-css"))return;const o=window.document.getElementById("yoast-seo-tailwind-css");if(!o)return;const n=r.createElement("link");n.id="yoast-seo-tailwind-css",n.rel="stylesheet",n.href=o.href,r.head.appendChild(n)},[]),(0,k.jsx)("div",{...s,children:(0,k.jsx)(qs,{contentNotes:e.suggestions})})},save:()=>null});var $s=s(3313),Bs=s(3832);const Us={aborted:!0};async function Hs({path:e,method:t="GET",data:s,abortController:r}){const o=r||new AbortController;let n=!1;const i=1e3*(0,d.get)(window,"wpseoContentPlanner.requestTimeout",30),a=setTimeout(()=>{n=!0,o.abort()},i);try{const r=await xt()(function(e,t,s,r){const o={path:e,method:t,parse:!1,signal:r.signal};return s&&(o.data=s),o}(e,t,s,o));return await r.json()}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw function(e){if(e)throw{errorCode:408,errorIdentifier:"",errorMessage:"timeout"}}(n),Us;throw await async function(e){const t=await async function(e){try{return await e.json()}catch(e){return{}}}(e);return{errorCode:e.status||502,errorIdentifier:t.errorIdentifier||t.code||"",errorMessage:t.message||"",missingLicenses:t.missingLicenses||[]}}(e)}finally{clearTimeout(a)}}const Ws=e=>{var t,s;let r=(0,d.isObject)(e)?e:{};(0,d.isString)(e)&&(r={message:e});const o={...r,errorMessage:(null===(t=r)||void 0===t?void 0:t.errorMessage)||(null===(s=r)||void 0===s?void 0:s.message)};return(0,d.mapValues)({errorCode:502,errorIdentifier:"",errorMessage:"",missingLicenses:[]},(e,t)=>o[t]||e)},zs="contentSuggestions",Ks="fetchContentPlannerSuggestions",Ys=(0,Pt.createSlice)({name:zs,initialState:{endpoint:"",status:N.$H.idle,suggestions:[],recentContent:[],error:S.pb},reducers:{setContentSuggestionsStatus:(e,{payload:t})=>{e.status=t},setSuggestion:(e,{payload:t})=>{const s=e.suggestions.findIndex(e=>e.id===t.id);-1!==s&&(e.suggestions[s]=t)},setSuggestionsError:(e,{payload:t})=>{e.status=N.$H.error,e.suggestions=[],e.error=Ws(t)}},extraReducers:e=>{e.addCase(`${Ks}/${N.fJ.request}`,e=>{e.status=N.$H.loading,e.suggestions=[],e.recentContent=[],e.error=S.pb}),e.addCase(`${Ks}/${N.fJ.success}`,(e,{payload:t})=>{e.status=N.$H.success,e.suggestions=t.suggestions,e.recentContent=t.recentContent,e.error=S.pb}),e.addCase(`${Ks}/${N.fJ.error}`,(e,{payload:t})=>{e.status=N.$H.error,e.error=Ws(t)})}}),Vs=Ys.getInitialState,Gs={selectContentSuggestionsEndpoint:e=>(0,d.get)(e,[zs,"endpoint"],Ys.getInitialState().endpoint),selectSuggestionsStatus:e=>(0,d.get)(e,[zs,"status"],Ys.getInitialState().status),selectSuggestions:e=>(0,d.get)(e,[zs,"suggestions"],Ys.getInitialState().suggestions),selectRecentContent:e=>(0,d.get)(e,[zs,"recentContent"],Ys.getInitialState().recentContent),selectSuggestionsError:e=>(0,d.get)(e,[zs,"error"],Ys.getInitialState().error)},Xs={...Ys.actions,fetchContentPlannerSuggestions:function*({endpoint:e,postType:t,language:s,editor:r}){yield{type:`${Ks}/${N.fJ.request}`};try{const o=(e=>{const t=(0,d.get)(e,"suggestions",null);if(!(0,d.isArray)(t))throw new Error("Invalid suggestions response: expected an array of suggestions.");return{suggestions:t.map(e=>({title:e.title,intent:e.intent,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category,explanation:e.explanation,id:`suggestion-${e.keyphrase}-${e.title}`})),recentContent:(0,d.get)(e,"recent_content",[])}})(yield{type:Ks,payload:{endpoint:e,postType:t,language:s,editor:r}});return{type:`${Ks}/${N.fJ.success}`,payload:o}}catch(e){if(null!=e&&e.aborted)return;return{type:`${Ks}/${N.fJ.error}`,payload:e}}}},Zs={[Ks]:async({payload:e})=>Hs({path:(0,Bs.addQueryArgs)(e.endpoint,{post_type:e.postType,language:e.language,editor:e.editor})})},Js=Ys.reducer,Qs="contentOutline",er="fetchContentOutline",tr={suggestion:null,outline:[],cache:{},endpoint:"",status:N.$H.idle,error:S.pb},sr=(0,Pt.createSlice)({name:Qs,initialState:tr,reducers:{setSuggestionForOutline:(e,{payload:t})=>{e.suggestion=t},restoreContentOutlineFromCache:(e,{payload:t})=>{const{suggestion:s,outline:r}=t;e.suggestion=s,e.outline=r,e.status=N.$H.success,e.error=S.pb},saveOutlineEditsToCache:(e,{payload:t})=>{const{id:s,structure:r}=t;s&&(e.cache[s]=r),e.suggestion=null,e.outline=[],e.status=N.$H.idle,e.error=S.pb}},extraReducers:e=>{e.addCase(`${er}/${N.fJ.request}`,(e,{payload:t})=>{e.status=N.$H.loading,e.suggestion=t.suggestion,e.error=S.pb}),e.addCase(`${er}/${N.fJ.success}`,(e,{payload:t})=>{e.status=N.$H.success;const s=t.outline.map((e,t)=>{var s,r;const o=null!==(s=e.subheading_text)&&void 0!==s?s:"";return{id:`${t}-${o}`,heading:o,contentNotes:null!==(r=e.content_notes)&&void 0!==r?r:[]}});e.outline=s}),e.addCase(`${er}/${N.fJ.error}`,(e,{payload:t})=>{e.status=N.$H.error,e.error=Ws(t)}),e.addCase(`${Ks}/${N.fJ.request}`,e=>({...tr,endpoint:e.endpoint}))}}),rr=sr.getInitialState,or={selectContentOutlineEndpoint:e=>(0,d.get)(e,[Qs,"endpoint"],sr.getInitialState().endpoint),selectContentOutlineStatus:e=>(0,d.get)(e,[Qs,"status"],sr.getInitialState().status),selectContentOutline:e=>(0,d.get)(e,[Qs,"outline"],sr.getInitialState().outline),selectContentOutlineError:e=>(0,d.get)(e,[Qs,"error"],sr.getInitialState().error),selectSuggestion:e=>(0,d.get)(e,[Qs,"suggestion"],sr.getInitialState().suggestion),selectContentOutlineCache:(e,t)=>(0,d.get)(e,[Qs,"cache",t],null)},nr={...sr.actions,fetchContentOutline:function*({endpoint:e,postType:t,language:s,editor:r,suggestion:o,recentContent:n}){yield{type:`${er}/${N.fJ.request}`,payload:{suggestion:o}};try{const i=yield{type:er,payload:{endpoint:e,postType:t,language:s,editor:r,recentContent:n,...o}};yield{type:`${er}/${N.fJ.success}`,payload:i}}catch(e){if(null!=e&&e.aborted)return;yield{type:`${er}/${N.fJ.error}`,payload:e}}}},ir={[er]:async({payload:e})=>Hs({method:"POST",path:e.endpoint,data:{post_type:e.postType,language:e.language,editor:e.editor,title:e.title,intent:e.intent,explanation:e.explanation,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category,recent_content:e.recentContent}})},ar=sr.reducer,lr="modal",cr=(0,Pt.createSlice)({name:lr,initialState:{isOpen:!1,featureModalStatus:null},reducers:{closeModal:()=>cr.getInitialState(),setFeatureModalStatus:(e,{payload:t})=>{e.featureModalStatus=t}},extraReducers:e=>{e.addCase(`${er}/${N.fJ.request}`,e=>{e.featureModalStatus=S.Qo.contentOutline}),e.addCase(`${Ks}/${N.fJ.request}`,e=>{e.featureModalStatus=S.Qo.contentSuggestions})}}),dr=cr.getInitialState,ur=cr.reducer,pr={...cr.actions},hr={selectFeatureModalStatus:e=>(0,d.get)(e,[lr,"featureModalStatus"],cr.getInitialState().featureModalStatus)},mr="availability",gr=(0,Pt.createSlice)({name:mr,initialState:{minPostsMet:!1},reducers:{}}),yr=gr.getInitialState,fr=gr.reducer,xr={...gr.actions},wr={selectIsMinPostsMet:e=>(0,d.get)(e,[mr,"minPostsMet"],gr.getInitialState().minPostsMet)},br="banner",vr="dismissBannerPermanently",_r=(0,Pt.createSlice)({name:br,initialState:{isBannerDismissed:!1,isBannerRendered:!1,isBannerPermanentlyDismissed:!1,bannerPermanentDismissalEndpoint:""},reducers:{setBannerRendered:e=>{e.isBannerRendered=!0},setBannerDismissed:e=>{e.isBannerDismissed=!0},setBannerPermanentlyDismissed:e=>{e.isBannerPermanentlyDismissed=!0}}}),kr=_r.getInitialState,jr=_r.reducer,Sr={[vr]:({endpoint:e})=>xt()({path:e,method:"POST",data:{is_dismissed:!0}}).catch(d.noop)},Cr={setBannerRendered:()=>((0,$s.mY)(),_r.actions.setBannerRendered()),setBannerDismissed:()=>((0,$s.al)(),_r.actions.setBannerDismissed()),setBannerPermanentlyDismissed:()=>_r.actions.setBannerPermanentlyDismissed(),dismissBannerPermanently:function*(e){e&&(yield _r.actions.setBannerPermanentlyDismissed(),yield{type:vr,endpoint:e})}},Tr={selectIsBannerDismissed:e=>(0,d.get)(e,[br,"isBannerDismissed"],_r.getInitialState().isBannerDismissed),selectIsBannerRendered:e=>(0,d.get)(e,[br,"isBannerRendered"],_r.getInitialState().isBannerRendered),selectIsBannerPermanentlyDismissed:e=>(0,d.get)(e,[br,"isBannerPermanentlyDismissed"],_r.getInitialState().isBannerPermanentlyDismissed),selectBannerPermanentDismissalEndpoint:e=>(0,d.get)(e,[br,"bannerPermanentDismissalEndpoint"],_r.getInitialState().bannerPermanentDismissalEndpoint)};var Rr=s(3560),Er=s.n(Rr),Ar=s(998),Ir=s.n(Ar);const Lr=({isPremium:e,onDismiss:t,onDismissPermanently:s,onClick:r,learnMoreLink:o})=>{const n=(0,u.useSvgAria)();return(0,k.jsx)(u.Root,{children:(0,k.jsxs)("div",{role:"group","aria-label":(0,p.__)("Content suggestions banner","wordpress-seo"),className:"yst-z-50 yst-relative yst-p-4 yst-ai-gradient-border yst-rounded-lg",children:[(0,k.jsxs)(u.DropdownMenu,{as:"span",className:"yst-absolute yst-top-4 yst-end-4",children:[(0,k.jsx)(u.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:(0,p.__)("Open banner options","wordpress-seo"),className:"yst-float-end"}),(0,k.jsxs)(u.DropdownMenu.List,{className:"yst-mt-8 yst-w-56",children:[(0,k.jsxs)(u.DropdownMenu.ButtonItem,{className:"yst-text-slate-600 yst-border-b yst-border-slate-200 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:t,children:[(0,k.jsx)(Ir(),{className:"yst-w-4 yst-text-slate-400 yst-shrink-0",...n}),(0,p.__)("Remove for this post","wordpress-seo")]}),(0,k.jsxs)(u.DropdownMenu.ButtonItem,{className:"yst-text-red-500 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:s,children:[(0,k.jsx)(Er(),{className:"yst-w-4 yst-shrink-0",...n}),(0,p.__)("Remove for all posts","wordpress-seo")]})]})]}),(0,k.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2 yst-mb-1 yst-pe-8",children:[(0,k.jsx)(u.GradientSparklesIcon,{className:"yst-h-4 yst-w-4",...n}),(0,k.jsxs)("p",{className:"yst-grow yst-text-slate-800 yst-font-medium",children:[" ",(0,p.__)("Stuck on what to write next?","wordpress-seo")]})]}),(0,k.jsx)("p",{className:"yst-text-sm yst-text-slate-600 yst-mb-1 yst-max-w-xl",children:(0,p.__)("Let Yoast AI Content Planner analyze your content and suggest high-impact topics that fill content gaps and strengthen your SEO strategy.","wordpress-seo")}),(0,k.jsxs)(u.Link,{as:b.rd,href:o,variant:"primary",className:"yst-font-medium yst-no-underline",children:[(0,p.__)("Learn more","wordpress-seo"),(0,k.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]}),(0,k.jsxs)("div",{className:"yst-mt-1 yst-flex yst-justify-end yst-gap-2 yst-items-center",children:[!e&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(j,{}),(0,k.jsx)("span",{"aria-hidden":"true",children:"·"})]}),(0,k.jsx)(u.Button,{variant:"ai-primary",onClick:r,children:(0,p.__)("Get content suggestions","wordpress-seo")})]})]})})},Nr=window.wp.dom;const Pr=({BlockListBlock:e,props:t,hasConsent:s})=>{const{isNewPost:r,isBannerDismissed:n,isBannerRendered:i,isBannerPermanentlyDismissed:a,bannerPermanentDismissalEndpoint:c,isPremium:d,minPostsMet:u,learnMoreLink:p}=(0,o.useSelect)(e=>{const t=e(S.bw);return{isNewPost:e("core/editor").isEditedPostNew(),isBannerDismissed:t.selectIsBannerDismissed(),isBannerRendered:t.selectIsBannerRendered(),isBannerPermanentlyDismissed:t.selectIsBannerPermanentlyDismissed(),bannerPermanentDismissalEndpoint:t.selectBannerPermanentDismissalEndpoint(),isPremium:e(C.sH).getIsPremium(),minPostsMet:e(S.bw).selectIsMinPostsMet(),learnMoreLink:e(C.sH).selectLink("https://yoa.st/content-planner-learn-more")}},[]),{setFeatureModalStatus:h,setBannerDismissed:m,setBannerRendered:g,dismissBannerPermanently:y}=(0,o.useDispatch)(S.bw),f=P(),x=(0,l.useRef)(null),w=!a&&!n&&(r||i)&&u,b=(0,l.useCallback)(()=>{m()},[m]),v=(0,l.useCallback)(()=>{y(c)},[y,c]),_=(0,l.useCallback)(()=>{s?f():h(S.Qo.consent)},[s,f,h]);return(0,l.useEffect)(()=>{w&&!i&&g()},[w,i,g]),(0,l.useEffect)(()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t||t===window.document||t.getElementById(S.x_))return;const s=window.document.getElementById(S.x_);if(!s)return;const r=t.createElement("link");r.id=S.x_,r.rel="stylesheet",r.href=s.href,t.head.appendChild(r)},[w]),(0,l.useEffect)(()=>{var e;if(!w)return;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t)return;function s(e){!function(e,t){!t.defaultPrevented&&e&&(["ArrowDown","ArrowUp"].includes(t.key)?function(e,t){const s=e.querySelector("[role='menu']");s&&(s===t.target||s.contains(t.target))&&t.preventDefault()}(e,t):"Tab"===t.key&&function(e,t){const s=(e=>e.shiftKey?Nr.focus.tabbable.findPrevious:Nr.focus.tabbable.findNext)(t),r=s(t.target);r&&((e,t,s)=>e.contains(t)||e.contains(s))(e,t.target,r)&&(t.preventDefault(),r.focus())}(e,t))}(x.current,e)}const r=e=>{(function(e,t){const s=null==e?void 0:e.querySelector(".yst-dropdown-menu__icon-trigger[aria-expanded='true']"),r=s&&e.querySelector("[role='menu']");return Boolean(r)&&!s.contains(t.target)&&!r.contains(t.target)})(x.current,e)&&x.current.querySelector(".yst-dropdown-menu__icon-trigger").click()};return t.addEventListener("keydown",s,{capture:!0}),t.addEventListener("mousedown",r,{capture:!0}),()=>{t.removeEventListener("keydown",s,{capture:!0}),t.removeEventListener("mousedown",r,{capture:!0})}},[w]),(0,k.jsxs)(k.Fragment,{children:[w&&(0,k.jsx)("div",{ref:x,className:"wp-block","data-block":"yoast-content-planner-banner",children:(0,k.jsx)(Lr,{isPremium:d,onDismiss:b,onDismissPermanently:v,onClick:_,learnMoreLink:p})}),(0,k.jsx)(e,{...t})]})},Mr=(0,h.createHigherOrderComponent)(e=>function(t){const{isFirstBlock:s,isEditingTemplate:r}=(0,o.useSelect)(e=>{const s=e("core/editor"),r=s.getCurrentPostType();return{isFirstBlock:e("core/block-editor").getBlockOrder()[0]===t.clientId,isEditingTemplate:"wp_template"===r||"wp_template_part"===r||"template-locked"===s.getRenderingMode()}},[t.clientId]),n=(0,o.useSelect)(e=>(0,d.isObject)(e(C.XA)),[]),i=(0,o.useSelect)(e=>{var t,s;return null!==(t=null===(s=e(C.XA))||void 0===s?void 0:s.selectHasAiGeneratorConsent())&&void 0!==t&&t}),a=(0,l.useCallback)(()=>(0,k.jsx)(e,{...t}),[e,t]);return s&&n&&!r?(0,k.jsx)(u.ErrorBoundary,{FallbackComponent:a,children:(0,k.jsx)(Pr,{BlockListBlock:e,props:t,hasConsent:i})}):(0,k.jsx)(e,{...t})},"withYoastContentPlannerBanner"),Or=()=>{const e=(0,l.useRef)(!1),{isNewPost:t,postType:s,blocks:n,minPostsMet:i,isBannerRendered:a,hasBlockTemplate:c}=(0,o.useSelect)(e=>{const t=e("core/editor"),s=t.getCurrentPostType(),r=e("core").getPostType(s);return{isNewPost:t.isEditedPostNew(),postType:s,blocks:e("core/block-editor").getBlocks(),minPostsMet:e(S.bw).selectIsMinPostsMet(),isBannerRendered:e(S.bw).selectIsBannerRendered(),hasBlockTemplate:Array.isArray(null==r?void 0:r.template)&&r.template.length>0}},[]),p=(0,o.useSelect)(e=>(0,d.isObject)(e(C.XA)),[]),h=(0,o.useSelect)(e=>{var t,s;return null!==(t=null===(s=e(C.XA))||void 0===s?void 0:s.selectHasAiGeneratorConsent())&&void 0!==t&&t}),{insertBlock:m}=(0,o.useDispatch)("core/block-editor");return function(){const{yoastTitle:e,yoastMetaDesc:t,yoastFocusKw:s,isPost:r,titleTemplate:n,descTemplate:i}=(0,o.useSelect)(e=>{const t=e("core/editor"),s=t.getEditedPostAttribute("meta"),{title:r,description:o}=e("yoast-seo/editor").getSnippetEditorTemplates();return{yoastTitle:null==s?void 0:s._yoast_wpseo_title,yoastMetaDesc:null==s?void 0:s._yoast_wpseo_metadesc,yoastFocusKw:null==s?void 0:s._yoast_wpseo_focuskw,isPost:"post"===t.getCurrentPostType(),titleTemplate:r,descTemplate:o}},[]),{updateData:a,setFocusKeyword:c}=(0,o.useDispatch)("yoast-seo/editor");(0,l.useEffect)(()=>{if(!r)return;const o={title:n,description:i};e&&(o.title=e),t&&(o.description=t),a(o),c(s||"")},[r,e,t,s,n,i])}(),(0,l.useEffect)(()=>{!e.current&&t&&"post"===s&&i&&!c&&(e.current=function(e,t,s){return!!s||(0===e.length?(t((0,r.createBlock)("core/paragraph"),0,void 0,!1),!1):-1!==e.findIndex(e=>"core/paragraph"===e.name))}(n,m,a))},[n,t,s,m,i,c]),p?(0,k.jsx)(u.ErrorBoundary,{FallbackComponent:d.noop,children:(0,k.jsx)(Ns,{hasConsent:h})}):null};function Fr(){a()(()=>{((e={})=>{(0,o.register)((e=>(0,o.createReduxStore)(S.bw,{actions:{...Xs,...nr,...pr,...xr,...Cr},selectors:{...Gs,...or,...hr,...wr,...Tr},controls:{...Zs,...ir,...Sr},initialState:(0,d.merge)({},{[zs]:Vs(),[Qs]:rr(),[lr]:dr(),[mr]:yr(),[br]:kr()},e),reducer:(0,o.combineReducers)({[zs]:Js,[Qs]:ar,[lr]:ur,[mr]:fr,[br]:jr})}))(e))})({[zs]:{endpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.getSuggestions","")},[Qs]:{endpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.getOutline","")},[mr]:{minPostsMet:(0,d.get)(window,"wpseoContentPlanner.minPostsMet",!1)},[br]:{isBannerDismissed:(0,$s.qj)(),isBannerRendered:(0,$s.au)(),isBannerPermanentlyDismissed:(0,d.get)(window,"wpseoContentPlanner.isBannerPermanentlyDismissed",!1),bannerPermanentDismissalEndpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.bannerPermanentDismissal","")}}),(0,n.addFilter)("editor.BlockListBlock","yoast/content-planner-banner",Mr)}),(0,c.registerPlugin)("yoast-content-planner",{render:Or})}},5431(e,t,s){"use strict";s.d(t,{$H:()=>m,C$:()=>f,Gu:()=>h,M$:()=>l,Sf:()=>g,Ty:()=>c,W1:()=>y,XA:()=>o,Zc:()=>u,Zv:()=>p,gC:()=>a,i0:()=>i,sH:()=>n,uv:()=>d});var r=s(8468);const o="yoast-seo/ai-generator",n="yoast-seo/editor",i={google:"google",social:"social",twitter:"twitter"},a={title:"title",description:"description"},l={post:"post",product:"product",attachment:"attachment",productCategory:"product_cat",productTag:"product_tag"},c={post:"post",term:"term"},d={post:"title",term:"term_title"},u=(0,r.mapValues)(d,e=>`%%${e}%%`),p={mobile:"mobile",desktop:"desktop"},h=5,m={idle:"idle",loading:"loading",success:"success",error:"error"},g={success:"success",error:"error",abort:"abort"},y=300,f=150},5547(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))});e.exports=o},5588(e,t,s){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},r.apply(this,arguments)}var o,n;function i(e,t){if(!1===e||null==e)throw new Error(t)}function a(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function l(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function c(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&"/"!==r?null:e.slice(s)||"/"}function d(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+s+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function u(e,t){let s=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?s.map((e,t)=>t===s.length-1?e.pathname:e.pathnameBase):s.map(e=>e.pathnameBase)}function p(e,t,s,o){let n;void 0===o&&(o=!1),"string"==typeof e?n=l(e):(n=r({},e),i(!n.pathname||!n.pathname.includes("?"),d("?","pathname","search",n)),i(!n.pathname||!n.pathname.includes("#"),d("#","pathname","hash",n)),i(!n.search||!n.search.includes("#"),d("#","search","hash",n)));let a,c=""===e||""===n.pathname,u=c?"/":n.pathname;if(null==u)a=s;else{let e=t.length-1;if(!o&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}a=e>=0?t[e]:"/"}let p=function(e,t){void 0===t&&(t="/");let{pathname:s,search:r="",hash:o=""}="string"==typeof e?l(e):e,n=s?s.startsWith("/")?s:function(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?s.length>1&&s.pop():"."!==e&&s.push(e)}),s.length>1?s.join("/"):"/"}(s,t):t;return{pathname:n,search:m(r),hash:g(o)}}(n,a),h=u&&"/"!==u&&u.endsWith("/"),y=(c||"."===u)&&s.endsWith("/");return p.pathname.endsWith("/")||!h&&!y||(p.pathname+="/"),p}s.d(t,{AO:()=>a,Gh:()=>p,HS:()=>h,Oi:()=>i,pb:()=>c,tH:()=>y,yD:()=>u}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(n||(n={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const h=e=>e.join("/").replace(/\/\/+/g,"/"),m=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",g=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class y extends Error{}const f=["post","put","patch","delete"],x=(new Set(f),["get",...f]);new Set(x),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},5636(e,t,s){"use strict";s.d(t,{R:()=>i});var r=s(5831),o=s(3054),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},5674(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(7723),c=s(8468),d=s(2379),u=s(8495),p=s(7558),h=s(1969),m=s(790);const g=n().div`
111 +`,d=e=>{const{siteUrl:t}=e;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("span",{className:"screen-reader-text",children:t}),(0,l.jsx)(c,{"aria-hidden":"true",children:(0,l.jsx)("span",{children:t})})]})};d.propTypes={siteUrl:a().string.isRequired};const u=d},5169(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))});e.exports=o},5221(e,t,s){"use strict";s.d(t,{Z:()=>i});var r=s(5831),o=s(6405),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},5431(e,t,s){"use strict";s.d(t,{$H:()=>m,C$:()=>f,Gu:()=>h,M$:()=>l,Sf:()=>g,Ty:()=>c,W1:()=>y,XA:()=>o,Zc:()=>u,Zv:()=>p,gC:()=>a,i0:()=>i,sH:()=>n,uv:()=>d});var r=s(8468);const o="yoast-seo/ai-generator",n="yoast-seo/editor",i={google:"google",social:"social",twitter:"twitter"},a={title:"title",description:"description"},l={post:"post",product:"product",attachment:"attachment",productCategory:"product_cat",productTag:"product_tag"},c={post:"post",term:"term"},d={post:"title",term:"term_title"},u=(0,r.mapValues)(d,e=>`%%${e}%%`),p={mobile:"mobile",desktop:"desktop"},h=5,m={idle:"idle",loading:"loading",success:"success",error:"error"},g={success:"success",error:"error",abort:"abort"},y=300,f=150},5547(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))});e.exports=o},5588(e,t,s){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},r.apply(this,arguments)}var o,n;function i(e,t){if(!1===e||null==e)throw new Error(t)}function a(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function l(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function c(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&"/"!==r?null:e.slice(s)||"/"}function d(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+s+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function u(e,t){let s=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?s.map((e,t)=>t===s.length-1?e.pathname:e.pathnameBase):s.map(e=>e.pathnameBase)}function p(e,t,s,o){let n;void 0===o&&(o=!1),"string"==typeof e?n=l(e):(n=r({},e),i(!n.pathname||!n.pathname.includes("?"),d("?","pathname","search",n)),i(!n.pathname||!n.pathname.includes("#"),d("#","pathname","hash",n)),i(!n.search||!n.search.includes("#"),d("#","search","hash",n)));let a,c=""===e||""===n.pathname,u=c?"/":n.pathname;if(null==u)a=s;else{let e=t.length-1;if(!o&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}a=e>=0?t[e]:"/"}let p=function(e,t){void 0===t&&(t="/");let{pathname:s,search:r="",hash:o=""}="string"==typeof e?l(e):e,n=s?s.startsWith("/")?s:function(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?s.length>1&&s.pop():"."!==e&&s.push(e)}),s.length>1?s.join("/"):"/"}(s,t):t;return{pathname:n,search:m(r),hash:g(o)}}(n,a),h=u&&"/"!==u&&u.endsWith("/"),y=(c||"."===u)&&s.endsWith("/");return p.pathname.endsWith("/")||!h&&!y||(p.pathname+="/"),p}s.d(t,{AO:()=>a,Gh:()=>p,HS:()=>h,Oi:()=>i,pb:()=>c,tH:()=>y,yD:()=>u}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(n||(n={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const h=e=>e.join("/").replace(/\/\/+/g,"/"),m=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",g=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class y extends Error{}const f=["post","put","patch","delete"],x=(new Set(f),["get",...f]);new Set(x),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},5636(e,t,s){"use strict";s.d(t,{R:()=>i});var r=s(5831),o=s(3054),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},5674(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(7723),c=s(8468),d=s(2379),u=s(8495),p=s(7558),h=s(1969),m=s(790);const g=n().div`
140 112 position: relative;
141 113 ${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`};
142 114 overflow: hidden;
143 115 background-color: ${u.colors.$color_white};
@@ -157,9 +129,9 @@
157 129 align-items: center;
158 130 text-decoration: underline;
159 131 font-size: 14px;
160 132 cursor: pointer;
161 -`;class f extends r.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await(0,h.cP)(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:d.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:d.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:d.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,m.jsx)(y,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,l.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,m.jsx)(g,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,m.jsx)(p.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:d.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}f.propTypes={src:a().string,alt:a().string,onImageLoaded:a().func,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},f.defaultProps={src:"",alt:"",onImageLoaded:c.noop,onImageClick:c.noop,onMouseEnter:c.noop,onMouseLeave:c.noop};const x=f},5687(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},5704(e,t,s){"use strict";s.d(t,{A:()=>m});var r=s(1455),o=s.n(r),n=s(7143),i=s(6087),a=s(7723),l=s(5831),c=s(1802),d=s.n(c),u=s(5431),p=s(6240),h=s(790);const m=({invalidSubscriptions:e=[]})=>{const t=(0,n.useSelect)(e=>e(u.XA).selectBustSubscriptionCacheEndpoint(),[]),{onClose:s}=(0,l.useModalContext)(),r=(0,i.useCallback)(async()=>{try{await o()({path:t,method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()},[]);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsxs)(l.Alert,{variant:"error",children:[(0,h.jsx)("span",{className:"yst-block yst-font-medium",children:p.D}),(0,h.jsx)(p.n,{invalidSubscriptions:e})]}),(0,h.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,h.jsx)(l.Button,{variant:"secondary",onClick:s,children:(0,a.__)("Close","wordpress-seo")}),(0,h.jsx)(l.Button,{variant:"primary",onClick:r,children:(0,a.__)("Refresh page","wordpress-seo")})]})]})};m.propTypes={invalidSubscriptions:d().arrayOf(d().string)}},5768(e,t,s){"use strict";s.d(t,{e:()=>p});var r=s(6702),o=s.n(r),n=s(6087),i=s(2458),a=s(7723),l=s(5831),c=s(1802),d=s.n(c),u=s(790);const p=({link:e})=>{const t=(0,n.useMemo)(()=>(0,i.x)((0,a.sprintf)(/* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */ /* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */
133 +`;class f extends r.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await(0,h.cP)(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:d.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:d.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:d.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,m.jsx)(y,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,l.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,m.jsx)(g,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,m.jsx)(p.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:d.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}f.propTypes={src:a().string,alt:a().string,onImageLoaded:a().func,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},f.defaultProps={src:"",alt:"",onImageLoaded:c.noop,onImageClick:c.noop,onMouseEnter:c.noop,onMouseLeave:c.noop};const x=f},5687(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},5704(e,t,s){"use strict";s.d(t,{A:()=>m});var r=s(1455),o=s.n(r),n=s(7143),i=s(6087),a=s(7723),l=s(5831),c=s(1802),d=s.n(c),u=s(5431),p=s(6240),h=s(790);const m=({invalidSubscriptions:e=[]})=>{const t=(0,n.useSelect)(e=>e(u.XA).selectBustSubscriptionCacheEndpoint(),[]),{onClose:s}=(0,l.useModalContext)(),r=(0,i.useCallback)(async()=>{try{await o()({path:t,method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()},[]);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsxs)(l.Alert,{variant:"error",children:[(0,h.jsx)("span",{className:"yst-block yst-font-medium",children:p.D}),(0,h.jsx)(p.n,{invalidSubscriptions:e})]}),(0,h.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,h.jsx)(l.Button,{variant:"secondary",onClick:s,children:(0,a.__)("Close","wordpress-seo")}),(0,h.jsx)(l.Button,{variant:"primary",onClick:r,children:(0,a.__)("Refresh page","wordpress-seo")})]})]})};m.propTypes={invalidSubscriptions:d().arrayOf(d().string)}},5750(e,t,s){"use strict";s.d(t,{En:()=>d,Jn:()=>u,ZF:()=>p,mw:()=>c});var r=s(5074),o=s.n(r),n=s(7723),i=s(5831),a=s(8468),l=s(790);const c=({children:e})=>(0,l.jsx)(i.Modal.Description,{as:"div",className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:e}),d=({children:e})=>(0,l.jsx)("div",{className:"yst-mt-6 yst-flex yst-flex-row yst-justify-end yst-gap-3",children:e}),u=({onClose:e,...t})=>(0,l.jsx)(i.Button,{variant:"secondary",onClick:e,...t,children:(0,n.__)("Close","wordpress-seo")}),p=({isOpen:e,title:t,onClose:s=a.noop,children:r})=>{const c=(0,i.useSvgAria)();return(0,l.jsx)(i.Modal,{isOpen:e,onClose:s,children:(0,l.jsx)(i.Modal.Panel,{className:"yst-max-w-lg",closeButtonScreenReaderText:(0,n.__)("Dismiss","wordpress-seo"),children:(0,l.jsxs)("div",{className:"yst-flex yst-items-start yst-gap-4",children:[(0,l.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,l.jsx)(o(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...c})}),(0,l.jsxs)("div",{className:"yst-text-start yst-flex-1 yst-min-w-0",children:[(0,l.jsx)(i.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900",children:t}),r]})]})})})}},5768(e,t,s){"use strict";s.d(t,{e:()=>p});var r=s(6702),o=s.n(r),n=s(6087),i=s(2458),a=s(7723),l=s(5831),c=s(1802),d=s.n(c),u=s(790);const p=({link:e})=>{const t=(0,n.useMemo)(()=>(0,i.x)((0,a.sprintf)(/* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */ /* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */
162 134 (0,a.__)("Want to learn SEO from Team Yoast? Check out our %1$s!","wordpress-seo"),"<link/>"),{link:(0,u.jsx)("a",{href:e,target:"_blank",rel:"noopener",children:"Yoast SEO academy"})}),[]);return(0,u.jsxs)(l.Paper,{as:"div",className:"yst-p-6 yst-space-y-3",children:[(0,u.jsx)(l.Title,{as:"h2",size:"4",className:"yst-text-base yst-text-primary-500",children:(0,a.__)("Learn SEO","wordpress-seo")}),(0,u.jsxs)("p",{children:[t,(0,u.jsx)("br",{}),(0,a.__)("We have both free and premium online courses to learn everything you need to know about SEO.","wordpress-seo")]}),(0,u.jsxs)(l.Link,{href:e,className:"yst-block yst-font-medium",target:"_blank",rel:"noopener",children:[(0,a.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */ /* translators: %1$s expands to "Yoast SEO academy". */
163 135 (0,a.__)("Check out %1$s","wordpress-seo"),"Yoast SEO academy"),(0,u.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
164 136 (0,a.__)("(Opens in a new browser tab)","wordpress-seo")}),(0,u.jsx)(o(),{className:"yst-w-3 yst-h-3 yst-mb-[1px] yst-icon-rtl yst-inline-block"})]})]})};p.propTypes={link:d().string.isRequired}},5795(e){"use strict";e.exports=window.ReactDOM},5831(e){"use strict";e.exports=window.yoast.uiLibrary},5979(e,t,s){"use strict";s.d(t,{applyReplaceUsingPlugin:()=>g,excerptFromContent:()=>m,fillReplacementVariables:()=>d,mapCustomFields:()=>h,mapCustomTaxonomies:()=>p});var r=s(8468),o=s(2310),n=s(9183),i=s(6250),a=s(3335);const{stripHTMLTags:l}=a.strings,c=["slug","content","contentImage","snippetPreviewImageURL"];function d(e,t){(0,r.forEach)(e,(e,s)=>{c.includes(s)||t.dispatch((0,n.us)(s,e))})}function u(e,t="_"){return e.replace(/\s/g,t)}function p(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,r.forEach)(e.custom_taxonomies,(e,t)=>{const{name:r,label:o,descriptionName:n,descriptionLabel:l}=function(e){const t=u(e);return{name:"ct_"+t,label:(0,i.GG)(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:(0,i.GG)(e+" description (custom taxonomy)")}}(t),c="string"==typeof e.name?(0,a.decodeHTML)(e.name):e.name,d="string"==typeof e.description?(0,a.decodeHTML)(e.description):e.description;s[r]={value:c,label:o},s[n]={value:d,label:l}}),t.dispatch((0,n.t$)(s)),(0,r.omit)({...e},"custom_taxonomies")}function h(e,t){return e.custom_fields?((0,r.forEach)(e.custom_fields,(e,s)=>{const{name:r,label:o}=function(e){return{name:"cf_"+u(e),label:(0,i.GG)(e+" (custom field)")}}(s);t.dispatch((0,n.us)(r,e,o))}),(0,r.omit)({...e},"custom_fields")):e}function m(e,t=156){return(e=(e=(0,o.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const g=function(e){const t=(0,r.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,r.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,r.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],r.identity);return{url:e.url,title:l(t(e.title)),description:l(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?l(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:l(s("data_page_title",e.title)),description:l(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?l(s("data_page_title",e.filteredSEOTitle)):""}}},5986(e){"use strict";e.exports=window.yoast.externals.contexts},6087(e){"use strict";e.exports=window.wp.element},6093(e,t,s){"use strict";s.d(t,{A:()=>n,Y:()=>o});var r=s(1679);const o=20,n=s.n(r)().span`
165 137 line-height: ${o}px;
@@ -261,9 +233,37 @@
261 233 padding-bottom: ${e=>e.aspectRatio}%;
262 234 `,u=({imageProps:e,width:t,height:s,imageMode:r="landscape"})=>"landscape"===r?(0,a.jsx)(d,{aspectRatio:e.aspectRatio,children:(0,a.jsx)(c,{src:e.src,alt:e.alt})}):(0,a.jsx)(l,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});u.propTypes={imageProps:o().shape({src:o().string.isRequired,alt:o().string.isRequired,aspectRatio:o().number.isRequired}).isRequired,width:o().number.isRequired,height:o().number.isRequired,imageMode:o().string}},7651(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))});e.exports=o},7656(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))});e.exports=o},7715(e,t,s){"use strict";s.d(t,{V:()=>y});var r=s(1455),o=s.n(r),n=s(7143),i=s(6087),a=s(7723),l=s(5831),c=s(8468),d=s(1802),u=s.n(d),p=s(5431),h=s(6240),m=s(4658),g=s(790);const y=({invalidSubscriptions:e=[],isOpen:t=!0,onClose:s=c.noop})=>{const r=(0,n.useSelect)(e=>e(p.XA).selectBustSubscriptionCacheEndpoint(),[]),d=(0,i.useCallback)(async()=>{try{await o()({path:r,method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()},[r]);return(0,g.jsxs)(m.ZF,{isOpen:t,title:h.D,onClose:s,children:[(0,g.jsx)(m.mw,{children:(0,g.jsx)(h.n,{invalidSubscriptions:e})}),(0,g.jsxs)(m.En,{children:[(0,g.jsx)(m.Jn,{onClose:s}),(0,g.jsx)(l.Button,{variant:"primary",onClick:d,children:(0,a.__)("Refresh page","wordpress-seo")})]})]})};y.propTypes={invalidSubscriptions:u().arrayOf(u().string),isOpen:u().bool,onClose:u().func}},7723(e){"use strict";e.exports=window.wp.i18n},7753(e,t,s){"use strict";s.d(t,{D:()=>l,n:()=>c});var r=s(7723),o=s(2458),n=s(3657),i=s(2027),a=s(790);const l=(0,r.__)("Yoast AI cannot reach your site","wordpress-seo"),c=()=>{const{commonErrorsLink:e,supportLink:t}=(0,i.g)();return(0,a.jsx)(i.f,{children:(0,o.x)((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
263 235 (0,r.__)("To use this feature, your site must be publicly accessible. This applies to both test sites and instances where your REST API is password-protected. Please ensure your site is accessible to the public and try again. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,a.jsx)(n.rd,{variant:"error",href:e}),a2:(0,a.jsx)(n.rd,{variant:"error",href:t})})})}},7767(e,t,s){"use strict";s.d(t,{$P:()=>d,Zp:()=>m,jb:()=>a,x$:()=>g,zy:()=>p});var r=s(1609),o=s(5588);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(this,arguments)}const i=r.createContext(null),a=r.createContext(null),l=r.createContext(null),c=r.createContext({outlet:null,matches:[],isDataRoute:!1});function d(e,t){let{relative:s}=void 0===t?{}:t;u()||(0,o.Oi)(!1);let{basename:n,navigator:i}=r.useContext(a),{hash:l,pathname:c,search:d}=g(e,{relative:s}),p=c;return"/"!==n&&(p="/"===c?n:(0,o.HS)([n,c])),i.createHref({pathname:p,search:d,hash:l})}function u(){return null!=r.useContext(l)}function p(){return u()||(0,o.Oi)(!1),r.useContext(l).location}function h(e){r.useContext(a).static||r.useLayoutEffect(e)}function m(){let{isDataRoute:e}=r.useContext(c);return e?function(){let{router:e}=function(){let e=r.useContext(i);return e||(0,o.Oi)(!1),e}(y.UseNavigateStable),t=function(){let e=function(){let e=r.useContext(c);return e||(0,o.Oi)(!1),e}(),t=e.matches[e.matches.length-1];return t.route.id||(0,o.Oi)(!1),t.route.id}(f.UseNavigateStable),s=r.useRef(!1);return h(()=>{s.current=!0}),r.useCallback(function(r,o){void 0===o&&(o={}),s.current&&("number"==typeof r?e.navigate(r):e.navigate(r,n({fromRouteId:t},o)))},[e,t])}():function(){u()||(0,o.Oi)(!1);let e=r.useContext(i),{basename:t,future:s,navigator:n}=r.useContext(a),{matches:l}=r.useContext(c),{pathname:d}=p(),m=JSON.stringify((0,o.yD)(l,s.v7_relativeSplatPath)),g=r.useRef(!1);return h(()=>{g.current=!0}),r.useCallback(function(s,r){if(void 0===r&&(r={}),!g.current)return;if("number"==typeof s)return void n.go(s);let i=(0,o.Gh)(s,JSON.parse(m),d,"path"===r.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,o.HS)([t,i.pathname])),(r.replace?n.replace:n.push)(i,r.state,r)},[t,n,m,d,e])}()}function g(e,t){let{relative:s}=void 0===t?{}:t,{future:n}=r.useContext(a),{matches:i}=r.useContext(c),{pathname:l}=p(),d=JSON.stringify((0,o.yD)(i,n.v7_relativeSplatPath));return r.useMemo(()=>(0,o.Gh)(e,JSON.parse(d),l,"path"===s),[e,d,l,s])}r.Component;var y=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(y||{}),f=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(f||{});r.startTransition,new Promise(()=>{}),r.Component},7948(e,t,s){"use strict";s.d(t,{r:()=>i,u:()=>n});var r=s(8468);const o={},n=(e,t,{log:s=console.warn}={})=>{o[e]||(o[e]=!0,s(t))},i=(e,t=r.noop)=>{const s={};for(const r in e)Object.hasOwn(e,r)&&Object.defineProperty(s,r,{set:s=>{e[r]=s,t("set",r,s)},get:()=>(t("get",r),e[r])});return s}},8210(e,t,s){"use strict";s.d(t,{D:()=>l,n:()=>c});var r=s(7723),o=s(2458),n=s(3657),i=s(2027),a=s(790);const l=(0,r.__)("Connection timeout","wordpress-seo"),c=()=>{const{commonErrorsLink:e,supportLink:t}=(0,i.g)();return(0,a.jsx)(i.f,{children:(0,o.x)((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
264 236 (0,r.__)("It seems that a connection timeout has occurred. Please check your internet connection and try again later. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,a.jsx)(n.rd,{variant:"error",href:e}),a2:(0,a.jsx)(n.rd,{variant:"error",href:t})})})}},8213(e){"use strict";e.exports=window.yoast.reduxJsToolkit},8290(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))});e.exports=o},8334(e,t,s){"use strict";s.d(t,{$H:()=>o,BG:()=>n,fJ:()=>r});const r={request:"request",success:"success",error:"error"},o={idle:"idle",loading:"loading",success:"success",error:"error"},n={showPlay:"showPlay",askPermission:"askPermission",isPlaying:"isPlaying"}},8393(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.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),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"}))});e.exports=o},8468(e){"use strict";e.exports=window.lodash},8495(e){"use strict";e.exports=window.yoast.styleGuide},8519(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none","aria-hidden":"true"},e),r||(r=o.createElement("path",{fill:"#0075B3",d:"M12.613.445a1.26 1.26 0 0 0-1.22.937l-.156.583A40.97 40.97 0 0 0 .379 3.225c-.013 0-.022.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.861c.084.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.01h10.592a.507.507 0 0 0 .506-.505c0-1.149-.774-2.15-1.888-2.441l1.722-6.452a.25.25 0 0 1 .243-.185h.931a.507.507 0 0 0 0-1.011h-.931l-.003.003zm-1.085 13.114a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016z"})))},8572(e,t,s){"use strict";s.d(t,{D:()=>p,n:()=>h});var r=s(7143),o=s(7723),n=s(1802),i=s.n(n),a=s(2458),l=s(3657),c=s(5431),d=s(2027),u=s(790);const p=(0,o.__)("Something went wrong","wordpress-seo"),h=({linkStoreName:e=c.sH})=>{const t=(0,r.useSelect)(t=>t(e).selectLink("https://yoa.st/ai-common-errors"),[e]),s=(0,r.useSelect)(t=>t(e).selectAdminLink("?page=wpseo_page_support"),[e]);return(0,u.jsx)(d.f,{children:(0,a.x)((0,o.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
265 -(0,o.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,u.jsx)(l.rd,{variant:"error",href:t}),a2:(0,u.jsx)(l.rd,{variant:"error",href:s})})})};h.propTypes={linkStoreName:i().string}},8629(e,t,s){"use strict";s.d(t,{g:()=>a,l:()=>l});var r=s(7723);const o=[(0,r.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,r.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,r.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,r.__)("Optimize pages for multiple keywords with guidance","wordpress-seo")],n=[(0,r.__)("Add product details to help your listings stand out","wordpress-seo"),(0,r.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,r.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,r.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo")],i=[(0,r.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,r.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,r.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,r.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,r.__)("Internal links and redirect management, easy","wordpress-seo"),(0,r.__)("Access to friendly help when you need it, day or night","wordpress-seo")],a=(e=!1)=>e?o:i,l=(e=!1)=>{if(e)return n;const t=[...i];return t[1]=(0,r.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t}},8738(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},9e3(e,t,s){"use strict";s.d(t,{A:()=>w});var r=s(7723),o=s(2379),n=s(8468),i=s(1802),a=s.n(i),l=s(1609),c=s.n(l),d=s(1679),u=s.n(d),p=s(1969),h=s(7558),m=s(790);const g=(e,t=!0)=>e?`\n\t\t\tmax-width: ${o.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${t?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${o.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,y=u().div`
237 +(0,o.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,u.jsx)(l.rd,{variant:"error",href:t}),a2:(0,u.jsx)(l.rd,{variant:"error",href:s})})})};h.propTypes={linkStoreName:i().string}},8629(e,t,s){"use strict";s.d(t,{g:()=>a,l:()=>l});var r=s(7723);const o=[(0,r.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,r.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,r.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,r.__)("Optimize pages for multiple keywords with guidance","wordpress-seo")],n=[(0,r.__)("Add product details to help your listings stand out","wordpress-seo"),(0,r.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,r.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,r.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo")],i=[(0,r.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,r.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,r.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,r.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,r.__)("Internal links and redirect management, easy","wordpress-seo"),(0,r.__)("Access to friendly help when you need it, day or night","wordpress-seo")],a=(e=!1)=>e?o:i,l=(e=!1)=>{if(e)return n;const t=[...i];return t[1]=(0,r.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t}},8738(e,t,s){const r=s(1609),o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))});e.exports=o},8993(e,t,s){"use strict";s.d(t,{Ay:()=>Fr});var r=s(4997),o=s(7143),n=s(2619);const i=window.wp.domReady;var a=s.n(i),l=s(6087),c=s(2279),d=s(8468),u=s(5831),p=s(7723),h=s(9491);const m=window.wp.wordcount;var g=s(818),y=s.n(g),f=s(2514),x=s.n(f),w=s(2458),b=s(3657),v=s(2485),k=s.n(v),_=s(790);const j=({className:e})=>{const t=(0,u.useSvgAria)();return(0,_.jsxs)("span",{className:k()("yst-text-sm yst-flex yst-items-center yst-gap-1 yst-justify-center yst-text-slate-500 yst-italic",e),children:[(0,_.jsx)(u.GradientSparklesIcon,{className:"yst-h-3 yst-w-3",...t}),(0,p.__)("Using 1 spark","wordpress-seo")]})};var S=s(3301),C=s(5431);const T=(0,h.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t}=e(S.bw),s=e("core/editor").getEditedPostContent(),{getIsPremium:r,selectLink:o}=e("yoast-seo/editor"),{isUsageCountLimitReached:n,selectPremiumSubscription:i}=e(C.XA),a=i(),l=r();return{isEmptyPost:0===(0,m.count)(s,"words",{}),isOpen:t()===S.Qo.idle,isPremium:l,upsellLink:o("https://yoa.st/content-planner-approve-modal"),learnMoreLink:o("https://yoa.st/content-planner-learn-more"),isUpsell:n()&&!a&&!l}}),(0,o.withDispatch)(e=>{const{closeModal:t,setFeatureModalStatus:s}=e(S.bw);return{onClose:t,setStatus:s}})])(({isEmptyPost:e,isPremium:t,isUpsell:s,onClick:r,upsellLink:o,learnMoreLink:n,isOpen:i,onClose:a})=>{const{title:l,description:c}=((e,t)=>t?{title:(0,p.__)("You're out of free sparks","wordpress-seo"),description:(0,p.__)("Upgrade to keep finding content gaps, generating AI-powered titles and meta descriptions, and giving your content the best chance of being found.","wordpress-seo")}:e?{title:(0,p.__)("Looking for inspiration?","wordpress-seo"),description:(0,p.__)("The Yoast AI Content Planner identifies content gaps in your site structure and recommends topics that strengthen your topical authority.","wordpress-seo")}:{title:(0,p.__)("Get content suggestions","wordpress-seo"),description:(0,w.x)((0,p.sprintf)(
238 +/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
239 + %2$s and %3$s are opening and closing italic HTML tags respectively. */
240 +/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
241 + %2$s and %3$s are opening and closing italic HTML tags respectively. */
242 +(0,p.__)("The Yoast AI Content Planner will analyze your site and recommend topics.%1$s%2$sNote: Applying a content suggestion will replace your current blogpost content & metadata.%3$s%4$s","wordpress-seo"),"<p>","<i>","</i>","</p>"),{i:(0,_.jsx)("i",{}),p:(0,_.jsx)("p",{className:"yst-mt-4"})})})(e,s),d=(0,u.useSvgAria)();return(0,_.jsx)(u.Modal,{isOpen:i,onClose:a,children:(0,_.jsxs)(u.Modal.Panel,{className:"yst-text-center yst-w-96",closeButtonScreenReaderText:(0,p.__)("Close modal","wordpress-seo"),children:[(0,_.jsx)("div",{className:"yst-w-12 yst-h-12 yst-rounded-full yst-bg-ai-100 yst-flex yst-items-center yst-justify-center yst-mx-auto yst-mb-4",children:(0,_.jsx)(u.GradientSparklesIcon,{className:"yst-h-6 yst-w-6",...d})}),(0,_.jsx)(u.Modal.Title,{className:"yst-text-slate-900 yst-font-medium yst-text-lg yst-mb-2",children:l}),(0,_.jsx)(u.Modal.Description,{as:"div",className:"yst-text-slate-600 yst-text-sm yst-mb-6 yst-mx-10",children:c}),!t&&!s&&(0,_.jsx)(j,{className:"yst-mb-2"}),s?(0,_.jsxs)(u.Button,{variant:"upsell",as:"a",href:o,target:"_blank",className:"yst-w-full",rel:"noopener noreferrer",children:[(0,_.jsx)(x(),{className:"yst-w-4 yst-h-4 yst-me-2 yst-shrink-0",...d}),(0,p.sprintf)(/* translators: %s is the name of the premium product, Yoast SEO Premium. */ /* translators: %s is the name of the premium product, Yoast SEO Premium. */
243 +(0,p.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),(0,_.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
244 +(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]}):(0,_.jsxs)(u.Button,{onClick:r,variant:"ai-primary",className:"yst-w-full",children:[" ",(0,p.__)("Get content suggestions","wordpress-seo")," "]}),(0,_.jsx)("div",{className:"yst-mt-2 yst-text-sm",children:(0,_.jsxs)(u.Link,{as:b.rd,href:n,variant:"primary",className:"yst-inline yst-no-underline yst-font-medium",children:[(0,p.__)("Learn more","wordpress-seo"),(0,_.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]})})]})})}),E=e=>{const t=[];return e.forEach(({heading:e,contentNotes:s})=>{t.push((0,r.createBlock)("core/heading",{content:e,level:2})),t.push((0,r.createBlock)("yoast-seo/content-suggestion",{suggestions:s})),t.push((0,r.createBlock)("core/paragraph"))}),t},R=["_formal","_informal","_ao90"],A=e=>{for(const t of R)if(e.endsWith(t))return e.slice(0,-t.length);return e},I=e=>({bottom:`calc( (${e+"px"} - 100vh) / 2 + 32px )`}),L=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,recentContent:n,selectContentOutlineCache:i}=(0,o.useSelect)(e=>({endpoint:e(S.bw).selectContentOutlineEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),recentContent:e(S.bw).selectRecentContent(),selectContentOutlineCache:e(S.bw).selectContentOutlineCache}),[]),{fetchContentOutline:a,restoreContentOutlineFromCache:c,setFeatureModalStatus:d}=(0,o.useDispatch)(S.bw);return(0,l.useCallback)(o=>{const l=i(o.id);if(l)return c({suggestion:o,outline:l}),void d(S.Qo.contentOutline);const u=A(s).replace("_","-");a({endpoint:e,postType:t,language:u,editor:r,recentContent:n,suggestion:{...o}})},[e,t,s,r,n,a,c,i,d])};var P=s(8334);const N=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,isUsageCountLimitReached:n,usageCountEndpoint:i,hasValidPremiumSubscription:a,isPremium:c}=(0,o.useSelect)(e=>({endpoint:e(S.bw).selectContentSuggestionsEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),usageCountEndpoint:e(C.XA).selectUsageCountEndpoint(),isUsageCountLimitReached:e(C.XA).isUsageCountLimitReached(),hasValidPremiumSubscription:e(C.XA).selectPremiumSubscription(),isPremium:e("yoast-seo/editor").getIsPremium()}),[]),{fetchContentPlannerSuggestions:d,setFeatureModalStatus:u,setContentSuggestionsStatus:p,setSuggestionsError:h}=(0,o.useDispatch)(S.bw),{fetchUsageCount:m,addUsageCount:g}=(0,o.useDispatch)(C.XA);return(0,l.useCallback)(async()=>{if(c&&!a)return u(S.Qo.contentSuggestions),void h({errorCode:402,errorIdentifier:"PAYMENT_REQUIRED",missingLicenses:["Yoast SEO Premium"]});if(n&&!a)return void u(S.Qo.idle);u(S.Qo.contentSuggestions),p(P.$H.loading);const{payload:o}=await m({endpoint:i,isWooProductEntity:!1});if((429===(null==o?void 0:o.errorCode)&&"USAGE_LIMIT_REACHED"===(null==o?void 0:o.errorIdentifier)||o.count>=o.limit)&&!a)return u(S.Qo.idle),void p(P.$H.idle);const l=A(s).replace("_","-");d({endpoint:e,postType:t,language:l,editor:r}),g()},[e,t,s,r,n,a,c,i,d,g,m,u,p,h])};var M=s(6692),O=s(1609);function F(...e){return e.filter(Boolean).join(" ")}function D(e,t,...s){if(e in t){let r=t[e];return"function"==typeof r?r(...s):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,D),r}var q,$,B=(($=B||{})[$.None=0]="None",$[$.RenderStrategy=1]="RenderStrategy",$[$.Static=2]="Static",$),U=((q=U||{})[q.Unmount=0]="Unmount",q[q.Hidden=1]="Hidden",q);function H({ourProps:e,theirProps:t,slot:s,defaultTag:r,features:o,visible:n=!0,name:i}){let a=z(t,e);if(n)return W(a,s,r,i);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=a;if(e)return W(t,s,r,i)}if(1&l){let{unmount:e=!0,...t}=a;return D(e?0:1,{0:()=>null,1:()=>W({...t,hidden:!0,style:{display:"none"}},s,r,i)})}return W(a,s,r,i)}function W(e,t={},s,r){var o;let{as:n=s,children:i,refName:a="ref",...l}=V(e,["unmount","static"]),c=void 0!==e.ref?{[a]:e.ref}:{},d="function"==typeof i?i(t):i;l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,s=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&s.push(r);e&&(u["data-headlessui-state"]=s.join(" "))}if(n===O.Fragment&&Object.keys(Y(l)).length>0){if(!(0,O.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"));let e=F(null==(o=d.props)?void 0:o.className,l.className),t=e?{className:e}:{};return(0,O.cloneElement)(d,Object.assign({},z(d.props,Y(V(l,["ref"]))),u,c,function(...e){return{ref:e.every(e=>null==e)?void 0:t=>{for(let s of e)null!=s&&("function"==typeof s?s(t):s.current=t)}}}(d.ref,c.ref),t))}return(0,O.createElement)(n,Object.assign({},V(l,["ref"]),n!==O.Fragment&&c,n!==O.Fragment&&u),d)}function z(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},s={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=s[e]||(s[e]=[]),s[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(s).map(e=>[e,void 0])));for(let e in s)Object.assign(t,{[e](t,...r){let o=s[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function K(e){var t;return Object.assign((0,O.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Y(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function V(e,t=[]){let s=Object.assign({},e);for(let e of t)e in s&&delete s[e];return s}let G=(0,O.createContext)(null);G.displayName="OpenClosedContext";var X=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(X||{});function Z(){return(0,O.useContext)(G)}function J({value:e,children:t}){return O.createElement(G.Provider,{value:e},t)}var Q=Object.defineProperty,ee=(e,t,s)=>(((e,t,s)=>{t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s);let te=new class{constructor(){ee(this,"current",this.detect()),ee(this,"handoffState","pending"),ee(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},se=(e,t)=>{te.isServer?(0,O.useEffect)(e,t):(0,O.useLayoutEffect)(e,t)};function re(){let e=(0,O.useRef)(!1);return se(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function oe(e){let t=(0,O.useRef)(e);return se(()=>{t.current=e},[e]),t}function ne(){let[e,t]=(0,O.useState)(te.isHandoffComplete);return e&&!1===te.isHandoffComplete&&t(!1),(0,O.useEffect)(()=>{!0!==e&&t(!0)},[e]),(0,O.useEffect)(()=>te.handoff(),[]),e}let ie=function(e){let t=oe(e);return O.useCallback((...e)=>t.current(...e),[t])},ae=Symbol();function le(...e){let t=(0,O.useRef)(e);(0,O.useEffect)(()=>{t.current=e},[e]);let s=ie(e=>{for(let s of t.current)null!=s&&("function"==typeof s?s(e):s.current=e)});return e.every(e=>null==e||(null==e?void 0:e[ae]))?void 0:s}function ce(){let e=[],t=[],s={enqueue(e){t.push(e)},addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),s.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return s.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>s.requestAnimationFrame(()=>s.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return s.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}(()=>{t.current&&e[0]()}),s.add(()=>{t.current=!1})},add:t=>(e.push(t),()=>{let s=e.indexOf(t);if(s>=0){let[t]=e.splice(s,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return s}function de(e,...t){e&&t.length>0&&e.classList.add(...t)}function ue(e,...t){e&&t.length>0&&e.classList.remove(...t)}function pe(){let[e]=(0,O.useState)(ce);return(0,O.useEffect)(()=>()=>e.dispose(),[e]),e}function he({container:e,direction:t,classes:s,onStart:r,onStop:o}){let n=re(),i=pe(),a=oe(t);se(()=>{let t=ce();i.add(t.dispose);let l=e.current;if(l&&"idle"!==a.current&&n.current)return t.dispose(),r.current(a.current),t.add(function(e,t,s,r){let o=s?"enter":"leave",n=ce(),i=void 0!==r?function(e){let t={called:!1};return(...s)=>{if(!t.called)return t.called=!0,e(...s)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let a=D(o,{enter:()=>t.enter,leave:()=>t.leave}),l=D(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=D(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ue(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),de(e,...a,...c),n.nextFrame(()=>{ue(e,...c),de(e,...l),function(e,t){let s=ce();if(!e)return s.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[n,i]=[r,o].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t});if(n+i!==0){let r=s.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();s.add(()=>t()),s.dispose}(e,()=>(ue(e,...a),de(e,...t.entered),i()))}),n.dispose}(l,s.current,"enter"===a.current,()=>{t.dispose(),o.current(a.current)})),t.dispose},[t])}function me(e=""){return e.split(" ").filter(e=>e.trim().length>1)}let ge=(0,O.createContext)(null);ge.displayName="TransitionContext";var ye,fe=((ye=fe||{}).Visible="visible",ye.Hidden="hidden",ye);let xe=(0,O.createContext)(null);function we(e){return"children"in e?we(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function be(e,t){let s=oe(e),r=(0,O.useRef)([]),o=re(),n=pe(),i=ie((e,t=U.Hidden)=>{let i=r.current.findIndex(({el:t})=>t===e);-1!==i&&(D(t,{[U.Unmount](){r.current.splice(i,1)},[U.Hidden](){r.current[i].state="hidden"}}),n.microTask(()=>{var e;!we(r)&&o.current&&(null==(e=s.current)||e.call(s))}))}),a=ie(e=>{let t=r.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>i(e,U.Unmount)}),l=(0,O.useRef)([]),c=(0,O.useRef)(Promise.resolve()),d=(0,O.useRef)({enter:[],leave:[],idle:[]}),u=ie((e,s,r)=>{l.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(d.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?c.current=c.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(s)):r(s)}),p=ie((e,t,s)=>{Promise.all(d.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>s(t))});return(0,O.useMemo)(()=>({children:r,register:a,unregister:i,onStart:u,onStop:p,wait:c,chains:d}),[a,i,r,u,p,d,c])}function ve(){}xe.displayName="NestingContext";let ke=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function _e(e){var t;let s={};for(let r of ke)s[r]=null!=(t=e[r])?t:ve;return s}let je=B.RenderStrategy,Se=K(function(e,t){let{beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n,enter:i,enterFrom:a,enterTo:l,entered:c,leave:d,leaveFrom:u,leaveTo:p,...h}=e,m=(0,O.useRef)(null),g=le(m,t),y=h.unmount?U.Unmount:U.Hidden,{show:f,appear:x,initial:w}=function(){let e=(0,O.useContext)(ge);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[b,v]=(0,O.useState)(f?"visible":"hidden"),k=function(){let e=(0,O.useContext)(xe);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:_,unregister:j}=k,S=(0,O.useRef)(null);(0,O.useEffect)(()=>_(m),[_,m]),(0,O.useEffect)(()=>{if(y===U.Hidden&&m.current)return f&&"visible"!==b?void v("visible"):D(b,{hidden:()=>j(m),visible:()=>_(m)})},[b,m,_,j,f,y]);let C=oe({enter:me(i),enterFrom:me(a),enterTo:me(l),entered:me(c),leave:me(d),leaveFrom:me(u),leaveTo:me(p)}),T=function(e){let t=(0,O.useRef)(_e(e));return(0,O.useEffect)(()=>{t.current=_e(e)},[e]),t}({beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n}),E=ne();(0,O.useEffect)(()=>{if(E&&"visible"===b&&null===m.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,b,E]);let R=w&&!x,A=!E||R||S.current===f?"idle":f?"enter":"leave",I=ie(e=>D(e,{enter:()=>T.current.beforeEnter(),leave:()=>T.current.beforeLeave(),idle:()=>{}})),L=ie(e=>D(e,{enter:()=>T.current.afterEnter(),leave:()=>T.current.afterLeave(),idle:()=>{}})),P=be(()=>{v("hidden"),j(m)},k);he({container:m,classes:C,direction:A,onStart:oe(e=>{P.onStart(m,e,I)}),onStop:oe(e=>{P.onStop(m,e,L),"leave"===e&&!we(P)&&(v("hidden"),j(m))})}),(0,O.useEffect)(()=>{!R||(y===U.Hidden?S.current=null:S.current=f)},[f,R,b]);let N=h,M={ref:g};return x&&f&&te.isServer&&(N={...N,className:F(h.className,...C.current.enter,...C.current.enterFrom)}),O.createElement(xe.Provider,{value:P},O.createElement(J,{value:D(b,{visible:X.Open,hidden:X.Closed})},H({ourProps:M,theirProps:N,defaultTag:"div",features:je,visible:"visible"===b,name:"Transition.Child"})))}),Ce=K(function(e,t){let{show:s,appear:r=!1,unmount:o,...n}=e,i=(0,O.useRef)(null),a=le(i,t);ne();let l=Z();if(void 0===s&&null!==l&&(s=D(l,{[X.Open]:!0,[X.Closed]:!1})),![!0,!1].includes(s))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=(0,O.useState)(s?"visible":"hidden"),u=be(()=>{d("hidden")}),[p,h]=(0,O.useState)(!0),m=(0,O.useRef)([s]);se(()=>{!1!==p&&m.current[m.current.length-1]!==s&&(m.current.push(s),h(!1))},[m,s]);let g=(0,O.useMemo)(()=>({show:s,appear:r,initial:p}),[s,r,p]);(0,O.useEffect)(()=>{if(s)d("visible");else if(we(u)){let e=i.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")},[s,u]);let y={unmount:o};return O.createElement(xe.Provider,{value:u},O.createElement(ge.Provider,{value:g},H({ourProps:{...y,as:O.Fragment,children:O.createElement(Se,{ref:a,...y,...n})},theirProps:{},defaultTag:O.Fragment,features:je,visible:"visible"===c,name:"Transition"})))}),Te=K(function(e,t){let s=null!==(0,O.useContext)(ge),r=null!==Z();return O.createElement(O.Fragment,null,!s&&r?O.createElement(Ce,{ref:t,...e}):O.createElement(Se,{ref:t,...e}))}),Ee=Object.assign(Ce,{Child:Te,Root:Ce});var Re=s(1802),Ae=s.n(Re),Ie=s(9672),Le=s(7753);const Pe=()=>(0,_.jsxs)(u.Alert,{variant:"error",children:[(0,_.jsx)("span",{className:"yst-block yst-font-medium",children:Le.D}),(0,_.jsx)(Le.n,{})]}),Ne=({errorCode:e,errorIdentifier:t="",errorMessage:s="",missingLicenses:r=[],onRetry:n=d.noop})=>{const{onClose:i}=(0,u.useModalContext)();if((0,o.useSelect)(e=>e("yoast-seo/editor").getIsPremium(),[])&&(402===e||429===e&&"USAGE_LIMIT_REACHED"===t)){const e=r.length>0?r:["Yoast SEO Premium"];return(0,_.jsx)(Ie.AA,{invalidSubscriptions:e})}let a;switch(e){case 400:switch(t){case"SITE_UNREACHABLE":a=(0,_.jsx)(Pe,{});break;case"WP_HTTP_REQUEST_ERROR":a=(0,_.jsx)(Ie.W7,{errorMessage:s});break;default:a=(0,_.jsx)(Ie.K2,{})}break;case 408:a=(0,_.jsx)(Ie.Am,{});break;case 429:a=(0,_.jsx)(Ie.IT,{});break;default:a=(0,_.jsx)(Ie.K2,{})}return(0,_.jsxs)(_.Fragment,{children:[a,(0,_.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,_.jsx)(u.Button,{variant:"secondary",onClick:i,children:(0,p.__)("Close","wordpress-seo")}),(0,_.jsx)(u.Button,{variant:"primary",onClick:n,children:(0,p.__)("Try again","wordpress-seo")})]})]})};Ne.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string,errorMessage:Ae().string,missingLicenses:Ae().arrayOf(Ae().string),onRetry:Ae().func};var Me=s(2580),Oe=s.n(Me),Fe=s(2509),De=s.n(Fe),qe=s(8393),$e=s.n(qe),Be=s(5011),Ue=s.n(Be);const He={informational:{classes:"yst-bg-blue-200 yst-text-blue-900",calloutClasses:"yst-bg-blue-50 yst-border-blue-200",calloutTextClasses:"yst-text-blue-900",Icon:Oe(),label:(0,p.__)("Informational","wordpress-seo"),tooltip:(0,p.__)("The user wants to find an answer to a specific question.","wordpress-seo")},navigational:{classes:"yst-bg-violet-200 yst-text-violet-900",calloutClasses:"yst-bg-violet-50 yst-border-violet-200",calloutTextClasses:"yst-text-violet-900",Icon:$e(),label:(0,p.__)("Navigational","wordpress-seo"),tooltip:(0,p.__)("The user wants to find a specific page or site.","wordpress-seo")},commercial:{classes:"yst-bg-amber-200 yst-text-amber-900",calloutClasses:"yst-bg-amber-50 yst-border-amber-200",calloutTextClasses:"yst-text-amber-900",Icon:De(),label:(0,p.__)("Commercial","wordpress-seo"),tooltip:(0,p.__)("The user wants to investigate brands or services.","wordpress-seo")},transactional:{classes:"yst-bg-green-200 yst-text-green-900",calloutClasses:"yst-bg-green-50 yst-border-green-200",calloutTextClasses:"yst-text-green-900",Icon:Ue(),label:(0,p.__)("Transactional","wordpress-seo"),tooltip:(0,p.__)("The user wants to complete an action (conversion).","wordpress-seo")}},We=({intent:e,className:t,tooltipPosition:s="top-right",cursor:r="default"})=>{const o=He[e],n=(0,u.useSvgAria)(),i=`intent-tooltip-${e}-${(0,l.useId)()}`;if(!o)return(0,_.jsx)(u.Badge,{children:e});const{Icon:a}=o,c="pointer"===r?"yst-cursor-pointer":"yst-cursor-default";return(0,_.jsxs)(u.TooltipContainer,{children:[(0,_.jsx)(u.TooltipTrigger,{as:"span",ariaDescribedby:i,className:"yst-inline-flex yst-w-fit",children:(0,_.jsxs)(u.Badge,{className:k()("yst-relative yst-flex yst-items-center yst-gap-1 yst-w-fit",c,o.classes,t),children:[(0,_.jsx)(a,{className:k()("yst-w-3",o.classes),...n})," ",o.label]})}),(0,_.jsx)(u.TooltipWithContext,{id:i,className:"yst-max-w-48 yst-z-50 yst-text-center",position:s,children:o.tooltip})]})},ze=({suggestion:e,onClick:t})=>{const{intent:s,title:r,explanation:o}=e,n=(0,l.useCallback)(()=>t(e),[t,e]);return(0,_.jsxs)("button",{type:"button",onClick:n,className:"hover:yst-bg-slate-50 yst-group yst-text-start yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",children:[(0,_.jsx)(We,{intent:s,className:"yst-mb-2",cursor:"pointer"}),(0,_.jsx)("div",{className:"yst-font-medium yst-text-sm yst-mb-2 yst-text-slate-800 group-hover:yst-text-slate-900",children:(0,_.jsx)("span",{className:"group-hover:yst-border-b group-hover:yst-border-slate-900",children:r})}),(0,_.jsx)("p",{className:"yst-text-slate-600",children:o})]})},Ke=()=>(0,_.jsxs)("div",{className:"yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm",children:[(0,_.jsxs)("div",{className:"yst-px-2 yst-py-1 yst-bg-white yst-inline-flex yst-gap-1 yst-items-center yst-justify-start yst-mb-2 yst-rounded-3xl yst-border yst-border-slate-300",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-2 yst-h-2 yst-rounded-full"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-20 yst-h-3 yst-rounded"})]}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-64 yst-h-[18px] yst-rounded yst-mb-3"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-[13px] yst-rounded yst-mb-2"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-2/3 yst-h-[13px] yst-rounded"})]}),Ye=({suggestions:e,onSuggestionClick:t})=>(0,_.jsxs)("div",{children:[(0,_.jsx)(u.Modal.Description,{className:"yst-mb-4",children:(0,p.__)("Select a suggestion to generate a structured outline for your post.","wordpress-seo")}),e.map((e,s)=>(0,_.jsx)(ze,{suggestion:e,onClick:t},`suggestion-${s}`))]}),Ve=()=>{const e=(0,u.useSvgAria)(),[t,s]=(0,l.useState)(0),[r,o]=(0,l.useState)(!0),[n,i]=(0,l.useState)(!0),a=[(0,p.__)("Analyzing your site content…","wordpress-seo"),(0,p.__)("Composing your content suggestions…","wordpress-seo"),(0,p.__)("Writing compelling headlines…","wordpress-seo")],c=(0,l.useRef)(null);return(0,l.useEffect)(()=>{const e=setInterval(()=>{o(!1),c.current=setTimeout(()=>{s(e=>(e+1)%a.length),o(!0)},300)},3e3);return()=>{clearInterval(e),clearTimeout(c.current)}},[]),(0,l.useEffect)(()=>{const e=setInterval(()=>{i(e=>!e)},1e3);return()=>clearInterval(e)},[]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-pb-8",children:[(0,_.jsx)(M.h,{className:"yst-w-24 yst-mb-2 yst-mt-6 yst-transition-colors yst-duration-1000 "+(n?"yst-text-primary-300":"yst-text-primary-500"),...e}),(0,_.jsxs)(u.Modal.Description,{className:"yst-italic yst-text-slate-500 yst-transition-opacity yst-duration-300 "+(r?"yst-opacity-100":"yst-opacity-0"),children:[(0,_.jsx)("span",{className:"yst-sr-only",children:" Yoast "}),a[t]]})]}),(0,_.jsxs)("div",{className:"yst-relative",children:[[...Array(5)].map((e,t)=>(0,_.jsx)(Ke,{},t)),(0,_.jsx)("div",{className:"yst-absolute yst-inset-0 yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity","aria-hidden":"true"})]})]})},Ge=(0,h.compose)([(0,o.withSelect)(e=>{const{selectSuggestions:t,selectSuggestionsStatus:s,selectSuggestionsError:r}=e(S.bw);return{suggestions:t(),status:s(),error:r()}})])(({status:e,onSuggestionClick:t=d.noop,suggestions:s,error:r,closeButtonRef:o})=>{const n=N(),i=e===P.$H.loading,a=e===P.$H.success;return(0,l.useEffect)(()=>{null!=o&&o.current&&o.current.focus()},[i]),(0,_.jsx)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,_.jsxs)("div",{className:"yst-relative","aria-live":"polite",children:[(0,_.jsx)(Ee,{as:"div",show:i,enter:"yst-transition-opacity yst-duration-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300 yst-absolute yst-top-0 yst-left-0 yst-right-0",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,_.jsx)(Ve,{})}),(0,_.jsx)(Ee,{as:"div",show:a,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,_.jsx)(Ye,{suggestions:s,onSuggestionClick:t})}),e===P.$H.error&&(0,_.jsx)(Ne,{errorCode:r.errorCode,errorIdentifier:r.errorIdentifier,errorMessage:r.errorMessage,missingLicenses:r.missingLicenses,onRetry:n})]})})});var Xe=s(4719),Ze=s.n(Xe),Je=s(3838);const Qe=({intent:e,description:t})=>{const s=He[e],r=s?s.calloutClasses:"yst-bg-slate-50 yst-border-slate-200",o=s?s.calloutTextClasses:"yst-text-slate-900";return(0,_.jsxs)("div",{role:"note",className:k()("yst-border yst-rounded-md yst-p-4 yst-flex yst-flex-col yst-gap-2",r),children:[(0,_.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,_.jsx)(We,{intent:e,tooltipPosition:"bottom-right"}),(0,_.jsx)("span",{className:k()("yst-font-medium yst-text-sm",o),children:(0,p.__)("Why this content?","wordpress-seo")})]}),(0,_.jsx)("p",{className:k()("yst-text-sm",o),children:t})]})},et=({children:e,className:t,dragProps:s,buttonProps:r})=>{const o=(0,u.useSvgAria)();return(0,_.jsx)("li",{...s,children:(0,_.jsxs)("button",{type:"button",className:k()("yst-h-10 yst-w-full yst-border yst-rounded-md yst-shadow yst-flex yst-items-center yst-gap-3 yst-px-3 yst-select-none",t),...r,children:[(0,_.jsxs)("svg",{className:"yst-w-2.5 yst-h-4 yst-shrink-0",viewBox:"0 0 10 16",fill:"currentColor",...o,children:[(0,_.jsx)("circle",{cx:"2",cy:"2",r:"1.5"}),(0,_.jsx)("circle",{cx:"8",cy:"2",r:"1.5"}),(0,_.jsx)("circle",{cx:"2",cy:"8",r:"1.5"}),(0,_.jsx)("circle",{cx:"8",cy:"8",r:"1.5"}),(0,_.jsx)("circle",{cx:"2",cy:"14",r:"1.5"}),(0,_.jsx)("circle",{cx:"8",cy:"14",r:"1.5"})]}),(0,_.jsx)("div",{className:"yst-flex yst-items-center yst-gap-3 yst-flex-1 yst-min-w-0",children:e})]})})},tt=({heading:e,index:t,dragOverIndex:s,onDragStart:r,onDragOver:o,onDrop:n,onDragEnd:i,onMoveUp:a,onMoveDown:c,totalItems:d,onAnnounce:u})=>{const h=(0,l.useCallback)(e=>r(e,t),[r,t]),m=(0,l.useCallback)(e=>o(e,t),[o,t]),g=(0,l.useCallback)(e=>n(e,t),[n,t]),y=(0,l.useCallback)(s=>{s.altKey&&("ArrowUp"===s.key&&t>0&&(s.preventDefault(),a(t),u(e,t)),"ArrowDown"===s.key&&t<d-1&&(s.preventDefault(),c(t),u(e,t+2)))},[t,d,a,c,u,e]),f={draggable:"true",onDragStart:h,onDragOver:m,onDrop:g,onDragEnd:i};return(0,_.jsxs)(et,{className:k()("yst-bg-slate-50 yst-text-slate-400 yst-border-slate-300 yst-text-sm yst-cursor-grab yst-transition-all focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",s===t&&"yst-border-primary-500 yst-border-2"),buttonProps:{onKeyDown:y},dragProps:f,children:[(0,_.jsx)("span",{className:"yst-font-medium yst-text-slate-500",children:"H2"}),(0,_.jsx)("span",{className:"yst-text-slate-600",children:e}),(0,_.jsx)("span",{className:"yst-sr-only",children:(0,p.sprintf)(/* translators: 1: current position, 2: total items. */ /* translators: 1: current position, 2: total items. */
245 +(0,p.__)("Position %1$d out of %2$d. Use Alt+Arrow Up/Down to reorder.","wordpress-seo"),t+1,d)})]})},st=()=>(0,_.jsxs)(et,{className:"yst-bg-white yst-text-slate-300 yst-border-slate-200",buttonProps:{disabled:!0},dragProps:{"aria-hidden":!0},children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3.5 yst-w-5 yst-rounded yst-shrink-0"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3.5 yst-w-32 yst-rounded"})]}),rt=({categoryName:e,isEnabled:t,isLoading:s})=>s?(0,_.jsx)("div",{className:"yst-inline-flex yst-items-center yst-w-20 yst-h-5 yst-px-2 yst-py-1 yst-rounded-full yst-border yst-border-slate-300",children:(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-16 yst-h-3 yst-rounded"})}):t&&e?(0,_.jsx)(u.Badge,{variant:"plain",className:"yst-w-fit",children:e}):null,ot=({category:e,isEnabled:t=!1,onToggle:s=d.noop,isLoading:r=!1})=>(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-3 yst-max-w-sm yst-mb-6",children:[(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-1.5",children:[(0,_.jsxs)("div",{className:"yst-flex yst-items-center yst-justify-between",children:[(0,_.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,p.__)("Suggest category","wordpress-seo")}),(0,_.jsx)(u.Toggle,{id:"suggest-category-toggle",checked:t,onChange:s,disabled:r,screenReaderLabel:(0,p.__)("Suggest category","wordpress-seo")})]}),(0,_.jsx)("p",{className:"yst-text-sm yst-text-slate-600",children:(0,p.__)("Adds post to an existing category, when applicable.","wordpress-seo")})]}),(0,_.jsx)(rt,{categoryName:null==e?void 0:e.name,isEnabled:t,isLoading:r})]}),nt=()=>(0,_.jsxs)("div",{className:"yst-flex yst-items-end yst-justify-between yst-mb-2",children:[(0,_.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,p.__)("Blog post structure","wordpress-seo")}),(0,_.jsx)("span",{className:"yst-text-xs yst-text-slate-500",children:(0,p.__)("Drag to reorder","wordpress-seo")})]}),it=({value:e,date:t="",locale:s,isCornerstone:r})=>{const{actual:o,score:n,max:i}=(0,Je.getDescriptionProgress)(e,t,r,!1,s),a=Math.min(o/i*100,100);return(0,_.jsx)("div",{className:"yst-w-full yst-h-1.5 yst-bg-slate-200 yst-rounded-full yst-overflow-hidden","aria-hidden":"true",children:(0,_.jsx)("div",{className:"yst-h-full yst-rounded-full yst-transition-all yst-duration-300",style:{width:`${a}%`,backgroundColor:(0,Je.getProgressColor)(n)}})})},at=({label:e,multiline:t=!1})=>(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-2",children:[(0,_.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:e}),(0,_.jsx)("div",{className:k()("yst-bg-white yst-border yst-border-slate-300 yst-rounded-md yst-shadow-sm yst-px-3 yst-py-2",t?"yst-min-h-20 yst-flex yst-flex-col yst-gap-1":"yst-h-10 yst-flex yst-items-center"),children:t?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-1/2 yst-h-4 yst-rounded"})]}):(0,_.jsx)(u.SkeletonLoader,{className:"yst-w-1/3 yst-h-4 yst-rounded"})})]}),lt=()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ot,{isLoading:!0}),(0,_.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,_.jsx)(at,{label:(0,p.__)("Focus Keyphrase","wordpress-seo")}),(0,_.jsx)(at,{label:(0,p.__)("Title","wordpress-seo")}),(0,_.jsx)(at,{label:(0,p.__)("Meta description","wordpress-seo"),multiline:!0})]}),(0,_.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,_.jsx)(nt,{}),(0,_.jsx)("ul",{"aria-label":(0,p.__)("Blog post structure","wordpress-seo"),"aria-busy":!0,className:"yst-list-none yst-p-0 yst-m-0 yst-flex yst-flex-col yst-gap-2",children:Array.from({length:S.Tf}).map((e,t)=>(0,_.jsx)(st,{},`structure-row-skeleton-${t}`))})]})]}),ct=(0,h.compose)([(0,o.withSelect)(e=>{const{selectSuggestion:t,selectContentOutline:s,selectContentOutlineStatus:r,selectFeatureModalStatus:o,selectContentOutlineError:n}=e(S.bw),{getIsPremium:i}=e("yoast-seo/editor"),{isCornerstoneContent:a,getDateFromSettings:l,getContentLocale:c}=e("yoast-seo/editor");return{suggestion:t(),outline:s(),status:r(),error:n(),isPremium:i(),isActive:o()===S.Qo.contentOutline,locale:c(),date:l(),isCornerstone:a()}}),(0,o.withDispatch)(e=>{const{setFeatureModalStatus:t,saveOutlineEditsToCache:s,setSuggestion:r}=e(S.bw);return{onBackToSuggestions:(e,o)=>{s({id:e.id,structure:o}),r(e),t(S.Qo.contentSuggestions)}}})])(({status:e,onBackToSuggestions:t,onApplyOutline:s,suggestion:r,error:n,isCornerstone:i,date:a,locale:c,closeButtonRef:d})=>{const h=e===P.$H.loading,m=L(),g=(0,l.useCallback)(()=>m(r),[m,r]),[y,f]=(0,l.useState)(!0),[x,w]=(0,l.useState)(r.keyphrase),[b,v]=(0,l.useState)(r.title),[j,C]=(0,l.useState)(r.meta_description),{structure:T,dragOverIndex:E,reorderMessage:R,handleAnnounce:A,handleDragStart:I,handleDragOver:N,handleDrop:M,handleDragEnd:O,handleMoveUp:F,handleMoveDown:D}=(()=>{const e=(0,o.useSelect)(e=>e(S.bw).selectContentOutline(),[]),[t,s]=(0,l.useState)(e),[r,n]=(0,l.useState)(null),[i,a]=(0,l.useState)(""),c=(0,l.useRef)(null),d=(0,l.useCallback)((e,s)=>{a((0,p.sprintf)(/* translators: 1: heading text, 2: new 1-based position, 3: total items. */ /* translators: 1: heading text, 2: new 1-based position, 3: total items. */
246 +(0,p.__)("H2 %1$s moved to position %2$d of %3$d.","wordpress-seo"),e,s,t.length))},[t.length]);(0,l.useEffect)(()=>{s(e),a(""),n(null),c.current=null},[e]);const u=(0,l.useCallback)((e,t)=>{c.current=t,e.dataTransfer.effectAllowed="move"},[]),h=(0,l.useCallback)((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",n(t)},[]),m=(0,l.useCallback)((e,t)=>{e.preventDefault();const r=c.current;null!==r&&r!==t?(s(e=>{const s=[...e],[o]=s.splice(r,1),n=r<t?t-1:t;return s.splice(n,0,o),s}),n(null),c.current=null):n(null)},[]),g=(0,l.useCallback)(()=>{n(null),c.current=null},[]),y=(0,l.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e-1,0,r),s})},[]),f=(0,l.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e+1,0,r),s})},[]);return{structure:t,dragOverIndex:r,reorderMessage:i,handleAnnounce:d,handleDragStart:u,handleDragOver:h,handleDrop:m,handleDragEnd:g,handleMoveUp:y,handleMoveDown:f}})(),q=(0,l.useCallback)(e=>N(e,T.length),[N,T.length]),$=(0,l.useCallback)(e=>M(e,T.length),[M,T.length]);(0,l.useEffect)(()=>{w(r.keyphrase),v(r.title),C(r.meta_description)},[r]),(0,l.useEffect)(()=>{null!=d&&d.current&&d.current.focus()},[h]);const B=(0,l.useCallback)(e=>w(e.target.value),[]),U=(0,l.useCallback)(e=>v(e.target.value),[]),H=(0,l.useCallback)(e=>C(e.target.value),[]),W=(0,l.useCallback)(()=>{f(e=>!e)},[]),z=(0,l.useCallback)(()=>{t({...r,title:b,keyphrase:x,meta_description:j},T)},[t,r,b,x,j,T]),K=(0,l.useCallback)(()=>{s({title:b,metaDescription:j,focusKeyphrase:x,category:y?r.category:{name:"",id:-1},structure:T})},[s,b,j,x,y,r.category,T]),Y=Boolean(r.category&&-1!==r.category.id);return e===P.$H.error?(0,_.jsx)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,_.jsx)(Ne,{errorCode:n.errorCode,errorIdentifier:n.errorIdentifier,errorMessage:n.errorMessage,missingLicenses:n.missingLicenses,onRetry:g})}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(u.Modal.Container.Content,{className:"yst-overflow-y-auto yst-pt-6 yst-px-6 yst-pb-0 yst-m-0 yst-relative","aria-busy":h,children:[(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-6",children:[(0,_.jsx)(Qe,{intent:r.intent,description:r.explanation}),(0,_.jsx)(u.Modal.Description,{className:"yst-text-sm yst-text-slate-600",children:(0,p.__)("Review and customize your content outline before adding it to your post","wordpress-seo")}),(0,_.jsx)("hr",{className:"yst-border-slate-200"}),(0,_.jsx)(Ee,{as:"div",show:h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,_.jsx)(lt,{})}),(0,_.jsxs)(Ee,{as:"div",show:!h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:[Y&&(0,_.jsx)(ot,{category:r.category,isEnabled:y,onToggle:W}),(0,_.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,_.jsx)(u.TextField,{id:"content-outline-focus-keyphrase",label:(0,p.__)("Focus Keyphrase","wordpress-seo"),value:x,onChange:B}),(0,_.jsx)(u.TextField,{id:"content-outline-title",label:(0,p.__)("Title","wordpress-seo"),value:b,onChange:U}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.TextareaField,{id:"content-outline-meta-description",label:(0,p.__)("Meta description","wordpress-seo"),value:j,onChange:H,className:"yst-mb-2"}),(0,_.jsx)(it,{value:j,date:a,locale:c,isCornerstone:i})]})]}),(0,_.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,_.jsx)(nt,{}),(0,_.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:"yst-sr-only",children:R}),(0,_.jsx)("ul",{"aria-label":(0,p.__)("Blog post structure","wordpress-seo"),className:"yst-flex yst-flex-col yst-gap-2 yst-list-none yst-p-0 yst-m-0",children:T.map((e,t)=>(0,_.jsx)(tt,{index:t,heading:e.heading,dragOverIndex:E,onDragStart:I,onDragOver:N,onDrop:M,onDragEnd:O,onMoveUp:F,onMoveDown:D,totalItems:T.length,onAnnounce:A},e.id))}),(0,_.jsx)("div",{className:"yst-h-8",onDragOver:q,onDrop:$})]})]})]}),(0,_.jsx)("div",{className:k()(h?"yst-sticky":"yst-hidden","-yst-left-6 -yst-right-6 yst-bottom-0 yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity"),"aria-hidden":"true"})]}),(0,_.jsxs)(u.Modal.Container.Footer,{className:"yst-flex yst-items-center yst-justify-between yst-p-6 yst-border-t yst-border-slate-200",children:[(0,_.jsxs)(u.Button,{variant:"secondary",onClick:z,className:"yst-flex yst-items-center yst-gap-1.5",disabled:h,children:[(0,_.jsx)(Ze(),{className:"yst-w-4 yst-h-4"}),(0,p.__)("Content suggestions","wordpress-seo")]}),(0,_.jsx)(u.Button,{variant:"ai-primary",onClick:K,className:"[&>.yst-button--sparkles-icon]:yst-hidden yst-ps-3",disabled:h,children:(0,p.__)("Add outline to post","wordpress-seo")})]})]})}),dt="yst-mt-1 yst-mb-3",ut="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",pt=({onClose:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("p",{className:dt,children:(0,p.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")}),(0,_.jsx)("div",{className:ut,children:(0,_.jsx)(u.Button,{type:"button",variant:"primary",size:"small",onClick:e,children:(0,p.__)("Got it!","wordpress-seo")})})]}),ht=({onClose:e,upsellLink:t,isWooProductEntity:s=!1,ctbId:r="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const o=(0,u.useSvgAria)();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("p",{className:dt,children:(0,p.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
247 +(0,p.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium")}),(0,_.jsxs)("div",{className:ut,children:[(0,_.jsx)(u.Button,{type:"button",variant:"tertiary",size:"small",onClick:e,children:(0,p.__)("Close","wordpress-seo")}),(0,_.jsxs)(u.Button,{as:"a",size:"small",variant:"upsell",href:t,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":r,children:[(0,_.jsx)(x(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...o}),(0,p.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
248 +(0,p.__)("Unlock with %1$s","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,_.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
249 +(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]})},mt=({className:e=""})=>{const{isUsageCountLimitReached:t,usageCount:s,usageCountLimit:r,premiumUpsellLink:n,wooUpsellLink:i,isWooProductEntity:a,hasValidPremiumSubscription:c,hasValidWooSubscription:d}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),premiumUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks"),wooUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks-woo"),isWooProductEntity:s.getIsWooProductEntity(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}},[]),h=(0,l.useMemo)(()=>c&&!a||a&&d&&c,[c,a,d]),[m,,g,,y]=(0,u.useToggleState)(s===r),f=Math.max(0,r-s);(0,l.useEffect)(()=>{g(h&&s===r||!h&&f<=5)},[s,r,h,t]);const x=(0,l.useMemo)(()=>a?i:n,[a,i,n]),w=(0,l.useMemo)(()=>a&&!d,[a,d]);return m&&(0,_.jsx)(u.Notifications.Notification,{id:"ai-sparks-limit",className:e,variant:"info",dismissScreenReaderLabel:(0,p.__)("Close","wordpress-seo"),title:h?(0,p.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
250 +(0,p._n)("You've used %s spark this month.","You've used %s sparks this month.",s,"wordpress-seo"),s):f<=5&&!t?(0,p.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
251 +(0,p._n)("%s free spark left!","%s free sparks left!",f,"wordpress-seo"),f):(0,p.__)("You're out of free sparks!","wordpress-seo"),size:h?"default":"large",children:h?(0,_.jsx)(pt,{onClose:y}):(0,_.jsx)(ht,{onClose:y,upsellLink:x,isWooUpsell:w})})};var gt=s(6752),yt=s(5979),ft=s(1455),xt=s.n(ft);let wt,bt=!1;const vt="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。。!‼?⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽{}|~⦅⦆「」、[]・¥$%@&'()*/:;<>\\\<>";vt.split(""),new RegExp("^["+vt+"]+"),new RegExp("["+vt+"]+$");const kt=new RegExp("["+vt+"#$%&*+/=@^`{|}~ -¿–-⁊ -₠-⃀]","g"),_t=e=>{const t={...e};return""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(t.value="%%"+e.name+"%%"),t.badge=`<badge>${e.label}</badge>`,t},jt={editType:C.gC.title,previewType:C.i0.google,postType:C.M$.post,contentType:C.Ty.post},St=(0,l.createContext)(jt),Ct=(St.Provider,()=>(0,l.useContext)(St));var Tt=s(5986);const Et=()=>(0,l.useContext)(Tt.LocationContext),Rt=e=>{const t=(0,l.useRef)(null);return(0,l.useCallback)(s=>{(0,d.attempt)(()=>t.current&&t.current.disconnect()),null!==s&&(t.current=new ResizeObserver(t=>{(0,d.forEach)(t,t=>e(t))}),t.current.observe(s))},[e])},At=({errorCode:e,errorIdentifier:t="",isOpen:s=!0,invalidSubscriptions:r=[],showActions:o=!1,onRetry:n=d.noop,errorMessage:i="",onClose:a=d.noop})=>{if("SEO_ANALYSIS_INACTIVE"===t)return(0,_.jsx)(Ie.qt,{isOpen:s,onClose:a});if(402===e||429===e&&"USAGE_LIMIT_REACHED"===t)return(0,_.jsx)(Ie.Vq,{isOpen:s,invalidSubscriptions:r,onClose:a});switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,_.jsx)(Ie.O7,{isOpen:s,onClose:a});case"NOT_ENOUGH_CONTENT":return(0,_.jsx)(Ie.Y$,{isOpen:s,onClose:a});case"SITE_UNREACHABLE":return(0,_.jsx)(Ie.vL,{isOpen:s,onClose:a});case"WP_HTTP_REQUEST_ERROR":return(0,_.jsx)(Ie.T5,{isOpen:s,errorMessage:i,showActions:o,onRetry:n,onClose:a});default:return(0,_.jsx)(Ie.zW,{isOpen:s,showActions:o,onRetry:n,onClose:a})}case 408:return(0,_.jsx)(Ie.xk,{isOpen:s,showActions:o,onRetry:n,onClose:a});case 429:return(0,_.jsx)(Ie.vA,{isOpen:s,onClose:a});case 410:return(0,_.jsx)(Ie.kr,{isOpen:s,onClose:a});default:return(0,_.jsx)(Ie.zW,{isOpen:s,showActions:o,onRetry:n,onClose:a})}};At.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string,isOpen:Ae().bool,invalidSubscriptions:Ae().arrayOf(Ae().string),showActions:Ae().bool,onRetry:Ae().func,errorMessage:Ae().string,onClose:Ae().func};var It=s(2863),Lt=s.n(It);const Pt=window.yoast.aiFrontend;var Nt=s(8213);const Mt="usageCount",Ot="fetchUsageCount",Ft=`${Ot}/${P.fJ.success}`,Dt=`${Ot}/${P.fJ.error}`,qt={errorCode:null,errorIdentifier:null,errorMessage:null},$t=(0,Nt.createSlice)({name:Mt,initialState:{status:P.$H.idle,count:0,limit:10,endpoint:"",error:qt},reducers:{addUsageCount:(e,{payload:t=1})=>{e.count+=t},setUsageCount:(e,{payload:t})=>{e.count=t},setUsageCountEndpoint:(e,{payload:t})=>{e.endpoint=t},setUsageCountLimit:(e,{payload:t})=>{e.limit=t}},extraReducers:e=>{e.addCase(`${Ot}/${P.fJ.request}`,e=>{e.status=P.$H.loading,e.error=qt}),e.addCase(Ft,(e,{payload:t})=>{e.status=P.$H.success,e.count=t.count,e.limit=t.limit,e.error=qt}),e.addCase(`${Ot}/${P.fJ.error}`,(e,{payload:t})=>{e.status=P.$H.error,e.error={errorCode:502,...t}})}}),Bt=($t.getInitialState,{selectUsageCountStatus:e=>(0,d.get)(e,[Mt,"status"],$t.getInitialState()),selectUsageCount:e=>(0,d.get)(e,[Mt,"count"],$t.getInitialState().count),selectUsageCountLimit:e=>(0,d.get)(e,[Mt,"limit"],$t.getInitialState().limit),selectUsageCountEndpoint:e=>(0,d.get)(e,[Mt,"endpoint"],$t.getInitialState().endpoint),selectUsageCountError:e=>(0,d.get)(e,[Mt,"error"],$t.getInitialState().error)});Bt.selectUsageCountRemaining=(0,Nt.createSelector)([Bt.selectUsageCount,Bt.selectUsageCountLimit],(e,t)=>Math.max(t-e,0)),Bt.isUsageCountLimitReached=(0,Nt.createSelector)([Bt.selectUsageCount,Bt.selectUsageCountLimit,Bt.selectUsageCountError],(e,t,s)=>429===s.errorCode||e>=t),$t.actions,$t.reducer;const Ut=({onStartGenerating:e})=>(0,_.jsx)(b.ve,{storeName:C.XA,linkStoreName:C.sH,onConsentGranted:e});Ut.propTypes={onStartGenerating:Ae().func.isRequired};var Ht=s(7219),Wt=s.n(Ht),zt=s(1480);const Kt=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,Yt=({total:e,current:t,onNavigate:s,disabled:r=!1,...o})=>(0,_.jsxs)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start",children:[(0,_.jsx)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1",children:(0,p.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")}),e>1&&(0,_.jsx)(u.Pagination,{className:"yst-shrink-0",current:t,total:e,onNavigate:s,disabled:r,variant:"text"
252 +/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,p.__)("Previous","wordpress-seo")
253 +/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,p.__)("Next","wordpress-seo"),...o})]}),Vt=({height:e,onFatalError:t})=>{const[s,r]=(0,l.useState)(""),{onClose:n}=(0,u.useModalContext)(),{editType:i,previewType:a,contentType:c}=Ct(),h=(()=>{const{editType:e,previewType:t}=Ct();let s="SEO";switch(t){case C.i0.social:s="social";break;case C.i0.twitter:s="X"}switch(e){case C.gC.title:return(0,p.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
254 +(0,p.__)("Generated %s titles","wordpress-seo"),s);case C.gC.description:return t===C.i0.google&&(s="meta"),(0,p.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
255 +(0,p.__)("Generated %s descriptions","wordpress-seo"),s)}})(),m=(()=>{const{editType:e,previewType:t}=Ct();let s="SEO";switch(t){case C.i0.social:s="social";break;case C.i0.twitter:s="X"}switch(e){case C.gC.title:return(0,p.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
256 +(0,p.__)("Apply %s title","wordpress-seo"),s);case C.gC.description:return t===C.i0.google&&(s="meta"),(0,p.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
257 +(0,p.__)("Apply %s description","wordpress-seo"),s)}})(),g=Et(),{suggestions:y,fetchSuggestions:f,setSelectedSuggestion:x}=js(),b=bs(),{addAppliedSuggestion:v,addUsageCount:k}=(0,o.useDispatch)(C.XA),{isUsageCountLimitReached:j,isWooProductEntity:S,hasValidPremiumSubscription:T,hasValidWooSubscription:E}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}},[]),R=(0,l.useMemo)(()=>y.status===C.$H.loading||!(E||!j||!S)||!(T||!j),[T,j,y.status,S,E]),A=(0,u.usePrevious)(e),L=y.status===C.$H.success?e:A,{bottom:P}=I(L),[N,M]=(0,l.useState)(!1),O=(0,l.useCallback)(e=>{M(e.target.offsetHeight!==e.target.scrollHeight)},[M]),F=Rt(O),D=Cs(),q=(()=>{const e=(()=>{const{previewType:e}=Ct();return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return()=>(0,o.select)(C.sH).getSnippetEditorData().description;case C.i0.social:return(0,o.select)(C.sH).getFacebookDescriptionOrFallback;case C.i0.twitter:return(0,o.select)(C.sH).getTwitterDescriptionOrFallback;default:return(0,d.constant)("")}},[e])})();return(0,l.useMemo)(e,[e])})(),$=(()=>{const e=(0,o.useSelect)(e=>e(C.sH).getReplaceVars(),[]),t=(0,l.useMemo)(()=>e.map(_t),[e]);return(0,l.useCallback)((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:n=C.gC.title,contentType:i=C.Ty.post}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,d.escapeRegExp)(o.name)+"%%","g"),(0,d.get)(r,o.name,o[s]));return i===C.Ty.term&&(e=e.replace(" Archives","")),o?((e,t=C.gC.title)=>{const s=(0,yt.applyReplaceUsingPlugin)({title:"",description:"",[t]:gt.languageProcessing.stripSpaces(e)});return(0,d.get)(s,t,e)})(e,n):e},[t])})(),B=(0,l.useMemo)(()=>i===C.gC.title?{[C.uv[c]]:y.selected}:{},[i,c,y.selected]),U=(0,l.useMemo)(()=>$(D,{overrides:B,contentType:c}),[$,D,i,c,y.selected]),H=(0,l.useMemo)(()=>$(D,{overrides:{...B,sep:"",sitename:""},contentType:c}),[$,D,i,c,y.selected]),W=(0,l.useMemo)(()=>i===C.gC.description?y.selected:$(q,{editType:C.gC.description}),[$,q,i,y.selected]),z=(0,l.useCallback)(e=>$(D,{overrides:{[C.uv[c]]:e},key:"badge",applyPluggable:!1,contentType:c}),[$,D,c]),{currentPage:K,setCurrentPage:Y,isOnLastPage:V,totalPages:G,getItemsOnCurrentPage:X}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,l.useState)(1),o=(0,l.useMemo)(()=>Math.ceil(e/t),[e,t]),n=(0,l.useMemo)(()=>s*t,[s,t]),i=(0,l.useMemo)(()=>n-t,[n,t]),a=(0,l.useMemo)(()=>1===s,[s]),c=(0,l.useMemo)(()=>s===o,[s,o]),u=(0,l.useCallback)(()=>{s>1&&r(s-1)},[s,r]),p=(0,l.useCallback)(()=>{s<o&&r(s+1)},[s,r,o]),h=(0,l.useCallback)(e=>(0,d.slice)(e,i,n),[i,n]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:a,isOnLastPage:c,previousPage:u,nextPage:p,firstOnPage:i,lastOnPage:n,getItemsOnCurrentPage:h}})({totalItems:y.status===C.$H.loading||y.status===C.$H.error?y.entities.length+C.Gu:y.entities.length,perPage:C.Gu}),Z=(0,l.useMemo)(()=>(0,d.map)(X(y.entities),e=>{let t=e;return i===C.gC.title&&(t=z(e),t=t.replace(Kt,(e,t,s,r,o,n,{start:i,wrap:a,end:l})=>{const c=a.trim();return 0===c.length?`${i}${a}${l}`:`${i}<span>${c}</span>${l}`}),t=(0,w.x)(t,{badge:(0,_.jsx)(u.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain",children:" "}),span:(0,_.jsx)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:e,label:t}}),[y.entities,X,i,z]),J=(0,l.useMemo)(()=>y.status!==C.$H.error||y.status===C.$H.error&&!V,[y.status,V]),Q=(0,l.useMemo)(()=>y.status===C.$H.loading&&V,[y.status,V]),ee=(0,l.useMemo)(()=>y.status===C.$H.error&&V,[y.status,V]),te=(0,l.useCallback)(()=>{R||(Y(y.status===C.$H.error?G:G+1),f().then(e=>{e===C.Sf.success&&k()}))},[f,y.status,G,Y,x,j]),se=vs(),re=(0,zt.Z)(!0),oe=(0,l.useCallback)(()=>{const e=i===C.gC.title?D.replace(new RegExp(C.Zc[c]+"( Archives)?"),y.selected):y.selected;se(e),v({editType:i,previewType:a,suggestion:y.selected}),n(),"pre-publish"===g&&re()},[se,i,a,y.selected,D,n,v,re,g]);((e,t=[])=>{const s=(0,l.useRef)(!1);(0,l.useEffect)(()=>{s.current||(s.current=!0,e().finally(()=>{s.current=!1}))},[e,t])})(()=>""===s?f().then(e=>{r(e),e===C.Sf.success&&k()}):Promise.resolve(),[s,k,f]);const ne=s===C.Sf.error||y.status===C.$H.error&&402===y.error.code;return(0,l.useEffect)(()=>{var e,s,r,o,n,i,a,l;ne&&t({errorCode:null!==(e=null===(s=y.error)||void 0===s?void 0:s.code)&&void 0!==e?e:0,errorIdentifier:null!==(r=null===(o=y.error)||void 0===o?void 0:o.errorIdentifier)&&void 0!==r?r:"",invalidSubscriptions:null!==(n=null===(i=y.error)||void 0===i?void 0:i.missingLicenses)&&void 0!==n?n:[],errorMessage:null!==(a=null===(l=y.error)||void 0===l?void 0:l.message)&&void 0!==a?a:""})},[ne,y.error,t]),ne?null:(0,_.jsxs)(l.Fragment,{children:[(0,_.jsxs)(u.Modal.Container.Content,{ref:F,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2",children:[(0,_.jsx)(b,{title:U,description:W,status:y.status,titleForLength:H,showPreviewSkeleton:""===s,showLengthProgress:!Q}),J&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"yst-flex yst-space-y-4",children:[(0,_.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto",children:h}),(0,_.jsx)(u.Button,{variant:"ai-secondary",size:"small",onClick:y.status===C.$H.loading?d.noop:te,isLoading:y.status===C.$H.loading,disabled:R,children:(0,p.__)("Generate 5 more","wordpress-seo")})]}),Q?(0,_.jsx)(ms,{idSuffix:g,suggestionClassNames:i===C.gC.title?[["yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-8/12"]]:void 0}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ps,{idSuffix:g,suggestions:Z,selected:y.selected,onChange:x}),(0,_.jsx)(Yt,{current:K,total:G,onNavigate:Y,disabled:y.status===C.$H.loading||ee})]})]}),ee&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"yst-mt-8"}),(0,_.jsx)(cs,{errorCode:y.error.code,errorIdentifier:y.error.errorIdentifier,invalidSubscriptions:y.error.missingLicenses,errorMessage:y.error.message}),(0,_.jsx)(Yt,{current:K,total:G,onNavigate:Y,disabled:y.status===C.$H.loading})]})]}),(0,_.jsxs)(u.Modal.Container.Footer,{children:[N&&(0,_.jsx)("div",{className:"yst-absolute yst-inset-x-0 yst--mt-10 yst-me-[calc(2.5rem-1px)] yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-slate-50"}),(0,_.jsx)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,_.jsxs)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse",children:[(0,_.jsx)("div",{className:"yst-hidden sm:yst-inline",children:(0,_.jsx)(u.Button,{variant:"secondary",onClick:n,children:(0,p.__)("Close","wordpress-seo")})}),(0,_.jsx)("div",{className:"yst-block sm:yst-inline",children:(0,_.jsxs)(u.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:oe,disabled:""===y.selected||y.status===C.$H.loading||ee,children:[(0,_.jsx)(Wt(),{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),m]})}),(0,_.jsx)("div",{className:"yst-mt-3 sm:yst-hidden",children:(0,_.jsx)(u.Button,{variant:"secondary",onClick:n,className:"yst-w-full sm:yst-w-auto",children:(0,p.__)("Close","wordpress-seo")})})]})]}),(0,_.jsxs)(u.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:P},position:"bottom-left",children:[y.status!==C.$H.loading&&(0,_.jsx)(mt,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(y.status===C.$H.success||y.status===C.$H.loading)&&(0,_.jsx)(ys,{})]})]})};Vt.propTypes={height:Ae().number.isRequired,onFatalError:Ae().func.isRequired};const Gt=({onActivateFreeSparks:e})=>{const{premiumUpsellLink:t,wooUpsellLink:s,isWooCommerceActive:r,isProductPost:n,learnMoreLink:i,imageLink:a,wistiaEmbedPermissionValue:c,wistiaEmbedPermissionStatus:d,isUsageCountLimitReached:h,activateFreeSparksEndpoint:m}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{premiumUpsellLink:s.selectLink("https://yoa.st/ai-generator-upsell"),wooUpsellLink:s.selectLink("https://yoa.st/ai-generator-upsell-woo-seo"),isWooCommerceActive:s.getIsWooCommerceActive(),isProductPost:s.getIsProduct(),learnMoreLink:s.selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:s.selectImageLink("ai-generator-preview.jpg"),wistiaEmbedPermissionValue:s.selectWistiaEmbedPermissionValue(),wistiaEmbedPermissionStatus:s.selectWistiaEmbedPermissionStatus(),isUsageCountLimitReached:t.isUsageCountLimitReached(),activateFreeSparksEndpoint:t.selectFreeSparksActiveEndpoint()}},[]),{onClose:g,initialFocus:f}=(0,u.useModalContext)(),{title:v,upsellLabel:j,upsellLink:S,ctbId:T,newToText:E}=Ts({premium:t,woo:s}),R=(0,l.useMemo)(()=>r&&n,[r,n]),A=(0,l.useMemo)(()=>({src:a,width:"432",height:"244"}),[a]),{setWistiaEmbedPermission:I}=(0,o.useDispatch)(C.sH),{activateFreeSparks:L}=(0,o.useDispatch)(C.XA),P=(0,l.useMemo)(()=>({value:c,status:d,set:I}),[c,d,I]),N=(0,l.useCallback)(()=>{L({endpoint:m}),e()},[L,m,g,e]),M={a:(0,_.jsx)(b.rd,{href:i,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,_.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"})};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:[(0,_.jsxs)("div",{className:"yst-relative yst-w-full",children:[(0,_.jsx)(b.qc,{videoId:"vmrahpfjxp",thumbnail:A,wistiaEmbedPermission:P}),(0,_.jsx)(u.Badge,{className:"yst-absolute yst--top-2 yst-end-4",variant:"info",children:"Beta"})]}),(0,_.jsx)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center",children:(0,_.jsxs)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center",children:[(0,_.jsx)("span",{className:"yst-logo-icon"}),E]})})]}),(0,_.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,_.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,_.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:v}),(0,_.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:R?(0,w.x)((0,p.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */ /* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
258 +(0,p.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for product titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),M):(0,w.x)((0,p.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */ /* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
259 +(0,p.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),M)})]}),h&&(0,_.jsx)(u.Alert,{className:"yst-my-4",children:(0,p.sprintf)(/* translators: %s is for Yoast SEO Premium. */ /* translators: %s is for Yoast SEO Premium. */
260 +(0,p.__)("Oh no! Its seems like you're out of free Sparks. Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),"Yoast SEO Premium")}),(0,_.jsxs)("div",{className:k()("yst-w-full yst-flex yst-flex-col",h?"yst-mt-0":"yst-mt-6"),children:[(0,_.jsxs)(u.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:S,target:"_blank",ref:f,"data-action":"load-nfd-ctb","data-ctb-id":T,children:[(0,_.jsx)(x(),{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),j,(0,_.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
261 +(0,p.__)("(Opens in a new browser tab)","wordpress-seo")})]}),!h&&(0,_.jsx)(u.Button,{variant:"ai-secondary",onClick:N,className:"yst-mt-2 yst-w-full yst-text-base yst-text-slate-800 yst-font-medium yst-h-11",children:(0,p.__)("Try for free","wordpress-seo")})]}),(0,_.jsx)(u.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:g,children:(0,p.__)("Close","wordpress-seo")})]})]})},Xt=({isOpen:e,onClose:t,closeButtonScreenReaderText:s,panelRef:r,title:o,aiModalHelperLink:n,children:i})=>{const a=(0,u.useSvgAria)();return(0,_.jsx)(u.Modal,{className:"yst-ai-modal",isOpen:e,onClose:t,children:(0,_.jsx)(u.Modal.Panel,{ref:r,className:"yst-max-w-3xl yst-relative",closeButtonScreenReaderText:s,children:(0,_.jsxs)(u.Modal.Container,{children:[(0,_.jsxs)(u.Modal.Container.Header,{children:[(0,_.jsxs)("div",{className:"yst-flex yst-items-center",children:[(0,_.jsx)("span",{className:"yst-logo-icon yst-h-5 yst-w-5"}),(0,_.jsx)(u.Modal.Title,{className:"yst-ms-3 yst-me-1.5",as:"h1",size:"2",children:o}),(0,_.jsx)(u.Link,{id:"ai-modal-learn-more",href:n,variant:"primary",className:"yst-no-underline yst-me-2",target:"_blank",rel:"noopener"
262 +/* translators: Hidden accessibility text. */,"aria-label":(0,p.__)("Learn more about AI (Opens in a new browser tab)","wordpress-seo"),children:(0,_.jsx)(Lt(),{...a,className:"yst-w-4 yst-h-4 yst-text-slate-500 yst-shrink-0"})}),(0,_.jsx)(u.Badge,{variant:"info",children:(0,p.__)("Beta","wordpress-seo")})]}),(0,_.jsx)("hr",{className:"yst-mt-6 yst--mx-6"})]}),i]})})})},Zt=({isOpen:e,onClose:t,closeButtonScreenReaderText:s,children:r})=>(0,_.jsx)(u.Modal,{className:"yst-introduction-modal",isOpen:e,onClose:t,children:(0,_.jsx)(u.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl",closeButtonScreenReaderText:s,children:r})}),Jt={inactive:"inactive",askConsent:"askConsent",upsell:"upsell",generate:"generate"};(({onUseAi:e})=>{const[t,s]=(0,l.useState)(Jt.inactive),{editType:r,previewType:n}=Ct(),i=Et(),a=(()=>{const{editType:e,previewType:t}=Ct();switch(t){case C.i0.social:return e===C.gC.description?(0,p.__)("AI social description generator","wordpress-seo"):(0,p.__)("AI social title generator","wordpress-seo");case C.i0.twitter:return e===C.gC.description?(0,p.__)("AI X description generator","wordpress-seo"):(0,p.__)("AI X title generator","wordpress-seo");default:return e===C.gC.description?(0,p.__)("AI description generator","wordpress-seo"):(0,p.__)("AI title generator","wordpress-seo")}})(),{hasConsent:c,promptContentInitialized:d,currentSubscriptions:h,usageCountStatus:m,usageCount:g,usageCountLimit:y,usageCountEndpoint:f,hasValidPremiumSubscription:x,hasValidWooSubscription:w,focusKeyphrase:b,isPremium:v,isSeoAnalysisActive:k,aiModalHelperLink:j,isWooProductEntity:S,isFreeSparksActive:T,isWooSeoActive:E}=(0,o.useSelect)(e=>{const t=e(C.XA),s=e(C.sH);return{hasConsent:t.selectHasAiGeneratorConsent(),promptContentInitialized:t.selectPromptContentInitialized(),currentSubscriptions:t.selectProductSubscriptions(),usageCountStatus:t.selectUsageCountStatus(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),usageCountEndpoint:t.selectUsageCountEndpoint(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription(),focusKeyphrase:s.getFocusKeyphrase(),isPremium:s.getIsPremium(),isWooSeoActive:s.getIsWooSeoActive(),isSeoAnalysisActive:s.getPreference("isKeywordAnalysisActive",!0),aiModalHelperLink:s.selectLink("https://yoa.st/ai-generator-help-button-modal"),isWooProductEntity:s.getIsWooProductEntity(),isFreeSparksActive:e(C.XA).selectIsFreeSparksActive()}},[]),{fetchUsageCount:R}=(0,o.useDispatch)(C.XA),{closeEditorModal:A}=(0,o.useDispatch)(C.sH),I=(0,p.__)("Close modal","wordpress-seo"),[L,N]=(0,l.useState)(!1),[M,O]=(0,l.useState)(0),F=(0,l.useCallback)(e=>O(e.borderBoxSize[0].blockSize),[O]),D=Rt(F),[q,$]=(0,l.useState)(null),B=(0,l.useCallback)(({currentSubscriptions:e,isSeoAnalysisActive:t})=>{const s=(e=>{const t=(0,o.select)(C.sH),s=[];return((e,t)=>(e.getIsPremium()||e.getIsWooProductEntity())&&!t.premiumSubscription)(t,e)&&s.push("Yoast SEO Premium"),((e,t)=>e.getIsWooProductEntity()&&e.getIsWooSeoActive()&&!t.wooCommerceSubscription)(t,e)&&s.push("Yoast WooCommerce SEO"),s})(e);return s.length>0?{errorCode:402,errorIdentifier:"",invalidSubscriptions:s,errorMessage:""}:t?(()=>{var e,t;const s=(0,o.select)(C.XA);if(s.selectUsageCountStatus()!==P.$H.error)return null;const r=s.selectUsageCountError();return{errorCode:r.errorCode,errorIdentifier:null!==(e=r.errorIdentifier)&&void 0!==e?e:"",invalidSubscriptions:[],errorMessage:null!==(t=r.errorMessage)&&void 0!==t?t:""}})():{errorCode:0,errorIdentifier:"SEO_ANALYSIS_INACTIVE",invalidSubscriptions:[],errorMessage:""}},[]),U=(0,l.useCallback)(()=>{s(Jt.inactive)},[]),H=(0,l.useCallback)(()=>$(null),[]),W=(0,l.useCallback)(()=>{$(null),s(Jt.generate)},[]),z=(0,l.useCallback)(()=>{$(B({currentSubscriptions:h,isSeoAnalysisActive:k})),s(Jt.inactive)},[B,h,k]),K=(0,l.useCallback)(e=>{$(e),s(Jt.inactive)},[]),Y={onClose:U,closeButtonScreenReaderText:I},V=(0,l.useCallback)(()=>!(0===b.replace(kt,"").trim().length),[b]),G=(0,zt.Z)(!1),X=(0,l.useCallback)(()=>{A(),"pre-publish"===i&&G(),setTimeout(()=>(e=>{const t=`focus-keyword-input-${["modal","pre-publish"].includes(e)?"sidebar":e}`;if("metabox"===e){const e=document.getElementById("wpseo-meta-tab-content");e&&e.click()}const s=document.getElementById(t);s&&s.focus()})(i),0)},[A,i,G]),Z=(0,l.useCallback)(()=>S?w&&x:x,[x,w,S]),J=(0,l.useCallback)(async()=>{if(e(),!k)return void z();if(!V())return s(Jt.inactive),void X();const t=Z();if(!t&&v&&E&&S)return void z();if(!t&&v&&!S)return void z();if(!c&&(T||t))return void s(Jt.askConsent);N(!0);const{type:r,payload:o}=await R({endpoint:f,isWooProductEntity:S}),n=429===(null==o?void 0:o.errorCode)&&!(null!=o&&o.errorIdentifier)&&0===(null==o?void 0:o.missingLicenses.length),i=429===(null==o?void 0:o.errorCode)&&"USAGE_LIMIT_REACHED"===(null==o?void 0:o.errorIdentifier)||o.count>=o.limit;N(!1),n?z():403!==(null==o?void 0:o.errorCode)||!T&&!t?r!==Dt||429===(null==o?void 0:o.errorCode)||403===(null==o?void 0:o.errorCode)?r===Dt&&429===(null==o?void 0:o.errorCode)&&t?z():!t&&!T||!t&&i?s(Jt.upsell):(t&&c&&s(Jt.generate),!t&&T&&!i&&c&&s(Jt.generate)):z():s(Jt.askConsent)},[e,v,T,c,k,V,X,z,f,R,E,S,L]),Q=(0,l.useCallback)(async()=>{const{type:e,payload:t}=await R({endpoint:f,isWooProductEntity:S}),r=429===(null==t?void 0:t.errorCode)||t.count>=t.limit,o=Z();!r||o?e!==Dt?s(Jt.generate):z():s(Jt.upsell)},[s,z,f,R,Z,S]),ee=(0,l.useCallback)(()=>{s(c?Jt.generate:Jt.askConsent)},[s,c]),te=(0,l.useMemo)(()=>"google"===n?"title"===r?(0,p.__)("Generate SEO title","wordpress-seo"):(0,p.__)("Generate meta description","wordpress-seo"):"social"===n||"twitter"===n?"title"===r?(0,p.__)("Generate social title","wordpress-seo"):(0,p.__)("Generate social description","wordpress-seo"):void 0,[n,r]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u.Button,{type:"button",variant:"ai-secondary",size:"small",id:`yst-replacevar__use-ai-button__${r}__${i}`,onClick:J,disabled:m===P.$H.loading||!d,isLoading:L&&m===P.$H.loading,children:te}),(0,_.jsxs)(Zt,{...Y,isOpen:[Jt.askConsent,Jt.upsell].includes(t),children:[t===Jt.askConsent&&(0,_.jsx)(Ut,{onStartGenerating:Q}),t===Jt.upsell&&(0,_.jsx)(Gt,{onActivateFreeSparks:ee})]}),(0,_.jsx)(Xt,{...Y,isOpen:t===Jt.generate,aiModalHelperLink:j,panelRef:D,title:a,children:t===Jt.generate&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Pt.UsageCounter,{limit:y,requests:g,isSkeleton:!1,className:"yst-absolute yst-top-[-11px] yst-end-12 sm:yst-end-16",mentionBetaInTooltip:v,mentionResetInTooltip:v}),(0,_.jsx)(Vt,{height:M,onFatalError:K})]})}),q&&(0,_.jsx)(At,{isOpen:!0,errorCode:q.errorCode,errorIdentifier:q.errorIdentifier,invalidSubscriptions:q.invalidSubscriptions,errorMessage:q.errorMessage,showActions:!0,onRetry:W,onClose:H})]})}).propTypes={onUseAi:Ae().func.isRequired};const Qt=({title:e,description:t,status:s,titleForLength:r,showPreviewSkeleton:n,showLengthProgress:i})=>{const a=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorMode(),[]),[c,d]=(0,l.useState)(a),{editType:h}=Ct(),m=Et(),g=Ss({editType:h,title:r,description:t});return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Je.ModeSwitcher,{onChange:d,active:c,id:`yst-ai-google-preview-mode-switcher-${m}`,disabled:s===C.$H.loading}),n?(0,_.jsx)(ss,{}):(0,_.jsx)(ts,{mode:c,title:e,description:t}),(0,_.jsxs)("div",{className:"yst-pt-4",children:[(0,_.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:h===C.gC.title?(0,p.__)("SEO title width","wordpress-seo"):(0,p.__)("Meta description length","wordpress-seo")}),(0,_.jsx)(rs,{className:"yst-mt-2",progress:i?g.actual:0,min:0,max:g.max,score:g.score})]})]})};Qt.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,status:Ae().oneOf(Object.keys(C.$H)).isRequired,titleForLength:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired,showLengthProgress:Ae().bool.isRequired};const es=/mobi/i,ts=({mode:e,title:t,description:s})=>{var r,n;const i=(0,o.useSelect)(e=>e(C.sH).getBaseUrlFromSettings(),[]),a=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorData().slug||"",[]),c=(0,o.useSelect)(e=>e(C.sH).getDateFromSettings(),[]),u=(0,o.useSelect)(e=>e(C.sH).getFocusKeyphrase(),[]),p=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorPreviewImageUrl(),[]),h=(0,o.useSelect)(e=>e(C.sH).getSiteIconUrlFromSettings(),[]),m=(0,o.useSelect)(e=>e(C.sH).getShoppingData(),[]),g=(0,o.useSelect)(e=>e(C.sH).getSnippetEditorWordsToHighlight(),[]),y=(0,o.useSelect)(e=>e(C.sH).getSiteName(),[]),f=(0,o.useSelect)(e=>e(C.sH).getContentLocale(),[]),x=(0,l.useMemo)(()=>i+a,[i,a]),w=(0,l.useMemo)(()=>{var e,t;return es.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)},[null===(r=window)||void 0===r||null===(n=r.navigator)||void 0===n?void 0:n.userAgent]);return(0,_.jsx)("div",{className:`yst-ai-generator-preview-section ${e}${w?" yst-user-agent__mobile":""}`,children:(0,_.jsx)(Je.SnippetPreview,{title:t,description:s,mode:e,url:x,keyword:u,date:c,faviconSrc:h,mobileImageSrc:p,wordsToHighlight:g,siteName:y,locale:f,shoppingData:m,onMouseUp:d.noop})})};ts.propTypes={mode:Ae().oneOf(Object.keys(C.Zv)).isRequired,title:Ae().string.isRequired,description:Ae().string.isRequired};const ss=()=>(0,_.jsxs)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto",children:[(0,_.jsxs)("div",{className:"yst-flex yst-gap-x-3",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"})]})]}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})]}),rs=({className:e="",progress:t,max:s,score:r})=>{const o=(0,l.useMemo)(()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(r),[r]);return(0,_.jsx)(u.ProgressBar,{className:k()("yst-length-progress-bar",o,e),progress:t,min:0,max:s})};rs.propTypes={className:Ae().string,progress:Ae().number.isRequired,max:Ae().number.isRequired,score:Ae().number.isRequired};const os=({title:e,description:t,showPreviewSkeleton:s})=>(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,_.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,p.__)("Social preview","wordpress-seo")})}),s?(0,_.jsx)(as,{}):(0,_.jsx)(is,{title:e,description:t})]});os.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired};var ns=s(1426);const is=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(C.sH).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(C.sH).getFacebookImageUrl(),[]),n=(0,o.useSelect)(e=>e(C.sH).getEditorDataImageFallback(),[]),i=(0,o.useSelect)(e=>e(C.sH).getFacebookAltText(),[]);return(0,_.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,_.jsx)(ns.Xi,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n,alt:i,onSelect:d.noop,onImageClick:d.noop,onMouseHover:d.noop})})};is.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired};const as=()=>(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,_.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),ls=({children:e,onRetry:t})=>{const{onClose:s}=(0,u.useModalContext)();return(0,_.jsxs)(l.Fragment,{children:[e,(0,_.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,_.jsx)(u.Button,{variant:"secondary",onClick:s,children:(0,p.__)("Close","wordpress-seo")}),(0,_.jsx)(u.Button,{variant:"primary",onClick:t,children:(0,p.__)("Try again","wordpress-seo")})]})]})};ls.propTypes={children:Ae().node.isRequired,onRetry:Ae().func.isRequired};const cs=({errorCode:e,errorIdentifier:t,invalidSubscriptions:s=[],showActions:r=!1,onRetry:o=d.noop,errorMessage:n=""})=>{switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,_.jsx)(Ie.Ri,{});case"NOT_ENOUGH_CONTENT":return(0,_.jsx)(Ie.Zd,{});case"SITE_UNREACHABLE":return(0,_.jsx)(Pe,{});case"WP_HTTP_REQUEST_ERROR":return r?(0,_.jsx)(ls,{onRetry:o,children:(0,_.jsx)(Ie.W7,{errorMessage:n})}):(0,_.jsx)(Ie.W7,{errorMessage:n});default:return r?(0,_.jsx)(ls,{onRetry:o,children:(0,_.jsx)(Ie.K2,{})}):(0,_.jsx)(Ie.K2,{})}case 402:return(0,_.jsx)(Ie.AA,{invalidSubscriptions:s});case 408:return r?(0,_.jsx)(ls,{onRetry:o,children:(0,_.jsx)(Ie.Am,{})}):(0,_.jsx)(Ie.Am,{});case 429:return"USAGE_LIMIT_REACHED"===t?(0,_.jsx)(Ie.AA,{invalidSubscriptions:s}):(0,_.jsx)(Ie.IT,{});case 410:return(0,_.jsx)(Ie.fQ,{});default:return r?(0,_.jsx)(ls,{onRetry:o,children:(0,_.jsx)(Ie.K2,{})}):(0,_.jsx)(Ie.K2,{})}};cs.propTypes={errorCode:Ae().number.isRequired,errorIdentifier:Ae().string.isRequired,invalidSubscriptions:Ae().array,showActions:Ae().bool,onRetry:Ae().func,errorMessage:Ae().string};const ds=Ae().shape({value:Ae().string.isRequired,label:Ae().node.isRequired}),us=({id:e,name:t,suggestion:s,isChecked:r,onChange:o})=>{const n=(0,l.useCallback)(()=>o(s.value),[s,o]);return(0,_.jsxs)("label",{htmlFor:e,className:k()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",r&&"yst-z-10 yst-border-primary-500"),children:[(0,_.jsx)("input",{type:"radio",id:e,name:t,className:"yst-radio__input",value:s.value,checked:r,onChange:n}),(0,_.jsx)("div",{className:k()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!r&&"yst-text-slate-600"),children:s.label})]})};us.propTypes={id:Ae().string.isRequired,name:Ae().string.isRequired,suggestion:ds.isRequired,isChecked:Ae().bool.isRequired,onChange:Ae().func.isRequired};const ps=({idSuffix:e,suggestions:t,selected:s,onChange:r})=>(0,_.jsx)("div",{children:(0,_.jsx)(u.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${e}`,children:t.map((t,o)=>(0,_.jsx)(us,{id:`yst-ai-suggestions-radio-${e}__${o}`,name:`ai-suggestion__${e}`,isChecked:t.value===s,onChange:r,suggestion:t},`yst-ai-suggestions-radio-${e}__${o}`))})});ps.propTypes={idSuffix:Ae().string.isRequired,suggestions:Ae().arrayOf(ds).isRequired,selected:Ae().string.isRequired,onChange:Ae().func.isRequired};const hs=[["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-8/12"]],ms=({suggestionClassNames:e=hs})=>(0,_.jsx)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]",children:e.map((e,t)=>(0,_.jsxs)("div",{className:"yst-flex yst-p-4 yst-gap-x-3 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",children:[(0,_.jsx)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,_.jsx)("div",{className:"yst-flex yst-flex-col yst-w-full",children:e.map((e,s)=>(0,_.jsx)(u.SkeletonLoader,{className:e},`yst-ai-suggestion-radio-skeleton-${t}__${s}`))})]},`yst-ai-suggestion-radio-skeleton__${t}`))});ms.propTypes={suggestionClassNames:Ae().arrayOf(Ae().arrayOf(Ae().string))};const gs="ai_generator_tip_notification",ys=()=>{const e=(0,o.useSelect)(e=>e(C.sH).isAlertDismissed(gs),[]),t=(0,o.useSelect)(e=>e(C.sH).getEditorDataContent(),[]),s=(0,o.useSelect)(e=>e(C.sH).getIsWooProductEntity(),[]),[r,,,n]=(0,u.useToggleState)(!1),{editType:i,contentType:a}=Ct(),{dismissAlert:c}=(0,o.useDispatch)(C.sH),d=(0,l.useCallback)(()=>{c(gs)},[c]),h=(0,l.useMemo)(()=>i===C.gC.description?(0,p.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,p.__)("%1$sTip%2$s: Improve the accuracy of your generated AI titles by writing more content in your page.","wordpress-seo")
263 +/* translators: %1$s and %2$s expand to opening and closing of a span in order to emphasise the word. */,[i]),m=(0,l.useMemo)(()=>((e,t)=>e||t===C.Ty.term?C.C$:C.W1)(s,a),[a,s]),g=(0,l.useMemo)(()=>(e=>gt.languageProcessing.sanitizeString(e||"").length)(t),[t]);return e||r||g>m?null:(0,_.jsxs)(u.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,p.__)("Dismiss","wordpress-seo"),children:[(0,w.x)((0,p.sprintf)(h,"<span>","</span>"),{span:(0,_.jsx)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,_.jsxs)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1",children:[(0,_.jsx)(u.Button,{type:"button",variant:"tertiary",onClick:d,children:(0,p.__)("Don’t show again","wordpress-seo")}),(0,_.jsx)(u.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:n,children:(0,p.__)("Dismiss","wordpress-seo")})]})]})},fs=({title:e,description:t,showPreviewSkeleton:s})=>(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,_.jsx)(u.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,p.__)("X preview","wordpress-seo")})}),s?(0,_.jsx)(ws,{}):(0,_.jsx)(xs,{title:e,description:t})]});fs.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired,showPreviewSkeleton:Ae().bool.isRequired};const xs=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(C.sH).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(C.sH).getTwitterImageUrl(),[]),n=(0,o.useSelect)(e=>e(C.sH).getFacebookImageUrl(),[]),i=(0,o.useSelect)(e=>e(C.sH).getEditorDataImageFallback(),[]),a=(0,o.useSelect)(e=>e(C.sH).getTwitterImageType(),[]),l=(0,o.useSelect)(e=>e(C.sH).getTwitterAltText(),[]);return(0,_.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,_.jsx)(ns.WG,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n||i,isLarge:"summary"!==a,alt:l,onSelect:d.noop,onImageClick:d.noop,onMouseHover:d.noop})})};xs.propTypes={title:Ae().string.isRequired,description:Ae().string.isRequired};const ws=()=>(0,_.jsxs)("div",{className:"yst-flex yst-flex-col yst-max-h-[370px] yst-w-[507px] yst-border yst-rounded-t-[14px] yst-overflow-hidden yst-mx-auto",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,_.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,_.jsx)(u.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]});Ae().number.isRequired,Ae().string,Ae().string,Ae().object.isRequired,Ae().bool;const bs=()=>{const{previewType:e}=Ct();switch(e){case C.i0.social:return os;case C.i0.twitter:return fs;default:return Qt}},vs=()=>{const{editType:e}=Ct();switch(e){case C.gC.title:return(()=>{const{previewType:e}=Ct(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,o.useDispatch)(C.sH);return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return e=>t({title:e});case C.i0.social:return s;case C.i0.twitter:return r;default:return d.noop}},[e,t,s,r])})();case C.gC.description:return(()=>{const{previewType:e}=Ct(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,o.useDispatch)(C.sH);return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return e=>t({description:e});case C.i0.social:return s;case C.i0.twitter:return r;default:return d.noop}},[e,t,s,r])})();default:return d.noop}},ks=(0,Nt.createSlice)({name:"suggestions",initialState:{status:C.$H.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=C.$H.loading},setSuccess:(e,{payload:t})=>{e.status=C.$H.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=C.$H.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),_s=e=>{switch(e){case C.i0.social:return"Facebook";case C.i0.twitter:return"Twitter";default:return"Google"}},js=()=>{const[e,t]=(0,l.useReducer)(ks.reducer,ks.getInitialState()),{editType:s,previewType:r,postType:n,contentType:i}=Ct(),a=(0,o.useSelect)(e=>e(C.XA).selectPromptContent(),[]),c=(0,o.useSelect)(e=>e(C.XA).selectGetSuggestionsEndpoint(),[]),{contentLocale:u,focusKeyphrase:p,isWooCommerceActive:h,isGutenberg:m,isElementor:g}=(0,o.useSelect)(e=>({contentLocale:e(C.sH).getContentLocale(),focusKeyphrase:e(C.sH).getFocusKeyphrase(),isWooCommerceActive:e(C.sH).getIsWooCommerceActive(),isGutenberg:e(C.sH).getIsBlockEditor(),isElementor:e(C.sH).getIsElementorEditor()}),[]);let y,f=gt.languageProcessing.helpers.processExactMatchRequest(p).keyphrase;f.length>191&&(f=f.slice(0,191)),y=g?"elementor":m?"gutenberg":"classic";const x=((e,t,s,r)=>{const o=e===C.gC.description?"meta-description":"seo-title";let n=((e,t)=>{if(e)switch(t){case C.M$.product:return"product-";case C.M$.productCategory:case C.M$.productTag:return"product-taxonomy-"}return""})(t,s);return n&&t||r!==C.Ty.term||(n="taxonomy-"),`${n}${o}`})(s,h,n,i);return{suggestions:e,fetchSuggestions:(0,l.useCallback)(async(e=!0)=>{t(ks.actions.setLoading());const{status:s,payload:o}=await(async({endpoint:e,data:t})=>{let s;const r=1e3*(0,d.get)(window,"wpseoAiGenerator.requestTimeout",30);try{wt&&wt.abort(),wt=new AbortController,bt=!1,s=setTimeout(()=>{bt=!0,wt.abort()},r);const o=await xt()({path:e,method:"POST",data:t,parse:!1,signal:wt.signal}),n=await o.json();return{status:C.Sf.success,payload:n}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return bt?{status:C.Sf.error,payload:{message:"timeout",code:408}}:{status:C.Sf.abort};const{message:t,missingLicenses:s,errorIdentifier:r}=await(async e=>{try{const t=e.body.getReader(),{value:s}=await t.read(),r=new TextDecoder("utf-8").decode(s);return console.error(r),JSON.parse(r)}catch(e){return{message:"Unknown"}}})(e);return{status:C.Sf.error,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}})({endpoint:c,canAbort:e,data:{type:x,prompt_content:a,focus_keyphrase:f,platform:_s(r),language:A(u).replace("_","-"),editor:y}});switch(s){case C.Sf.abort:break;case C.Sf.error:t(ks.actions.setError(o));break;case C.Sf.success:t(ks.actions.setSuccess(o))}return s},[t]),setSelectedSuggestion:(0,l.useCallback)(e=>t(ks.actions.setSelected(e)),[t])}},Ss=({editType:e,title:t,description:s})=>{const r=(0,o.useSelect)(e=>e(C.sH).getDateFromSettings(),[]),n=(0,o.useSelect)(e=>e(C.sH).getContentLocale(),[]),i=(0,o.useSelect)(e=>e(C.sH).isCornerstoneContent(),[]),a=(0,o.useSelect)(e=>e(C.sH).getIsTerm(),[]);return(0,l.useMemo)(()=>e===C.gC.description?(0,Je.getDescriptionProgress)(s,r,i,a,n):(0,Je.getTitleProgress)(t),[e,t,s,r,i,a,n])},Cs=()=>{const{editType:e,previewType:t,contentType:s}=Ct(),r=(()=>{const{previewType:e}=Ct();return(0,l.useMemo)(()=>{switch(e){case C.i0.google:return()=>(0,o.select)(C.sH).getSnippetEditorData().title;case C.i0.social:return(0,o.select)(C.sH).getFacebookTitleOrFallback;case C.i0.twitter:return(0,o.select)(C.sH).getTwitterTitleOrFallback;default:return(0,d.constant)("")}},[e])})(),n=(0,o.useSelect)(s=>s(C.XA).selectAppliedSuggestionFor({editType:e,previewType:t}),[e,t]);return(0,l.useMemo)(()=>{let t=r();return e===C.gC.description?t:(n&&(t=t.replace(n,C.Zc[s])),((e,t)=>e.includes(C.Zc[t])?e:C.Zc[t])(t,s))},[e,r])},Ts=e=>{const{isWooProductEntity:t,isProductPost:s,hasValidWooSubscription:r}=(0,o.useSelect)(e=>{const t=e(C.sH),s=e(C.XA);return{isWooProductEntity:t.getIsWooProductEntity(),isProductPost:t.getIsProduct(),hasValidWooSubscription:s.selectWooCommerceSubscription()}},[]);return(0,l.useMemo)(()=>{const o={upsellLink:e.premium,upsellLabel:(0,p.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
264 +(0,p.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",title:(0,p.__)("Use AI to generate your titles & descriptions!","wordpress-seo")};return t&&(s&&(o.title=(0,p.__)("Generate product titles & descriptions with AI!","wordpress-seo")),r||(o.newToText="Yoast WooCommerce SEO",o.upsellLabel=(0,p.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
265 +(0,p.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO"),o.upsellLink=e.woo,o.ctbId="5b32250e-e6f0-44ae-ad74-3cefc8e427f9")),o},[t,s,e.premium,e.woo])};var Es=s(4080),Rs=s(5074),As=s.n(Rs);const Is=({onConfirm:e,isOpen:t,onClose:s})=>{const r=(0,u.useSvgAria)();return(0,_.jsx)(u.Modal,{isOpen:t,onClose:s,className:"yst-flex yst-items-center yst-justify-center",children:(0,_.jsxs)(u.Modal.Panel,{closeButtonScreenReaderText:(0,p.__)("Close replace content confirmation","wordpress-seo"),children:[(0,_.jsxs)("div",{className:"yst-flex yst-items-start",children:[(0,_.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,_.jsx)(As(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...r})}),(0,_.jsxs)("div",{className:"yst-ms-4 yst-text-start",children:[(0,_.jsx)(u.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900 yst-mb-3",children:(0,p.__)("Replace existing content with this outline?","wordpress-seo")}),(0,_.jsx)(u.Modal.Description,{className:"yst-text-sm yst-text-slate-500",children:(0,p.__)("This will replace everything in your post with the generated outline and content notes. You can revert this action by clicking the 'undo' button in the Gutenberg editor.","wordpress-seo")})]})]}),(0,_.jsxs)("div",{className:"yst-flex yst-flex-row yst-justify-end yst-gap-3 yst-mt-6",children:[(0,_.jsx)(u.Button,{type:"button",variant:"secondary",onClick:s,children:(0,p.__)("Cancel","wordpress-seo")}),(0,_.jsx)(u.Button,{type:"button",variant:"error",onClick:e,children:(0,p.__)("Replace content","wordpress-seo")})]})]})})},Ls=(0,h.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t,selectSuggestionsStatus:s,selectContentOutlineStatus:r}=e(S.bw),o=e("core/editor").getEditedPostContent(),{getIsPremium:n,selectLink:i}=e("yoast-seo/editor"),{selectUsageCount:a,selectUsageCountLimit:l,selectUsageCountStatus:c}=e(C.XA);return{isEmptyPost:0===(0,m.count)(o,"words",{}),isPremium:n(),status:t(),modalHelpLink:i("https://yoa.st/ai-content-planner-help-button-modal"),usageCount:a(),usageCountLimit:l(),contentSuggestionsStatus:s(),contentOutlineStatus:r(),usageCountStatus:c()}}),(0,o.withDispatch)(e=>{const{closeModal:t}=e(S.bw);return{onClose:t}})])(({onClose:e,isEmptyPost:t,isPremium:s,status:r,modalHelpLink:o,usageCount:n,usageCountLimit:i,contentSuggestionsStatus:a,contentOutlineStatus:c,usageCountStatus:d,openReplaceContentModal:h,setHasVisitedReplace:m,editedOutlineRef:g,handleApplyOutline:y,isReplaceModalOpen:f=!1,onCloseReplace:x})=>{const w=L(),b=r===S.Qo.consent,v=(0,u.useSvgAria)(),k=(0,l.useRef)(null),j=r===S.Qo.contentSuggestions,C=a===P.$H.error,T=r===S.Qo.contentOutline,E=c===P.$H.error,[R,A]=(0,l.useState)(0),N=(0,l.useCallback)(e=>A(e.borderBoxSize[0].blockSize),[A]),M=Rt(N),{bottom:O}=I(R),F=(0,l.useCallback)(e=>{w(e)},[w]),D=(0,l.useCallback)(e=>{g.current=e,t?y():(m(!0),h())},[t,y,h,m]);return(0,_.jsx)(u.Modal,{isOpen:!b&&(j||T),onClose:e,children:(0,_.jsxs)(u.Modal.Panel,{ref:M,className:"yst-p-0 yst-max-w-2xl yst-overflow-visible",hasCloseButton:!1,children:[(0,_.jsx)(u.Modal.CloseButton,{ref:k,screenReaderText:j?(0,p.__)("Close content suggestions modal","wordpress-seo"):(0,p.__)("Close content outline modal","wordpress-seo")}),(0,_.jsxs)(u.Modal.Container,{children:[(0,_.jsxs)(u.Modal.Container.Header,{className:"yst-flex yst-items-center yst-gap-2 yst-pe-14 yst-py-6 yst-ps-6 yst-border-b yst-border-slate-200",children:[(0,_.jsx)(Es.h,{className:"yst-fill-primary-500 yst-w-4 yst-mb-[1px]",...v}),(0,_.jsx)(u.Modal.Title,{size:"2",children:j?(0,p.__)("Content suggestions","wordpress-seo"):(0,p.__)("Content outline","wordpress-seo")}),(0,_.jsx)(u.Link,{href:o,variant:"primary",className:"yst-no-underline",target:"_blank",rel:"noopener noreferrer","aria-label":(0,p.__)("Learn more about AI (Opens in a new browser tab)","wordpress-seo"),children:(0,_.jsx)(Lt(),{...v,className:"yst-w-4 yst-h-4 yst-text-slate-500 yst-shrink-0"})}),(0,_.jsx)("span",{className:"yst-flex-grow"}),(0,_.jsx)(u.Badge,{size:"small",children:(0,p.__)("Beta","wordpress-seo")}),(j&&!C||T&&!E)&&(0,_.jsx)(Pt.UsageCounter,{className:"yst-relative yst-flex yst-items-center",limit:i,requests:n,mentionBetaInTooltip:s,mentionResetInTooltip:s,isSkeleton:a===P.$H.loading||d===P.$H.loading})]}),j&&(0,_.jsx)(Ge,{onSuggestionClick:F,closeButtonRef:k}),T&&(0,_.jsx)(ct,{onApplyOutline:D,closeButtonRef:k})]}),(0,_.jsx)(u.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:O},position:"bottom-left",children:a===P.$H.success&&!E&&(0,_.jsx)(mt,{})}),(0,_.jsx)(Is,{isOpen:f,onConfirm:y,onClose:x})]})})}),Ps=({hasConsent:e})=>{const t=(0,o.useSelect)(e=>e(S.bw).selectFeatureModalStatus(),[]),{setFeatureModalStatus:s,closeModal:r}=(0,o.useDispatch)(S.bw),[n,i]=(0,l.useState)(!1),[a,c,,d]=(0,u.useToggleState)(!1),h=(0,l.useRef)(null),m=(({editedOutlineRef:e})=>{const{editPost:t}=(0,o.useDispatch)("core/editor"),{closeModal:s,setBannerDismissed:r}=(0,o.useDispatch)(S.bw);return(0,l.useCallback)(()=>{var n;const i=e.current,a=(0,o.select)(S.bw).selectContentOutline(),l=(0,o.select)(S.bw).selectSuggestion(),c=i?{title:i.title,metaDescription:i.metaDescription,focusKeyphrase:i.focusKeyphrase,category:i.category}:{title:l.title,metaDescription:l.meta_description,focusKeyphrase:l.keyphrase,category:l.category},d=i?i.structure:a,u={title:c.title,blocks:E(d),meta:{_yoast_wpseo_title:c.title,_yoast_wpseo_metadesc:c.metaDescription,_yoast_wpseo_focuskw:c.focusKeyphrase}};null!==(n=c.category)&&void 0!==n&&n.id&&-1!==c.category.id&&(u.categories=[c.category.id]),t(u),r(),s()},[t,s,r])})({editedOutlineRef:h}),g=N(),y=t===S.Qo.consent,f=(0,l.useCallback)(()=>{e?g():s(S.Qo.consent)},[e,s,g]);(0,l.useEffect)(()=>{t||i(!1)},[t]);const x=a&&n;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(T,{onClick:f}),(0,_.jsx)(Ls,{editedOutlineRef:h,handleApplyOutline:m,openReplaceContentModal:d,setHasVisitedReplace:i,isReplaceModalOpen:x,onCloseReplace:c}),(0,_.jsx)(u.Modal,{isOpen:y,onClose:r,className:"yst-introduction-modal",children:(0,_.jsx)(u.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl",closeButtonScreenReaderText:(0,p.__)("Close modal","wordpress-seo"),children:(0,_.jsx)(b.ve,{storeName:C.XA,linkStoreName:C.sH,onConsentGranted:g})})})]})},Ns=window.wp.blockEditor;var Ms=s(6883),Os=s.n(Ms),Fs=s(2127),Ds=s.n(Fs);const qs=({contentNotes:e})=>{const t=(0,u.useSvgAria)();return(0,_.jsxs)("div",{className:"yst-bg-slate-50 yst-font-sans yst-rounded-sm yst-shadow-sm yst-border yst-border-solid yst-border-slate-200 yst-p-4",children:[(0,_.jsxs)("div",{className:"yst-text-slate-500 yst-text-xs yst-flex yst-items-center yst-mb-4",children:[(0,_.jsx)(Os(),{className:"yst-inline-block yst-w-3 yst-h-3 yst-me-1 yst-shrink-0",...t}),(0,_.jsx)("span",{className:"yst-text-xs yst-leading-3",children:(0,p.__)("Only visible to you","wordpress-seo")})]}),(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{className:"yst-flex yst-justify-start yst-items-center yst-gap-2 yst-mb-1 yst-ps-4",children:[(0,_.jsx)("div",{className:"yst-flex yst-items-center yst-justify-center yst-w-4 yst-h-4 yst-bg-ai-500 yst-rounded-[1.5px]",children:(0,_.jsx)(Ds(),{className:"yst-w-3 yst-h-3 yst-shrink-0 yst-text-white yst-flex yst-items-center yst-justify-center",...t})}),(0,_.jsx)("h3",{className:"yst-text-slate-800 yst-text-sm yst-leading-5 yst-font-medium yst-m-0",children:(0,p.__)("Content notes","wordpress-seo")})]}),e.length>0&&(0,_.jsx)("ul",{className:"yst-text-sm yst-text-slate-600 yst-font-normal yst-my-0 yst-ps-5 yst-leading-5 yst-list-none",children:e.map((e,t)=>(0,_.jsxs)("li",{className:"yst-flex yst-justify-start yst-gap-2",children:[(0,_.jsx)("span",{"aria-hidden":"true",children:"•"}),e]},`${t}-${e}`))})]})]})};(0,r.getBlockType)("yoast-seo/content-suggestion")||(0,r.registerBlockType)("yoast-seo/content-suggestion",{apiVersion:3,title:(0,p.__)("Content Suggestion","wordpress-seo"),category:"text",supports:{inserter:!1},transforms:{to:[{type:"block",blocks:["core/list"],transform:({suggestions:e})=>(0,r.createBlock)("core/list",{},e.map(e=>(0,r.createBlock)("core/list-item",{content:e})))}]},attributes:{title:{type:"string",default:""},suggestions:{type:"array",items:{type:"string"},default:[]}},edit:({attributes:e})=>{const t=(0,l.useRef)(null),s=(0,Ns.useBlockProps)({ref:t});return(0,l.useEffect)(()=>{var e,s;const r=null!==(e=null===(s=t.current)||void 0===s?void 0:s.ownerDocument)&&void 0!==e?e:document;if(r===window.document||r.getElementById("yoast-seo-tailwind-css"))return;const o=window.document.getElementById("yoast-seo-tailwind-css");if(!o)return;const n=r.createElement("link");n.id="yoast-seo-tailwind-css",n.rel="stylesheet",n.href=o.href,r.head.appendChild(n)},[]),(0,_.jsx)("div",{...s,children:(0,_.jsx)(qs,{contentNotes:e.suggestions})})},save:()=>null});var $s=s(3313),Bs=s(3832);const Us={aborted:!0};async function Hs({path:e,method:t="GET",data:s,abortController:r}){const o=r||new AbortController;let n=!1;const i=1e3*(0,d.get)(window,"wpseoContentPlanner.requestTimeout",30),a=setTimeout(()=>{n=!0,o.abort()},i);try{const r=await xt()(function(e,t,s,r){const o={path:e,method:t,parse:!1,signal:r.signal};return s&&(o.data=s),o}(e,t,s,o));return await r.json()}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw function(e){if(e)throw{errorCode:408,errorIdentifier:"",errorMessage:"timeout"}}(n),Us;throw await async function(e){const t=await async function(e){try{return await e.json()}catch(e){return{}}}(e);return{errorCode:e.status||502,errorIdentifier:t.errorIdentifier||t.code||"",errorMessage:t.message||"",missingLicenses:t.missingLicenses||[]}}(e)}finally{clearTimeout(a)}}const Ws=e=>{var t,s;let r=(0,d.isObject)(e)?e:{};(0,d.isString)(e)&&(r={message:e});const o={...r,errorMessage:(null===(t=r)||void 0===t?void 0:t.errorMessage)||(null===(s=r)||void 0===s?void 0:s.message)};return(0,d.mapValues)({errorCode:502,errorIdentifier:"",errorMessage:"",missingLicenses:[]},(e,t)=>o[t]||e)},zs="contentSuggestions",Ks="fetchContentPlannerSuggestions",Ys=(0,Nt.createSlice)({name:zs,initialState:{endpoint:"",status:P.$H.idle,suggestions:[],recentContent:[],error:S.pb},reducers:{setContentSuggestionsStatus:(e,{payload:t})=>{e.status=t},setSuggestion:(e,{payload:t})=>{const s=e.suggestions.findIndex(e=>e.id===t.id);-1!==s&&(e.suggestions[s]=t)},setSuggestionsError:(e,{payload:t})=>{e.status=P.$H.error,e.suggestions=[],e.error=Ws(t)}},extraReducers:e=>{e.addCase(`${Ks}/${P.fJ.request}`,e=>{e.status=P.$H.loading,e.suggestions=[],e.recentContent=[],e.error=S.pb}),e.addCase(`${Ks}/${P.fJ.success}`,(e,{payload:t})=>{e.status=P.$H.success,e.suggestions=t.suggestions,e.recentContent=t.recentContent,e.error=S.pb}),e.addCase(`${Ks}/${P.fJ.error}`,(e,{payload:t})=>{e.status=P.$H.error,e.error=Ws(t)})}}),Vs=Ys.getInitialState,Gs={selectContentSuggestionsEndpoint:e=>(0,d.get)(e,[zs,"endpoint"],Ys.getInitialState().endpoint),selectSuggestionsStatus:e=>(0,d.get)(e,[zs,"status"],Ys.getInitialState().status),selectSuggestions:e=>(0,d.get)(e,[zs,"suggestions"],Ys.getInitialState().suggestions),selectRecentContent:e=>(0,d.get)(e,[zs,"recentContent"],Ys.getInitialState().recentContent),selectSuggestionsError:e=>(0,d.get)(e,[zs,"error"],Ys.getInitialState().error)},Xs={...Ys.actions,fetchContentPlannerSuggestions:function*({endpoint:e,postType:t,language:s,editor:r}){yield{type:`${Ks}/${P.fJ.request}`};try{const o=(e=>{const t=(0,d.get)(e,"suggestions",null);if(!(0,d.isArray)(t))throw new Error("Invalid suggestions response: expected an array of suggestions.");return{suggestions:t.map(e=>({title:e.title,intent:e.intent,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category,explanation:e.explanation,id:`suggestion-${e.keyphrase}-${e.title}`})),recentContent:(0,d.get)(e,"recent_content",[])}})(yield{type:Ks,payload:{endpoint:e,postType:t,language:s,editor:r}});return{type:`${Ks}/${P.fJ.success}`,payload:o}}catch(e){if(null!=e&&e.aborted)return;return{type:`${Ks}/${P.fJ.error}`,payload:e}}}},Zs={[Ks]:async({payload:e})=>Hs({path:(0,Bs.addQueryArgs)(e.endpoint,{post_type:e.postType,language:e.language,editor:e.editor})})},Js=Ys.reducer,Qs="contentOutline",er="fetchContentOutline",tr={suggestion:null,outline:[],cache:{},endpoint:"",status:P.$H.idle,error:S.pb},sr=(0,Nt.createSlice)({name:Qs,initialState:tr,reducers:{setSuggestionForOutline:(e,{payload:t})=>{e.suggestion=t},restoreContentOutlineFromCache:(e,{payload:t})=>{const{suggestion:s,outline:r}=t;e.suggestion=s,e.outline=r,e.status=P.$H.success,e.error=S.pb},saveOutlineEditsToCache:(e,{payload:t})=>{const{id:s,structure:r}=t;s&&(e.cache[s]=r),e.suggestion=null,e.outline=[],e.status=P.$H.idle,e.error=S.pb}},extraReducers:e=>{e.addCase(`${er}/${P.fJ.request}`,(e,{payload:t})=>{e.status=P.$H.loading,e.suggestion=t.suggestion,e.error=S.pb}),e.addCase(`${er}/${P.fJ.success}`,(e,{payload:t})=>{e.status=P.$H.success;const s=t.outline.map((e,t)=>{var s,r;const o=null!==(s=e.subheading_text)&&void 0!==s?s:"";return{id:`${t}-${o}`,heading:o,contentNotes:null!==(r=e.content_notes)&&void 0!==r?r:[]}});e.outline=s}),e.addCase(`${er}/${P.fJ.error}`,(e,{payload:t})=>{e.status=P.$H.error,e.error=Ws(t)}),e.addCase(`${Ks}/${P.fJ.request}`,e=>({...tr,endpoint:e.endpoint}))}}),rr=sr.getInitialState,or={selectContentOutlineEndpoint:e=>(0,d.get)(e,[Qs,"endpoint"],sr.getInitialState().endpoint),selectContentOutlineStatus:e=>(0,d.get)(e,[Qs,"status"],sr.getInitialState().status),selectContentOutline:e=>(0,d.get)(e,[Qs,"outline"],sr.getInitialState().outline),selectContentOutlineError:e=>(0,d.get)(e,[Qs,"error"],sr.getInitialState().error),selectSuggestion:e=>(0,d.get)(e,[Qs,"suggestion"],sr.getInitialState().suggestion),selectContentOutlineCache:(e,t)=>(0,d.get)(e,[Qs,"cache",t],null)},nr={...sr.actions,fetchContentOutline:function*({endpoint:e,postType:t,language:s,editor:r,suggestion:o,recentContent:n}){yield{type:`${er}/${P.fJ.request}`,payload:{suggestion:o}};try{const i=yield{type:er,payload:{endpoint:e,postType:t,language:s,editor:r,recentContent:n,...o}};yield{type:`${er}/${P.fJ.success}`,payload:i}}catch(e){if(null!=e&&e.aborted)return;yield{type:`${er}/${P.fJ.error}`,payload:e}}}},ir={[er]:async({payload:e})=>Hs({method:"POST",path:e.endpoint,data:{post_type:e.postType,language:e.language,editor:e.editor,title:e.title,intent:e.intent,explanation:e.explanation,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category,recent_content:e.recentContent}})},ar=sr.reducer,lr="modal",cr=(0,Nt.createSlice)({name:lr,initialState:{isOpen:!1,featureModalStatus:null},reducers:{closeModal:()=>cr.getInitialState(),setFeatureModalStatus:(e,{payload:t})=>{e.featureModalStatus=t}},extraReducers:e=>{e.addCase(`${er}/${P.fJ.request}`,e=>{e.featureModalStatus=S.Qo.contentOutline}),e.addCase(`${Ks}/${P.fJ.request}`,e=>{e.featureModalStatus=S.Qo.contentSuggestions})}}),dr=cr.getInitialState,ur=cr.reducer,pr={...cr.actions},hr={selectFeatureModalStatus:e=>(0,d.get)(e,[lr,"featureModalStatus"],cr.getInitialState().featureModalStatus)},mr="availability",gr=(0,Nt.createSlice)({name:mr,initialState:{minPostsMet:!1},reducers:{}}),yr=gr.getInitialState,fr=gr.reducer,xr={...gr.actions},wr={selectIsMinPostsMet:e=>(0,d.get)(e,[mr,"minPostsMet"],gr.getInitialState().minPostsMet)},br="banner",vr="dismissBannerPermanently",kr=(0,Nt.createSlice)({name:br,initialState:{isBannerDismissed:!1,isBannerRendered:!1,isBannerPermanentlyDismissed:!1,bannerPermanentDismissalEndpoint:""},reducers:{setBannerRendered:e=>{e.isBannerRendered=!0},setBannerDismissed:e=>{e.isBannerDismissed=!0},setBannerPermanentlyDismissed:e=>{e.isBannerPermanentlyDismissed=!0}}}),_r=kr.getInitialState,jr=kr.reducer,Sr={[vr]:({endpoint:e})=>xt()({path:e,method:"POST",data:{is_dismissed:!0}}).catch(d.noop)},Cr={setBannerRendered:()=>((0,$s.mY)(),kr.actions.setBannerRendered()),setBannerDismissed:()=>((0,$s.al)(),kr.actions.setBannerDismissed()),setBannerPermanentlyDismissed:()=>kr.actions.setBannerPermanentlyDismissed(),dismissBannerPermanently:function*(e){e&&(yield kr.actions.setBannerPermanentlyDismissed(),yield{type:vr,endpoint:e})}},Tr={selectIsBannerDismissed:e=>(0,d.get)(e,[br,"isBannerDismissed"],kr.getInitialState().isBannerDismissed),selectIsBannerRendered:e=>(0,d.get)(e,[br,"isBannerRendered"],kr.getInitialState().isBannerRendered),selectIsBannerPermanentlyDismissed:e=>(0,d.get)(e,[br,"isBannerPermanentlyDismissed"],kr.getInitialState().isBannerPermanentlyDismissed),selectBannerPermanentDismissalEndpoint:e=>(0,d.get)(e,[br,"bannerPermanentDismissalEndpoint"],kr.getInitialState().bannerPermanentDismissalEndpoint)};var Er=s(3560),Rr=s.n(Er),Ar=s(998),Ir=s.n(Ar);const Lr=({isPremium:e,onDismiss:t,onDismissPermanently:s,onClick:r,learnMoreLink:o})=>{const n=(0,u.useSvgAria)();return(0,_.jsx)(u.Root,{children:(0,_.jsxs)("div",{role:"group","aria-label":(0,p.__)("Content suggestions banner","wordpress-seo"),className:"yst-z-50 yst-relative yst-p-4 yst-ai-gradient-border yst-rounded-lg",children:[(0,_.jsxs)(u.DropdownMenu,{as:"span",className:"yst-absolute yst-top-4 yst-end-4",children:[(0,_.jsx)(u.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:(0,p.__)("Open banner options","wordpress-seo"),className:"yst-float-end"}),(0,_.jsxs)(u.DropdownMenu.List,{className:"yst-mt-8 yst-w-56",children:[(0,_.jsxs)(u.DropdownMenu.ButtonItem,{className:"yst-text-slate-600 yst-border-b yst-border-slate-200 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:t,children:[(0,_.jsx)(Ir(),{className:"yst-w-4 yst-text-slate-400 yst-shrink-0",...n}),(0,p.__)("Remove for this post","wordpress-seo")]}),(0,_.jsxs)(u.DropdownMenu.ButtonItem,{className:"yst-text-red-500 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:s,children:[(0,_.jsx)(Rr(),{className:"yst-w-4 yst-shrink-0",...n}),(0,p.__)("Remove for all posts","wordpress-seo")]})]})]}),(0,_.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2 yst-mb-1 yst-pe-8",children:[(0,_.jsx)(u.GradientSparklesIcon,{className:"yst-h-4 yst-w-4",...n}),(0,_.jsxs)("p",{className:"yst-grow yst-text-slate-800 yst-font-medium",children:[" ",(0,p.__)("Stuck on what to write next?","wordpress-seo")]})]}),(0,_.jsx)("p",{className:"yst-text-sm yst-text-slate-600 yst-mb-1 yst-max-w-xl",children:(0,p.__)("Let Yoast AI Content Planner analyze your content and suggest high-impact topics that fill content gaps and strengthen your SEO strategy.","wordpress-seo")}),(0,_.jsxs)(u.Link,{as:b.rd,href:o,variant:"primary",className:"yst-font-medium yst-no-underline",children:[(0,p.__)("Learn more","wordpress-seo"),(0,_.jsx)(y(),{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]}),(0,_.jsxs)("div",{className:"yst-mt-1 yst-flex yst-justify-end yst-gap-2 yst-items-center",children:[!e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(j,{}),(0,_.jsx)("span",{"aria-hidden":"true",children:"·"})]}),(0,_.jsx)(u.Button,{variant:"ai-primary",onClick:r,children:(0,p.__)("Get content suggestions","wordpress-seo")})]})]})})},Pr=window.wp.dom;const Nr=({BlockListBlock:e,props:t,hasConsent:s})=>{const{isNewPost:r,isBannerDismissed:n,isBannerRendered:i,isBannerPermanentlyDismissed:a,bannerPermanentDismissalEndpoint:c,isPremium:d,minPostsMet:u,learnMoreLink:p}=(0,o.useSelect)(e=>{const t=e(S.bw);return{isNewPost:e("core/editor").isEditedPostNew(),isBannerDismissed:t.selectIsBannerDismissed(),isBannerRendered:t.selectIsBannerRendered(),isBannerPermanentlyDismissed:t.selectIsBannerPermanentlyDismissed(),bannerPermanentDismissalEndpoint:t.selectBannerPermanentDismissalEndpoint(),isPremium:e(C.sH).getIsPremium(),minPostsMet:e(S.bw).selectIsMinPostsMet(),learnMoreLink:e(C.sH).selectLink("https://yoa.st/content-planner-learn-more")}},[]),{setFeatureModalStatus:h,setBannerDismissed:m,setBannerRendered:g,dismissBannerPermanently:y}=(0,o.useDispatch)(S.bw),f=N(),x=(0,l.useRef)(null),w=!a&&!n&&(r||i)&&u,b=(0,l.useCallback)(()=>{m()},[m]),v=(0,l.useCallback)(()=>{y(c)},[y,c]),k=(0,l.useCallback)(()=>{s?f():h(S.Qo.consent)},[s,f,h]);return(0,l.useEffect)(()=>{w&&!i&&g()},[w,i,g]),(0,l.useEffect)(()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t||t===window.document||t.getElementById(S.x_))return;const s=window.document.getElementById(S.x_);if(!s)return;const r=t.createElement("link");r.id=S.x_,r.rel="stylesheet",r.href=s.href,t.head.appendChild(r)},[w]),(0,l.useEffect)(()=>{var e;if(!w)return;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t)return;function s(e){!function(e,t){!t.defaultPrevented&&e&&(["ArrowDown","ArrowUp"].includes(t.key)?function(e,t){const s=e.querySelector("[role='menu']");s&&(s===t.target||s.contains(t.target))&&t.preventDefault()}(e,t):"Tab"===t.key&&function(e,t){const s=(e=>e.shiftKey?Pr.focus.tabbable.findPrevious:Pr.focus.tabbable.findNext)(t),r=s(t.target);r&&((e,t,s)=>e.contains(t)||e.contains(s))(e,t.target,r)&&(t.preventDefault(),r.focus())}(e,t))}(x.current,e)}const r=e=>{(function(e,t){const s=null==e?void 0:e.querySelector(".yst-dropdown-menu__icon-trigger[aria-expanded='true']"),r=s&&e.querySelector("[role='menu']");return Boolean(r)&&!s.contains(t.target)&&!r.contains(t.target)})(x.current,e)&&x.current.querySelector(".yst-dropdown-menu__icon-trigger").click()};return t.addEventListener("keydown",s,{capture:!0}),t.addEventListener("mousedown",r,{capture:!0}),()=>{t.removeEventListener("keydown",s,{capture:!0}),t.removeEventListener("mousedown",r,{capture:!0})}},[w]),(0,_.jsxs)(_.Fragment,{children:[w&&(0,_.jsx)("div",{ref:x,className:"wp-block","data-block":"yoast-content-planner-banner",children:(0,_.jsx)(Lr,{isPremium:d,onDismiss:b,onDismissPermanently:v,onClick:k,learnMoreLink:p})}),(0,_.jsx)(e,{...t})]})},Mr=(0,h.createHigherOrderComponent)(e=>function(t){const{isFirstBlock:s,isEditingTemplate:r}=(0,o.useSelect)(e=>{const s=e("core/editor"),r=s.getCurrentPostType();return{isFirstBlock:e("core/block-editor").getBlockOrder()[0]===t.clientId,isEditingTemplate:"wp_template"===r||"wp_template_part"===r||"template-locked"===s.getRenderingMode()}},[t.clientId]),n=(0,o.useSelect)(e=>(0,d.isObject)(e(C.XA)),[]),i=(0,o.useSelect)(e=>{var t,s;return null!==(t=null===(s=e(C.XA))||void 0===s?void 0:s.selectHasAiGeneratorConsent())&&void 0!==t&&t}),a=(0,l.useCallback)(()=>(0,_.jsx)(e,{...t}),[e,t]);return s&&n&&!r?(0,_.jsx)(u.ErrorBoundary,{FallbackComponent:a,children:(0,_.jsx)(Nr,{BlockListBlock:e,props:t,hasConsent:i})}):(0,_.jsx)(e,{...t})},"withYoastContentPlannerBanner"),Or=()=>{const e=(0,l.useRef)(!1),{isNewPost:t,postType:s,blocks:n,minPostsMet:i,isBannerRendered:a,hasBlockTemplate:c}=(0,o.useSelect)(e=>{const t=e("core/editor"),s=t.getCurrentPostType(),r=e("core").getPostType(s);return{isNewPost:t.isEditedPostNew(),postType:s,blocks:e("core/block-editor").getBlocks(),minPostsMet:e(S.bw).selectIsMinPostsMet(),isBannerRendered:e(S.bw).selectIsBannerRendered(),hasBlockTemplate:Array.isArray(null==r?void 0:r.template)&&r.template.length>0}},[]),p=(0,o.useSelect)(e=>(0,d.isObject)(e(C.XA)),[]),h=(0,o.useSelect)(e=>{var t,s;return null!==(t=null===(s=e(C.XA))||void 0===s?void 0:s.selectHasAiGeneratorConsent())&&void 0!==t&&t}),{insertBlock:m}=(0,o.useDispatch)("core/block-editor");return function(){const{yoastTitle:e,yoastMetaDesc:t,yoastFocusKw:s,isPost:r,titleTemplate:n,descTemplate:i}=(0,o.useSelect)(e=>{const t=e("core/editor"),s=t.getEditedPostAttribute("meta"),{title:r,description:o}=e("yoast-seo/editor").getSnippetEditorTemplates();return{yoastTitle:null==s?void 0:s._yoast_wpseo_title,yoastMetaDesc:null==s?void 0:s._yoast_wpseo_metadesc,yoastFocusKw:null==s?void 0:s._yoast_wpseo_focuskw,isPost:"post"===t.getCurrentPostType(),titleTemplate:r,descTemplate:o}},[]),{updateData:a,setFocusKeyword:c}=(0,o.useDispatch)("yoast-seo/editor");(0,l.useEffect)(()=>{if(!r)return;const o={title:n,description:i};e&&(o.title=e),t&&(o.description=t),a(o),c(s||"")},[r,e,t,s,n,i])}(),(0,l.useEffect)(()=>{!e.current&&t&&"post"===s&&i&&!c&&(e.current=function(e,t,s){return!!s||(0===e.length?(t((0,r.createBlock)("core/paragraph"),0,void 0,!1),!1):-1!==e.findIndex(e=>"core/paragraph"===e.name))}(n,m,a))},[n,t,s,m,i,c]),p?(0,_.jsx)(u.ErrorBoundary,{FallbackComponent:d.noop,children:(0,_.jsx)(Ps,{hasConsent:h})}):null};function Fr(){a()(()=>{((e={})=>{(0,o.register)((e=>(0,o.createReduxStore)(S.bw,{actions:{...Xs,...nr,...pr,...xr,...Cr},selectors:{...Gs,...or,...hr,...wr,...Tr},controls:{...Zs,...ir,...Sr},initialState:(0,d.merge)({},{[zs]:Vs(),[Qs]:rr(),[lr]:dr(),[mr]:yr(),[br]:_r()},e),reducer:(0,o.combineReducers)({[zs]:Js,[Qs]:ar,[lr]:ur,[mr]:fr,[br]:jr})}))(e))})({[zs]:{endpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.getSuggestions","")},[Qs]:{endpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.getOutline","")},[mr]:{minPostsMet:(0,d.get)(window,"wpseoContentPlanner.minPostsMet",!1)},[br]:{isBannerDismissed:(0,$s.qj)(),isBannerRendered:(0,$s.au)(),isBannerPermanentlyDismissed:(0,d.get)(window,"wpseoContentPlanner.isBannerPermanentlyDismissed",!1),bannerPermanentDismissalEndpoint:(0,d.get)(window,"wpseoContentPlanner.endpoints.bannerPermanentDismissal","")}}),(0,n.addFilter)("editor.BlockListBlock","yoast/content-planner-banner",Mr)}),(0,c.registerPlugin)("yoast-content-planner",{render:Or})}},9e3(e,t,s){"use strict";s.d(t,{A:()=>w});var r=s(7723),o=s(2379),n=s(8468),i=s(1802),a=s.n(i),l=s(1609),c=s.n(l),d=s(1679),u=s.n(d),p=s(1969),h=s(7558),m=s(790);const g=(e,t=!0)=>e?`\n\t\t\tmax-width: ${o.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${t?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${o.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,y=u().div`
266 266 position: relative;
267 267 box-sizing: content-box;
268 268 overflow: hidden;
269 269 background-color: #e1e8ed;
@@ -292,9 +292,9 @@
292 292 background-color: #f1f1f1;
293 293 text-decoration: underline;
294 294 font-size: 14px;
295 295 cursor: pointer;
296 -`;class w extends c().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await(0,p.cP)(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,m.jsx)(x,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,r.__)("Select image","wordpress-seo")}):(0,m.jsx)(y,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,m.jsx)(h.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:o.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}w.propTypes={isLarge:a().bool.isRequired,src:a().string,alt:a().string,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},w.defaultProps={src:"",alt:"",onMouseEnter:n.noop,onImageClick:n.noop,onMouseLeave:n.noop}},9183(e,t,s){"use strict";s.d(t,{t$:()=>n,us:()=>o});var r=s(3335);function o(e,t,s="",o=!1){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",name:e,value:"string"==typeof t?(0,r.decodeHTML)(t):t,label:s,hidden:o}}function n(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}},9425(e,t,s){"use strict";s.d(t,{z:()=>c});var r=s(8468),o=s(1802),n=s.n(o),i=s(8572),a=s(4658),l=s(790);const c=({isOpen:e=!0,showActions:t=!1,onRetry:s=r.noop,onClose:o=r.noop})=>(0,l.jsxs)(a.ZF,{isOpen:e,title:i.D,onClose:o,children:[(0,l.jsx)(a.mw,{children:(0,l.jsx)(i.n,{})}),(0,l.jsx)(a.Kw,{showActions:t,onRetry:s,onClose:o})]});c.propTypes={isOpen:n().bool,showActions:n().bool,onRetry:n().func,onClose:n().func}},9432(e,t,s){"use strict";s.d(t,{W:()=>l});var r=s(5831),o=s(1802),n=s.n(o),i=s(4788),a=s(790);const l=({errorMessage:e=""})=>(0,a.jsxs)(r.Alert,{variant:"error",children:[(0,a.jsx)("span",{className:"yst-block yst-font-medium",children:i.D}),(0,a.jsx)(i.n,{errorMessage:e})]});l.propTypes={errorMessage:n().string}},9483(e,t,s){"use strict";s.d(t,{B:()=>l});var r=s(6087),o=s(7723),n=s(5831),i=s(2441),a=s(790);const l=()=>{const e=(0,r.useCallback)(()=>{window.location.reload()},[]),{onClose:t}=(0,n.useModalContext)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Alert,{variant:"error",children:[(0,a.jsx)("span",{className:"yst-block yst-font-medium",children:i.D}),(0,a.jsx)(i.n,{})]}),(0,a.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,a.jsx)(n.Button,{variant:"secondary",onClick:t,children:(0,o.__)("Close","wordpress-seo")}),(0,a.jsx)(n.Button,{className:"yst-revoke-button",variant:"primary",onClick:e,children:(0,o.__)("Refresh page","wordpress-seo")})]})]})}},9491(e){"use strict";e.exports=window.wp.compose},9496(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(5831),o=s(8210),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},9498(e,t,s){"use strict";var r=s(6554),o=s(1609),n=s.n(o),i=s(1802),a=s.n(i),l=s(2379),c=s(7415),d=s(1709),u=s(2547),p=s(790);class h extends o.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?c.A:d.A,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:o,socialMediumName:i,imageWarnings:a,siteUrl:c,description:d,descriptionInputPlaceholder:u,descriptionPreviewFallback:h,imageUrl:m,imageFallbackUrl:g,alt:y,title:f,titleInputPlaceholder:x,titlePreviewFallback:w,replacementVariables:b,recommendedReplacementVariables:v,applyReplacementVariables:_,onReplacementVariableSearchChange:k,isPremium:j,isLarge:S,socialPreviewLabel:C,idSuffix:T,activeMetaTabId:R}=this.props,E=_({title:f||w,description:d||h});return(0,p.jsxs)(n().Fragment,{children:[C&&(0,p.jsx)(r.SimulatedLabel,{children:C}),(0,p.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:c,title:E.title,description:E.description,imageUrl:m,imageFallbackUrl:g,alt:y,isLarge:S,activeMetaTabId:R}),(0,p.jsx)(l.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:i,title:f,titleInputPlaceholder:x,onRemoveImageClick:o,imageSelected:!!m,imageUrl:m,imageFallbackUrl:g,onTitleChange:t,onSelectImageClick:s,description:d,descriptionInputPlaceholder:u,imageWarnings:a,replacementVariables:b,recommendedReplacementVariables:v,onReplacementVariableSearchChange:k,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:j,setEditorRef:this.setEditorRef,idSuffix:T})]})}}h.propTypes={title:a().string.isRequired,onTitleChange:a().func.isRequired,description:a().string.isRequired,onDescriptionChange:a().func.isRequired,imageUrl:a().string.isRequired,imageFallbackUrl:a().string.isRequired,onSelectImageClick:a().func.isRequired,onRemoveImageClick:a().func.isRequired,socialMediumName:a().string.isRequired,alt:a().string,isPremium:a().bool,imageWarnings:a().array,isLarge:a().bool,siteUrl:a().string,descriptionInputPlaceholder:a().string,titleInputPlaceholder:a().string,descriptionPreviewFallback:a().string,titlePreviewFallback:a().string,replacementVariables:u.replacementVariablesShape,recommendedReplacementVariables:u.recommendedReplacementVariablesShape,applyReplacementVariables:a().func,onReplacementVariableSearchChange:a().func,socialPreviewLabel:a().string,idSuffix:a().string,activeMetaTabId:a().string},h.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""}},9672(e,t,s){"use strict";s.d(t,{AA:()=>a.A,Am:()=>l.A,B:()=>n.B,IT:()=>i.I,K2:()=>r.K,O7:()=>y.O,Ri:()=>c.R,T5:()=>m.T,Vq:()=>w.V,W7:()=>d.W,Y$:()=>g.Y,Zd:()=>o.Z,fQ:()=>u.f,kr:()=>x.k,qt:()=>b.q,vA:()=>f.v,vL:()=>v.v,xk:()=>h.x,zW:()=>p.z});var r=s(4578),o=s(5221),n=s(9483),i=s(817),a=s(5704),l=s(9496),c=s(5636),d=s(9432),u=s(4739),p=s(9425),h=s(2255),m=s(3199),g=s(6638),y=s(227),f=s(6898),x=s(708),w=s(7715),b=s(16),v=s(4730)}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,s),n.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";var e=s(4997),t=s(7143),r=s(3832);const o=window.wp.editor;var n=s(6087),i=s(7723),a=s(2279);const l=window.wp.richText;var c=s(5986);const d=window.yoast.externals.redux;var u=s(8468);function p(){return(0,u.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}var h=s(1802),m=s.n(h),g=s(1679),y=s.n(g),f=s(790);const x=y().svg`
296 +`;class w extends c().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await(0,p.cP)(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,m.jsx)(x,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,r.__)("Select image","wordpress-seo")}):(0,m.jsx)(y,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,m.jsx)(h.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:o.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}w.propTypes={isLarge:a().bool.isRequired,src:a().string,alt:a().string,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},w.defaultProps={src:"",alt:"",onMouseEnter:n.noop,onImageClick:n.noop,onMouseLeave:n.noop}},9183(e,t,s){"use strict";s.d(t,{t$:()=>n,us:()=>o});var r=s(3335);function o(e,t,s="",o=!1){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",name:e,value:"string"==typeof t?(0,r.decodeHTML)(t):t,label:s,hidden:o}}function n(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}},9425(e,t,s){"use strict";s.d(t,{z:()=>c});var r=s(8468),o=s(1802),n=s.n(o),i=s(8572),a=s(4658),l=s(790);const c=({isOpen:e=!0,showActions:t=!1,onRetry:s=r.noop,onClose:o=r.noop})=>(0,l.jsxs)(a.ZF,{isOpen:e,title:i.D,onClose:o,children:[(0,l.jsx)(a.mw,{children:(0,l.jsx)(i.n,{})}),(0,l.jsx)(a.Kw,{showActions:t,onRetry:s,onClose:o})]});c.propTypes={isOpen:n().bool,showActions:n().bool,onRetry:n().func,onClose:n().func}},9432(e,t,s){"use strict";s.d(t,{W:()=>l});var r=s(5831),o=s(1802),n=s.n(o),i=s(4788),a=s(790);const l=({errorMessage:e=""})=>(0,a.jsxs)(r.Alert,{variant:"error",children:[(0,a.jsx)("span",{className:"yst-block yst-font-medium",children:i.D}),(0,a.jsx)(i.n,{errorMessage:e})]});l.propTypes={errorMessage:n().string}},9483(e,t,s){"use strict";s.d(t,{B:()=>l});var r=s(6087),o=s(7723),n=s(5831),i=s(2441),a=s(790);const l=()=>{const e=(0,r.useCallback)(()=>{window.location.reload()},[]),{onClose:t}=(0,n.useModalContext)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Alert,{variant:"error",children:[(0,a.jsx)("span",{className:"yst-block yst-font-medium",children:i.D}),(0,a.jsx)(i.n,{})]}),(0,a.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,a.jsx)(n.Button,{variant:"secondary",onClick:t,children:(0,o.__)("Close","wordpress-seo")}),(0,a.jsx)(n.Button,{className:"yst-revoke-button",variant:"primary",onClick:e,children:(0,o.__)("Refresh page","wordpress-seo")})]})]})}},9491(e){"use strict";e.exports=window.wp.compose},9496(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(5831),o=s(8210),n=s(790);const i=()=>(0,n.jsxs)(r.Alert,{variant:"error",children:[(0,n.jsx)("span",{className:"yst-block yst-font-medium",children:o.D}),(0,n.jsx)(o.n,{})]})},9498(e,t,s){"use strict";var r=s(6554),o=s(1609),n=s.n(o),i=s(1802),a=s.n(i),l=s(2379),c=s(7415),d=s(1709),u=s(2547),p=s(790);class h extends o.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?c.A:d.A,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:o,socialMediumName:i,imageWarnings:a,siteUrl:c,description:d,descriptionInputPlaceholder:u,descriptionPreviewFallback:h,imageUrl:m,imageFallbackUrl:g,alt:y,title:f,titleInputPlaceholder:x,titlePreviewFallback:w,replacementVariables:b,recommendedReplacementVariables:v,applyReplacementVariables:k,onReplacementVariableSearchChange:_,isPremium:j,isLarge:S,socialPreviewLabel:C,idSuffix:T,activeMetaTabId:E}=this.props,R=k({title:f||w,description:d||h});return(0,p.jsxs)(n().Fragment,{children:[C&&(0,p.jsx)(r.SimulatedLabel,{children:C}),(0,p.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:c,title:R.title,description:R.description,imageUrl:m,imageFallbackUrl:g,alt:y,isLarge:S,activeMetaTabId:E}),(0,p.jsx)(l.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:i,title:f,titleInputPlaceholder:x,onRemoveImageClick:o,imageSelected:!!m,imageUrl:m,imageFallbackUrl:g,onTitleChange:t,onSelectImageClick:s,description:d,descriptionInputPlaceholder:u,imageWarnings:a,replacementVariables:b,recommendedReplacementVariables:v,onReplacementVariableSearchChange:_,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:j,setEditorRef:this.setEditorRef,idSuffix:T})]})}}h.propTypes={title:a().string.isRequired,onTitleChange:a().func.isRequired,description:a().string.isRequired,onDescriptionChange:a().func.isRequired,imageUrl:a().string.isRequired,imageFallbackUrl:a().string.isRequired,onSelectImageClick:a().func.isRequired,onRemoveImageClick:a().func.isRequired,socialMediumName:a().string.isRequired,alt:a().string,isPremium:a().bool,imageWarnings:a().array,isLarge:a().bool,siteUrl:a().string,descriptionInputPlaceholder:a().string,titleInputPlaceholder:a().string,descriptionPreviewFallback:a().string,titlePreviewFallback:a().string,replacementVariables:u.replacementVariablesShape,recommendedReplacementVariables:u.recommendedReplacementVariablesShape,applyReplacementVariables:a().func,onReplacementVariableSearchChange:a().func,socialPreviewLabel:a().string,idSuffix:a().string,activeMetaTabId:a().string},h.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""}},9672(e,t,s){"use strict";s.d(t,{AA:()=>a.A,Am:()=>l.A,B:()=>n.B,IT:()=>i.I,K2:()=>r.K,O7:()=>y.O,Ri:()=>c.R,T5:()=>m.T,Vq:()=>w.V,W7:()=>d.W,Y$:()=>g.Y,Zd:()=>o.Z,fQ:()=>u.f,kr:()=>x.k,qt:()=>b.q,vA:()=>f.v,vL:()=>v.v,xk:()=>h.x,zW:()=>p.z});var r=s(4578),o=s(5221),n=s(9483),i=s(817),a=s(5704),l=s(9496),c=s(5636),d=s(9432),u=s(4739),p=s(9425),h=s(2255),m=s(3199),g=s(6638),y=s(227),f=s(6898),x=s(708),w=s(7715),b=s(16),v=s(4730)}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,s),n.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";var e=s(4997),t=s(7143),r=s(3832);const o=window.wp.editor;var n=s(6087),i=s(7723),a=s(2279);const l=window.wp.richText;var c=s(5986);const d=window.yoast.externals.redux;var u=s(8468);function p(){return(0,u.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}var h=s(1802),m=s.n(h),g=s(1679),y=s.n(g),f=s(790);const x=y().svg`
297 297 width: ${e=>e.size}px;
298 298 height: ${e=>e.size}px;
299 299
300 300 &&& path {
@@ -309,9 +309,9 @@
309 309 &&& circle.yoast-icon-seo-score {
310 310 fill: ${e=>e.seoScoreColor};
311 311 display: ${e=>e.isKeywordAnalysisActive?"inline":"none"};
312 312 }
313 -`,w=({readabilityScoreColor:e="#000000",isContentAnalysisActive:t=!1,seoScoreColor:s="#000000",isKeywordAnalysisActive:r=!1,size:o=20,color:n="#000001",...i})=>(0,f.jsxs)(x,{readabilityScoreColor:e,isContentAnalysisActive:t,seoScoreColor:s,isKeywordAnalysisActive:r,size:o,color:n,...i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 646.66 456.27",children:[(0,f.jsx)("path",{d:"M73,405.26a68.53,68.53,0,0,1-12.82-4c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92q-2.64-2-5.08-4.19a68.26,68.26,0,0,1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24q-1.84-2.73-3.44-5.64a68.26,68.26,0,0,1-8.29-32.55V142.13a68.29,68.29,0,0,1,8.29-32.55,58.6,58.6,0,0,1,3.44-5.64,57.53,57.53,0,0,1,4-5.27A69.64,69.64,0,0,1,48.56,85.42,56.06,56.06,0,0,1,54.2,82,67.78,67.78,0,0,1,73,75.09,69.79,69.79,0,0,1,86.75,73.7H256.41L263,55.39H86.75A86.84,86.84,0,0,0,0,142.13V338.22A86.83,86.83,0,0,0,86.75,425H98.07V406.65H86.75A68.31,68.31,0,0,1,73,405.26ZM368.55,60.85l-1.41-.53L360.73,77.5l1.41.53a68.58,68.58,0,0,1,8.66,4,58.65,58.65,0,0,1,5.65,3.43A69.49,69.49,0,0,1,391,98.67c1.4,1.68,2.72,3.46,3.95,5.27s2.39,3.72,3.44,5.64a68.32,68.32,0,0,1,8.29,32.55V406.65H233.55l-.44.76c-3.07,5.37-6.26,10.48-9.49,15.19L222,425H425V142.13A87.19,87.19,0,0,0,368.55,60.85Z",fill:"#000001"}),(0,f.jsx)("path",{d:"M303.66,0l-96.8,268.87-47.58-149H101.1l72.72,186.78a73.61,73.61,0,0,1,0,53.73c-7.07,18.07-19.63,39.63-54.36,46l-1.56.29v49.57l2-.08c29-1.14,51.57-10.72,70.89-30.14,19.69-19.79,36.55-50.52,53-96.68L366.68,0Z",fill:"#000001"}),(0,f.jsx)("circle",{className:"yoast-icon-readability-score",cx:"561.26",cy:"142.43",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"}),(0,f.jsx)("circle",{className:"yoast-icon-seo-score",cx:"561.26",cy:"341.96",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"})]});w.propTypes={readabilityScoreColor:m().string,isContentAnalysisActive:m().bool,seoScoreColor:m().string,isKeywordAnalysisActive:m().bool,size:m().number,color:m().string};const b=w,v=window.wp.components;var _=s(5831);function k(e){return void 0===e.length?e:(0,u.flatten)(e).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority)}var j=s(3657),S=s(6554),C=s(8495),T=s(6752);function R(e){switch(e){case"loading":return{icon:"loading-spinner",color:C.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:C.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:C.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:C.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:C.colors.$color_ok};default:return{icon:"seo-score-bad",color:C.colors.$color_red}}}function E({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,n.createPortal)(t,s):null}E.propTypes={target:m().oneOfType([m().string,m().object]).isRequired,children:m().node.isRequired};const A=({target:e,scoreIndicator:t})=>(0,f.jsx)(E,{target:e,children:(0,f.jsx)(S.SvgIcon,{...R(t)})});A.propTypes={target:m().string.isRequired,scoreIndicator:m().string.isRequired};const I=A,L=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/metabox-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,n.useEffect)(()=>{document.querySelectorAll('[id^="wpseo-meta-tab-"]').forEach(e=>{!function(e){const t=document.querySelector(`#${e}`);null!==t&&(t.style.opacity="0.5",t.style.pointerEvents="none",t.setAttribute("aria-disabled","true"),t.classList.contains("yoast-active-tab")&&t.classList.remove("yoast-active-tab"))}(e.id)})},[]),(0,f.jsx)(_.Root,{context:{isRtl:o},children:(0,f.jsxs)(j.xP,{error:e,children:[(0,f.jsx)(j.xP.HorizontalButtons,{supportLink:r,handleRefreshClick:s}),(0,f.jsx)(I,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};L.propTypes={error:m().object.isRequired};const N=({theme:e,location:t,children:s})=>(0,f.jsx)(c.LocationProvider,{value:t,children:(0,f.jsx)(g.ThemeProvider,{theme:e,children:s})});N.propTypes={theme:m().object.isRequired,location:m().oneOf(["sidebar","metabox","modal"]).isRequired,children:m().node.isRequired};const P=N;function M({theme:e}){return(0,f.jsx)(P,{theme:e,location:"metabox",children:(0,f.jsx)(_.ErrorBoundary,{FallbackComponent:L,children:(0,f.jsx)(v.Slot,{name:"YoastMetabox",children:e=>k(e)})})})}var O=s(9491),F=s(5547),D=s.n(F),q=s(1609);const $=(e=null)=>(0,q.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]);var B=s(2485),U=s.n(B);const H=({className:e="",...t})=>(0,f.jsx)("span",{className:U()("yst-grow yst-overflow-hidden yst-overflow-ellipsis yst-whitespace-nowrap yst-font-wp","yst-text-[#555] yst-text-base yst-leading-[normal] yst-subpixel-antialiased yst-text-start",e),...t});H.displayName="MetaboxButton.Text",H.propTypes={className:m().string};const W=({className:e="",...t})=>(0,f.jsx)("button",{type:"button",className:U()("yst-flex yst-items-center yst-w-full yst-pt-4 yst-pb-4 yst-pe-4 yst-ps-6 yst-space-x-2 rtl:yst-space-x-reverse","yst-border-t yst-border-t-[rgb(0,0,0,0.2)] yst-rounded-none yst-transition-all hover:yst-bg-[#f0f0f0]","focus:yst-outline focus:yst-outline-[1px] focus:yst-outline-[color:#0066cd] focus:-yst-outline-offset-1 focus:yst-shadow-[0_0_3px_rgba(8,74,103,0.8)]",e),...t});W.propTypes={className:m().string},W.Text=H;var z=s(3335);const K=y().div`
313 +`,w=({readabilityScoreColor:e="#000000",isContentAnalysisActive:t=!1,seoScoreColor:s="#000000",isKeywordAnalysisActive:r=!1,size:o=20,color:n="#000001",...i})=>(0,f.jsxs)(x,{readabilityScoreColor:e,isContentAnalysisActive:t,seoScoreColor:s,isKeywordAnalysisActive:r,size:o,color:n,...i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 646.66 456.27",children:[(0,f.jsx)("path",{d:"M73,405.26a68.53,68.53,0,0,1-12.82-4c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92q-2.64-2-5.08-4.19a68.26,68.26,0,0,1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24q-1.84-2.73-3.44-5.64a68.26,68.26,0,0,1-8.29-32.55V142.13a68.29,68.29,0,0,1,8.29-32.55,58.6,58.6,0,0,1,3.44-5.64,57.53,57.53,0,0,1,4-5.27A69.64,69.64,0,0,1,48.56,85.42,56.06,56.06,0,0,1,54.2,82,67.78,67.78,0,0,1,73,75.09,69.79,69.79,0,0,1,86.75,73.7H256.41L263,55.39H86.75A86.84,86.84,0,0,0,0,142.13V338.22A86.83,86.83,0,0,0,86.75,425H98.07V406.65H86.75A68.31,68.31,0,0,1,73,405.26ZM368.55,60.85l-1.41-.53L360.73,77.5l1.41.53a68.58,68.58,0,0,1,8.66,4,58.65,58.65,0,0,1,5.65,3.43A69.49,69.49,0,0,1,391,98.67c1.4,1.68,2.72,3.46,3.95,5.27s2.39,3.72,3.44,5.64a68.32,68.32,0,0,1,8.29,32.55V406.65H233.55l-.44.76c-3.07,5.37-6.26,10.48-9.49,15.19L222,425H425V142.13A87.19,87.19,0,0,0,368.55,60.85Z",fill:"#000001"}),(0,f.jsx)("path",{d:"M303.66,0l-96.8,268.87-47.58-149H101.1l72.72,186.78a73.61,73.61,0,0,1,0,53.73c-7.07,18.07-19.63,39.63-54.36,46l-1.56.29v49.57l2-.08c29-1.14,51.57-10.72,70.89-30.14,19.69-19.79,36.55-50.52,53-96.68L366.68,0Z",fill:"#000001"}),(0,f.jsx)("circle",{className:"yoast-icon-readability-score",cx:"561.26",cy:"142.43",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"}),(0,f.jsx)("circle",{className:"yoast-icon-seo-score",cx:"561.26",cy:"341.96",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"})]});w.propTypes={readabilityScoreColor:m().string,isContentAnalysisActive:m().bool,seoScoreColor:m().string,isKeywordAnalysisActive:m().bool,size:m().number,color:m().string};const b=w,v=window.wp.components;var k=s(5831);function _(e){return void 0===e.length?e:(0,u.flatten)(e).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority)}var j=s(3657),S=s(6554),C=s(8495),T=s(6752);function E(e){switch(e){case"loading":return{icon:"loading-spinner",color:C.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:C.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:C.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:C.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:C.colors.$color_ok};default:return{icon:"seo-score-bad",color:C.colors.$color_red}}}function R({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,n.createPortal)(t,s):null}R.propTypes={target:m().oneOfType([m().string,m().object]).isRequired,children:m().node.isRequired};const A=({target:e,scoreIndicator:t})=>(0,f.jsx)(R,{target:e,children:(0,f.jsx)(S.SvgIcon,{...E(t)})});A.propTypes={target:m().string.isRequired,scoreIndicator:m().string.isRequired};const I=A,L=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/metabox-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,n.useEffect)(()=>{document.querySelectorAll('[id^="wpseo-meta-tab-"]').forEach(e=>{!function(e){const t=document.querySelector(`#${e}`);null!==t&&(t.style.opacity="0.5",t.style.pointerEvents="none",t.setAttribute("aria-disabled","true"),t.classList.contains("yoast-active-tab")&&t.classList.remove("yoast-active-tab"))}(e.id)})},[]),(0,f.jsx)(k.Root,{context:{isRtl:o},children:(0,f.jsxs)(j.xP,{error:e,children:[(0,f.jsx)(j.xP.HorizontalButtons,{supportLink:r,handleRefreshClick:s}),(0,f.jsx)(I,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};L.propTypes={error:m().object.isRequired};const P=({theme:e,location:t,children:s})=>(0,f.jsx)(c.LocationProvider,{value:t,children:(0,f.jsx)(g.ThemeProvider,{theme:e,children:s})});P.propTypes={theme:m().object.isRequired,location:m().oneOf(["sidebar","metabox","modal"]).isRequired,children:m().node.isRequired};const N=P;function M({theme:e}){return(0,f.jsx)(N,{theme:e,location:"metabox",children:(0,f.jsx)(k.ErrorBoundary,{FallbackComponent:L,children:(0,f.jsx)(v.Slot,{name:"YoastMetabox",children:e=>_(e)})})})}var O=s(9491),F=s(5547),D=s.n(F),q=s(1609);const $=(e=null)=>(0,q.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]);var B=s(2485),U=s.n(B);const H=({className:e="",...t})=>(0,f.jsx)("span",{className:U()("yst-grow yst-overflow-hidden yst-overflow-ellipsis yst-whitespace-nowrap yst-font-wp","yst-text-[#555] yst-text-base yst-leading-[normal] yst-subpixel-antialiased yst-text-start",e),...t});H.displayName="MetaboxButton.Text",H.propTypes={className:m().string};const W=({className:e="",...t})=>(0,f.jsx)("button",{type:"button",className:U()("yst-flex yst-items-center yst-w-full yst-pt-4 yst-pb-4 yst-pe-4 yst-ps-6 yst-space-x-2 rtl:yst-space-x-reverse","yst-border-t yst-border-t-[rgb(0,0,0,0.2)] yst-rounded-none yst-transition-all hover:yst-bg-[#f0f0f0]","focus:yst-outline focus:yst-outline-[1px] focus:yst-outline-[color:#0066cd] focus:-yst-outline-offset-1 focus:yst-shadow-[0_0_3px_rgba(8,74,103,0.8)]",e),...t});W.propTypes={className:m().string},W.Text=H;var z=s(3335);const K=y().div`
314 314 min-width: 600px;
315 315
316 316 @media screen and ( max-width: 680px ) {
317 317 min-width: 0;
@@ -333,9 +333,9 @@
333 333 width: 80px;
334 334 height: 80px;
335 335 }
336 336 }
337 -`,({title:e="Yoast SEO",className:t="yoast yoast-gutenberg-modal",showYoastIcon:s=!0,children:r=null,additionalClassName:o="",...n})=>{const i=s?(0,f.jsx)("span",{className:"yoast-icon"}):null;return(0,f.jsx)(v.Modal,{title:e,className:`${t} ${o}`,icon:i,...n,children:r})});Y.propTypes={title:m().string,className:m().string,showYoastIcon:m().bool,children:m().oneOfType([m().node,m().arrayOf(m().node)]),additionalClassName:m().string};const V=Y;var G=s(4080);const X=({onClick:e,title:t,id:s="",subTitle:r="",suffixIcon:o=null,SuffixHeroIcon:n=null,prefixIcon:i=null,children:a=null})=>(0,f.jsx)("div",{className:"yoast components-panel__body",children:(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{id:s,onClick:e,className:"components-button components-panel__body-toggle",type:"button",children:[i&&(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${i&&i.color||""}`},children:(0,f.jsx)(S.SvgIcon,{size:i.size,icon:i.icon})}),(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:t}),(0,f.jsx)("div",{className:"yoast-subtitle",children:r})]}),a,o&&(0,f.jsx)(S.SvgIcon,{size:o.size,icon:o.icon}),n]})})}),Z=X;X.propTypes={onClick:m().func.isRequired,title:m().string.isRequired,id:m().string,subTitle:m().string,suffixIcon:m().object,SuffixHeroIcon:m().element,prefixIcon:m().object,children:m().node};const J=window.moment;var Q=s.n(J),ee=s(1455),te=s.n(ee);async function se(e,t,s,r=200){try{const o=await e();return!!o&&(o.status===r?t(o):s(o))}catch(e){console.error(e.message)}}async function re(e){try{return await te()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function oe(e){return(0,u.isArray)(e)||(e=[e]),await re({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const ne=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:o=!0})=>e.length!==r.length?(0,f.jsx)("p",{children:(0,i.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,f.jsx)("div",{className:o?"screen-reader-text":null,children:(0,f.jsxs)("table",{children:[(0,f.jsx)("caption",{children:s}),(0,f.jsx)("thead",{children:(0,f.jsx)("tr",{children:r.map((e,t)=>(0,f.jsx)("th",{children:e},t))})}),(0,f.jsx)("tbody",{children:(0,f.jsx)("tr",{children:e.map((e,s)=>(0,f.jsx)("td",{children:t(e.y)},s))})})]})});ne.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const ie=ne,ae=({data:e,width:t,height:s,fillColor:r=null,strokeColor:o="#000000",strokeWidth:i=1,className:a="",mapChartDataToTableData:l=null,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u=!0})=>{const p=Math.max(1,Math.max(...e.map(e=>e.x))),h=Math.max(1,Math.max(...e.map(e=>e.y))),m=s-i,g=e.map(e=>`${e.x/p*t},${m-e.y/h*m+i}`).join(" "),y=`0,${m+i} `+g+` ${t},${m+i}`;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:a,role:"img","aria-hidden":"true",focusable:"false",children:[(0,f.jsx)("polygon",{fill:r,points:y}),(0,f.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:i,strokeLinejoin:"round",strokeLinecap:"round",points:g})]}),l&&(0,f.jsx)(ie,{data:e,mapChartDataToTableData:l,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u})]})};ae.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,width:m().number.isRequired,height:m().number.isRequired,fillColor:m().string,strokeColor:m().string,strokeWidth:m().number,className:m().string,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const le=ae,ce=()=>(0,f.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,i.__)("Tracking the ranking position…","wordpress-seo")," ",(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"})]}),de=y()(S.SvgIcon)`
337 +`,({title:e="Yoast SEO",className:t="yoast yoast-gutenberg-modal",showYoastIcon:s=!0,children:r=null,additionalClassName:o="",...n})=>{const i=s?(0,f.jsx)("span",{className:"yoast-icon"}):null;return(0,f.jsx)(v.Modal,{title:e,className:`${t} ${o}`,icon:i,...n,children:r})});Y.propTypes={title:m().node,className:m().string,showYoastIcon:m().bool,children:m().oneOfType([m().node,m().arrayOf(m().node)]),additionalClassName:m().string};const V=Y;var G=s(4080);const X=({onClick:e,title:t,id:s="",subTitle:r="",suffixIcon:o=null,SuffixHeroIcon:n=null,prefixIcon:i=null,children:a=null})=>(0,f.jsx)("div",{className:"yoast components-panel__body",children:(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{id:s,onClick:e,className:"components-button components-panel__body-toggle",type:"button",children:[i&&(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${i&&i.color||""}`},children:(0,f.jsx)(S.SvgIcon,{size:i.size,icon:i.icon})}),(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:t}),(0,f.jsx)("div",{className:"yoast-subtitle",children:r})]}),a,o&&(0,f.jsx)(S.SvgIcon,{size:o.size,icon:o.icon}),n]})})}),Z=X;X.propTypes={onClick:m().func.isRequired,title:m().string.isRequired,id:m().string,subTitle:m().string,suffixIcon:m().object,SuffixHeroIcon:m().element,prefixIcon:m().object,children:m().node};const J=window.moment;var Q=s.n(J),ee=s(1455),te=s.n(ee);async function se(e,t,s,r=200){try{const o=await e();return!!o&&(o.status===r?t(o):s(o))}catch(e){console.error(e.message)}}async function re(e){try{return await te()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function oe(e){return(0,u.isArray)(e)||(e=[e]),await re({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const ne=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:o=!0})=>e.length!==r.length?(0,f.jsx)("p",{children:(0,i.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,f.jsx)("div",{className:o?"screen-reader-text":null,children:(0,f.jsxs)("table",{children:[(0,f.jsx)("caption",{children:s}),(0,f.jsx)("thead",{children:(0,f.jsx)("tr",{children:r.map((e,t)=>(0,f.jsx)("th",{children:e},t))})}),(0,f.jsx)("tbody",{children:(0,f.jsx)("tr",{children:e.map((e,s)=>(0,f.jsx)("td",{children:t(e.y)},s))})})]})});ne.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const ie=ne,ae=({data:e,width:t,height:s,fillColor:r=null,strokeColor:o="#000000",strokeWidth:i=1,className:a="",mapChartDataToTableData:l=null,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u=!0})=>{const p=Math.max(1,Math.max(...e.map(e=>e.x))),h=Math.max(1,Math.max(...e.map(e=>e.y))),m=s-i,g=e.map(e=>`${e.x/p*t},${m-e.y/h*m+i}`).join(" "),y=`0,${m+i} `+g+` ${t},${m+i}`;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:a,role:"img","aria-hidden":"true",focusable:"false",children:[(0,f.jsx)("polygon",{fill:r,points:y}),(0,f.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:i,strokeLinejoin:"round",strokeLinecap:"round",points:g})]}),l&&(0,f.jsx)(ie,{data:e,mapChartDataToTableData:l,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u})]})};ae.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,width:m().number.isRequired,height:m().number.isRequired,fillColor:m().string,strokeColor:m().string,strokeWidth:m().number,className:m().string,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const le=ae,ce=()=>(0,f.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,i.__)("Tracking the ranking position…","wordpress-seo")," ",(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"})]}),de=y()(S.SvgIcon)`
338 338 margin-left: 2px;
339 339 flex-shrink: 0;
340 340 rotate: ${e=>e.isImproving?"-90deg":"90deg"};
341 341 `,ue=y().span`
@@ -374,9 +374,9 @@
374 374 display: flex;
375 375 align-items: center;
376 376 `,fe=y().tr`
377 377 background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important;
378 -`;function xe(e){return Math.round(100*e)}function we({chartData:e={}}){if((0,u.isEmpty)(e)||(0,u.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,i.sprintf)((0,i._n)("%d day","%d days",e,"wordpress-seo"),e))}(e),s=e.position.history.map((e,t)=>({x:t,y:31-e.value}));return(0,f.jsx)(le,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:xe,dataTableCaption:(0,i.__)("Keyphrase position in the last 90 days on a scale from 0 to 30.","wordpress-seo"),dataTableHeaderLabels:t})}function be({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:r}){return r?(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"}):(0,f.jsx)(S.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function ve(e){return!e||!e.position||e.position.value>30?"> 30":e.position.value}we.propTypes={chartData:m().object};const _e=({rowData:e={}})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,f.jsx)(we,{chartData:e});const s=e.position.change<0;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(we,{chartData:e}),(0,f.jsx)(ue,{isImproving:s,children:Math.abs(e.position.change)}),(0,f.jsx)(de,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s})]})};function ke({rowData:e,websiteId:t,keyphrase:s,onSelectKeyphrases:r}){const o=(0,n.useCallback)(()=>{r([s])},[r,s]),a=!(0,u.isEmpty)(e),l=e&&e.updated_at&&Q()(e.updated_at)>=Q()().subtract(7,"days"),c=e?`https://app.wincher.com/websites/${t}/keywords?serp=${e.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return a?l?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("td",{children:(0,f.jsxs)(ge,{children:[ve(e),(0,f.jsx)(S.ButtonStyledLink,{variant:"secondary",href:c,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,i.__)("View","wordpress-seo")})]})}),(0,f.jsx)("td",{className:"yoast-table--nopadding",children:(0,f.jsx)(ye,{type:"button",onClick:o,children:(0,f.jsx)(_e,{rowData:e})})}),(0,f.jsx)("td",{children:(d=e.updated_at,Q()(d).fromNow())})]}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)(ce,{})}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)("i",{children:(0,i.__)("Activate tracking to show the ranking position","wordpress-seo")})});var d}function je({keyphrase:e,rowData:t={},onTrackKeyphrase:s=u.noop,onUntrackKeyphrase:r=u.noop,isFocusKeyphrase:o=!1,isDisabled:i=!1,isLoading:a=!1,websiteId:l="",isSelected:c,onSelectKeyphrases:d}){var p;const h=!(0,u.isEmpty)(t),m=!(0,u.isEmpty)(null==t||null===(p=t.position)||void 0===p?void 0:p.history),g=(0,n.useCallback)(()=>{i||(h?r(e,t.id):s(e))},[e,s,r,h,t,i]),y=(0,n.useCallback)(()=>{d(t=>c?t.filter(t=>t!==e):t.concat(e))},[d,c,e]);return(0,f.jsxs)(fe,{isEnabled:h,children:[(0,f.jsx)(pe,{children:m&&(0,f.jsx)(S.Checkbox,{id:"select-"+e,onChange:y,checked:c,label:""})}),(0,f.jsxs)(he,{children:[e,o&&(0,f.jsx)("span",{children:"*"})]}),ke({rowData:t,websiteId:l,keyphrase:e,onSelectKeyphrases:d}),(0,f.jsx)(me,{children:be({keyphrase:e,isEnabled:h,toggleAction:g,isLoading:a})})]})}_e.propTypes={rowData:m().object},je.propTypes={rowData:m().object,keyphrase:m().string.isRequired,onTrackKeyphrase:m().func,onUntrackKeyphrase:m().func,isFocusKeyphrase:m().bool,isDisabled:m().bool,isLoading:m().bool,websiteId:m().string,isSelected:m().bool.isRequired,onSelectKeyphrases:m().func.isRequired};const Se=(0,z.makeOutboundLink)(),Ce=y().span`
378 +`;function xe(e){return Math.round(100*e)}function we({chartData:e={}}){if((0,u.isEmpty)(e)||(0,u.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,i.sprintf)((0,i._n)("%d day","%d days",e,"wordpress-seo"),e))}(e),s=e.position.history.map((e,t)=>({x:t,y:31-e.value}));return(0,f.jsx)(le,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:xe,dataTableCaption:(0,i.__)("Keyphrase position in the last 90 days on a scale from 0 to 30.","wordpress-seo"),dataTableHeaderLabels:t})}function be({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:r}){return r?(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"}):(0,f.jsx)(S.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function ve(e){return!e||!e.position||e.position.value>30?"> 30":e.position.value}we.propTypes={chartData:m().object};const ke=({rowData:e={}})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,f.jsx)(we,{chartData:e});const s=e.position.change<0;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(we,{chartData:e}),(0,f.jsx)(ue,{isImproving:s,children:Math.abs(e.position.change)}),(0,f.jsx)(de,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s})]})};function _e({rowData:e,websiteId:t,keyphrase:s,onSelectKeyphrases:r}){const o=(0,n.useCallback)(()=>{r([s])},[r,s]),a=!(0,u.isEmpty)(e),l=e&&e.updated_at&&Q()(e.updated_at)>=Q()().subtract(7,"days"),c=e?`https://app.wincher.com/websites/${t}/keywords?serp=${e.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return a?l?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("td",{children:(0,f.jsxs)(ge,{children:[ve(e),(0,f.jsx)(S.ButtonStyledLink,{variant:"secondary",href:c,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,i.__)("View","wordpress-seo")})]})}),(0,f.jsx)("td",{className:"yoast-table--nopadding",children:(0,f.jsx)(ye,{type:"button",onClick:o,children:(0,f.jsx)(ke,{rowData:e})})}),(0,f.jsx)("td",{children:(d=e.updated_at,Q()(d).fromNow())})]}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)(ce,{})}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)("i",{children:(0,i.__)("Activate tracking to show the ranking position","wordpress-seo")})});var d}function je({keyphrase:e,rowData:t={},onTrackKeyphrase:s=u.noop,onUntrackKeyphrase:r=u.noop,isFocusKeyphrase:o=!1,isDisabled:i=!1,isLoading:a=!1,websiteId:l="",isSelected:c,onSelectKeyphrases:d}){var p;const h=!(0,u.isEmpty)(t),m=!(0,u.isEmpty)(null==t||null===(p=t.position)||void 0===p?void 0:p.history),g=(0,n.useCallback)(()=>{i||(h?r(e,t.id):s(e))},[e,s,r,h,t,i]),y=(0,n.useCallback)(()=>{d(t=>c?t.filter(t=>t!==e):t.concat(e))},[d,c,e]);return(0,f.jsxs)(fe,{isEnabled:h,children:[(0,f.jsx)(pe,{children:m&&(0,f.jsx)(S.Checkbox,{id:"select-"+e,onChange:y,checked:c,label:""})}),(0,f.jsxs)(he,{children:[e,o&&(0,f.jsx)("span",{children:"*"})]}),_e({rowData:t,websiteId:l,keyphrase:e,onSelectKeyphrases:d}),(0,f.jsx)(me,{children:be({keyphrase:e,isEnabled:h,toggleAction:g,isLoading:a})})]})}ke.propTypes={rowData:m().object},je.propTypes={rowData:m().object,keyphrase:m().string.isRequired,onTrackKeyphrase:m().func,onUntrackKeyphrase:m().func,isFocusKeyphrase:m().bool,isDisabled:m().bool,isLoading:m().bool,websiteId:m().string,isSelected:m().bool.isRequired,onSelectKeyphrases:m().func.isRequired};const Se=(0,z.makeOutboundLink)(),Ce=y().span`
379 379 display: block;
380 380 font-style: italic;
381 381
382 382 @media (min-width: 782px) {
@@ -386,9 +386,9 @@
386 386 }
387 387 `,Te=y().div`
388 388 width: 100%;
389 389 overflow-y: auto;
390 -`,Re=y().th`
390 +`,Ee=y().th`
391 391 pointer-events: ${e=>e.isDisabled?"none":"initial"};
392 392 padding-right: 0 !important;
393 393
394 394 & > div {
@@ -393,12 +393,12 @@
393 393
394 394 & > div {
395 395 margin: 0px;
396 396 }
397 -`,Ee=y().th`
397 +`,Re=y().th`
398 398 padding-left: 2px !important;
399 -`,Ae=e=>{const t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e}),t.current},Ie=({addTrackedKeyphrase:e,isLoggedIn:t=!1,isNewlyAuthenticated:s=!1,keyphrases:r=[],newRequest:o,removeTrackedKeyphrase:a,setRequestFailed:l,setKeyphraseLimitReached:c,setRequestSucceeded:d,setTrackedKeyphrases:p,setHasTrackedAll:h,trackAll:m=!1,trackedKeyphrases:g=null,websiteId:y="",permalink:x,focusKeyphrase:w="",startAt:b=null,selectedKeyphrases:v,onSelectKeyphrases:_})=>{const k=(0,n.useRef)(),j=(0,n.useRef)(),C=(0,n.useRef)(!1),[T,R]=(0,n.useState)([]),E=(0,n.useCallback)(e=>{const t=e.toLowerCase();return g&&!(0,u.isEmpty)(g)&&Object.prototype.hasOwnProperty.call(g,t)?g[t]:null},[g]),A=(0,n.useMemo)(()=>async()=>{await se(()=>{var e;return j.current&&j.current.abort(),j.current="undefined"==typeof AbortController?null:new AbortController,async function(e=null,t=null,s=null,r){return await re({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:r})}(r,b,x,null===(e=j.current)||void 0===e?void 0:e.signal)},e=>{d(e),p(e.results)},e=>{l(e)})},[d,l,p,r,x,b]),I=(0,n.useCallback)(async t=>{const s=(Array.isArray(t)?t:[t]).map(e=>e.toLowerCase());R(e=>[...e,...s]),await se(()=>oe(s),t=>{d(t),e(t.results),A()},e=>{400===e.status&&e.limit&&c(e.limit),l(e)},201),R(e=>(0,u.without)(e,...s))},[d,l,c,e,A]),L=(0,n.useCallback)(async(e,t)=>{e=e.toLowerCase(),R(t=>[...t,e]),await se(()=>async function(e){return await re({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t),t=>{d(t),a(e)},e=>{l(e)}),R(t=>(0,u.without)(t,e))},[d,a,l]),N=(0,n.useCallback)(async e=>{o(),await I(e)},[o,I]),P=Ae(x),M=Ae(r),O=Ae(b),F=x&&b;(0,n.useEffect)(()=>{t&&F&&(x!==P||(0,u.difference)(r,M).length||b!==O)&&A()},[t,x,P,r,M,A,F,b,O]),(0,n.useEffect)(()=>{if(t&&m&&null!==g){const e=r.filter(e=>!E(e));e.length&&I(e),h()}},[t,m,g,I,h,E,r]),(0,n.useEffect)(()=>{s&&!C.current&&(A(),C.current=!0)},[s,A]),(0,n.useEffect)(()=>{if(t&&!(0,u.isEmpty)(g))return(0,u.filter)(g,e=>(0,u.isEmpty)(e.updated_at)).length>0&&(k.current=setInterval(()=>{A()},1e4)),()=>{clearInterval(k.current)}},[t,g,A]);const D=t&&null===g,q=(0,n.useMemo)(()=>(0,u.isEmpty)(g)?[]:Object.values(g).filter(e=>{var t;return!(0,u.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[g]),$=(0,n.useMemo)(()=>v.length>0&&q.length>0&&q.every(e=>v.includes(e)),[v,q]),B=(0,n.useCallback)(()=>{_($?[]:q)},[_,$,q]),U=(0,n.useMemo)(()=>(0,u.orderBy)(r,[e=>Object.values(g||{}).map(e=>e.keyword).includes(e)],["desc"]),[r,g]);return r&&!(0,u.isEmpty)(r)&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Te,{children:(0,f.jsxs)("table",{className:"yoast yoast-table",children:[(0,f.jsx)("thead",{children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(Re,{isDisabled:0===q.length,children:(0,f.jsx)(S.Checkbox,{id:"select-all",onChange:B,checked:$,label:""})}),(0,f.jsx)(Ee,{scope:"col",abbr:(0,i.__)("Keyphrase","wordpress-seo"),children:(0,i.__)("Keyphrase","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position","wordpress-seo"),children:(0,i.__)("Position","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position over time","wordpress-seo"),children:(0,i.__)("Position over time","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Last updated","wordpress-seo"),children:(0,i.__)("Last updated","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Tracking","wordpress-seo"),children:(0,i.__)("Tracking","wordpress-seo")})]})}),(0,f.jsx)("tbody",{children:U.map((e,s)=>(0,f.jsx)(je,{keyphrase:e,onTrackKeyphrase:N,onUntrackKeyphrase:L,rowData:E(e),isFocusKeyphrase:e===w.trim().toLowerCase(),websiteId:y,isDisabled:!t,isLoading:D||T.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:_},`trackable-keyphrase-${s}`))})]})}),(0,f.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,f.jsx)(Se,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
400 -(0,i.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,f.jsx)(Ce,{children:(0,i.__)("* focus keyphrase","wordpress-seo")})]})]})};Ie.propTypes={addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,newRequest:m().func.isRequired,removeTrackedKeyphrase:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,setRequestSucceeded:m().func.isRequired,setTrackedKeyphrases:m().func.isRequired,setHasTrackedAll:m().func.isRequired,trackAll:m().bool,trackedKeyphrases:m().object,websiteId:m().string,permalink:m().string.isRequired,focusKeyphrase:m().string,startAt:m().string,selectedKeyphrases:m().arrayOf(m().string).isRequired,onSelectKeyphrases:m().func.isRequired};const Le=Ie,Ne=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:r,getWincherPermalink:o,getFocusKeyphrase:n,isWincherNewlyAuthenticated:i,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:n(),keyphrases:s(),isLoggedIn:r(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:i(),permalink:o()}}),(0,t.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:n,setWincherTrackingForKeyphrase:i,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{i(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{n(e)},setHasTrackedAll:()=>{a(!1)}}})])(Le);class Pe{constructor(e,t={},s={}){this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},s),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:s}=this.options,r=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,s,r.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:r}=e;r===this.origin&&this.popup===s&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}const Me=()=>(0,f.jsx)(S.Alert,{type:"info",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
399 +`,Ae=e=>{const t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e}),t.current},Ie=({addTrackedKeyphrase:e,isLoggedIn:t=!1,isNewlyAuthenticated:s=!1,keyphrases:r=[],newRequest:o,removeTrackedKeyphrase:a,setRequestFailed:l,setKeyphraseLimitReached:c,setRequestSucceeded:d,setTrackedKeyphrases:p,setHasTrackedAll:h,trackAll:m=!1,trackedKeyphrases:g=null,websiteId:y="",permalink:x,focusKeyphrase:w="",startAt:b=null,selectedKeyphrases:v,onSelectKeyphrases:k})=>{const _=(0,n.useRef)(),j=(0,n.useRef)(),C=(0,n.useRef)(!1),[T,E]=(0,n.useState)([]),R=(0,n.useCallback)(e=>{const t=e.toLowerCase();return g&&!(0,u.isEmpty)(g)&&Object.prototype.hasOwnProperty.call(g,t)?g[t]:null},[g]),A=(0,n.useMemo)(()=>async()=>{await se(()=>{var e;return j.current&&j.current.abort(),j.current="undefined"==typeof AbortController?null:new AbortController,async function(e=null,t=null,s=null,r){return await re({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:r})}(r,b,x,null===(e=j.current)||void 0===e?void 0:e.signal)},e=>{d(e),p(e.results)},e=>{l(e)})},[d,l,p,r,x,b]),I=(0,n.useCallback)(async t=>{const s=(Array.isArray(t)?t:[t]).map(e=>e.toLowerCase());E(e=>[...e,...s]),await se(()=>oe(s),t=>{d(t),e(t.results),A()},e=>{400===e.status&&e.limit&&c(e.limit),l(e)},201),E(e=>(0,u.without)(e,...s))},[d,l,c,e,A]),L=(0,n.useCallback)(async(e,t)=>{e=e.toLowerCase(),E(t=>[...t,e]),await se(()=>async function(e){return await re({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t),t=>{d(t),a(e)},e=>{l(e)}),E(t=>(0,u.without)(t,e))},[d,a,l]),P=(0,n.useCallback)(async e=>{o(),await I(e)},[o,I]),N=Ae(x),M=Ae(r),O=Ae(b),F=x&&b;(0,n.useEffect)(()=>{t&&F&&(x!==N||(0,u.difference)(r,M).length||b!==O)&&A()},[t,x,N,r,M,A,F,b,O]),(0,n.useEffect)(()=>{if(t&&m&&null!==g){const e=r.filter(e=>!R(e));e.length&&I(e),h()}},[t,m,g,I,h,R,r]),(0,n.useEffect)(()=>{s&&!C.current&&(A(),C.current=!0)},[s,A]),(0,n.useEffect)(()=>{if(t&&!(0,u.isEmpty)(g))return(0,u.filter)(g,e=>(0,u.isEmpty)(e.updated_at)).length>0&&(_.current=setInterval(()=>{A()},1e4)),()=>{clearInterval(_.current)}},[t,g,A]);const D=t&&null===g,q=(0,n.useMemo)(()=>(0,u.isEmpty)(g)?[]:Object.values(g).filter(e=>{var t;return!(0,u.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[g]),$=(0,n.useMemo)(()=>v.length>0&&q.length>0&&q.every(e=>v.includes(e)),[v,q]),B=(0,n.useCallback)(()=>{k($?[]:q)},[k,$,q]),U=(0,n.useMemo)(()=>(0,u.orderBy)(r,[e=>Object.values(g||{}).map(e=>e.keyword).includes(e)],["desc"]),[r,g]);return r&&!(0,u.isEmpty)(r)&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Te,{children:(0,f.jsxs)("table",{className:"yoast yoast-table",children:[(0,f.jsx)("thead",{children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(Ee,{isDisabled:0===q.length,children:(0,f.jsx)(S.Checkbox,{id:"select-all",onChange:B,checked:$,label:""})}),(0,f.jsx)(Re,{scope:"col",abbr:(0,i.__)("Keyphrase","wordpress-seo"),children:(0,i.__)("Keyphrase","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position","wordpress-seo"),children:(0,i.__)("Position","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position over time","wordpress-seo"),children:(0,i.__)("Position over time","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Last updated","wordpress-seo"),children:(0,i.__)("Last updated","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Tracking","wordpress-seo"),children:(0,i.__)("Tracking","wordpress-seo")})]})}),(0,f.jsx)("tbody",{children:U.map((e,s)=>(0,f.jsx)(je,{keyphrase:e,onTrackKeyphrase:P,onUntrackKeyphrase:L,rowData:R(e),isFocusKeyphrase:e===w.trim().toLowerCase(),websiteId:y,isDisabled:!t,isLoading:D||T.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:k},`trackable-keyphrase-${s}`))})]})}),(0,f.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,f.jsx)(Se,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
400 +(0,i.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,f.jsx)(Ce,{children:(0,i.__)("* focus keyphrase","wordpress-seo")})]})]})};Ie.propTypes={addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,newRequest:m().func.isRequired,removeTrackedKeyphrase:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,setRequestSucceeded:m().func.isRequired,setTrackedKeyphrases:m().func.isRequired,setHasTrackedAll:m().func.isRequired,trackAll:m().bool,trackedKeyphrases:m().object,websiteId:m().string,permalink:m().string.isRequired,focusKeyphrase:m().string,startAt:m().string,selectedKeyphrases:m().arrayOf(m().string).isRequired,onSelectKeyphrases:m().func.isRequired};const Le=Ie,Pe=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:r,getWincherPermalink:o,getFocusKeyphrase:n,isWincherNewlyAuthenticated:i,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:n(),keyphrases:s(),isLoggedIn:r(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:i(),permalink:o()}}),(0,t.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:n,setWincherTrackingForKeyphrase:i,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{i(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{n(e)},setHasTrackedAll:()=>{a(!1)}}})])(Le);class Ne{constructor(e,t={},s={}){this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},s),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:s}=this.options,r=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,s,r.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:r}=e;r===this.origin&&this.popup===s&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}const Me=()=>(0,f.jsx)(S.Alert,{type:"info",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
401 401 (0,i.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")}),Oe=()=>(0,f.jsx)(S.Alert,{type:"success",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
402 402 (0,i.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),Fe=()=>(0,f.jsx)(S.Alert,{type:"info",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
403 403 (0,i.__)("%s is currently tracking the ranking position(s) of your page. This may take a few minutes. Please wait or check back later.","wordpress-seo"),"Wincher")});var De=s(2458);const qe=(0,z.makeOutboundLink)(),$e=(0,z.makeOutboundLink)(),Be=()=>{const e=(0,i.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ /* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
404 404 (0,i.__)("With %1$s you can track the ranking position of your page in the search results based on your keyphrase(s). %2$s","wordpress-seo"),"<wincherLink/>","<wincherReadMoreLink/>");return(0,f.jsx)("p",{children:(0,De.x)(e,{wincherLink:(0,f.jsx)(qe,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,f.jsx)($e,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,i.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})})})},Ue=(0,z.makeOutboundLink)(),He=({limit:e=10})=>{const t=(0,i.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ /* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */
@@ -461,9 +461,9 @@
461 461 /* Translators: %1$s expands to upgrade account link.
462 462 * %2$s expands to the upgrade discount value.
463 463 * %3$s expands to the upgrade discount duration e.g. 2 months.
464 464 */
465 -(0,i.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",r+"%",t);return(0,f.jsx)(Qe,{children:(0,De.x)(o,{wincherAccountUpgradeLink:s})})};rt.propTypes={discount:m().number,months:m().number};const ot=({onClose:e=null,isTitleShortened:t=!1,trackingInfo:s=null})=>{const r=(()=>{const[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e||async function(){return await re({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then(e=>t(e))},[e]),e})();if(null===s)return null;const{limit:o,usage:a}=s;if(!(o&&a/o>=.8))return null;const l=Boolean(null==r?void 0:r.discount);return(0,f.jsxs)(et,{isTitleShortened:t,children:[e&&(0,f.jsx)(Je,{type:"button","aria-label":(0,i.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,f.jsx)(S.SvgIcon,{icon:"times-circle",color:C.colors.$color_pink_dark,size:"14px"})}),(0,f.jsx)(tt,{...s,isTitleShortened:t,isFreeAccount:l}),(0,f.jsx)(rt,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months})]})};ot.propTypes={onClose:m().func,isTitleShortened:m().bool,trackingInfo:m().object};const nt=ot,it=window.yoast["chart.js"],at="label";function lt(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ct(e,t){e.labels=t}function dt(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:at;const r=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):{...t}})}function ut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at;const s={labels:[],datasets:[]};return ct(s,e.labels),dt(s,e.datasets,t),s}function pt(e,t){const{height:s=150,width:r=300,redraw:o=!1,datasetIdKey:n,type:i,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...p}=e,h=(0,q.useRef)(null),m=(0,q.useRef)(),g=()=>{h.current&&(m.current=new it.Chart(h.current,{type:i,data:ut(a,n),options:l&&{...l},plugins:c}),lt(t,m.current))},y=()=>{lt(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,q.useEffect)(()=>{!o&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)},[o,l]),(0,q.useEffect)(()=>{!o&&m.current&&ct(m.current.config.data,a.labels)},[o,a.labels]),(0,q.useEffect)(()=>{!o&&m.current&&a.datasets&&dt(m.current.config.data,a.datasets,n)},[o,a.datasets]),(0,q.useEffect)(()=>{m.current&&(o?(y(),setTimeout(g)):m.current.update(u))},[o,l,a.labels,a.datasets,u]),(0,q.useEffect)(()=>{m.current&&(y(),setTimeout(g))},[i]),(0,q.useEffect)(()=>(g(),()=>y()),[]),q.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:r},p),d)}const ht=(0,q.forwardRef)(pt);function mt(e,t){return it.Chart.register(t),(0,q.forwardRef)((t,s)=>q.createElement(ht,Object.assign({},t,{ref:s,type:e})))}const gt=mt("line",it.LineController),yt={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};it._adapters._date.override("function"==typeof Q()?{_id:"moment",formats:function(){return yt},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=Q()(e,t):e instanceof Q()||(e=Q()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return Q()(e).format(t)},add:function(e,t,s){return Q()(e).add(t,s).valueOf()},diff:function(e,t,s){return Q()(e).diff(Q()(t),s)},startOf:function(e,t,s){return e=Q()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return Q()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const ft=["top","right","bottom","left"];function xt(e,t,s){const r={};s=s?"-"+s:"";for(let o=0;o<4;o++){const n=ft[o];r[n]=parseFloat(e[t+"-"+n+s])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),it.Chart.register(it.CategoryScale,it.LineController,it.LineElement,it.PointElement,it.LinearScale,it.TimeScale,it.Legend,it.Tooltip);const wt=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function bt({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const r=(0,n.useMemo)(()=>Object.fromEntries([...s].sort().map((e,t)=>[e,wt[t%wt.length]])),[s]),o=e.map(e=>{const t=r[e.label];return{...e,data:e.data.map(({datetime:e,value:t})=>({x:e,y:t})),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}}).filter(e=>!1!==e.selected);return(0,f.jsx)(gt,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:u.noop},tooltip:{enabled:!0,callbacks:{title:e=>Q()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:31}}}})}it.Interaction.modes.xPoint=(e,t,s,r)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:r}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),n="border-box"===o.boxSizing,i=xt(o,"padding"),a=xt(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,r=s&&s.length?s[0]:e,{offsetX:o,offsetY:n}=r;let i,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,n,e.target))i=o,a=n;else{const e=t.getBoundingClientRect();i=r.clientX-e.left,a=r.clientY-e.top,l=!0}return{x:i,y:a,box:l}}(e,s),u=i.left+(d&&a.left),p=i.top+(d&&a.top);var h;let{width:m,height:g}=t;return n&&(m-=i.width+a.width,g-=i.height+a.height),{x:Math.round((l-u)/m*s.width/r),y:Math.round((c-p)/g*s.height/r)}}(t,e);let n=[];if(it.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,r)&&n.push({element:e,datasetIndex:t,index:s})}),0===n.length)return n;const i=n.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return n=n.filter(e=>e.element.x===i),n.some(e=>Math.abs(e.element.y-o.y)<10)?n:[]},bt.propTypes={datasets:m().arrayOf(m().shape({label:m().string.isRequired,data:m().arrayOf(m().shape({datetime:m().string.isRequired,value:m().number.isRequired})).isRequired,selected:m().bool})).isRequired,isChartShown:m().bool.isRequired,keyphrases:m().array.isRequired};const vt=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,f.jsx)(Ve,{onReconnect:t}):(0,f.jsx)(Ge,{});vt.propTypes={response:m().object.isRequired,onLogin:m().func.isRequired};const _t=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:r,keyphraseLimitReached:o,limit:n})=>o?(0,f.jsx)(We,{limit:n}):(0,u.isEmpty)(t)||e?s?(0,f.jsx)(Fe,{}):null:(0,f.jsx)(vt,{response:t,onLogin:r});_t.propTypes={isSuccess:m().bool.isRequired,allKeyphrasesMissRanking:m().bool.isRequired,response:m().object,onLogin:m().func.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired};let kt=null;const jt=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n})=>{if(kt&&!kt.isClosed())return void kt.focus();const{url:i}=await async function(){return await re({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();kt=new Pe(i,{success:{type:"wincher:oauth:success",callback:i=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)=>{await se(()=>async function(e){const{code:t,websiteId:s}=e;return await re({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(i),async a=>{e(!0,!0,i.websiteId.toString()),t(a);const l=(Array.isArray(r)?r:[r]).map(e=>e.toLowerCase());await se(()=>oe(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&n(e.limit),s(e)},201);const c=kt.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),kt.createPopup()},St=e=>e.isLoggedIn?null:(0,f.jsx)("p",{children:(0,f.jsx)(S.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
465 +(0,i.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",r+"%",t);return(0,f.jsx)(Qe,{children:(0,De.x)(o,{wincherAccountUpgradeLink:s})})};rt.propTypes={discount:m().number,months:m().number};const ot=({onClose:e=null,isTitleShortened:t=!1,trackingInfo:s=null})=>{const r=(()=>{const[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e||async function(){return await re({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then(e=>t(e))},[e]),e})();if(null===s)return null;const{limit:o,usage:a}=s;if(!(o&&a/o>=.8))return null;const l=Boolean(null==r?void 0:r.discount);return(0,f.jsxs)(et,{isTitleShortened:t,children:[e&&(0,f.jsx)(Je,{type:"button","aria-label":(0,i.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,f.jsx)(S.SvgIcon,{icon:"times-circle",color:C.colors.$color_pink_dark,size:"14px"})}),(0,f.jsx)(tt,{...s,isTitleShortened:t,isFreeAccount:l}),(0,f.jsx)(rt,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months})]})};ot.propTypes={onClose:m().func,isTitleShortened:m().bool,trackingInfo:m().object};const nt=ot,it=window.yoast["chart.js"],at="label";function lt(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ct(e,t){e.labels=t}function dt(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:at;const r=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):{...t}})}function ut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at;const s={labels:[],datasets:[]};return ct(s,e.labels),dt(s,e.datasets,t),s}function pt(e,t){const{height:s=150,width:r=300,redraw:o=!1,datasetIdKey:n,type:i,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...p}=e,h=(0,q.useRef)(null),m=(0,q.useRef)(),g=()=>{h.current&&(m.current=new it.Chart(h.current,{type:i,data:ut(a,n),options:l&&{...l},plugins:c}),lt(t,m.current))},y=()=>{lt(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,q.useEffect)(()=>{!o&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)},[o,l]),(0,q.useEffect)(()=>{!o&&m.current&&ct(m.current.config.data,a.labels)},[o,a.labels]),(0,q.useEffect)(()=>{!o&&m.current&&a.datasets&&dt(m.current.config.data,a.datasets,n)},[o,a.datasets]),(0,q.useEffect)(()=>{m.current&&(o?(y(),setTimeout(g)):m.current.update(u))},[o,l,a.labels,a.datasets,u]),(0,q.useEffect)(()=>{m.current&&(y(),setTimeout(g))},[i]),(0,q.useEffect)(()=>(g(),()=>y()),[]),q.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:r},p),d)}const ht=(0,q.forwardRef)(pt);function mt(e,t){return it.Chart.register(t),(0,q.forwardRef)((t,s)=>q.createElement(ht,Object.assign({},t,{ref:s,type:e})))}const gt=mt("line",it.LineController),yt={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};it._adapters._date.override("function"==typeof Q()?{_id:"moment",formats:function(){return yt},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=Q()(e,t):e instanceof Q()||(e=Q()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return Q()(e).format(t)},add:function(e,t,s){return Q()(e).add(t,s).valueOf()},diff:function(e,t,s){return Q()(e).diff(Q()(t),s)},startOf:function(e,t,s){return e=Q()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return Q()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const ft=["top","right","bottom","left"];function xt(e,t,s){const r={};s=s?"-"+s:"";for(let o=0;o<4;o++){const n=ft[o];r[n]=parseFloat(e[t+"-"+n+s])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),it.Chart.register(it.CategoryScale,it.LineController,it.LineElement,it.PointElement,it.LinearScale,it.TimeScale,it.Legend,it.Tooltip);const wt=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function bt({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const r=(0,n.useMemo)(()=>Object.fromEntries([...s].sort().map((e,t)=>[e,wt[t%wt.length]])),[s]),o=e.map(e=>{const t=r[e.label];return{...e,data:e.data.map(({datetime:e,value:t})=>({x:e,y:t})),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}}).filter(e=>!1!==e.selected);return(0,f.jsx)(gt,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:u.noop},tooltip:{enabled:!0,callbacks:{title:e=>Q()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:31}}}})}it.Interaction.modes.xPoint=(e,t,s,r)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:r}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),n="border-box"===o.boxSizing,i=xt(o,"padding"),a=xt(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,r=s&&s.length?s[0]:e,{offsetX:o,offsetY:n}=r;let i,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,n,e.target))i=o,a=n;else{const e=t.getBoundingClientRect();i=r.clientX-e.left,a=r.clientY-e.top,l=!0}return{x:i,y:a,box:l}}(e,s),u=i.left+(d&&a.left),p=i.top+(d&&a.top);var h;let{width:m,height:g}=t;return n&&(m-=i.width+a.width,g-=i.height+a.height),{x:Math.round((l-u)/m*s.width/r),y:Math.round((c-p)/g*s.height/r)}}(t,e);let n=[];if(it.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,r)&&n.push({element:e,datasetIndex:t,index:s})}),0===n.length)return n;const i=n.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return n=n.filter(e=>e.element.x===i),n.some(e=>Math.abs(e.element.y-o.y)<10)?n:[]},bt.propTypes={datasets:m().arrayOf(m().shape({label:m().string.isRequired,data:m().arrayOf(m().shape({datetime:m().string.isRequired,value:m().number.isRequired})).isRequired,selected:m().bool})).isRequired,isChartShown:m().bool.isRequired,keyphrases:m().array.isRequired};const vt=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,f.jsx)(Ve,{onReconnect:t}):(0,f.jsx)(Ge,{});vt.propTypes={response:m().object.isRequired,onLogin:m().func.isRequired};const kt=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:r,keyphraseLimitReached:o,limit:n})=>o?(0,f.jsx)(We,{limit:n}):(0,u.isEmpty)(t)||e?s?(0,f.jsx)(Fe,{}):null:(0,f.jsx)(vt,{response:t,onLogin:r});kt.propTypes={isSuccess:m().bool.isRequired,allKeyphrasesMissRanking:m().bool.isRequired,response:m().object,onLogin:m().func.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired};let _t=null;const jt=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n})=>{if(_t&&!_t.isClosed())return void _t.focus();const{url:i}=await async function(){return await re({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();_t=new Ne(i,{success:{type:"wincher:oauth:success",callback:i=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)=>{await se(()=>async function(e){const{code:t,websiteId:s}=e;return await re({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(i),async a=>{e(!0,!0,i.websiteId.toString()),t(a);const l=(Array.isArray(r)?r:[r]).map(e=>e.toLowerCase());await se(()=>oe(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&n(e.limit),s(e)},201);const c=_t.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),_t.createPopup()},St=e=>e.isLoggedIn?null:(0,f.jsx)("p",{children:(0,f.jsx)(S.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
466 466 (0,i.__)("Connect with %s","wordpress-seo"),"Wincher")})});St.propTypes={isLoggedIn:m().bool.isRequired,onLogin:m().func.isRequired};const Ct=y().div`
467 467 p {
468 468 margin: 1em 0;
469 469 }
@@ -468,13 +468,13 @@
468 468 margin: 1em 0;
469 469 }
470 470 `,Tt=y().div`
471 471 ${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
472 -`,Rt=y().div`
472 +`,Et=y().div`
473 473 font-weight: var(--yoast-font-weight-bold);
474 474 color: var(--yoast-color-label);
475 475 font-size: var(--yoast-font-size-default);
476 -`,Et=y().div.attrs({className:"yoast-field-group"})`
476 +`,Rt=y().div.attrs({className:"yoast-field-group"})`
477 477 display: flex;
478 478 justify-content: space-between;
479 479 align-items: center;
480 480 margin-bottom: 14px;
@@ -479,10 +479,10 @@
479 479 align-items: center;
480 480 margin-bottom: 14px;
481 481 `,At=y().div`
482 482 margin: 8px 0;
483 -`,It=Q().utc().startOf("day"),Lt=[{name:(0,i.__)("Last day","wordpress-seo"),value:Q()(It).subtract(1,"days").format(),defaultIndex:1},{name:(0,i.__)("Last week","wordpress-seo"),value:Q()(It).subtract(1,"week").format(),defaultIndex:2},{name:(0,i.__)("Last month","wordpress-seo"),value:Q()(It).subtract(1,"month").format(),defaultIndex:3},{name:(0,i.__)("Last year","wordpress-seo"),value:Q()(It).subtract(1,"year").format(),defaultIndex:0}],Nt=({onSelect:e,selected:t=null,options:s,isLoggedIn:r})=>r?s.length<1?null:(0,f.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==t?void 0:t.value)||s[0].value,onChange:e,children:s.map(e=>(0,f.jsx)("option",{value:e.value,children:e.name},e.name))}):null;Nt.propTypes={onSelect:m().func.isRequired,selected:m().object,options:m().array.isRequired,isLoggedIn:m().bool.isRequired};const Pt=({trackedKeyphrases:e=null,isLoggedIn:t,keyphrases:s,shouldTrackAll:r,permalink:o,historyDaysLimit:a=0})=>{if(!o&&t)return(0,f.jsx)(Ke,{});if(0===s.length)return(0,f.jsx)(ze,{});const l=Q()(It).subtract(a,"days"),c=Lt.filter(e=>Q()(e.value).isSameOrAfter(l)),d=(0,u.orderBy)(c,e=>e.defaultIndex,"desc")[0],[p,h]=(0,n.useState)(d),[m,g]=(0,n.useState)([]),y=m.length>0,x=(0,O.usePrevious)(e);(0,n.useEffect)(()=>{if(!(0,u.isEmpty)(e)&&(0,u.difference)(Object.keys(e),Object.keys(x||[])).length){const t=Object.values(e).map(e=>e.keyword);g(t)}},[e,x]),(0,n.useEffect)(()=>{h(d)},[null==d?void 0:d.name]);const w=(0,n.useCallback)(e=>{const t=Lt.find(t=>t.value===e.target.value);t&&h(t)},[h]),b=(0,n.useMemo)(()=>(0,u.isEmpty)(m)||(0,u.isEmpty)(e)?[]:Object.values(e).filter(e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)}).map(e=>{var t;return{label:e.keyword,data:e.position.history,selected:m.includes(e.keyword)&&!(0,u.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[m,e]);return(0,f.jsxs)(Tt,{isDisabled:!t,children:[(0,f.jsx)("p",{children:(0,i.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),t&&r&&(0,f.jsx)(Me,{}),(0,f.jsx)(Et,{children:(0,f.jsx)(Nt,{selected:p,onSelect:w,options:c,isLoggedIn:t})}),(0,f.jsx)(At,{children:(0,f.jsx)(bt,{isChartShown:y,datasets:b,keyphrases:s})}),(0,f.jsx)(Ne,{startAt:null==p?void 0:p.value,selectedKeyphrases:m,onSelectKeyphrases:g,trackedKeyphrases:e})]})};function Mt({trackedKeyphrases:e=null,addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:r=!1,keyphrases:o=[],response:a={},shouldTrackAll:l=!1,permalink:c="",allKeyphrasesMissRanking:d,isSuccess:u,keyphraseLimitReached:p,limit:h,setRequestSucceeded:m,setRequestFailed:g,setKeyphraseLimitReached:y,onAuthentication:x}){const w=(0,n.useCallback)(()=>{jt({onAuthentication:x,setRequestSucceeded:m,setRequestFailed:g,keyphrases:o,addTrackedKeyphrase:t,setKeyphraseLimitReached:y})},[jt,x,m,g,o,t,y]),b=(e=>{const[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e&&!t&&async function(){return await re({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then(e=>s(e))},[t]),t})(s);return(0,f.jsxs)(Ct,{children:[r&&(0,f.jsx)(Oe,{}),s&&(0,f.jsx)(nt,{trackingInfo:b}),(0,f.jsxs)(Rt,{children:[(0,i.__)("SEO performance","wordpress-seo"),(0,f.jsx)(S.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
484 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,f.jsx)(Be,{}),(0,f.jsx)(St,{isLoggedIn:s,onLogin:w}),(0,f.jsx)(_t,{isSuccess:u,response:a,allKeyphrasesMissRanking:d,keyphraseLimitReached:p,limit:h,onLogin:w}),(0,f.jsx)(Pt,{trackedKeyphrases:e,isLoggedIn:s,keyphrases:o,shouldTrackAll:l,permalink:c,historyDaysLimit:(null==b?void 0:b.historyDays)||31})]})}Pt.propTypes={trackedKeyphrases:m().object,keyphrases:m().array.isRequired,isLoggedIn:m().bool.isRequired,shouldTrackAll:m().bool.isRequired,permalink:m().string.isRequired,historyDaysLimit:m().number},Mt.propTypes={trackedKeyphrases:m().object,addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,response:m().object,shouldTrackAll:m().bool,permalink:m().string,allKeyphrasesMissRanking:m().bool.isRequired,isSuccess:m().bool.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired,setRequestSucceeded:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,onAuthentication:m().func.isRequired};const Ot=(0,O.compose)([(0,t.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:r,getWincherLoginStatus:o,getWincherRequestIsSuccess:n,getWincherRequestResponse:i,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:n(),keyphraseLimitReached:s(),limit:r(),response:i(),shouldTrackAll:u(),permalink:d()}}),(0,t.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:n,setWincherLoginStatus:i}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{n(e)},onAuthentication:(e,s,r)=>{t(r),i(e,s)}}})])(Mt),Ft=y()(D())`
483 +`,It=Q().utc().startOf("day"),Lt=[{name:(0,i.__)("Last day","wordpress-seo"),value:Q()(It).subtract(1,"days").format(),defaultIndex:1},{name:(0,i.__)("Last week","wordpress-seo"),value:Q()(It).subtract(1,"week").format(),defaultIndex:2},{name:(0,i.__)("Last month","wordpress-seo"),value:Q()(It).subtract(1,"month").format(),defaultIndex:3},{name:(0,i.__)("Last year","wordpress-seo"),value:Q()(It).subtract(1,"year").format(),defaultIndex:0}],Pt=({onSelect:e,selected:t=null,options:s,isLoggedIn:r})=>r?s.length<1?null:(0,f.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==t?void 0:t.value)||s[0].value,onChange:e,children:s.map(e=>(0,f.jsx)("option",{value:e.value,children:e.name},e.name))}):null;Pt.propTypes={onSelect:m().func.isRequired,selected:m().object,options:m().array.isRequired,isLoggedIn:m().bool.isRequired};const Nt=({trackedKeyphrases:e=null,isLoggedIn:t,keyphrases:s,shouldTrackAll:r,permalink:o,historyDaysLimit:a=0})=>{if(!o&&t)return(0,f.jsx)(Ke,{});if(0===s.length)return(0,f.jsx)(ze,{});const l=Q()(It).subtract(a,"days"),c=Lt.filter(e=>Q()(e.value).isSameOrAfter(l)),d=(0,u.orderBy)(c,e=>e.defaultIndex,"desc")[0],[p,h]=(0,n.useState)(d),[m,g]=(0,n.useState)([]),y=m.length>0,x=(0,O.usePrevious)(e);(0,n.useEffect)(()=>{if(!(0,u.isEmpty)(e)&&(0,u.difference)(Object.keys(e),Object.keys(x||[])).length){const t=Object.values(e).map(e=>e.keyword);g(t)}},[e,x]),(0,n.useEffect)(()=>{h(d)},[null==d?void 0:d.name]);const w=(0,n.useCallback)(e=>{const t=Lt.find(t=>t.value===e.target.value);t&&h(t)},[h]),b=(0,n.useMemo)(()=>(0,u.isEmpty)(m)||(0,u.isEmpty)(e)?[]:Object.values(e).filter(e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)}).map(e=>{var t;return{label:e.keyword,data:e.position.history,selected:m.includes(e.keyword)&&!(0,u.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[m,e]);return(0,f.jsxs)(Tt,{isDisabled:!t,children:[(0,f.jsx)("p",{children:(0,i.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),t&&r&&(0,f.jsx)(Me,{}),(0,f.jsx)(Rt,{children:(0,f.jsx)(Pt,{selected:p,onSelect:w,options:c,isLoggedIn:t})}),(0,f.jsx)(At,{children:(0,f.jsx)(bt,{isChartShown:y,datasets:b,keyphrases:s})}),(0,f.jsx)(Pe,{startAt:null==p?void 0:p.value,selectedKeyphrases:m,onSelectKeyphrases:g,trackedKeyphrases:e})]})};function Mt({trackedKeyphrases:e=null,addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:r=!1,keyphrases:o=[],response:a={},shouldTrackAll:l=!1,permalink:c="",allKeyphrasesMissRanking:d,isSuccess:u,keyphraseLimitReached:p,limit:h,setRequestSucceeded:m,setRequestFailed:g,setKeyphraseLimitReached:y,onAuthentication:x}){const w=(0,n.useCallback)(()=>{jt({onAuthentication:x,setRequestSucceeded:m,setRequestFailed:g,keyphrases:o,addTrackedKeyphrase:t,setKeyphraseLimitReached:y})},[jt,x,m,g,o,t,y]),b=(e=>{const[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e&&!t&&async function(){return await re({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then(e=>s(e))},[t]),t})(s);return(0,f.jsxs)(Ct,{children:[r&&(0,f.jsx)(Oe,{}),s&&(0,f.jsx)(nt,{trackingInfo:b}),(0,f.jsxs)(Et,{children:[(0,i.__)("SEO performance","wordpress-seo"),(0,f.jsx)(S.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
484 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,f.jsx)(Be,{}),(0,f.jsx)(St,{isLoggedIn:s,onLogin:w}),(0,f.jsx)(kt,{isSuccess:u,response:a,allKeyphrasesMissRanking:d,keyphraseLimitReached:p,limit:h,onLogin:w}),(0,f.jsx)(Nt,{trackedKeyphrases:e,isLoggedIn:s,keyphrases:o,shouldTrackAll:l,permalink:c,historyDaysLimit:(null==b?void 0:b.historyDays)||31})]})}Nt.propTypes={trackedKeyphrases:m().object,keyphrases:m().array.isRequired,isLoggedIn:m().bool.isRequired,shouldTrackAll:m().bool.isRequired,permalink:m().string.isRequired,historyDaysLimit:m().number},Mt.propTypes={trackedKeyphrases:m().object,addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,response:m().object,shouldTrackAll:m().bool,permalink:m().string,allKeyphrasesMissRanking:m().bool.isRequired,isSuccess:m().bool.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired,setRequestSucceeded:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,onAuthentication:m().func.isRequired};const Ot=(0,O.compose)([(0,t.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:r,getWincherLoginStatus:o,getWincherRequestIsSuccess:n,getWincherRequestResponse:i,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:n(),keyphraseLimitReached:s(),limit:r(),response:i(),shouldTrackAll:u(),permalink:d()}}),(0,t.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:n,setWincherLoginStatus:i}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{n(e)},onAuthentication:(e,s,r)=>{t(r),i(e,s)}}})])(Mt),Ft=y()(D())`
485 485 width: 18px;
486 486 height: 18px;
487 487 margin: 3px;
488 488 `;function Dt({keyphrases:e,onNoKeyphraseSet:t,onOpen:s,location:r}){if(!e.length){let e=document.querySelector("#focus-keyword-input-metabox");return e||(e=document.querySelector("#focus-keyword-input-sidebar")),e.focus(),void t()}s(r)}function qt({location:e="",whichModalOpen:t="none",shouldCloseOnClickOutside:s=!0,keyphrases:r,onNoKeyphraseSet:o,onOpen:a,onClose:l}){const c=(0,n.useCallback)(()=>{Dt({keyphrases:r,onNoKeyphraseSet:o,onOpen:a,location:e})},[Dt,r,o,a,e]),d=(0,i.__)("Track SEO performance","wordpress-seo"),u=$();return(0,f.jsxs)(n.Fragment,{children:[t===e&&(0,f.jsx)(V,{title:d,onRequestClose:l,icon:(0,f.jsx)(G.h,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:s,children:(0,f.jsx)(K,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,f.jsx)(Ot,{})})}),"sidebar"===e&&(0,f.jsx)(Z,{id:`wincher-open-button-${e}`,title:d,SuffixHeroIcon:(0,f.jsx)(Ft,{className:"yst-text-slate-500",...u}),onClick:c}),"metabox"===e&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(W,{id:`wincher-open-button-${e}`,onClick:c,children:[(0,f.jsx)(W.Text,{children:d}),(0,f.jsx)(D(),{className:"yst-h-5 yst-w-5 yst-text-slate-500",...u})]})})]})}qt.propTypes={location:m().string,whichModalOpen:m().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:m().bool,keyphrases:m().array.isRequired,onNoKeyphraseSet:m().func.isRequired,onOpen:m().func.isRequired,onClose:m().func.isRequired};const $t=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherModalOpen:t,getWincherTrackableKeyphrases:s}=e("yoast-seo/editor");return{keyphrases:s(),whichModalOpen:t()}}),(0,t.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherDismissModal:s,setWincherNoKeyphrase:r}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{r()}}})])(qt),Bt=window.yoast.externals.components;function Ut(){return(0,O.createHigherOrderComponent)(function(e){return(0,O.pure)(function(t){const s=(0,n.useContext)(c.LocationContext);return(0,n.createElement)(e,{...t,location:s})})},"withLocation")}const Ht=(0,O.compose)([(0,t.withSelect)(e=>{const{isCornerstoneContent:t}=e("yoast-seo/editor");return{isCornerstone:t(),learnMoreUrl:wpseoAdminL10n["shortlinks.cornerstone_content_info"]}}),(0,t.withDispatch)(e=>{const{toggleCornerstoneContent:t}=e("yoast-seo/editor");return{onChange:t}}),Ut()])(Bt.CollapsibleCornerstone);var Wt=s(3838);const zt=y()(S.StyledSection)`
@@ -493,9 +493,9 @@
493 493 ${(0,z.getDirectionalStyle)("padding-left","padding-right")}: 20px;
494 494 margin-left: ${(0,z.getDirectionalStyle)("0","20px")};
495 495 }
496 496 }
497 -`,Kt=({children:e=null,title:t="",icon:s="",hasPaperStyle:r=!0,shoppingData:o=null})=>(0,f.jsx)(zt,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:r,shoppingData:o,children:e});Kt.propTypes={children:m().element,title:m().string,icon:m().string,hasPaperStyle:m().bool,shoppingData:m().object};const Yt=Kt;var Vt=s(5979);const Gt=(0,u.memoize)((e,t)=>0===e?u.noop:(0,u.debounce)(s=>t(s,e),500));var Xt=s(2514),Zt=s.n(Xt);const Jt=({link:e,text:t})=>(0,f.jsxs)(_.Root,{children:[(0,f.jsx)("p",{children:t}),(0,f.jsxs)(_.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,f.jsx)(Zt(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
497 +`,Kt=({children:e=null,title:t="",icon:s="",hasPaperStyle:r=!0,shoppingData:o=null})=>(0,f.jsx)(zt,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:r,shoppingData:o,children:e});Kt.propTypes={children:m().element,title:m().string,icon:m().string,hasPaperStyle:m().bool,shoppingData:m().object};const Yt=Kt;var Vt=s(5979);const Gt=(0,u.memoize)((e,t)=>0===e?u.noop:(0,u.debounce)(s=>t(s,e),500));var Xt=s(2514),Zt=s.n(Xt);const Jt=({link:e,text:t})=>(0,f.jsxs)(k.Root,{children:[(0,f.jsx)("p",{children:t}),(0,f.jsxs)(k.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,f.jsx)(Zt(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
498 498 (0,i.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});Jt.propTypes={link:m().string.isRequired,text:m().string.isRequired};const Qt=Jt,es=function(e,t){let s=0;return t.shortenedBaseUrl&&"string"==typeof t.shortenedBaseUrl&&(s=t.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[s]&&(e.url=e.url.slice(0,s)+e.url.slice(s+1)),(0,Vt.applyReplaceUsingPlugin)(e)},ts=(0,O.compose)([(0,t.withSelect)(function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:r,getRecommendedReplaceVars:o,getReplaceVars:n,getShoppingData:i,getSiteIconUrlFromSettings:a,getSnippetEditorData:l,getSnippetEditorMode:c,getSnippetEditorPreviewImageUrl:d,getSnippetEditorWordsToHighlight:u,isCornerstoneContent:p,getIsTerm:h,getContentLocale:m,getSiteName:g}=e("yoast-seo/editor"),y=n();return y.forEach(e=>{""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(e.value="%%"+e.name+"%%")}),{baseUrl:t(),data:l(),date:s(),faviconSrc:a(),keyword:r(),mobileImageSrc:d(),mode:c(),recommendedReplacementVariables:o(),replacementVariables:y,shoppingData:i(),wordsToHighlight:u(),isCornerstone:p(),isTaxonomy:h(),locale:m(),siteName:g()}}),(0,t.withDispatch)(function(e,t,{select:s}){const{updateData:r,switchMode:o,updateAnalysisData:n,findCustomFields:i}=e("yoast-seo/editor"),a=e("core/editor"),l=s("yoast-seo/editor").getPostId();return{onChange:(e,t)=>{switch(e){case"mode":o(t);break;case"slug":r({slug:t}),a&&a.editPost({slug:t});break;default:r({[e]:t})}},onChangeAnalysisData:n,onReplacementVariableSearchChange:Gt(l,i)}})])(e=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox"),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsWooSeoUpsell(),[]),o=(0,i.__)("Want an enhanced Google preview of how your WooCommerce products look in the search results?","wordpress-seo");return(0,f.jsx)(c.LocationConsumer,{children:t=>(0,f.jsx)(Yt,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,f.jsxs)(f.Fragment,{children:[r&&(0,f.jsx)(Qt,{link:s,text:o}),(0,f.jsx)(Wt.SnippetEditor,{...e,descriptionPlaceholder:(0,i.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:es,showCloseButton:!1,idSuffix:t})]})})})}),ss=(0,t.withSelect)(e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t()}})(S.Warning),rs=window.yoast.featureFlag,os=y()(S.Collapsible)`
499 499 h2 > button {
500 500 padding-left: 24px;
501 501 padding-top: 16px;
@@ -510,98 +510,211 @@
510 510 margin: 0 24px;
511 511 border-top: 1px solid rgba(0,0,0,0.2);
512 512 }
513 513
514 -`,ns=({initialIsOpen:e,id:t,...s})=>(0,f.jsx)(os,{hasPadding:!0,hasSeparator:!0,initialIsOpen:e,id:t,...s}),is=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i._n)("minute","minutes",e,"wordpress-seo"),title:(0,i.__)("Reading time","wordpress-seo"),linkTo:s
515 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about reading time","wordpress-seo")})},as=(0,z.makeOutboundLink)();function ls(e,t){return-1===e?(0,i.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,i.sprintf)(
514 +`,ns=(0,z.getDirectionalStyle)("right: 16px","left: 24px"),is=y().h2`
515 + // wrapInHeading's resets, as longhands so the icon's lane below can override one side.
516 + margin: 0 !important;
517 + padding-block: 0 !important;
518 + padding-inline-start: 0 !important;
519 + font-size: ${e=>e.headingProps.fontSize} !important;
520 + font-weight: ${e=>e.headingProps.fontWeight} !important;
521 + color: ${e=>e.headingProps.color} !important;
522 +
523 + ${S.StyledTitle} {
524 + font-weight: ${e=>e.headingProps.fontWeight};
525 + color: ${e=>e.headingProps.color};
526 + }
527 +
528 + position: relative;
529 + display: flex;
530 + align-items: center;
531 + // The suffix icon's lane, so the title and the link shrink before reaching it.
532 + padding-inline-end: 48px !important;
533 +
534 + &:hover {
535 + background-color: #f0f0f0;
536 + }
537 +
538 + // The link's wrapper, above the button's overlay so the link stays clickable.
539 + > span {
540 + position: relative;
541 + z-index: 1;
542 + flex: 0 0 auto;
543 + }
544 +
545 + ${S.StyledIconsButton} {
546 + flex: 0 1 auto;
547 + min-width: 0;
548 + width: auto;
549 + /*
550 + * Restates the shared h2 > button padding instead of inheriting a selector this heading does not
551 + * own. Physical on purpose: the collapsibles it has to line up with are padded physically too.
552 + */
553 + padding-block-start: 16px;
554 + ${(0,z.getDirectionalStyle)("padding-left: 24px","padding-right: 16px")};
555 + // The help link brings its own leading gap, so the button ends at its title.
556 + padding-inline-end: 0;
557 + // Only the heading paints the hover, so it covers the row in one even color.
558 + background-color: transparent;
559 +
560 + &:hover {
561 + background-color: transparent;
562 + }
563 +
564 + &::after {
565 + content: "";
566 + position: absolute;
567 + inset: 0;
568 + }
569 +
570 + /*
571 + * The ring moves to the overlay, because on the button it would frame the title alone. It cannot
572 + * be reused: elsewhere it is the browser's own, which no pseudo-element can draw. Colors from Button.js.
573 + */
574 + &:focus {
575 + outline: none;
576 + box-shadow: none;
577 + }
578 +
579 + &:focus::after {
580 + outline: 1px solid ${C.colors.$color_blue};
581 + outline-offset: -1px;
582 + box-shadow: 0 0 3px ${(0,C.rgba)(C.colors.$color_blue_dark,.8)};
583 + }
584 +
585 + > svg:last-child {
586 + position: absolute;
587 + ${ns};
588 + top: 50%;
589 + transform: translateY(-50%);
590 + margin: 0;
591 + }
592 + }
593 +`,as=({initialIsOpen:e=!1,id:t=null,HeaderHelpLink:s=null,headingProps:r=S.Collapsible.defaultProps.headingProps,...o})=>{const i=(0,n.useRef)(s);i.current=s;const a=(0,n.useRef)(r);a.current=r;const l=Boolean(s),c=(0,n.useMemo)(()=>l?function(e){const t=i.current;return(0,f.jsxs)(is,{headingProps:a.current,children:[(0,f.jsx)(S.StyledIconsButton,{...e}),(0,f.jsx)("span",{children:(0,f.jsx)(t,{})})]})}:null,[l]);return(0,f.jsx)(os,{hasPadding:!0,hasSeparator:!0,initialIsOpen:e,id:t,headingProps:r,...c?{Heading:c}:{},...o})};as.propTypes={initialIsOpen:m().bool,id:m().string,HeaderHelpLink:m().elementType,headingProps:m().shape({level:m().number,fontSize:m().string,fontWeight:m().string,color:m().string})};const ls=as,cs=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i._n)("minute","minutes",e,"wordpress-seo"),title:(0,i.__)("Reading time","wordpress-seo"),linkTo:s
594 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about reading time","wordpress-seo")})},ds=(0,z.makeOutboundLink)();function us(e,t){return-1===e?(0,i.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,i.sprintf)(
516 595 /* Translators: %1$s expands to the numeric Flesch reading ease score,
517 596 %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */
518 597 /* Translators: %1$s expands to the numeric Flesch reading ease score,
519 598 %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */
520 -(0,i.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case T.DIFFICULTY.NO_DATA:return(0,i.__)("no data","wordpress-seo");case T.DIFFICULTY.VERY_EASY:return(0,i.__)("very easy","wordpress-seo");case T.DIFFICULTY.EASY:return(0,i.__)("easy","wordpress-seo");case T.DIFFICULTY.FAIRLY_EASY:return(0,i.__)("fairly easy","wordpress-seo");case T.DIFFICULTY.OKAY:return(0,i.__)("okay","wordpress-seo");case T.DIFFICULTY.FAIRLY_DIFFICULT:return(0,i.__)("fairly difficult","wordpress-seo");case T.DIFFICULTY.DIFFICULT:return(0,i.__)("difficult","wordpress-seo");case T.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("very difficult","wordpress-seo")}}(t))}const cs=()=>{let e=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[e]),o=(0,n.useMemo)(()=>{const t=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const r=function(e){switch(e){case T.DIFFICULTY.FAIRLY_DIFFICULT:case T.DIFFICULTY.DIFFICULT:case T.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case T.DIFFICULTY.NO_DATA:return(0,i.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,i.__)("Good job!","wordpress-seo")}}(t);return(0,f.jsxs)("span",{children:[ls(e,t)," ",t>=T.DIFFICULTY.FAIRLY_DIFFICULT?(0,f.jsx)(as,{href:s,children:r+"."}):r]})}(e,r,t)},[e,r]);return-1===e&&(e="?"),(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i.__)("out of 100","wordpress-seo"),title:(0,i.__)("Flesch reading ease","wordpress-seo"),linkTo:s
521 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about Flesch reading ease","wordpress-seo"),description:o})},ds=({data:e=[],itemScreenReaderText:t="",className:s="",...r})=>{const o=(0,n.useMemo)(()=>{var t,s;return null!==(t=null===(s=(0,u.maxBy)(e,"number"))||void 0===s?void 0:s.number)&&void 0!==t?t:0},[e]);return(0,f.jsx)("ul",{className:U()("yoast-data-model",s),...r,children:e.map(({name:e,number:s})=>(0,f.jsxs)("li",{style:{"--yoast-width":s/o*100+"%"},children:[e,(0,f.jsx)("span",{children:s}),t&&(0,f.jsx)("span",{className:"screen-reader-text",children:(0,i.sprintf)(t,s)})]},`${e}_dataItem`))})};ds.propTypes={data:m().arrayOf(m().shape({name:m().string.isRequired,number:m().number.isRequired})),itemScreenReaderText:m().string,className:m().string};const us=ds,ps=(0,z.makeOutboundLink)(),hs=({location:e})=>{const s=(0,t.useSelect)(e=>{var t,s;return null===(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getPreference("isProminentWordsAvailable",!1))||void 0===t||t},[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1),[]),a=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-prominent_words`,""),[e]),l=(0,n.useMemo)(()=>{const e=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return(0,De.x)((0,i.sprintf)(
599 +(0,i.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case T.DIFFICULTY.NO_DATA:return(0,i.__)("no data","wordpress-seo");case T.DIFFICULTY.VERY_EASY:return(0,i.__)("very easy","wordpress-seo");case T.DIFFICULTY.EASY:return(0,i.__)("easy","wordpress-seo");case T.DIFFICULTY.FAIRLY_EASY:return(0,i.__)("fairly easy","wordpress-seo");case T.DIFFICULTY.OKAY:return(0,i.__)("okay","wordpress-seo");case T.DIFFICULTY.FAIRLY_DIFFICULT:return(0,i.__)("fairly difficult","wordpress-seo");case T.DIFFICULTY.DIFFICULT:return(0,i.__)("difficult","wordpress-seo");case T.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("very difficult","wordpress-seo")}}(t))}const ps=()=>{let e=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[e]),o=(0,n.useMemo)(()=>{const t=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const r=function(e){switch(e){case T.DIFFICULTY.FAIRLY_DIFFICULT:case T.DIFFICULTY.DIFFICULT:case T.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case T.DIFFICULTY.NO_DATA:return(0,i.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,i.__)("Good job!","wordpress-seo")}}(t);return(0,f.jsxs)("span",{children:[us(e,t)," ",t>=T.DIFFICULTY.FAIRLY_DIFFICULT?(0,f.jsx)(ds,{href:s,children:r+"."}):r]})}(e,r,t)},[e,r]);return-1===e&&(e="?"),(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i.__)("out of 100","wordpress-seo"),title:(0,i.__)("Flesch reading ease","wordpress-seo"),linkTo:s
600 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about Flesch reading ease","wordpress-seo"),description:o})},hs=({data:e=[],itemScreenReaderText:t="",className:s="",...r})=>{const o=(0,n.useMemo)(()=>{var t,s;return null!==(t=null===(s=(0,u.maxBy)(e,"number"))||void 0===s?void 0:s.number)&&void 0!==t?t:0},[e]);return(0,f.jsx)("ul",{className:U()("yoast-data-model",s),...r,children:e.map(({name:e,number:s})=>(0,f.jsxs)("li",{style:{"--yoast-width":s/o*100+"%"},children:[e,(0,f.jsx)("span",{children:s}),t&&(0,f.jsx)("span",{className:"screen-reader-text",children:(0,i.sprintf)(t,s)})]},`${e}_dataItem`))})};hs.propTypes={data:m().arrayOf(m().shape({name:m().string.isRequired,number:m().number.isRequired})),itemScreenReaderText:m().string,className:m().string};const ms=hs,gs=(0,z.makeOutboundLink)(),ys=({location:e})=>{const s=(0,t.useSelect)(e=>{var t,s;return null===(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getPreference("isProminentWordsAvailable",!1))||void 0===t||t},[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1),[]),a=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-prominent_words`,""),[e]),l=(0,n.useMemo)(()=>{const e=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return(0,De.x)((0,i.sprintf)(
522 601 // translators: %1$s and %2$s are replaced by opening and closing <a> tags.
523 602 // translators: %1$s and %2$s are replaced by opening and closing <a> tags.
524 -(0,i.__)("Read our %1$sultimate guide to keyword research%2$s to learn more about keyword research and keyword strategy.","wordpress-seo"),"<a>","</a>"),{a:(0,f.jsx)(ps,{href:e})})},[]),d=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
603 +(0,i.__)("Read our %1$sultimate guide to keyword research%2$s to learn more about keyword research and keyword strategy.","wordpress-seo"),"<a>","</a>"),{a:(0,f.jsx)(gs,{href:e})})},[]),d=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
525 604 // translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
526 605 // translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
527 606 (0,i.__)("With %1$s%3$s%2$s, this section will show you which words occur most often in your text. By checking these prominent words against your intended keyword(s), you'll know how to edit your text to be more focused.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,f.jsx)("b",{})}),[]),p=(0,t.useSelect)(e=>{var t,s;return null!==(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getProminentWords())&&void 0!==t?t:[]},[]),h=(0,n.useMemo)(()=>{const e=(0,i.sprintf)(
528 607 // translators: %1$s expands to Yoast SEO Premium.
529 608 // translators: %1$s expands to Yoast SEO Premium.
530 -(0,i.__)("Get %s to enjoy the benefits of prominent words","wordpress-seo"),"Yoast SEO Premium").split(/\s+/);return e.map((t,s)=>({name:t,number:e.length-s}))},[]),m=(0,n.useMemo)(()=>o?h:p.map(({word:e,occurrence:t})=>({name:e,number:t})),[p,h]);if(!s)return null;const{locationContext:g}=(0,c.useRootContext)();return(0,f.jsxs)("div",{className:"yoast-prominent-words",children:[(0,f.jsx)("div",{className:"yoast-field-group__title",children:(0,f.jsx)("b",{children:(0,i.__)("Prominent words","wordpress-seo")})}),!o&&(0,f.jsx)("p",{children:0===m.length?(0,i.__)("Once you add a bit more copy, we'll give you a list of words that occur the most in the content. These give an indication of what your content focuses on.","wordpress-seo"):(0,i.__)("The following words occur the most in the content. These give an indication of what your content focuses on. If the words differ a lot from your topic, you might want to rewrite your content accordingly.","wordpress-seo")}),o&&(0,f.jsx)("p",{children:d}),o&&(0,f.jsxs)(ps,{href:(0,r.addQueryArgs)(a,{context:g}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
609 +(0,i.__)("Get %s to enjoy the benefits of prominent words","wordpress-seo"),"Yoast SEO Premium").split(/\s+/);return e.map((t,s)=>({name:t,number:e.length-s}))},[]),m=(0,n.useMemo)(()=>o?h:p.map(({word:e,occurrence:t})=>({name:e,number:t})),[p,h]);if(!s)return null;const{locationContext:g}=(0,c.useRootContext)();return(0,f.jsxs)("div",{className:"yoast-prominent-words",children:[(0,f.jsx)("div",{className:"yoast-field-group__title",children:(0,f.jsx)("b",{children:(0,i.__)("Prominent words","wordpress-seo")})}),!o&&(0,f.jsx)("p",{children:0===m.length?(0,i.__)("Once you add a bit more copy, we'll give you a list of words that occur the most in the content. These give an indication of what your content focuses on.","wordpress-seo"):(0,i.__)("The following words occur the most in the content. These give an indication of what your content focuses on. If the words differ a lot from your topic, you might want to rewrite your content accordingly.","wordpress-seo")}),o&&(0,f.jsx)("p",{children:d}),o&&(0,f.jsxs)(gs,{href:(0,r.addQueryArgs)(a,{context:g}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
531 610 // translators: %s expands to `Premium` (part of add-on name).
532 611 // translators: %s expands to `Premium` (part of add-on name).
533 -(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,f.jsx)("p",{children:l}),(0,f.jsx)(us,{data:m,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */
534 -(0,i.__)("%d occurrences","wordpress-seo"),"aria-label":(0,i.__)("Prominent words","wordpress-seo"),className:o?"yoast-data-model--upsell":null})]})};hs.propTypes={location:m().string.isRequired};const ms=hs,gs=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let r=(0,i._n)("word","words",e.count,"wordpress-seo"),o=(0,i.__)("Word count","wordpress-seo"),a=(0,i.__)("Learn more about word count","wordpress-seo");return"character"===e.unit&&(r=(0,i._n)("character","characters",e.count,"wordpress-seo"),o=(0,i.__)("Character count","wordpress-seo"),
612 +(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,f.jsx)("p",{children:l}),(0,f.jsx)(ms,{data:m,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */
613 +(0,i.__)("%d occurrences","wordpress-seo"),"aria-label":(0,i.__)("Prominent words","wordpress-seo"),className:o?"yoast-data-model--upsell":null})]})};ys.propTypes={location:m().string.isRequired};const fs=ys,xs=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let r=(0,i._n)("word","words",e.count,"wordpress-seo"),o=(0,i.__)("Word count","wordpress-seo"),a=(0,i.__)("Learn more about word count","wordpress-seo");return"character"===e.unit&&(r=(0,i._n)("character","characters",e.count,"wordpress-seo"),o=(0,i.__)("Character count","wordpress-seo"),
535 614 /* translators: Hidden accessibility text. */
536 -a=(0,i.__)("Learn more about character count","wordpress-seo")),(0,f.jsx)(S.InsightsCard,{amount:e.count,unit:r,title:o,linkTo:s,linkText:a})},ys=(0,z.makeOutboundLink)(),fs=({location:e})=>{const t=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-text_formality`,""),[e]),s=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
615 +a=(0,i.__)("Learn more about character count","wordpress-seo")),(0,f.jsx)(S.InsightsCard,{amount:e.count,unit:r,title:o,linkTo:s,linkText:a})},ws=(0,z.makeOutboundLink)(),bs=({location:e})=>{const t=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-text_formality`,""),[e]),s=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
537 616 // Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
538 617 // Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
539 -(0,i.__)("%1$s%3$s%2$s will help you assess the formality level of your text.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,f.jsx)("b",{})}),[]);return(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{children:s}),(0,f.jsxs)(ys,{href:t,className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
618 +(0,i.__)("%1$s%3$s%2$s will help you assess the formality level of your text.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,f.jsx)("b",{})}),[]);return(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{children:s}),(0,f.jsxs)(ws,{href:t,className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
540 619 // Translators: %s expands to `Premium` (part of add-on name).
541 620 // Translators: %s expands to `Premium` (part of add-on name).
542 -(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};fs.propTypes={location:m().string.isRequired};const xs=fs,ws=({location:e,name:s})=>{const r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),o=p().isPremium,n=o?(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),a=(0,i.__)("Read more about text formality.","wordpress-seo");return r?(0,f.jsxs)("div",{className:"yoast-text-formality",children:[(0,f.jsxs)("div",{className:"yoast-field-group__title",children:[(0,f.jsx)("b",{children:(0,i.__)("Text formality","wordpress-seo")}),(0,f.jsx)(S.HelpIcon,{linkTo:n,linkText:a})]}),o?(0,f.jsx)(v.Slot,{name:s}):(0,f.jsx)(xs,{location:e})]}):null};ws.propTypes={location:m().string.isRequired,name:m().string.isRequired};const bs=ws,vs=({location:e="metabox"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]);return(0,f.jsxs)(ns,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,f.jsx)(ms,{location:e}),(0,f.jsxs)("div",{children:[s&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(cs,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(is,{}),(0,f.jsx)(gs,{})]}),(0,rs.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(bs,{location:e,name:"YoastTextFormalityMetabox"})]})]})};vs.propTypes={location:m().string};const _s=vs;var ks=s(465),js=s.n(ks),Ss=s(8738),Cs=s.n(Ss),Ts=s(7656),Rs=s.n(Ts);const Es=({isOpen:e,onClose:s,id:r,upsellLink:o,title:a="",description:l="",benefits:c=[],note:d="",ctbId:u="",modalTitle:p})=>{const{isBlackFriday:h,isWooCommerceActive:m,isProductEntity:g,isWooSEOActive:y}=(0,t.useSelect)(e=>{const t=e("yoast-seo/editor");return{isProductEntity:t.getIsProductEntity(),isWooCommerceActive:t.getIsWooCommerceActive(),isBlackFriday:t.isPromotionActive("black-friday-promotion"),isWooSEOActive:t.getIsWooSeoActive()}},[]),x=(0,n.useMemo)(()=>m&&g,[m,g]),w=(0,n.useRef)(null);return(0,f.jsx)(_.Modal,{isOpen:e,onClose:s,id:r,initialFocus:w,children:(0,f.jsx)(_.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,f.jsxs)(_.Modal.Container,{children:[(0,f.jsxs)(_.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-3 yst-items-center",children:[x?(0,f.jsx)(Rs(),{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,f.jsx)(G.h,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,f.jsx)(_.Modal.Title,{as:"h3",className:U()(x?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:p}),(0,f.jsx)(_.Modal.CloseButton,{className:"yst-top-2",onClick:s,screenReaderText:(0,i.__)("Close modal","wordpress-seo")})]}),(0,f.jsxs)(_.Modal.Container.Content,{className:"yst-p-0",children:[h&&(0,f.jsx)("div",{className:"yst-flex yst-font-semibold yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6",children:(0,f.jsx)("div",{className:"yst-mx-auto",children:(0,i.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,f.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,f.jsx)(_.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-medium yst-text-slate-800",children:a}),(0,f.jsx)("p",{className:"yst-mb-2",children:l}),Array.isArray(c)&&c.length>0&&(0,f.jsx)("ul",{className:"yst-my-2",children:c.map((e,t)=>(0,f.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,f.jsx)(Cs(),{className:"yst-mr-1 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),(0,f.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${r}-upsell-benefit-${t}`))}),"function"==typeof c&&c(),(0,f.jsxs)("div",{className:"yst-text-center",children:[(0,f.jsxs)(_.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5 yst-w-full",href:o,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":u,ref:w,children:[(0,f.jsx)(Zt(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
543 -(0,i.__)("Explore %s","wordpress-seo"),x&&!y?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,f.jsx)("span",{className:"yst-sr-only",children:(0,i.__)("Opens in a new tab","wordpress-seo")})]}),(0,f.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:d})]})]})]})]})})})},As=()=>{const[e,,,t,s]=(0,_.useToggleState)(!1),{locationContext:o}=(0,c.useRootContext)(),n=(0,_.useSvgAria)(),a=o.includes("sidebar"),l=o.includes("metabox"),d=a?"sidebar":"metabox",u=wpseoAdminL10n[a?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Es,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${d}`,upsellLink:(0,r.addQueryArgs)(u,{context:o}),modalTitle:(0,i.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,i.__)("Connect related content without the guesswork","wordpress-seo"),description:(0,De.x)((0,i.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */
544 -(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles. %sScans your content to:","wordpress-seo"),"<br />"),{br:(0,f.jsx)("br",{})}),benefits:[(0,i.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,i.__)("Build relevant internal links faster","wordpress-seo"),(0,i.__)("Strengthen your site’s structure","wordpress-seo"),(0,i.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,i.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),a&&(0,f.jsx)(Z,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,i.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(_.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(js(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...n})})})}),l&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(W,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(W.Text,{children:(0,i.__)("Internal linking suggestions","wordpress-seo")}),(0,f.jsxs)(_.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(js(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...n}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})},Is=({children:e})=>(0,f.jsx)("div",{children:e});Is.propTypes={renderPriority:m().number.isRequired,children:m().node.isRequired};const Ls=Is,Ns=({noIndex:e,onNoIndexChange:t,editorContext:s,isPrivateBlog:r=!1})=>{const o=(e=>{const t=(0,i.__)("No","wordpress-seo"),s=(0,i.__)("Yes","wordpress-seo"),r=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,i.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */
621 +(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};bs.propTypes={location:m().string.isRequired};const vs=bs,ks=({location:e,name:s})=>{const r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),o=p().isPremium,n=o?(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),a=(0,i.__)("Read more about text formality.","wordpress-seo");return r?(0,f.jsxs)("div",{className:"yoast-text-formality",children:[(0,f.jsxs)("div",{className:"yoast-field-group__title",children:[(0,f.jsx)("b",{children:(0,i.__)("Text formality","wordpress-seo")}),(0,f.jsx)(S.HelpIcon,{linkTo:n,linkText:a})]}),o?(0,f.jsx)(v.Slot,{name:s}):(0,f.jsx)(vs,{location:e})]}):null};ks.propTypes={location:m().string.isRequired,name:m().string.isRequired};const _s=ks,js=({location:e="metabox"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]);return(0,f.jsxs)(ls,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,f.jsx)(fs,{location:e}),(0,f.jsxs)("div",{children:[s&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(ps,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(cs,{}),(0,f.jsx)(xs,{})]}),(0,rs.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(_s,{location:e,name:"YoastTextFormalityMetabox"})]})]})};js.propTypes={location:m().string};const Ss=js;var Cs=s(465),Ts=s.n(Cs),Es=s(8738),Rs=s.n(Es),As=s(7656),Is=s.n(As);const Ls=({isOpen:e,onClose:s,id:r,upsellLink:o,title:a="",description:l="",benefits:c=[],note:d="",ctbId:u="",modalTitle:p})=>{const{isBlackFriday:h,isWooCommerceActive:m,isProductEntity:g,isWooSEOActive:y}=(0,t.useSelect)(e=>{const t=e("yoast-seo/editor");return{isProductEntity:t.getIsProductEntity(),isWooCommerceActive:t.getIsWooCommerceActive(),isBlackFriday:t.isPromotionActive("black-friday-promotion"),isWooSEOActive:t.getIsWooSeoActive()}},[]),x=(0,n.useMemo)(()=>m&&g,[m,g]),w=(0,n.useRef)(null);return(0,f.jsx)(k.Modal,{isOpen:e,onClose:s,id:r,initialFocus:w,children:(0,f.jsx)(k.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,f.jsxs)(k.Modal.Container,{children:[(0,f.jsxs)(k.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-3 yst-items-center",children:[x?(0,f.jsx)(Is(),{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,f.jsx)(G.h,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,f.jsx)(k.Modal.Title,{as:"h3",className:U()(x?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:p}),(0,f.jsx)(k.Modal.CloseButton,{className:"yst-top-2",onClick:s,screenReaderText:(0,i.__)("Close modal","wordpress-seo")})]}),(0,f.jsxs)(k.Modal.Container.Content,{className:"yst-p-0",children:[h&&(0,f.jsx)("div",{className:"yst-flex yst-font-semibold yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6",children:(0,f.jsx)("div",{className:"yst-mx-auto",children:(0,i.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,f.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,f.jsx)(k.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-medium yst-text-slate-800",children:a}),(0,f.jsx)("p",{className:"yst-mb-2",children:l}),Array.isArray(c)&&c.length>0&&(0,f.jsx)("ul",{className:"yst-my-2",children:c.map((e,t)=>(0,f.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,f.jsx)(Rs(),{className:"yst-mr-1 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),(0,f.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${r}-upsell-benefit-${t}`))}),"function"==typeof c&&c(),(0,f.jsxs)("div",{className:"yst-text-center",children:[(0,f.jsxs)(k.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5 yst-w-full",href:o,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":u,ref:w,children:[(0,f.jsx)(Zt(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
622 +(0,i.__)("Explore %s","wordpress-seo"),x&&!y?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,f.jsx)("span",{className:"yst-sr-only",children:(0,i.__)("Opens in a new tab","wordpress-seo")})]}),(0,f.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:d})]})]})]})]})})})},Ps=()=>{const[e,,,t,s]=(0,k.useToggleState)(!1),{locationContext:o}=(0,c.useRootContext)(),n=(0,k.useSvgAria)(),a=o.includes("sidebar"),l=o.includes("metabox"),d=a?"sidebar":"metabox",u=wpseoAdminL10n[a?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ls,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${d}`,upsellLink:(0,r.addQueryArgs)(u,{context:o}),modalTitle:(0,i.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,i.__)("Connect related content without the guesswork","wordpress-seo"),description:(0,De.x)((0,i.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */
623 +(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles. %sScans your content to:","wordpress-seo"),"<br />"),{br:(0,f.jsx)("br",{})}),benefits:[(0,i.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,i.__)("Build relevant internal links faster","wordpress-seo"),(0,i.__)("Strengthen your site’s structure","wordpress-seo"),(0,i.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,i.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),a&&(0,f.jsx)(Z,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,i.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(k.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(Ts(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...n})})})}),l&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(W,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(W.Text,{children:(0,i.__)("Internal linking suggestions","wordpress-seo")}),(0,f.jsxs)(k.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(Ts(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...n}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})},Ns=({children:e})=>(0,f.jsx)("div",{children:e});Ns.propTypes={renderPriority:m().number.isRequired,children:m().node.isRequired};const Ms=Ns,Os=({noIndex:e,onNoIndexChange:t,editorContext:s,isPrivateBlog:r=!1})=>{const o=(e=>{const t=(0,i.__)("No","wordpress-seo"),s=(0,i.__)("Yes","wordpress-seo"),r=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,i.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */
545 624 (0,i.__)("%1$s (current default for %2$s)","wordpress-seo"),r,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,i.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */
546 625 (0,i.__)("%1$s (current default for %2$s)","wordpress-seo"),r,e.postTypeNamePlural),value:"default"},{name:s,value:"index"},{name:t,value:"noindex"}]})(s);return(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsxs)(n.Fragment,{children:[r&&(0,f.jsx)(S.Alert,{type:"warning",children:(0,i.__)("Even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won't have an effect.","wordpress-seo")}),(0,f.jsx)(S.Select,{label:(0,i.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:t,id:(0,z.join)(["yoast-meta-robots-noindex",s]),options:o,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"]
547 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};Ns.propTypes={noIndex:m().string.isRequired,onNoIndexChange:m().func.isRequired,editorContext:m().object.isRequired,isPrivateBlog:m().bool};const Ps=({noFollow:e,onNoFollowChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,z.join)(["yoast-meta-robots-nofollow",s]);return(0,f.jsx)(S.RadioButtonGroup,{id:r,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,i.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:r,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"]
548 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});Ps.propTypes={noFollow:m().string.isRequired,onNoFollowChange:m().func.isRequired};const Ms=({advanced:e,onAdvancedChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,z.join)(["yoast-meta-robots-advanced",s]),o=`${r}-input`;return(0,f.jsx)(S.MultiSelect,{label:(0,i.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:r,inputId:o,options:[{name:(0,i.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,i.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,i.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"]
549 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});Ms.propTypes={advanced:m().array.isRequired,onAdvancedChange:m().func.isRequired};const Os=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Breadcrumbs Title","wordpress-seo"),id:(0,z.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"]
550 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});Os.propTypes={breadcrumbsTitle:m().string.isRequired,onBreadcrumbsTitleChange:m().func.isRequired};const Fs=({canonical:e,onCanonicalChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Canonical URL","wordpress-seo"),id:(0,z.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url"
551 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});Fs.propTypes={canonical:m().string.isRequired,onCanonicalChange:m().func.isRequired};const Ds=({noIndex:e,canonical:t,onNoIndexChange:s,onCanonicalChange:r,onLoad:o,isLoading:i,editorContext:a,isBreadcrumbsDisabled:l,advanced:c=[],onAdvancedChange:d=u.noop,noFollow:p="",onNoFollowChange:h=u.noop,breadcrumbsTitle:m="",onBreadcrumbsTitleChange:g=u.noop,isPrivateBlog:y=!1})=>{(0,n.useEffect)(()=>{setTimeout(()=>{i&&o()})});const x={noIndex:e,onNoIndexChange:s,editorContext:a,isPrivateBlog:y},w={noFollow:p,onNoFollowChange:h},b={advanced:c,onAdvancedChange:d},v={breadcrumbsTitle:m,onBreadcrumbsTitleChange:g},_={canonical:t,onCanonicalChange:r};return i?null:(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Ns,{...x}),a.isPost&&(0,f.jsx)(Ps,{...w}),a.isPost&&(0,f.jsx)(Ms,{...b}),!l&&(0,f.jsx)(Os,{...v}),(0,f.jsx)(Fs,{..._})]})};Ds.propTypes={noIndex:m().string.isRequired,canonical:m().string.isRequired,onNoIndexChange:m().func.isRequired,onCanonicalChange:m().func.isRequired,onLoad:m().func.isRequired,isLoading:m().bool.isRequired,editorContext:m().object.isRequired,isBreadcrumbsDisabled:m().bool.isRequired,isPrivateBlog:m().bool,advanced:m().array,onAdvancedChange:m().func,noFollow:m().string,onNoFollowChange:m().func,breadcrumbsTitle:m().string,onBreadcrumbsTitleChange:m().func};const qs=Ds,$s=(0,O.compose)([(0,t.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:r,getBreadcrumbsTitle:o,getCanonical:n,getIsLoading:i,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:r(),breadcrumbsTitle:o(),canonical:n(),isLoading:i(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,t.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:r,setBreadcrumbsTitle:o,setCanonical:n,loadAdvancedSettingsData:i}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:r,onBreadcrumbsTitleChange:o,onCanonicalChange:n,onLoad:i}})])(qs);var Bs=s(1426);const Us=y().div`
626 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};Os.propTypes={noIndex:m().string.isRequired,onNoIndexChange:m().func.isRequired,editorContext:m().object.isRequired,isPrivateBlog:m().bool};const Fs=({noFollow:e,onNoFollowChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,z.join)(["yoast-meta-robots-nofollow",s]);return(0,f.jsx)(S.RadioButtonGroup,{id:r,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,i.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:r,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"]
627 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});Fs.propTypes={noFollow:m().string.isRequired,onNoFollowChange:m().func.isRequired};const Ds=({advanced:e,onAdvancedChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,z.join)(["yoast-meta-robots-advanced",s]),o=`${r}-input`;return(0,f.jsx)(S.MultiSelect,{label:(0,i.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:r,inputId:o,options:[{name:(0,i.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,i.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,i.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"]
628 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});Ds.propTypes={advanced:m().array.isRequired,onAdvancedChange:m().func.isRequired};const qs=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Breadcrumbs Title","wordpress-seo"),id:(0,z.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"]
629 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});qs.propTypes={breadcrumbsTitle:m().string.isRequired,onBreadcrumbsTitleChange:m().func.isRequired};const $s=({canonical:e,onCanonicalChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Canonical URL","wordpress-seo"),id:(0,z.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url"
630 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});$s.propTypes={canonical:m().string.isRequired,onCanonicalChange:m().func.isRequired};const Bs=({noIndex:e,canonical:t,onNoIndexChange:s,onCanonicalChange:r,onLoad:o,isLoading:i,editorContext:a,isBreadcrumbsDisabled:l,advanced:c=[],onAdvancedChange:d=u.noop,noFollow:p="",onNoFollowChange:h=u.noop,breadcrumbsTitle:m="",onBreadcrumbsTitleChange:g=u.noop,isPrivateBlog:y=!1})=>{(0,n.useEffect)(()=>{setTimeout(()=>{i&&o()})});const x={noIndex:e,onNoIndexChange:s,editorContext:a,isPrivateBlog:y},w={noFollow:p,onNoFollowChange:h},b={advanced:c,onAdvancedChange:d},v={breadcrumbsTitle:m,onBreadcrumbsTitleChange:g},k={canonical:t,onCanonicalChange:r};return i?null:(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Os,{...x}),a.isPost&&(0,f.jsx)(Fs,{...w}),a.isPost&&(0,f.jsx)(Ds,{...b}),!l&&(0,f.jsx)(qs,{...v}),(0,f.jsx)($s,{...k})]})};Bs.propTypes={noIndex:m().string.isRequired,canonical:m().string.isRequired,onNoIndexChange:m().func.isRequired,onCanonicalChange:m().func.isRequired,onLoad:m().func.isRequired,isLoading:m().bool.isRequired,editorContext:m().object.isRequired,isBreadcrumbsDisabled:m().bool.isRequired,isPrivateBlog:m().bool,advanced:m().array,onAdvancedChange:m().func,noFollow:m().string,onNoFollowChange:m().func,breadcrumbsTitle:m().string,onBreadcrumbsTitleChange:m().func};const Us=Bs,Hs=(0,O.compose)([(0,t.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:r,getBreadcrumbsTitle:o,getCanonical:n,getIsLoading:i,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:r(),breadcrumbsTitle:o(),canonical:n(),isLoading:i(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,t.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:r,setBreadcrumbsTitle:o,setCanonical:n,loadAdvancedSettingsData:i}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:r,onBreadcrumbsTitleChange:o,onCanonicalChange:n,onLoad:i}})])(Us);var Ws=s(1426);const zs=y().div`
552 631 max-width: calc(527px + 1.5rem);
553 -`,Hs=e=>{const t="X"===e.socialMediumName?(0,i.__)("X share preview","wordpress-seo"):(0,i.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,_.useRootContext)();return(0,f.jsx)(_.Root,{children:(0,f.jsx)(Us,{children:(0,f.jsx)(_.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,r.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,i.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
554 -(0,i.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,f.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,f.jsx)(_.Label,{children:t}),(0,f.jsx)(Bs.Xi,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:u.noop,onImageClick:u.noop,onMouseHover:u.noop})]})})})})};Hs.propTypes={socialMediumName:m().oneOf(["Social","Twitter","X"]).isRequired};const Ws=Hs;var zs=s(2379),Ks=s(2547);class Ys extends n.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:r,socialMediumName:o,imageWarnings:i,description:a,descriptionInputPlaceholder:l,imageUrl:c,imageFallbackUrl:d,alt:u,title:p,titleInputPlaceholder:h,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,isPremium:x,location:w}=this.props;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Ws,{socialMediumName:o}),(0,f.jsx)(zs.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:p,titleInputPlaceholder:h,onRemoveImageClick:r,imageSelected:!!c,imageUrl:c,imageFallbackUrl:d,imageAltText:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:i,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:w})]})}}Ys.propTypes={title:m().string.isRequired,onTitleChange:m().func.isRequired,description:m().string.isRequired,onDescriptionChange:m().func.isRequired,imageUrl:m().string.isRequired,imageFallbackUrl:m().string,onSelectImageClick:m().func.isRequired,onRemoveImageClick:m().func.isRequired,socialMediumName:m().string.isRequired,isPremium:m().bool,imageWarnings:m().array,descriptionInputPlaceholder:m().string,titleInputPlaceholder:m().string,replacementVariables:Ks.replacementVariablesShape,recommendedReplacementVariables:Ks.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:m().func,location:m().string,alt:m().string},Ys.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const Vs=Ys,Gs=(e,t,s)=>{const[r,o]=(0,n.useState)(!1),a=(0,i.sprintf)(
632 +`,Ks=e=>{const t="X"===e.socialMediumName?(0,i.__)("X share preview","wordpress-seo"):(0,i.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,k.useRootContext)();return(0,f.jsx)(k.Root,{children:(0,f.jsx)(zs,{children:(0,f.jsx)(k.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,r.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,i.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
633 +(0,i.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,f.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,f.jsx)(k.Label,{children:t}),(0,f.jsx)(Ws.Xi,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:u.noop,onImageClick:u.noop,onMouseHover:u.noop})]})})})})};Ks.propTypes={socialMediumName:m().oneOf(["Social","Twitter","X"]).isRequired};const Ys=Ks;var Vs=s(2379),Gs=s(2547);class Xs extends n.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:r,socialMediumName:o,imageWarnings:i,description:a,descriptionInputPlaceholder:l,imageUrl:c,imageFallbackUrl:d,alt:u,title:p,titleInputPlaceholder:h,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,isPremium:x,location:w}=this.props;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Ys,{socialMediumName:o}),(0,f.jsx)(Vs.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:p,titleInputPlaceholder:h,onRemoveImageClick:r,imageSelected:!!c,imageUrl:c,imageFallbackUrl:d,imageAltText:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:i,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:w})]})}}Xs.propTypes={title:m().string.isRequired,onTitleChange:m().func.isRequired,description:m().string.isRequired,onDescriptionChange:m().func.isRequired,imageUrl:m().string.isRequired,imageFallbackUrl:m().string,onSelectImageClick:m().func.isRequired,onRemoveImageClick:m().func.isRequired,socialMediumName:m().string.isRequired,isPremium:m().bool,imageWarnings:m().array,descriptionInputPlaceholder:m().string,titleInputPlaceholder:m().string,replacementVariables:Gs.replacementVariablesShape,recommendedReplacementVariables:Gs.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:m().func,location:m().string,alt:m().string},Xs.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const Zs=Xs,Js=(e,t,s)=>{const[r,o]=(0,n.useState)(!1),a=(0,i.sprintf)(
555 634 /* Translators: %1$s expands to the jpg format, %2$s expands to the png format,
556 635 %3$s expands to the webp format, %4$s expands to the gif format. */
557 636 /* Translators: %1$s expands to the jpg format, %2$s expands to the png format,
558 637 %3$s expands to the webp format, %4$s expands to the gif format. */
559 -(0,i.__)("No image was found that we can automatically set as your social image. Please use %1$s, %2$s, %3$s or %4$s formats to ensure it displays correctly on social media.","wordpress-seo"),"JPG","PNG","WEBP","GIF");return(0,n.useEffect)(()=>{o(""===t&&e.toLowerCase().endsWith(".avif"))},[e,t]),r?[a]:s},Xs=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const[l,c]=(0,n.useState)(""),d=Gs(r,o,i),u=(0,n.useCallback)(e=>{c(e.detail.metaTabId)},[c]);(0,n.useEffect)(()=>(setTimeout(t),window.addEventListener("YoastSEO:metaTabChange",u),()=>{window.removeEventListener("YoastSEO:metaTabChange",u)}),[]);const p={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:d,activeMetaTabId:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastFacebookPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:p}):(0,f.jsx)(Vs,{...p})};Xs.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const Zs=Xs;function Js(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const s=t.state().get("selection").first();var r;e({type:(r=s.attributes).subtype,width:r.width,height:r.height,url:r.url,id:r.id,sizes:r.sizes,alt:r.alt||r.title||r.name})}),t})(e).open()}const Qs=()=>{Js(e=>(0,t.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,r=(0,zs.determineFacebookImageMode)({width:t,height:s}),o=zs.FACEBOOK_IMAGE_SIZES[r+"Width"],n=zs.FACEBOOK_IMAGE_SIZES[r+"Height"],i=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=n);return{url:i?i.url:e.url,id:e.id,warnings:(0,z.validateFacebookImage)(e),alt:e.alt||""}})(e)))},er=(0,O.compose)([(0,t.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:r,getSeoTitle:o,getFacebookImageUrl:n,getImageFallback:i,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:u,getSeoTitleTemplateNoFallback:h,getSocialTitleTemplate:m,getSeoDescriptionTemplate:g,getSocialDescriptionTemplate:y,getReplacedExcerpt:f,getFacebookAltText:x}=e("yoast-seo/editor");return{imageUrl:n(),imageFallbackUrl:i(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:y()||s()||g()||f()||"",title:r(),titlePreviewFallback:m()||o()||h()||u()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!p().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:x()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:r,setFacebookPreviewDescription:o,clearFacebookPreviewImage:n,loadFacebookPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Qs,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(Zs),tr=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const l=Gs(r,o,i);(0,n.useEffect)(()=>{setTimeout(t)},[]);const c={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastTwitterPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:c}):(0,f.jsx)(Vs,{...c})};tr.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const sr=tr,rr=()=>{Js(e=>(0,t.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,u.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=zs.TWITTER_IMAGE_SIZES[t+"Width"],r=zs.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=r);return{url:o?o.url:e.url,id:e.id,warnings:(0,z.validateTwitterImage)(e),alt:e.alt||""}})(e)))},or=(0,O.compose)([(0,t.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:r,getFacebookImageUrl:o,getFacebookTitle:n,getFacebookDescription:i,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:u,getRecommendedReplaceVars:h,getReplaceVars:m,getSiteUrl:g,getSeoTitleTemplate:y,getSeoTitleTemplateNoFallback:f,getSocialTitleTemplate:x,getSeoDescriptionTemplate:w,getSocialDescriptionTemplate:b,getReplacedExcerpt:v,getTwitterAltText:_}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:o()||u(),recommendedReplacementVariables:h(),replacementVariables:m(),description:t(),descriptionPreviewFallback:b()||i()||a()||w()||v()||"",title:s(),titlePreviewFallback:x()||n()||l()||f()||y()||"",imageWarnings:c(),siteUrl:g(),isPremium:!!p().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:_()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:r,setTwitterPreviewDescription:o,clearTwitterPreviewImage:n,loadTwitterPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:rr,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(sr),nr=y().legend`
638 +(0,i.__)("No image was found that we can automatically set as your social image. Please use %1$s, %2$s, %3$s or %4$s formats to ensure it displays correctly on social media.","wordpress-seo"),"JPG","PNG","WEBP","GIF");return(0,n.useEffect)(()=>{o(""===t&&e.toLowerCase().endsWith(".avif"))},[e,t]),r?[a]:s},Qs=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const[l,c]=(0,n.useState)(""),d=Js(r,o,i),u=(0,n.useCallback)(e=>{c(e.detail.metaTabId)},[c]);(0,n.useEffect)(()=>(setTimeout(t),window.addEventListener("YoastSEO:metaTabChange",u),()=>{window.removeEventListener("YoastSEO:metaTabChange",u)}),[]);const p={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:d,activeMetaTabId:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastFacebookPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:p}):(0,f.jsx)(Zs,{...p})};Qs.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const er=Qs;function tr(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const s=t.state().get("selection").first();var r;e({type:(r=s.attributes).subtype,width:r.width,height:r.height,url:r.url,id:r.id,sizes:r.sizes,alt:r.alt||r.title||r.name})}),t})(e).open()}const sr=()=>{tr(e=>(0,t.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,r=(0,Vs.determineFacebookImageMode)({width:t,height:s}),o=Vs.FACEBOOK_IMAGE_SIZES[r+"Width"],n=Vs.FACEBOOK_IMAGE_SIZES[r+"Height"],i=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=n);return{url:i?i.url:e.url,id:e.id,warnings:(0,z.validateFacebookImage)(e),alt:e.alt||""}})(e)))},rr=(0,O.compose)([(0,t.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:r,getSeoTitle:o,getFacebookImageUrl:n,getImageFallback:i,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:u,getSeoTitleTemplateNoFallback:h,getSocialTitleTemplate:m,getSeoDescriptionTemplate:g,getSocialDescriptionTemplate:y,getReplacedExcerpt:f,getFacebookAltText:x}=e("yoast-seo/editor");return{imageUrl:n(),imageFallbackUrl:i(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:y()||s()||g()||f()||"",title:r(),titlePreviewFallback:m()||o()||h()||u()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!p().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:x()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:r,setFacebookPreviewDescription:o,clearFacebookPreviewImage:n,loadFacebookPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:sr,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(er),or=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const l=Js(r,o,i);(0,n.useEffect)(()=>{setTimeout(t)},[]);const c={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastTwitterPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:c}):(0,f.jsx)(Zs,{...c})};or.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const nr=or,ir=()=>{tr(e=>(0,t.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,u.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=Vs.TWITTER_IMAGE_SIZES[t+"Width"],r=Vs.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=r);return{url:o?o.url:e.url,id:e.id,warnings:(0,z.validateTwitterImage)(e),alt:e.alt||""}})(e)))},ar=(0,O.compose)([(0,t.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:r,getFacebookImageUrl:o,getFacebookTitle:n,getFacebookDescription:i,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:u,getRecommendedReplaceVars:h,getReplaceVars:m,getSiteUrl:g,getSeoTitleTemplate:y,getSeoTitleTemplateNoFallback:f,getSocialTitleTemplate:x,getSeoDescriptionTemplate:w,getSocialDescriptionTemplate:b,getReplacedExcerpt:v,getTwitterAltText:k}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:o()||u(),recommendedReplacementVariables:h(),replacementVariables:m(),description:t(),descriptionPreviewFallback:b()||i()||a()||w()||v()||"",title:s(),titlePreviewFallback:x()||n()||l()||f()||y()||"",imageWarnings:c(),siteUrl:g(),isPremium:!!p().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:k()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:r,setTwitterPreviewDescription:o,clearTwitterPreviewImage:n,loadTwitterPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:ir,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(nr),lr=y().legend`
560 639 margin: 16px 0;
561 640 padding: 0;
562 641 color: ${C.colors.$color_headings};
563 642 font-size: 12px;
564 643 font-weight: 300;
565 -`,ir=y().legend`
644 +`,cr=y().legend`
566 645 margin: 0 0 16px;
567 646 padding: 0;
568 647 color: ${C.colors.$color_headings};
569 648 font-size: 12px;
570 649 font-weight: 300;
571 -`,ar=y().div`
650 +`,dr=(0,z.makeOutboundLink)(y().a`
651 + display: inline-block;
652 + position: relative;
653 + outline: none;
654 + text-decoration: none;
655 + border-radius: 100%;
656 + width: 24px;
657 + height: 24px;
658 + margin: -4px 0;
659 + vertical-align: middle;
660 +
661 + color: ${C.colors.$color_help_text};
662 +
663 + &:hover,
664 + &:focus {
665 + color: ${C.colors.$color_snippet_focus};
666 + }
667 +
668 + // Overwrite the default blue active color for links.
669 + &:active {
670 + color: ${C.colors.$color_help_text};
671 + }
672 +
673 + &::before {
674 + position: absolute;
675 + top: 0;
676 + left: 0;
677 + padding: 2px;
678 + content: "\f223";
679 + }
680 +`),ur=y()(dr)`
681 + margin-block: 0;
682 + margin-inline: 8px 0;
683 +`,pr=()=>(0,f.jsx)(ur,{href:wpseoAdminL10n["shortlinks.social_previews_info"],className:"dashicons",children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
684 +(0,i.__)("Learn more about social previews","wordpress-seo")})}),hr=y().div`
572 685 padding: 16px;
573 -`,lr=({useOpenGraphData:e,useTwitterData:t})=>(0,f.jsxs)(n.Fragment,{children:[t&&e&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)(ns,{hasSeparator:!1
574 -/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,i.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,children:[(0,f.jsx)(ir,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(er,{}),(0,f.jsx)(nr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),(0,f.jsx)(ns,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(or,{})})]}),e&&!t&&(0,f.jsxs)(ar,{children:[(0,f.jsx)(ir,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(er,{})]}),!e&&t&&(0,f.jsxs)(ar,{children:[(0,f.jsx)(ir,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(or,{})]})]});lr.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const cr=lr,dr=(0,t.withSelect)(e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:r}=t();return{useOpenGraphData:s,useTwitterData:r}})(cr);function ur({target:e}){return(0,f.jsx)(E,{target:e,children:(0,f.jsx)(dr,{})})}ur.propTypes={target:m().string.isRequired};const pr=(0,z.makeOutboundLink)(),hr=y().div`
686 +`,mr=({useOpenGraphData:e,useTwitterData:t})=>(0,f.jsxs)(n.Fragment,{children:[t&&e&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)(ls,{hasSeparator:!1
687 +/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,i.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,HeaderHelpLink:pr,children:[(0,f.jsx)(cr,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(rr,{}),(0,f.jsx)(lr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),(0,f.jsx)(ls,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(ar,{})})]}),e&&!t&&(0,f.jsxs)(hr,{children:[(0,f.jsxs)(cr,{children:[(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo"),(0,f.jsx)(pr,{})]}),(0,f.jsx)(rr,{})]}),!e&&t&&(0,f.jsxs)(hr,{children:[(0,f.jsx)(cr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(ar,{})]})]});mr.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const gr=mr,yr=(0,t.withSelect)(e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:r}=t();return{useOpenGraphData:s,useTwitterData:r}})(gr);function fr({target:e}){return(0,f.jsx)(R,{target:e,children:(0,f.jsx)(yr,{})})}fr.propTypes={target:m().string.isRequired};const xr=(0,z.makeOutboundLink)(),wr=y().div`
575 688 padding: 16px;
576 -`,mr="yoast-seo/editor";function gr({location:e,show:t}){return t?(0,f.jsxs)(S.Alert,{type:"info",children:[(0,i.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */
577 -(0,i.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,f.jsx)(pr,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,i.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */
578 -(0,i.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}gr.propTypes={show:m().bool.isRequired,location:m().string.isRequired};const yr=(e,s,r)=>{const o=(0,t.useSelect)(e=>e(mr).getIsProduct(),[]),n=(0,t.useSelect)(e=>e(mr).getIsWooSeoActive(),[]),a=o&&n?{name:(0,i.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===s);return[{name:(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ /* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */
579 -(0,i.__)("Default for %1$s (%2$s)","wordpress-seo"),r,a?a.name:""),value:""},...e]},fr=(e,t)=>(0,De.x)((e=>(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ /* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */
580 -(0,i.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"<link>","</link>"))(e),{link:(0,f.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})}),xr=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,f.jsx)(S.FieldGroup,{label:e,linkTo:t
581 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});xr.propTypes={helpTextTitle:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextDescription:m().string.isRequired};const wr=({schemaPageTypeChange:e=u.noop,schemaPageTypeSelected:s=null,pageTypeOptions:r,schemaArticleTypeChange:o=u.noop,schemaArticleTypeSelected:a=null,articleTypeOptions:l,showArticleTypeInput:c,additionalHelpTextLink:d,helpTextLink:p,helpTextTitle:h,helpTextDescription:m,postTypeName:g,displayFooter:y=!1,defaultPageType:x,defaultArticleType:w,location:b,isNewsEnabled:v=!1})=>{const _=yr(r,x,g),k=yr(l,w,g),j=(0,t.useSelect)(e=>e(mr).selectLink("https://yoa.st/product-schema-metabox"),[]),C=(0,t.useSelect)(e=>e(mr).getIsWooSeoUpsell(),[]),[T,R]=(0,n.useState)(a),E=(0,i.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),A=(0,t.useSelect)(e=>e(mr).getIsProduct(),[]),I=(0,t.useSelect)(e=>e(mr).getIsWooSeoActive(),[]),L=(0,t.useSelect)(e=>e(mr).selectAdminLink("?page=wpseo_page_settings"),[]),N=A&&I,P=(0,n.useCallback)((e,t)=>{R(t)},[]);return(0,n.useEffect)(()=>{P(null,a)},[a]),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(xr,{helpTextLink:p,helpTextTitle:h,helpTextDescription:m}),(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("What type of page or content is this?","wordpress-seo"),linkTo:d
582 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about page or content types","wordpress-seo")}),C&&(0,f.jsx)(Qt,{link:j,text:E}),(0,f.jsx)(S.Select,{id:(0,z.join)(["yoast-schema-page-type",b]),options:_,label:(0,i.__)("Page type","wordpress-seo"),onChange:e,selected:N?"ItemPage":s,disabled:N}),c&&(0,f.jsx)(S.Select,{id:(0,z.join)(["yoast-schema-article-type",b]),options:k,label:(0,i.__)("Article type","wordpress-seo"),onChange:o,selected:a,onOptionFocus:P}),(0,f.jsx)(gr,{location:b,show:!v&&(M=T,O=w,"NewsArticle"===M||""===M&&"NewsArticle"===O)}),y&&!N&&(0,f.jsx)("p",{children:fr(g,L)}),N&&(0,f.jsx)("p",{children:(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
583 -(0,i.__)("You have %1$s activated on your site, automatically setting the Page type for your products to 'Item Page'. As a result, the Page type selection is disabled.","wordpress-seo"),"Yoast WooCommerce SEO")})]});var M,O},br=m().arrayOf(m().shape({name:m().string,value:m().string}));wr.propTypes={schemaPageTypeChange:m().func,schemaPageTypeSelected:m().string,pageTypeOptions:br.isRequired,schemaArticleTypeChange:m().func,schemaArticleTypeSelected:m().string,articleTypeOptions:br.isRequired,showArticleTypeInput:m().bool.isRequired,additionalHelpTextLink:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,defaultPageType:m().string.isRequired,defaultArticleType:m().string.isRequired,location:m().string.isRequired,isNewsEnabled:m().bool};const vr=({isMetabox:e,showArticleTypeInput:t=!1,articleTypeLabel:s="",additionalHelpTextLink:r="",pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d=!1,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m})=>{const g=(0,f.jsx)(wr,{showArticleTypeInput:t,articleTypeLabel:s,additionalHelpTextLink:r,pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m});return e?(0,n.createPortal)((0,f.jsx)(hr,{children:g}),document.getElementById("wpseo-meta-section-schema")):g};vr.propTypes={isMetabox:m().bool.isRequired,showArticleTypeInput:m().bool,articleTypeLabel:m().string,additionalHelpTextLink:m().string,pageTypeLabel:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,loadSchemaArticleData:m().func.isRequired,loadSchemaPageData:m().func.isRequired,location:m().string.isRequired};const _r=vr;class kr{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return kr.articleTypeInput.getAttribute("data-default")}static get articleType(){return kr.articleTypeInput.value}static set articleType(e){kr.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return kr.pageTypeInput.getAttribute("data-default")}static get pageType(){return kr.pageTypeInput.value}static set pageType(e){kr.pageTypeInput.value=e}}const jr=e=>{const t=null!==kr.articleTypeInput;(0,n.useEffect)(()=>{e.loadSchemaPageData(),t&&e.loadSchemaArticleData()},[]);const{pageTypeOptions:s,articleTypeOptions:r}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,i.__)("Article type","wordpress-seo"),pageTypeLabel:(0,i.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,i.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,i.__)("This helps search engines understand your website and your content. You can change some of your settings for this page below.","wordpress-seo"),showArticleTypeInput:t,pageTypeOptions:s,articleTypeOptions:r},a={...e,...o,...(l=e.location,"metabox"===l?{helpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.page_type"],isMetabox:!0}:{helpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.page_type"],isMetabox:!1})};var l;return(0,f.jsx)(_r,{...a})};jr.propTypes={displayFooter:m().bool.isRequired,schemaPageTypeSelected:m().string.isRequired,schemaArticleTypeSelected:m().string.isRequired,defaultArticleType:m().string.isRequired,defaultPageType:m().string.isRequired,loadSchemaPageData:m().func.isRequired,loadSchemaArticleData:m().func.isRequired,schemaPageTypeChange:m().func.isRequired,schemaArticleTypeChange:m().func.isRequired,location:m().string.isRequired};const Sr=(0,O.compose)([(0,t.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:r,getArticleType:o,getDefaultArticleType:n}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:i,isNewsEnabled:a}=t();return{displayFooter:i,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:n(),defaultPageType:r()}}),(0,t.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:r,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:r,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),Ut()])(jr),Cr=window.yoast.relatedKeyphraseSuggestions;function Tr({requestLimitReached:e,isSuccess:t,response:s,requestHasData:r,relatedKeyphrases:o}){return e?"requestLimitReached":!t&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,u.isEmpty)(e)&&"error"in e}(s)?"requestFailed":r?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function Rr({keyphrase:e="",relatedKeyphrases:t=[],renderAction:s=null,requestLimitReached:r=!1,countryCode:o,setCountry:i,newRequest:a,response:l={},isRtl:c=!1,userLocale:d="en_US",isPending:u=!1,isSuccess:p=!1,requestHasData:h=!0,isPremium:m=!1,semrushUpsellLink:g="",premiumUpsellLink:y=""}){var x,w;const[b,v]=(0,n.useState)(o),k=(0,n.useCallback)(async()=>{a(o,e),v(o)},[o,e,a]);return(0,f.jsxs)(_.Root,{context:{isRtl:c},children:[!r&&!m&&(0,f.jsx)(Cr.PremiumUpsell,{url:y,className:"yst-mb-4"}),!r&&(0,f.jsx)(Cr.CountrySelector,{countryCode:o,activeCountryCode:b,onChange:i,onClick:k,className:"yst-mb-4",userLocale:d.split("_")[0]}),!u&&(0,f.jsx)(Cr.UserMessage,{variant:Tr({requestLimitReached:r,isSuccess:p,response:l,requestHasData:h,relatedKeyphrases:t}),upsellLink:g}),(0,f.jsx)(Cr.KeyphrasesTable,{relatedKeyphrases:t,columnNames:null==l||null===(x=l.results)||void 0===x?void 0:x.columnNames,data:null==l||null===(w=l.results)||void 0===w?void 0:w.rows,isPending:u,renderButton:s,className:"yst-mt-4"})]})}Rr.propTypes={keyphrase:m().string,relatedKeyphrases:m().array,renderAction:m().func,requestLimitReached:m().bool,countryCode:m().string.isRequired,setCountry:m().func.isRequired,newRequest:m().func.isRequired,response:m().object,isRtl:m().bool,userLocale:m().string,isPending:m().bool,isSuccess:m().bool,requestHasData:m().bool,isPremium:m().bool,semrushUpsellLink:m().string,premiumUpsellLink:m().string};const Er=(0,O.compose)([(0,t.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:o,getSEMrushRequestResponse:n,getSEMrushRequestIsSuccess:i,getSEMrushIsRequestPending:a,getSEMrushRequestHasData:l,getPreference:c,getIsPremium:d,selectLinkParams:u}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:o(),response:n(),isSuccess:i(),isPending:a(),requestHasData:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,r.addQueryArgs)("https://yoa.st/semrush-prices",u()),premiumUpsellLink:(0,r.addQueryArgs)("https://yoa.st/413",u())}}),(0,t.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(Rr),Ar=({isOpen:e,closeModal:t,id:s,upsellLink:r})=>(0,f.jsx)(Es,{isOpen:e,onClose:t,id:s,upsellLink:r,title:(0,i.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,i.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,i.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Ir=()=>{const[e,,,t,s]=(0,_.useToggleState)(!1),o=(0,n.useContext)(c.LocationContext),{locationContext:a}=(0,c.useRootContext)(),l=(0,_.useSvgAria)(),d=wpseoAdminL10n["sidebar"===o.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ar,{isOpen:e,closeModal:s,upsellLink:(0,r.addQueryArgs)(d,{context:a}),id:`yoast-additional-keyphrases-modal-${o}`}),"sidebar"===o&&(0,f.jsx)(Z,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,i.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:C.colors.$color_grey_medium_dark},onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(_.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(js(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...l})})})}),"metabox"===o&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(W,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(S.SvgIcon,{icon:"plus",color:C.colors.$color_grey_medium_dark}),(0,f.jsx)(W.Text,{children:(0,i.__)("Add related keyphrase","wordpress-seo")}),(0,f.jsxs)(_.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(js(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...l}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})};var Lr=s(998),Nr=s.n(Lr),Pr=s(818),Mr=s.n(Pr),Or=s(4289);const Fr=({store:e="yoast-seo/editor",location:s="sidebar"})=>{const o="black-friday-promotion",a=(0,t.useSelect)(t=>t(e).getIsPremium(),[e]),l=(0,t.useSelect)(t=>t(e).selectLinkParams(),[e]),c=(0,t.useSelect)(t=>t(e).isPromotionActive(o),[e]),d=(0,t.useSelect)(t=>t(e).getIsWooCommerceActive(),[e]),u=(0,t.useSelect)(t=>t(e).isAlertDismissed(o),[e]),p=(0,n.useCallback)(()=>{(0,t.dispatch)(e).dismissAlert(o)},[e,o]),h=(0,r.addQueryArgs)("https://yoa.st/black-friday-sale",l),m=(0,_.useSvgAria)();return a||!c||u?null:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)("div",{className:U()("yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm yst-mt-2",d?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,f.jsxs)(_.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,i.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,f.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:p,children:[(0,f.jsx)(Nr(),{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,f.jsx)("div",{className:"yst-sr-only",children:(0,i.__)("Dismiss","wordpress-seo")})]}),(0,f.jsxs)("div",{className:U()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,f.jsxs)("div",{className:d?"yst-text-woo-light":"yst-text-primary-500",children:[(0,f.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,i.__)("30% OFF","wordpress-seo")}),(0,f.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:d?(0,f.jsxs)(f.Fragment,{children:["Yoast WooCommerce SEO ",(0,f.jsx)(Rs(),{className:"yst-w-4 yst-scale-x-[-1]",...m})]}):(0,f.jsxs)(f.Fragment,{children:[" Yoast SEO Premium ",(0,f.jsx)(Or.h,{className:"yst-w-4",...m})]})})]}),(0,f.jsx)("div",{className:"yst-flex yst-items-end",children:(0,f.jsxs)(_.Button,{as:"a",className:U()("sidebar"===s?"yst-w-full":"yst-w-[140px]","yst-flex yst-gap-1 yst-w-[140px] yst-h-7 yst-mt-4"),variant:"upsell",href:h,target:"_blank",rel:"noreferrer",children:[(0,i.__)("Buy now!","wordpress-seo"),(0,f.jsx)(Mr(),{className:"yst-w-4 rtl:yst-rotate-180",...m})]})})]})]})})};function Dr(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}Fr.propTypes={store:m().string,location:m().oneOf(["sidebar","metabox"]),inEditorIntro:m().bool};const qr=()=>{const{editorMode:e,activeAIButtonId:s}=(0,t.useSelect)(e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()}),[]),{setMarkerStatus:r}=(0,t.useDispatch)("yoast-seo/editor");(0,n.useEffect)(()=>(r("visual"===e&&s||"text"===e?"disabled":"enabled"),()=>{r("disabled")}),[e,s])};var $r=s(3301);const Br=(0,O.compose)([(0,t.withDispatch)(e=>{const{setFeatureModalStatus:t}=e($r.bw);return{setFeatureModalStatus:t}})])(({location:e,setFeatureModalStatus:s})=>{const r=(0,n.useCallback)(()=>{s($r.Qo.idle)},[s]),o=(0,t.useSelect)(e=>e($r.bw).selectIsMinPostsMet(),[]),a="yoast-content-planner-min-posts-notice-"+e;return(0,f.jsx)(_.Root,{children:(0,f.jsxs)("div",{className:U()("metabox"===e&&"yst-flex yst-items-center yst-gap-3"),children:[(0,f.jsx)(_.Button,{variant:"ai-secondary",onClick:r,disabled:!o,"aria-describedby":o?null:a,className:"sidebar"===e?"yst-w-full":"",children:(0,i.__)("Get content suggestions","wordpress-seo")}),!o&&(0,f.jsx)("span",{id:a,className:U()("yst-text-sm yst-text-slate-500 yst-italic","sidebar"===e&&"yst-flex yst-mt-1 yst-justify-center"),children:(0,i.__)("Available after 5 published posts","wordpress-seo")})]})})});var Ur=s(6692);const Hr=({children:e})=>(0,f.jsxs)("div",{className:"yst-p-4 yst-flex yst-flex-col yst-gap-3",children:[(0,f.jsx)(Ur.h,{className:"yst-w-14 yst-text-primary-500"}),e]}),Wr=({withPromptForContentSuggestions:e,className:t})=>(0,f.jsx)("p",{className:U()("yst-text-slate-600 yst-my-0",t),children:e?(0,i.__)("Optimize your content for discovery or get new content suggestions.","wordpress-seo"):(0,i.__)("Optimize your content for discovery.","wordpress-seo")}),zr=(Kr=Fr,e=>!(()=>{var e,s;const r=(0,t.select)("yoast-seo/editor").getIsPremium(),o=(0,t.select)("yoast-seo/editor").getWarningMessage();return(r&&null!==(e=null===(s=(0,t.select)("yoast-seo-premium/editor"))||void 0===s?void 0:s.getMetaboxWarning())&&void 0!==e?e:[]).length>0||o.length>0})()&&(0,f.jsx)(Kr,{...e}));var Kr;function Yr({settings:e}){const{isTerm:s,isPost:r,isAiFeatureActive:o}=(0,t.useSelect)(e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isPost:"post"===e("yoast-seo/editor").getPostType(),isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive")}),[]),a=Dr();return a&&qr(),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastMetabox",children:[(0,f.jsx)(Ls,{renderPriority:0,children:(0,f.jsx)(ss,{})},"warning"),(0,f.jsx)(Ls,{renderPriority:1,children:(0,f.jsxs)(Hr,{children:[(0,f.jsx)(zr,{location:"metabox"}),(0,f.jsx)(Wr,{withPromptForContentSuggestions:o&&a&&r}),r&&a&&o&&(0,f.jsx)(Br,{location:"metabox"})]})},"editor-intro"),e.isKeywordAnalysisActive&&(0,f.jsxs)(Ls,{renderPriority:8,children:[(0,f.jsx)(Bt.TopicInputs,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,f.jsx)(v.Fill,{name:"YoastRelatedKeyphrases",children:(0,f.jsx)(Er,{})})]},"keyword-input"),(0,f.jsx)(Ls,{renderPriority:9,children:(0,f.jsx)(ns,{id:"yoast-snippet-editor-metabox",title:(0,i.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,f.jsx)(ts,{hasPaperStyle:!1})})},"search-appearance"),e.isContentAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:10,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:20,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo-analysis"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Ir,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ls,{renderPriority:23,children:(0,f.jsx)($t,{location:"metabox"})},"wincher-seo-performance"),e.shouldUpsell&&!s&&(0,f.jsx)(Ls,{renderPriority:25,children:(0,f.jsx)(As,{})},"internal-linking-suggestions-upsell"),e.isCornerstoneActive&&(0,f.jsx)(Ls,{renderPriority:30,children:(0,f.jsx)(Ht,{})},"cornerstone"),e.displayAdvancedTab&&(0,f.jsx)(Ls,{renderPriority:40,children:(0,f.jsx)(ns,{id:"collapsible-advanced-settings",title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)($s,{})})},"advanced"),e.displaySchemaSettings&&(0,f.jsx)(Ls,{renderPriority:50,children:(0,f.jsx)(Sr,{})},"schema"),a&&(0,f.jsx)(Ls,{renderPriority:24,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),(0,f.jsx)(Ls,{renderPriority:-1,children:(0,f.jsx)(ur,{target:"wpseo-section-social"})},"social"),e.isInsightsEnabled&&(0,f.jsx)(Ls,{renderPriority:52,children:(0,f.jsx)(_s,{location:"metabox"})},"insights")]})})}Yr.propTypes={settings:m().object.isRequired};const Vr=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})])(Yr);function Gr({target:e,store:t,theme:s}){return(0,f.jsxs)(E,{target:e,children:[(0,f.jsx)(M,{store:t,theme:s}),(0,f.jsx)(Vr,{store:t,theme:s})]})}Gr.propTypes={target:m().string.isRequired,store:m().object.isRequired,theme:m().object.isRequired};const Xr=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/sidebar-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,f.jsx)(_.Root,{context:{isRtl:o},children:(0,f.jsx)(j.xP,{error:e,children:(0,f.jsx)(j.xP.VerticalButtons,{supportLink:r,handleRefreshClick:s})})})};function Zr({theme:e}){return(0,f.jsx)(P,{theme:e,location:"sidebar",children:(0,f.jsx)(_.ErrorBoundary,{FallbackComponent:Xr,children:(0,f.jsx)(v.Slot,{name:"YoastSidebar",children:e=>k(e)})})})}function Jr({score:e,label:t,scoreValue:s=""}){return(0,f.jsxs)("div",{className:"yoast-analysis-check",children:[(0,f.jsx)(S.SvgIcon,{...R(e)}),(0,f.jsxs)("span",{children:[" ",t," ",s&&(0,f.jsx)("strong",{children:s})]})]})}function Qr({checklist:e,onClick:t}){const s=e.every(e=>"good"===e.score);return(0,f.jsxs)(n.Fragment,{children:[e.map(e=>(0,f.jsx)(Jr,{...e},e.label)),(0,f.jsx)("br",{}),!s&&(0,f.jsx)(_.Root,{children:(0,f.jsx)(_.Button,{variant:"secondary",size:"small",onClick:t,children:(0,i.__)("Improve your post with Yoast SEO","wordpress-seo")})})]})}function eo(e){return(0,u.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,i.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,i.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,i.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(T.interpreters.scoreToRating(e))}function to(e,t){const{isKeywordAnalysisActive:s}=t.getPreferences();if(s){const s=eo(t.getReadabilityResults().overallScore);e.push({label:(0,i.__)("Readability analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function so(e,t){const{isContentAnalysisActive:s}=t.getPreferences();if(s){const s=eo(t.getResultsForFocusKeyword().overallScore),r=p().isPremium;e.push({label:r?(0,i.__)("Premium SEO analysis:","wordpress-seo"):(0,i.__)("SEO analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function ro(e,t){const{isInclusiveLanguageAnalysisActive:s}=t.getPreferences();if(s){const s=eo(t.getInclusiveLanguageResults().overallScore);e.push({label:(0,i.__)("Inclusive language:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderInclusiveLanguageText})}}Xr.propTypes={error:m().object.isRequired},Jr.propTypes={score:h.string.isRequired,label:h.string.isRequired,scoreValue:h.string},Qr.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired};const oo=(()=>{let e=[];return t=>{const s=t("yoast-seo/editor"),r=[];return so(r,s),to(r,s),ro(r,s),r.push(...Object.values(s.getChecklistItems())),r.length===e.length&&r.every((t,s)=>t.label===e[s].label&&t.score===e[s].score&&t.scoreValue===e[s].scoreValue)?{checklist:e}:(e=r,{checklist:r})}})(),no=(0,O.compose)([(0,t.withSelect)(oo),(0,t.withDispatch)(function(e){const{openGeneralSidebar:t}=e("core/edit-post");return{onClick:()=>{t("yoast-seo/seo-sidebar")}}})])(Qr),io=(0,O.compose)([(0,t.withSelect)(e=>{const t=e("yoast-seo/editor"),s=eo(t.getResultsForFocusKeyword().overallScore),r=eo(t.getReadabilityResults().overallScore),{isKeywordAnalysisActive:o,isContentAnalysisActive:n}=t.getPreferences();let i,a;switch(r.className){case"good":i=C.colors.$color_good;break;case"ok":i=C.colors.$color_ok;break;default:i=C.colors.$color_bad}switch(s.className){case"good":a=C.colors.$color_good;break;case"ok":a=C.colors.$color_ok;break;default:a=C.colors.$color_bad}return{readabilityScoreColor:i,seoScoreColor:a,isKeywordAnalysisActive:o,isContentAnalysisActive:n}})])(b);var ao;function lo(){return lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},lo.apply(null,arguments)}const co=e=>q.createElement("svg",lo({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1600 1600"},e),ao||(ao=q.createElement("g",{fill:"none",fillRule:"evenodd"},q.createElement("path",{fill:"#1877f2",d:"M1600 800a800 800 0 1 0-925 790v-559H472V800h203V624c0-201 119-311 302-311 88 0 179 15 179 15v197h-101c-99 0-130 62-130 125v150h222l-36 231H925v559a800 800 0 0 0 675-790"}),q.createElement("path",{fill:"#fff",d:"M1147 800H925V650c0-63 31-125 130-125h101V328s-91-15-179-15c-183 0-302 110-302 311v176H472v231h203v559a806 806 0 0 0 250 0v-559h186z"}))));var uo;function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},po.apply(null,arguments)}const ho=e=>q.createElement("svg",po({xmlns:"http://www.w3.org/2000/svg",fill:"current","aria-hidden":"true",viewBox:"0 0 1200 1227"},e),uo||(uo=q.createElement("path",{d:"M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026zM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026z"})));function mo({permalink:e}){const t=encodeURI(e);return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("div",{children:(0,i.__)("Share your post!","wordpress-seo")}),(0,f.jsxs)("ul",{className:"yoast-seo-social-share-buttons",children:[(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+t,target:"_blank",rel:"noopener noreferrer",children:[(0,f.jsx)(co,{}),(0,i.__)("Facebook","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
584 -(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://twitter.com/share?url="+t,target:"_blank",rel:"noopener noreferrer",className:"x-share",children:[(0,f.jsx)(ho,{}),(0,i.__)("X","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
585 -(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})})]})]})}mo.propTypes={permalink:m().string.isRequired};const go=(0,O.compose)([(0,t.withSelect)(e=>({permalink:e("core/editor").getPermalink()}))])(mo);var yo=s(7651),fo=s.n(yo),xo=s(2619),wo=s(1480);function bo({isSeoDataDefault:e}){const s=(0,t.select)("yoast-seo/editor").getPostType(),r=(0,n.useMemo)(()=>(null==e?void 0:e.isAllTitlesDefault)||!1,[e]),o=(0,n.useMemo)(()=>(null==e?void 0:e.isAllDescriptionsDefault)||!1,[e]),a=(0,n.useMemo)(()=>"post"===s&&(r||o),[s,r,o]),l=(0,n.useMemo)(()=>r&&o?(0,i.__)("custom SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("custom SEO titles","wordpress-seo"):o?(0,i.__)("custom meta descriptions","wordpress-seo"):void 0,[r,o]),c=(0,n.useMemo)(()=>r&&o?(0,i.__)("quick optimized SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("quick optimized SEO titles","wordpress-seo"):o?(0,i.__)("quick optimized meta descriptions","wordpress-seo"):void 0,[r,o]),d=(0,n.useMemo)(()=>(0,i.sprintf)(/* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */ /* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */
689 +`,br="yoast-seo/editor";function vr({location:e,show:t}){return t?(0,f.jsxs)(S.Alert,{type:"info",children:[(0,i.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */
690 +(0,i.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,f.jsx)(xr,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,i.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */
691 +(0,i.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}vr.propTypes={show:m().bool.isRequired,location:m().string.isRequired};const kr=(e,s,r)=>{const o=(0,t.useSelect)(e=>e(br).getIsProduct(),[]),n=(0,t.useSelect)(e=>e(br).getIsWooSeoActive(),[]),a=o&&n?{name:(0,i.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===s);return[{name:(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ /* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */
692 +(0,i.__)("Default for %1$s (%2$s)","wordpress-seo"),r,a?a.name:""),value:""},...e]},_r=(e,t)=>(0,De.x)((e=>(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ /* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */
693 +(0,i.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"<link>","</link>"))(e),{link:(0,f.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})}),jr=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,f.jsx)(S.FieldGroup,{label:e,linkTo:t
694 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});jr.propTypes={helpTextTitle:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextDescription:m().string.isRequired};const Sr=({schemaPageTypeChange:e=u.noop,schemaPageTypeSelected:s=null,pageTypeOptions:r,schemaArticleTypeChange:o=u.noop,schemaArticleTypeSelected:a=null,articleTypeOptions:l,showArticleTypeInput:c,additionalHelpTextLink:d,helpTextLink:p,helpTextTitle:h,helpTextDescription:m,postTypeName:g,displayFooter:y=!1,defaultPageType:x,defaultArticleType:w,location:b,isNewsEnabled:v=!1})=>{const k=kr(r,x,g),_=kr(l,w,g),j=(0,t.useSelect)(e=>e(br).selectLink("https://yoa.st/product-schema-metabox"),[]),C=(0,t.useSelect)(e=>e(br).getIsWooSeoUpsell(),[]),[T,E]=(0,n.useState)(a),R=(0,i.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),A=(0,t.useSelect)(e=>e(br).getIsProduct(),[]),I=(0,t.useSelect)(e=>e(br).getIsWooSeoActive(),[]),L=(0,t.useSelect)(e=>e(br).selectAdminLink("?page=wpseo_page_settings"),[]),P=A&&I,N=(0,n.useCallback)((e,t)=>{E(t)},[]);return(0,n.useEffect)(()=>{N(null,a)},[a]),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(jr,{helpTextLink:p,helpTextTitle:h,helpTextDescription:m}),(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("What type of page or content is this?","wordpress-seo"),linkTo:d
695 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about page or content types","wordpress-seo")}),C&&(0,f.jsx)(Qt,{link:j,text:R}),(0,f.jsx)(S.Select,{id:(0,z.join)(["yoast-schema-page-type",b]),options:k,label:(0,i.__)("Page type","wordpress-seo"),onChange:e,selected:P?"ItemPage":s,disabled:P}),c&&(0,f.jsx)(S.Select,{id:(0,z.join)(["yoast-schema-article-type",b]),options:_,label:(0,i.__)("Article type","wordpress-seo"),onChange:o,selected:a,onOptionFocus:N}),(0,f.jsx)(vr,{location:b,show:!v&&(M=T,O=w,"NewsArticle"===M||""===M&&"NewsArticle"===O)}),y&&!P&&(0,f.jsx)("p",{children:_r(g,L)}),P&&(0,f.jsx)("p",{children:(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
696 +(0,i.__)("You have %1$s activated on your site, automatically setting the Page type for your products to 'Item Page'. As a result, the Page type selection is disabled.","wordpress-seo"),"Yoast WooCommerce SEO")})]});var M,O},Cr=m().arrayOf(m().shape({name:m().string,value:m().string}));Sr.propTypes={schemaPageTypeChange:m().func,schemaPageTypeSelected:m().string,pageTypeOptions:Cr.isRequired,schemaArticleTypeChange:m().func,schemaArticleTypeSelected:m().string,articleTypeOptions:Cr.isRequired,showArticleTypeInput:m().bool.isRequired,additionalHelpTextLink:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,defaultPageType:m().string.isRequired,defaultArticleType:m().string.isRequired,location:m().string.isRequired,isNewsEnabled:m().bool};const Tr=({isMetabox:e,showArticleTypeInput:t=!1,articleTypeLabel:s="",additionalHelpTextLink:r="",pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d=!1,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m})=>{const g=(0,f.jsx)(Sr,{showArticleTypeInput:t,articleTypeLabel:s,additionalHelpTextLink:r,pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m});return e?(0,n.createPortal)((0,f.jsx)(wr,{children:g}),document.getElementById("wpseo-meta-section-schema")):g};Tr.propTypes={isMetabox:m().bool.isRequired,showArticleTypeInput:m().bool,articleTypeLabel:m().string,additionalHelpTextLink:m().string,pageTypeLabel:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,loadSchemaArticleData:m().func.isRequired,loadSchemaPageData:m().func.isRequired,location:m().string.isRequired};const Er=Tr;class Rr{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return Rr.articleTypeInput.getAttribute("data-default")}static get articleType(){return Rr.articleTypeInput.value}static set articleType(e){Rr.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return Rr.pageTypeInput.getAttribute("data-default")}static get pageType(){return Rr.pageTypeInput.value}static set pageType(e){Rr.pageTypeInput.value=e}}const Ar=e=>{const t=null!==Rr.articleTypeInput;(0,n.useEffect)(()=>{e.loadSchemaPageData(),t&&e.loadSchemaArticleData()},[]);const{pageTypeOptions:s,articleTypeOptions:r}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,i.__)("Article type","wordpress-seo"),pageTypeLabel:(0,i.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,i.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,i.__)("This helps search engines understand your website and your content. You can change some of your settings for this page below.","wordpress-seo"),showArticleTypeInput:t,pageTypeOptions:s,articleTypeOptions:r},a={...e,...o,...(l=e.location,"metabox"===l?{helpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.page_type"],isMetabox:!0}:{helpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.page_type"],isMetabox:!1})};var l;return(0,f.jsx)(Er,{...a})};Ar.propTypes={displayFooter:m().bool.isRequired,schemaPageTypeSelected:m().string.isRequired,schemaArticleTypeSelected:m().string.isRequired,defaultArticleType:m().string.isRequired,defaultPageType:m().string.isRequired,loadSchemaPageData:m().func.isRequired,loadSchemaArticleData:m().func.isRequired,schemaPageTypeChange:m().func.isRequired,schemaArticleTypeChange:m().func.isRequired,location:m().string.isRequired};const Ir=(0,O.compose)([(0,t.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:r,getArticleType:o,getDefaultArticleType:n}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:i,isNewsEnabled:a}=t();return{displayFooter:i,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:n(),defaultPageType:r()}}),(0,t.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:r,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:r,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),Ut()])(Ar),Lr=window.yoast.relatedKeyphraseSuggestions;function Pr({requestLimitReached:e,isSuccess:t,response:s,requestHasData:r,relatedKeyphrases:o}){return e?"requestLimitReached":!t&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,u.isEmpty)(e)&&"error"in e}(s)?"requestFailed":r?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function Nr({keyphrase:e="",relatedKeyphrases:t=[],renderAction:s=null,requestLimitReached:r=!1,countryCode:o,setCountry:i,newRequest:a,response:l={},isRtl:c=!1,userLocale:d="en_US",isPending:u=!1,isSuccess:p=!1,requestHasData:h=!0,isPremium:m=!1,semrushUpsellLink:g="",premiumUpsellLink:y=""}){var x,w;const[b,v]=(0,n.useState)(o),_=(0,n.useCallback)(async()=>{a(o,e),v(o)},[o,e,a]);return(0,f.jsxs)(k.Root,{context:{isRtl:c},children:[!r&&!m&&(0,f.jsx)(Lr.PremiumUpsell,{url:y,className:"yst-mb-4"}),!r&&(0,f.jsx)(Lr.CountrySelector,{countryCode:o,activeCountryCode:b,onChange:i,onClick:_,className:"yst-mb-4",userLocale:d.split("_")[0]}),!u&&(0,f.jsx)(Lr.UserMessage,{variant:Pr({requestLimitReached:r,isSuccess:p,response:l,requestHasData:h,relatedKeyphrases:t}),upsellLink:g}),(0,f.jsx)(Lr.KeyphrasesTable,{relatedKeyphrases:t,columnNames:null==l||null===(x=l.results)||void 0===x?void 0:x.columnNames,data:null==l||null===(w=l.results)||void 0===w?void 0:w.rows,isPending:u,renderButton:s,className:"yst-mt-4"})]})}Nr.propTypes={keyphrase:m().string,relatedKeyphrases:m().array,renderAction:m().func,requestLimitReached:m().bool,countryCode:m().string.isRequired,setCountry:m().func.isRequired,newRequest:m().func.isRequired,response:m().object,isRtl:m().bool,userLocale:m().string,isPending:m().bool,isSuccess:m().bool,requestHasData:m().bool,isPremium:m().bool,semrushUpsellLink:m().string,premiumUpsellLink:m().string};const Mr=(0,O.compose)([(0,t.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:o,getSEMrushRequestResponse:n,getSEMrushRequestIsSuccess:i,getSEMrushIsRequestPending:a,getSEMrushRequestHasData:l,getPreference:c,getIsPremium:d,selectLinkParams:u}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:o(),response:n(),isSuccess:i(),isPending:a(),requestHasData:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,r.addQueryArgs)("https://yoa.st/semrush-prices",u()),premiumUpsellLink:(0,r.addQueryArgs)("https://yoa.st/413",u())}}),(0,t.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(Nr),Or=({isOpen:e,closeModal:t,id:s,upsellLink:r})=>(0,f.jsx)(Ls,{isOpen:e,onClose:t,id:s,upsellLink:r,title:(0,i.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,i.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,i.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Fr=()=>{const[e,,,t,s]=(0,k.useToggleState)(!1),o=(0,n.useContext)(c.LocationContext),{locationContext:a}=(0,c.useRootContext)(),l=(0,k.useSvgAria)(),d=wpseoAdminL10n["sidebar"===o.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Or,{isOpen:e,closeModal:s,upsellLink:(0,r.addQueryArgs)(d,{context:a}),id:`yoast-additional-keyphrases-modal-${o}`}),"sidebar"===o&&(0,f.jsx)(Z,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,i.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:C.colors.$color_grey_medium_dark},onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(k.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(Ts(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...l})})})}),"metabox"===o&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(W,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(S.SvgIcon,{icon:"plus",color:C.colors.$color_grey_medium_dark}),(0,f.jsx)(W.Text,{children:(0,i.__)("Add related keyphrase","wordpress-seo")}),(0,f.jsxs)(k.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(Ts(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...l}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})};var Dr=s(998),qr=s.n(Dr),$r=s(818),Br=s.n($r),Ur=s(4289);const Hr=({store:e="yoast-seo/editor",location:s="sidebar"})=>{const o="black-friday-promotion",a=(0,t.useSelect)(t=>t(e).getIsPremium(),[e]),l=(0,t.useSelect)(t=>t(e).selectLinkParams(),[e]),c=(0,t.useSelect)(t=>t(e).isPromotionActive(o),[e]),d=(0,t.useSelect)(t=>t(e).getIsWooCommerceActive(),[e]),u=(0,t.useSelect)(t=>t(e).isAlertDismissed(o),[e]),p=(0,n.useCallback)(()=>{(0,t.dispatch)(e).dismissAlert(o)},[e,o]),h=(0,r.addQueryArgs)("https://yoa.st/black-friday-sale",l),m=(0,k.useSvgAria)();return a||!c||u?null:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)("div",{className:U()("yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm yst-mt-2",d?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,f.jsxs)(k.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,i.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,f.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:p,children:[(0,f.jsx)(qr(),{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,f.jsx)("div",{className:"yst-sr-only",children:(0,i.__)("Dismiss","wordpress-seo")})]}),(0,f.jsxs)("div",{className:U()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,f.jsxs)("div",{className:d?"yst-text-woo-light":"yst-text-primary-500",children:[(0,f.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,i.__)("30% OFF","wordpress-seo")}),(0,f.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:d?(0,f.jsxs)(f.Fragment,{children:["Yoast WooCommerce SEO ",(0,f.jsx)(Is(),{className:"yst-w-4 yst-scale-x-[-1]",...m})]}):(0,f.jsxs)(f.Fragment,{children:[" Yoast SEO Premium ",(0,f.jsx)(Ur.h,{className:"yst-w-4",...m})]})})]}),(0,f.jsx)("div",{className:"yst-flex yst-items-end",children:(0,f.jsxs)(k.Button,{as:"a",className:U()("sidebar"===s?"yst-w-full":"yst-w-[140px]","yst-flex yst-gap-1 yst-w-[140px] yst-h-7 yst-mt-4"),variant:"upsell",href:h,target:"_blank",rel:"noreferrer",children:[(0,i.__)("Buy now!","wordpress-seo"),(0,f.jsx)(Br(),{className:"yst-w-4 rtl:yst-rotate-180",...m})]})})]})]})})};function Wr(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}Hr.propTypes={store:m().string,location:m().oneOf(["sidebar","metabox"]),inEditorIntro:m().bool};const zr=()=>{const{editorMode:e,activeAIButtonId:s}=(0,t.useSelect)(e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()}),[]),{setMarkerStatus:r}=(0,t.useDispatch)("yoast-seo/editor");(0,n.useEffect)(()=>(r("visual"===e&&s||"text"===e?"disabled":"enabled"),()=>{r("disabled")}),[e,s])};var Kr=s(3301);const Yr=(0,O.compose)([(0,t.withDispatch)(e=>{const{setFeatureModalStatus:t}=e(Kr.bw);return{setFeatureModalStatus:t}})])(({location:e,setFeatureModalStatus:s})=>{const r=(0,n.useCallback)(()=>{s(Kr.Qo.idle)},[s]),o=(0,t.useSelect)(e=>e(Kr.bw).selectIsMinPostsMet(),[]),a="yoast-content-planner-min-posts-notice-"+e;return(0,f.jsx)(k.Root,{children:(0,f.jsxs)("div",{className:U()("metabox"===e&&"yst-flex yst-items-center yst-gap-3"),children:[(0,f.jsx)(k.Button,{variant:"ai-secondary",onClick:r,disabled:!o,"aria-describedby":o?null:a,className:"sidebar"===e?"yst-w-full":"",children:(0,i.__)("Get content suggestions","wordpress-seo")}),!o&&(0,f.jsx)("span",{id:a,className:U()("yst-text-sm yst-text-slate-500 yst-italic","sidebar"===e&&"yst-flex yst-mt-1 yst-justify-center"),children:(0,i.__)("Available after 5 published posts","wordpress-seo")})]})})});var Vr=s(6692);const Gr=({children:e})=>(0,f.jsxs)("div",{className:"yst-p-4 yst-flex yst-flex-col yst-gap-3",children:[(0,f.jsx)(Vr.h,{className:"yst-w-14 yst-text-primary-500"}),e]}),Xr=({withPromptForContentSuggestions:e,className:t})=>(0,f.jsx)("p",{className:U()("yst-text-slate-600 yst-my-0",t),children:e?(0,i.__)("Optimize your content for discovery or get new content suggestions.","wordpress-seo"):(0,i.__)("Optimize your content for discovery.","wordpress-seo")}),Zr=(Jr=Hr,e=>!(()=>{var e,s;const r=(0,t.select)("yoast-seo/editor").getIsPremium(),o=(0,t.select)("yoast-seo/editor").getWarningMessage();return(r&&null!==(e=null===(s=(0,t.select)("yoast-seo-premium/editor"))||void 0===s?void 0:s.getMetaboxWarning())&&void 0!==e?e:[]).length>0||o.length>0})()&&(0,f.jsx)(Jr,{...e}));var Jr;function Qr({settings:e}){const{isTerm:s,isPost:r,isAiFeatureActive:o}=(0,t.useSelect)(e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isPost:"post"===e("yoast-seo/editor").getPostType(),isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive")}),[]),a=Wr();return a&&zr(),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastMetabox",children:[(0,f.jsx)(Ms,{renderPriority:0,children:(0,f.jsx)(ss,{})},"warning"),(0,f.jsx)(Ms,{renderPriority:1,children:(0,f.jsxs)(Gr,{children:[(0,f.jsx)(Zr,{location:"metabox"}),(0,f.jsx)(Xr,{withPromptForContentSuggestions:o&&a&&r}),r&&a&&o&&(0,f.jsx)(Yr,{location:"metabox"})]})},"editor-intro"),e.isKeywordAnalysisActive&&(0,f.jsxs)(Ms,{renderPriority:8,children:[(0,f.jsx)(Bt.TopicInputs,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,f.jsx)(v.Fill,{name:"YoastRelatedKeyphrases",children:(0,f.jsx)(Mr,{})})]},"keyword-input"),(0,f.jsx)(Ms,{renderPriority:9,children:(0,f.jsx)(ls,{id:"yoast-snippet-editor-metabox",title:(0,i.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,f.jsx)(ts,{hasPaperStyle:!1})})},"search-appearance"),e.isContentAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:10,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:20,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo-analysis"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Fr,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ms,{renderPriority:23,children:(0,f.jsx)($t,{location:"metabox"})},"wincher-seo-performance"),e.shouldUpsell&&!s&&(0,f.jsx)(Ms,{renderPriority:25,children:(0,f.jsx)(Ps,{})},"internal-linking-suggestions-upsell"),e.isCornerstoneActive&&(0,f.jsx)(Ms,{renderPriority:30,children:(0,f.jsx)(Ht,{})},"cornerstone"),e.displayAdvancedTab&&(0,f.jsx)(Ms,{renderPriority:40,children:(0,f.jsx)(ls,{id:"collapsible-advanced-settings",title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(Hs,{})})},"advanced"),e.displaySchemaSettings&&(0,f.jsx)(Ms,{renderPriority:50,children:(0,f.jsx)(Ir,{})},"schema"),a&&(0,f.jsx)(Ms,{renderPriority:24,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),(0,f.jsx)(Ms,{renderPriority:-1,children:(0,f.jsx)(fr,{target:"wpseo-section-social"})},"social"),e.isInsightsEnabled&&(0,f.jsx)(Ms,{renderPriority:52,children:(0,f.jsx)(Ss,{location:"metabox"})},"insights")]})})}Qr.propTypes={settings:m().object.isRequired};const eo=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})])(Qr);function to({target:e,store:t,theme:s}){return(0,f.jsxs)(R,{target:e,children:[(0,f.jsx)(M,{store:t,theme:s}),(0,f.jsx)(eo,{store:t,theme:s})]})}to.propTypes={target:m().string.isRequired,store:m().object.isRequired,theme:m().object.isRequired};const so=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/sidebar-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,f.jsx)(k.Root,{context:{isRtl:o},children:(0,f.jsx)(j.xP,{error:e,children:(0,f.jsx)(j.xP.VerticalButtons,{supportLink:r,handleRefreshClick:s})})})};function ro({theme:e}){return(0,f.jsx)(N,{theme:e,location:"sidebar",children:(0,f.jsx)(k.ErrorBoundary,{FallbackComponent:so,children:(0,f.jsx)(v.Slot,{name:"YoastSidebar",children:e=>_(e)})})})}function oo({score:e,label:t,scoreValue:s=""}){return(0,f.jsxs)("div",{className:"yoast-analysis-check",children:[(0,f.jsx)(S.SvgIcon,{...E(e)}),(0,f.jsxs)("span",{children:[" ",t," ",s&&(0,f.jsx)("strong",{children:s})]})]})}function no({checklist:e,onClick:t}){const s=e.every(e=>"good"===e.score);return(0,f.jsxs)(n.Fragment,{children:[e.map(e=>(0,f.jsx)(oo,{...e},e.label)),(0,f.jsx)("br",{}),!s&&(0,f.jsx)(k.Root,{children:(0,f.jsx)(k.Button,{variant:"secondary",size:"small",onClick:t,children:(0,i.__)("Improve your post with Yoast SEO","wordpress-seo")})})]})}function io(e){return(0,u.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,i.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,i.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,i.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(T.interpreters.scoreToRating(e))}function ao(e,t){const{isKeywordAnalysisActive:s}=t.getPreferences();if(s){const s=io(t.getReadabilityResults().overallScore);e.push({label:(0,i.__)("Readability analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function lo(e,t){const{isContentAnalysisActive:s}=t.getPreferences();if(s){const s=io(t.getResultsForFocusKeyword().overallScore),r=p().isPremium;e.push({label:r?(0,i.__)("Premium SEO analysis:","wordpress-seo"):(0,i.__)("SEO analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function co(e,t){const{isInclusiveLanguageAnalysisActive:s}=t.getPreferences();if(s){const s=io(t.getInclusiveLanguageResults().overallScore);e.push({label:(0,i.__)("Inclusive language:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderInclusiveLanguageText})}}so.propTypes={error:m().object.isRequired},oo.propTypes={score:h.string.isRequired,label:h.string.isRequired,scoreValue:h.string},no.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired};const uo=(()=>{let e=[];return t=>{const s=t("yoast-seo/editor"),r=[];return lo(r,s),ao(r,s),co(r,s),r.push(...Object.values(s.getChecklistItems())),r.length===e.length&&r.every((t,s)=>t.label===e[s].label&&t.score===e[s].score&&t.scoreValue===e[s].scoreValue)?{checklist:e}:(e=r,{checklist:r})}})(),po=(0,O.compose)([(0,t.withSelect)(uo),(0,t.withDispatch)(function(e){const{openGeneralSidebar:t}=e("core/edit-post");return{onClick:()=>{t("yoast-seo/seo-sidebar")}}})])(no),ho=(0,O.compose)([(0,t.withSelect)(e=>{const t=e("yoast-seo/editor"),s=io(t.getResultsForFocusKeyword().overallScore),r=io(t.getReadabilityResults().overallScore),{isKeywordAnalysisActive:o,isContentAnalysisActive:n}=t.getPreferences();let i,a;switch(r.className){case"good":i=C.colors.$color_good;break;case"ok":i=C.colors.$color_ok;break;default:i=C.colors.$color_bad}switch(s.className){case"good":a=C.colors.$color_good;break;case"ok":a=C.colors.$color_ok;break;default:a=C.colors.$color_bad}return{readabilityScoreColor:i,seoScoreColor:a,isKeywordAnalysisActive:o,isContentAnalysisActive:n}})])(b);var mo;function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},go.apply(null,arguments)}const yo=e=>q.createElement("svg",go({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1600 1600"},e),mo||(mo=q.createElement("g",{fill:"none",fillRule:"evenodd"},q.createElement("path",{fill:"#1877f2",d:"M1600 800a800 800 0 1 0-925 790v-559H472V800h203V624c0-201 119-311 302-311 88 0 179 15 179 15v197h-101c-99 0-130 62-130 125v150h222l-36 231H925v559a800 800 0 0 0 675-790"}),q.createElement("path",{fill:"#fff",d:"M1147 800H925V650c0-63 31-125 130-125h101V328s-91-15-179-15c-183 0-302 110-302 311v176H472v231h203v559a806 806 0 0 0 250 0v-559h186z"}))));var fo;function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},xo.apply(null,arguments)}const wo=e=>q.createElement("svg",xo({xmlns:"http://www.w3.org/2000/svg",fill:"current","aria-hidden":"true",viewBox:"0 0 1200 1227"},e),fo||(fo=q.createElement("path",{d:"M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026zM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026z"})));function bo({permalink:e}){const t=encodeURI(e);return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("div",{children:(0,i.__)("Share your post!","wordpress-seo")}),(0,f.jsxs)("ul",{className:"yoast-seo-social-share-buttons",children:[(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+t,target:"_blank",rel:"noopener noreferrer",children:[(0,f.jsx)(yo,{}),(0,i.__)("Facebook","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
697 +(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://twitter.com/share?url="+t,target:"_blank",rel:"noopener noreferrer",className:"x-share",children:[(0,f.jsx)(wo,{}),(0,i.__)("X","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
698 +(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})})]})]})}bo.propTypes={permalink:m().string.isRequired};const vo=(0,O.compose)([(0,t.withSelect)(e=>({permalink:e("core/editor").getPermalink()}))])(bo);var ko=s(7651),_o=s.n(ko),jo=s(2619),So=s(1480);function Co({isSeoDataDefault:e}){const s=(0,t.select)("yoast-seo/editor").getPostType(),r=(0,n.useMemo)(()=>(null==e?void 0:e.isAllTitlesDefault)||!1,[e]),o=(0,n.useMemo)(()=>(null==e?void 0:e.isAllDescriptionsDefault)||!1,[e]),a=(0,n.useMemo)(()=>"post"===s&&(r||o),[s,r,o]),l=(0,n.useMemo)(()=>r&&o?(0,i.__)("custom SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("custom SEO titles","wordpress-seo"):o?(0,i.__)("custom meta descriptions","wordpress-seo"):void 0,[r,o]),c=(0,n.useMemo)(()=>r&&o?(0,i.__)("quick optimized SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("quick optimized SEO titles","wordpress-seo"):o?(0,i.__)("quick optimized meta descriptions","wordpress-seo"):void 0,[r,o]),d=(0,n.useMemo)(()=>(0,i.sprintf)(/* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */ /* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */
586 699 (0,i.__)("Stand out in the search results and attract more visitors by adding %1$s.","wordpress-seo"),l),[l]),u=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
587 700 /* translators: %1$s, %2$s expands to strong tags. %3$s, %4$s expands to emphasis tags.
588 701 %5$s expands to "quick optimized SEO titles" or "quick optimized meta descriptions" or both */
589 702 /* translators: %1$s, %2$s expands to strong tags. %3$s, %4$s expands to emphasis tags.
590 703 %5$s expands to "quick optimized SEO titles" or "quick optimized meta descriptions" or both */
591 -(0,i.__)("%1$sPro tip%2$s: Use %3$sAI Generate%4$s for %5$s.","wordpress-seo"),"<strong>","</strong>","<em>","</em>",c),{strong:(0,f.jsx)("strong",{}),em:(0,f.jsx)("em",{})}),[c]),p=(0,n.useMemo)(()=>r?o?[]:(0,xo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"title"}):[],[r,o]),h=(0,n.useMemo)(()=>o?(0,xo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"description"}):[],[r,o]),m=(0,wo.Z)(!0),g=(0,n.useCallback)(()=>{m()},[m]);return a&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-1 yst-mb-[-25px]",children:[(0,f.jsx)(fo(),{className:"yst-w-4 yst-h-4 yst-text-amber-500"}),(0,f.jsx)("h4",{children:(0,i.__)("Default SEO data detected","wordpress-seo")})]}),(0,f.jsx)("p",{children:d}),p.length+h.length>0&&(0,f.jsx)("p",{children:u}),(0,f.jsx)(v.Slot,{name:"yoast.replacementVariableEditor.additionalButtons.yoast-google-preview-pre-publish"}),p.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-title-${t}`)),h.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-description-${t}`)),(0,f.jsx)(_.Root,{children:(0,f.jsx)(_.Button,{variant:"secondary",size:"small",className:"yst-mt-2",onClick:g,children:(0,i.__)("Write custom SEO data","wordpress-seo")})})]})}function vo({checklist:e,onClick:t,isSeoDataDefault:s}){let r;return r=e.every(e=>"good"===e.score)?(0,i.__)("We've analyzed your post. Everything looks good. Well done!","wordpress-seo"):(0,i.__)("We've analyzed your post. There is still room for improvement!","wordpress-seo"),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(c.LocationProvider,{value:"pre-publish",children:[(0,f.jsx)("p",{children:r}),(0,f.jsx)(Qr,{checklist:e,onClick:t}),(0,f.jsx)(bo,{isSeoDataDefault:s})]})})}bo.propTypes={isSeoDataDefault:m().object.isRequired},vo.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired,isSeoDataDefault:m().object.isRequired};const _o=(()=>{let e=null;return t=>{const s=t("yoast-seo/editor"),r=[];!function(e,t){t.getFocusKeyphrase()||e.push({label:(0,i.__)("No focus keyword was entered","wordpress-seo"),score:"bad"})}(r,s),so(r,s),to(r,s),ro(r,s),r.push(...Object.values(s.getChecklistItems()));const o=function(e){const{isRecentTitlesDefault:t,isRecentDescriptionsDefault:s}=e.getPreferences(),r=e.getSnippetEditorData(),o=e.getSeoTitleTemplate(),n=e.getSeoDescriptionTemplate(),i=r.title.trim()===o.trim(),a=r.description.trim()===n.trim();return{isAllTitlesDefault:t&&i,isAllDescriptionsDefault:s&&a}}(s);return null!==e&&r.length===e.checklist.length&&r.every((t,s)=>t.label===e.checklist[s].label&&t.score===e.checklist[s].score&&t.scoreValue===e.checklist[s].scoreValue)&&o.isAllTitlesDefault===e.isSeoDataDefault.isAllTitlesDefault&&o.isAllDescriptionsDefault===e.isSeoDataDefault.isAllDescriptionsDefault||(e={checklist:r,isSeoDataDefault:o}),e}})(),ko=(0,O.compose)([(0,t.withSelect)(_o),(0,t.withDispatch)(function(e){const{closePublishSidebar:t,openGeneralSidebar:s}=e("core/edit-post");return{onClick:()=>{t(),s("yoast-seo/seo-sidebar")}}})])(vo),jo=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}}),(0,t.withDispatch)((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}})]),So=({children:e,id:t,hasIcon:s=!0,title:r,image:o=null,isAlertDismissed:n,onDismissed:a,className:l=""})=>n?null:(0,f.jsxs)("div",{id:t,className:U()("notice-yoast yoast is-dismissible",l),children:[(0,f.jsxs)("div",{className:"notice-yoast__container",children:[(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"notice-yoast__header",children:[s&&(0,f.jsx)("span",{className:"yoast-icon"}),(0,f.jsx)("h2",{className:"notice-yoast__header-heading yoast-notice-migrated-header",children:r})]}),(0,f.jsx)("div",{className:"notice-yoast-content",children:(0,f.jsx)("p",{children:e})})]}),o&&(0,f.jsx)(o,{height:"60"})]}),(0,f.jsx)("button",{type:"button",className:"notice-dismiss",onClick:a,children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
592 -(0,i.__)("Dismiss this notice.","wordpress-seo")})})]});So.propTypes={children:m().node.isRequired,id:m().string.isRequired,hasIcon:m().bool,title:m().any.isRequired,image:m().elementType,isAlertDismissed:m().bool.isRequired,onDismissed:m().func.isRequired,className:m().string};const Co=jo(So),To="trustpilot-review-notification",Ro="yoast-seo/editor",Eo=()=>{const e=(0,t.useSelect)(e=>e(Ro).getIsPremium(),[]),s=(0,t.useSelect)(e=>e(Ro).isAlertDismissed(To),[]),{overallScore:r}=(0,t.useSelect)(e=>e(Ro).getResultsForFocusKeyword(),[]),{dismissAlert:o}=(0,t.useDispatch)(Ro),i=(0,n.useCallback)(()=>o(To),[o]),[a,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{var e;"good"===(null===(e=eo(r))||void 0===e?void 0:e.className)&&l(!0)},[r]),{shouldShow:!e&&!s&&a,dismiss:i}},Ao=(0,z.makeOutboundLink)(),Io=e=>{const{shouldShow:s,dismiss:r}=Eo(),{locationContext:o}=(0,c.useRootContext)(),n=(0,t.useSelect)(e=>e(Ro).selectLink("https://yoa.st/trustpilot-review",{context:o}),[o]);return(0,f.jsxs)(So,{alertKey:To,store:Ro,id:To,title:(0,i.__)("Show Yoast SEO some love!","wordpress-seo"),hasIcon:!1,isAlertDismissed:!s,onDismissed:r,className:"yst-m-0",...e,children:[(0,i.__)("Happy with the plugin?","wordpress-seo")," ",(0,f.jsx)(Ao,{href:n,rel:"noopener noreferrer",children:(0,i.__)("Leave a quick review","wordpress-seo")}),"."]})},Lo=({store:e="yoast-seo/editor",image:s=null,url:r,...o})=>(0,t.useSelect)(t=>t(e).getIsPremium())?null:(0,f.jsxs)(Co,{alertKey:"webinar-promo-notification",store:e,id:"webinar-promo-notification",title:(0,i.__)("Ready to boost your online visibility?","wordpress-seo"),image:s,url:r,...o,children:[(0,De.x)((0,i.sprintf)(/* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */ /* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */
593 -(0,i.__)("Access our %1$s%2$s%3$s webinars and podcasts to get started with %4$s and build the foundational skills and confidence needed for sustainable success.","wordpress-seo"),"<strong>","FREE","</strong>","Yoast SEO"),{strong:(0,f.jsx)("strong",{})})," ",(0,f.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",children:(0,i.__)("Sign up today!","wordpress-seo")})]});Lo.propTypes={store:m().string,image:m().elementType,url:m().string.isRequired};const No=Lo,Po=(e="yoast-seo/editor")=>{const s=(0,t.select)(e).isPromotionActive("black-friday-promotion"),r=(0,t.select)(e).isAlertDismissed("black-friday-promotion");return!s||r};var Mo=s(5169),Oo=s.n(Mo);const Fo=({id:e,postTypeName:t,children:s,title:r,isOpen:o,open:a,close:l,shouldCloseOnClickOutside:d=!0,showChangesWarning:u=!0,SuffixHeroIcon:p=null})=>(0,f.jsxs)(n.Fragment,{children:[o&&(0,f.jsx)(c.LocationProvider,{value:"modal",children:(0,f.jsxs)(V,{title:r,onRequestClose:l,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:d,children:[(0,f.jsx)("div",{className:"yoast-content-container",children:(0,f.jsx)("div",{className:"yoast-modal-content",children:s})}),(0,f.jsxs)("div",{className:"yoast-notice-container",children:[(0,f.jsx)("hr",{}),(0,f.jsxs)("div",{className:"yoast-button-container",children:[u&&(0,f.jsx)("p",{children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */
704 +(0,i.__)("%1$sPro tip%2$s: Use %3$sAI Generate%4$s for %5$s.","wordpress-seo"),"<strong>","</strong>","<em>","</em>",c),{strong:(0,f.jsx)("strong",{}),em:(0,f.jsx)("em",{})}),[c]),p=(0,n.useMemo)(()=>r?o?[]:(0,jo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"title"}):[],[r,o]),h=(0,n.useMemo)(()=>o?(0,jo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"description"}):[],[r,o]),m=(0,So.Z)(!0),g=(0,n.useCallback)(()=>{m()},[m]);return a&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-1 yst-mb-[-25px]",children:[(0,f.jsx)(_o(),{className:"yst-w-4 yst-h-4 yst-text-amber-500"}),(0,f.jsx)("h4",{children:(0,i.__)("Default SEO data detected","wordpress-seo")})]}),(0,f.jsx)("p",{children:d}),p.length+h.length>0&&(0,f.jsx)("p",{children:u}),(0,f.jsx)(v.Slot,{name:"yoast.replacementVariableEditor.additionalButtons.yoast-google-preview-pre-publish"}),p.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-title-${t}`)),h.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-description-${t}`)),(0,f.jsx)(k.Root,{children:(0,f.jsx)(k.Button,{variant:"secondary",size:"small",className:"yst-mt-2",onClick:g,children:(0,i.__)("Write custom SEO data","wordpress-seo")})})]})}function To({checklist:e,onClick:t,isSeoDataDefault:s}){let r;return r=e.every(e=>"good"===e.score)?(0,i.__)("We've analyzed your post. Everything looks good. Well done!","wordpress-seo"):(0,i.__)("We've analyzed your post. There is still room for improvement!","wordpress-seo"),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(c.LocationProvider,{value:"pre-publish",children:[(0,f.jsx)("p",{children:r}),(0,f.jsx)(no,{checklist:e,onClick:t}),(0,f.jsx)(Co,{isSeoDataDefault:s})]})})}Co.propTypes={isSeoDataDefault:m().object.isRequired},To.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired,isSeoDataDefault:m().object.isRequired};const Eo=(()=>{let e=null;return t=>{const s=t("yoast-seo/editor"),r=[];!function(e,t){t.getFocusKeyphrase()||e.push({label:(0,i.__)("No focus keyword was entered","wordpress-seo"),score:"bad"})}(r,s),lo(r,s),ao(r,s),co(r,s),r.push(...Object.values(s.getChecklistItems()));const o=function(e){const{isRecentTitlesDefault:t,isRecentDescriptionsDefault:s}=e.getPreferences(),r=e.getSnippetEditorData(),o=e.getSeoTitleTemplate(),n=e.getSeoDescriptionTemplate(),i=r.title.trim()===o.trim(),a=r.description.trim()===n.trim();return{isAllTitlesDefault:t&&i,isAllDescriptionsDefault:s&&a}}(s);return null!==e&&r.length===e.checklist.length&&r.every((t,s)=>t.label===e.checklist[s].label&&t.score===e.checklist[s].score&&t.scoreValue===e.checklist[s].scoreValue)&&o.isAllTitlesDefault===e.isSeoDataDefault.isAllTitlesDefault&&o.isAllDescriptionsDefault===e.isSeoDataDefault.isAllDescriptionsDefault||(e={checklist:r,isSeoDataDefault:o}),e}})(),Ro=(0,O.compose)([(0,t.withSelect)(Eo),(0,t.withDispatch)(function(e){const{closePublishSidebar:t,openGeneralSidebar:s}=e("core/edit-post");return{onClick:()=>{t(),s("yoast-seo/seo-sidebar")}}})])(To),Ao=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}}),(0,t.withDispatch)((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}})]),Io=({children:e,id:t,hasIcon:s=!0,title:r,image:o=null,isAlertDismissed:n,onDismissed:a,className:l=""})=>n?null:(0,f.jsxs)("div",{id:t,className:U()("notice-yoast yoast is-dismissible",l),children:[(0,f.jsxs)("div",{className:"notice-yoast__container",children:[(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"notice-yoast__header",children:[s&&(0,f.jsx)("span",{className:"yoast-icon"}),(0,f.jsx)("h2",{className:"notice-yoast__header-heading yoast-notice-migrated-header",children:r})]}),(0,f.jsx)("div",{className:"notice-yoast-content",children:(0,f.jsx)("p",{children:e})})]}),o&&(0,f.jsx)(o,{height:"60"})]}),(0,f.jsx)("button",{type:"button",className:"notice-dismiss",onClick:a,children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
705 +(0,i.__)("Dismiss this notice.","wordpress-seo")})})]});Io.propTypes={children:m().node.isRequired,id:m().string.isRequired,hasIcon:m().bool,title:m().any.isRequired,image:m().elementType,isAlertDismissed:m().bool.isRequired,onDismissed:m().func.isRequired,className:m().string};const Lo=Ao(Io),Po="trustpilot-review-notification",No="yoast-seo/editor",Mo=()=>{const e=(0,t.useSelect)(e=>e(No).getIsPremium(),[]),s=(0,t.useSelect)(e=>e(No).isAlertDismissed(Po),[]),{overallScore:r}=(0,t.useSelect)(e=>e(No).getResultsForFocusKeyword(),[]),{dismissAlert:o}=(0,t.useDispatch)(No),i=(0,n.useCallback)(()=>o(Po),[o]),[a,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{var e;"good"===(null===(e=io(r))||void 0===e?void 0:e.className)&&l(!0)},[r]),{shouldShow:!e&&!s&&a,dismiss:i}},Oo=(0,z.makeOutboundLink)(),Fo=e=>{const{shouldShow:s,dismiss:r}=Mo(),{locationContext:o}=(0,c.useRootContext)(),n=(0,t.useSelect)(e=>e(No).selectLink("https://yoa.st/trustpilot-review",{context:o}),[o]);return(0,f.jsxs)(Io,{alertKey:Po,store:No,id:Po,title:(0,i.__)("Show Yoast SEO some love!","wordpress-seo"),hasIcon:!1,isAlertDismissed:!s,onDismissed:r,className:"yst-m-0",...e,children:[(0,i.__)("Happy with the plugin?","wordpress-seo")," ",(0,f.jsx)(Oo,{href:n,rel:"noopener noreferrer",children:(0,i.__)("Leave a quick review","wordpress-seo")}),"."]})},Do=({store:e="yoast-seo/editor",image:s=null,url:r,...o})=>(0,t.useSelect)(t=>t(e).getIsPremium())?null:(0,f.jsxs)(Lo,{alertKey:"webinar-promo-notification",store:e,id:"webinar-promo-notification",title:(0,i.__)("Ready to boost your online visibility?","wordpress-seo"),image:s,url:r,...o,children:[(0,De.x)((0,i.sprintf)(/* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */ /* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */
706 +(0,i.__)("Access our %1$s%2$s%3$s webinars and podcasts to get started with %4$s and build the foundational skills and confidence needed for sustainable success.","wordpress-seo"),"<strong>","FREE","</strong>","Yoast SEO"),{strong:(0,f.jsx)("strong",{})})," ",(0,f.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",children:(0,i.__)("Sign up today!","wordpress-seo")})]});Do.propTypes={store:m().string,image:m().elementType,url:m().string.isRequired};const qo=Do,$o=(e="yoast-seo/editor")=>{const s=(0,t.select)(e).isPromotionActive("black-friday-promotion"),r=(0,t.select)(e).isAlertDismissed("black-friday-promotion");return!s||r};var Bo=s(5169),Uo=s.n(Bo);const Ho=({id:e,postTypeName:t,children:s,title:r,isOpen:o,open:a,close:l,shouldCloseOnClickOutside:d=!0,showChangesWarning:u=!0,SuffixHeroIcon:p=null,titleHelpLink:h=null})=>(0,f.jsxs)(n.Fragment,{children:[o&&(0,f.jsx)(c.LocationProvider,{value:"modal",children:(0,f.jsxs)(V,{title:h?(0,f.jsxs)(f.Fragment,{children:[r,h]}):r,contentLabel:h?r:null,onRequestClose:l,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:d,children:[(0,f.jsx)("div",{className:"yoast-content-container",children:(0,f.jsx)("div",{className:"yoast-modal-content",children:s})}),(0,f.jsxs)("div",{className:"yoast-notice-container",children:[(0,f.jsx)("hr",{}),(0,f.jsxs)("div",{className:"yoast-button-container",children:[u&&(0,f.jsx)("p",{children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */
594 707 (0,i.sprintf)((0,i.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),t)}),(0,f.jsx)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:l,children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */
595 -(0,i.sprintf)((0,i.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,f.jsx)(Z,{id:e+"-open-button",title:r,SuffixHeroIcon:p,suffixIcon:p?null:{size:"20px",icon:"pencil-square"},onClick:a})]});Fo.propTypes={id:m().string.isRequired,postTypeName:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,title:m().string.isRequired,isOpen:m().bool.isRequired,open:m().func.isRequired,close:m().func.isRequired,shouldCloseOnClickOutside:m().bool,showChangesWarning:m().bool,SuffixHeroIcon:m().element};const Do=Fo,qo=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:r}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:r(t.id)}}),(0,t.withDispatch)((e,t)=>{const{openEditorModal:s,closeEditorModal:r}=e("yoast-seo/editor");return{open:()=>s(t.id),close:r}})])(Do),$o=y()(Oo())`
708 +(0,i.sprintf)((0,i.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,f.jsx)(Z,{id:e+"-open-button",title:r,SuffixHeroIcon:p,suffixIcon:p?null:{size:"20px",icon:"pencil-square"},onClick:a})]});Ho.propTypes={id:m().string.isRequired,postTypeName:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,title:m().string.isRequired,isOpen:m().bool.isRequired,open:m().func.isRequired,close:m().func.isRequired,shouldCloseOnClickOutside:m().bool,showChangesWarning:m().bool,SuffixHeroIcon:m().element,titleHelpLink:m().element};const Wo=Ho,zo=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:r}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:r(t.id)}}),(0,t.withDispatch)((e,t)=>{const{openEditorModal:s,closeEditorModal:r}=e("yoast-seo/editor");return{open:()=>s(t.id),close:r}})])(Wo),Ko=y()(Uo())`
596 709 width: 18px;
597 710 height: 18px;
598 711 margin: 3px;
599 -`,Bo=({location:e="sidebar"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]),o=$();return(0,f.jsx)(qo,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-modal-${e}`,shouldCloseOnClickOutside:!s,showChangesWarning:!1,SuffixHeroIcon:(0,f.jsx)($o,{className:"yst-text-slate-500",...o}),children:(0,f.jsxs)("div",{className:"yoast-insights yoast-modal-content--columns",children:[(0,f.jsx)(ms,{location:e}),(0,f.jsxs)("div",{children:[r&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(cs,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(is,{}),(0,f.jsx)(gs,{})]}),(0,rs.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(bs,{location:e,name:"YoastTextFormalityMetabox"})]})]})})};Bo.propTypes={location:m().string};const Uo=Bo;var Ho=s(8290),Wo=s.n(Ho);class zo{constructor(e){this.refresh=e,this.loaded=!1,this.preloadThreshold=3e3,this.plugins={},this.modifications={},this._registerPlugin=this._registerPlugin.bind(this),this._ready=this._ready.bind(this),this._reloaded=this._reloaded.bind(this),this._registerModification=this._registerModification.bind(this),this._registerAssessment=this._registerAssessment.bind(this),this._applyModifications=this._applyModifications.bind(this),setTimeout(this._pollLoadingPlugins.bind(this),1500)}_registerPlugin(e,t){return(0,u.isString)(e)?(0,u.isUndefined)(t)||(0,u.isObject)(t)?!1===this._validateUniqueness(e)?(console.error("Failed to register plugin. Plugin with name "+e+" already exists"),!1):(this.plugins[e]=t,!0):(console.error("Failed to register plugin "+e+". Expected parameters `options` to be a object."),!1):(console.error("Failed to register plugin. Expected parameter `pluginName` to be a string."),!1)}_ready(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to modify status for plugin "+e+". The plugin was not properly registered."),!1):(this.plugins[e].status="ready",!0):(console.error("Failed to modify status for plugin "+e+". Expected parameter `pluginName` to be a string."),!1)}_reloaded(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to reload Content Analysis for plugin "+e+". The plugin was not properly registered."),!1):(this.refresh(),!0):(console.error("Failed to reload Content Analysis for "+e+". Expected parameter `pluginName` to be a string."),!1)}_registerModification(e,t,s,r){if(!(0,u.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,u.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,u.isString)(s))return console.error("Failed to register modification for plugin "+s+". Expected parameter `pluginName` to be a string."),!1;if(!1===this._validateOrigin(s))return console.error("Failed to register modification for plugin "+s+". The integration has not finished loading yet."),!1;const o={callable:t,origin:s,priority:(0,u.isNumber)(r)?r:10};return(0,u.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(o),!0}_registerAssessment(e,t,s,r){return(0,u.isString)(t)?(0,u.isObject)(s)?(0,u.isString)(r)?(t=r+"-"+t,e.addAssessment(t,s),!0):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `pluginName` to be a string."),!1):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `assessment` to be a function."),!1):(console.error("Failed to register test for plugin "+r+". Expected parameter `name` to be a string."),!1)}_applyModifications(e,t,s){let r=this.modifications[e];return!(0,u.isArray)(r)||r.length<1||(r=this._stripIllegalModifications(r),r.sort((e,t)=>e.priority-t.priority),(0,u.forEach)(r,function(r){const o=r.callable(t,s);typeof o==typeof t?t=o:console.error("Modification with name "+e+" performed by plugin with name "+r.origin+" was ignored because the data that was returned by it was of a different type than the data we had passed it.")})),t}_pollLoadingPlugins(e){e=(0,u.isUndefined)(e)?0:e,!0===this._allReady()?(this.loaded=!0,this.refresh()):e>=this.preloadThreshold?(this._pollTimeExceeded(),this.loaded=!0,this.refresh()):(e+=50,setTimeout(this._pollLoadingPlugins.bind(this,e),50))}_allReady(){return(0,u.reduce)(this.plugins,function(e,t){return e&&"ready"===t.status},!0)}_pollTimeExceeded(){(0,u.forEach)(this.plugins,function(e,t){(0,u.isUndefined)(e.options)||"ready"===e.options.status||(console.error("Error: Plugin "+t+". did not finish loading in time."),delete this.plugins[t])})}_stripIllegalModifications(e){return(0,u.forEach)(e,(t,s)=>{!1===this._validateOrigin(t.origin)&&delete e[s]}),e}_validateOrigin(e){return"ready"===this.plugins[e].status}_validateUniqueness(e){return(0,u.isUndefined)(this.plugins[e])}}let Ko=null;const Yo=()=>{if(null===Ko){const e=(0,t.dispatch)("yoast-seo/editor").runAnalysis;Ko=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new zo(e)}return Ko},Vo=(e,t,s)=>Yo().loaded?Yo()._applyModifications(e,t,s):t,{stripHTMLTags:Go}=z.strings,Xo=(e,s)=>{const r=(0,t.select)("yoast-seo/editor").getSnippetEditorTemplates();""===e.title&&(e.title=r.title),""===e.description&&(e.description=r.description);let o=0;return s.shortenedBaseUrl&&"string"==typeof s.shortenedBaseUrl&&(o=s.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[o]&&(e.url=e.url.slice(0,o)+e.url.slice(o+1)),{url:e.url,title:Go(Vo("data_page_title",e.title)),description:Go(Vo("data_meta_desc",e.description)),filteredSEOTitle:Go(Vo("data_page_title",e.filteredSEOTitle))}},Zo=({isLoading:e,onLoad:t,location:s,...r})=>((0,n.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,f.jsx)(Yt,{icon:"eye",hasPaperStyle:r.hasPaperStyle,children:(0,f.jsx)(Wt.SnippetEditor,{...r,descriptionPlaceholder:(0,i.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:Xo,showCloseButton:!1,idSuffix:s})}));Zo.propTypes={isLoading:m().bool.isRequired,onLoad:m().func.isRequired,hasPaperStyle:m().bool.isRequired,location:m().string.isRequired};const Jo=(0,O.compose)([(0,t.withSelect)(e=>{const{getBaseUrlFromSettings:t,getDateFromSettings:s,getEditorDataImageUrl:r,getFocusKeyphrase:o,getRecommendedReplaceVars:n,getSiteIconUrlFromSettings:i,getSnippetEditorData:a,getSnippetEditorIsLoading:l,getSnippetEditorMode:c,getSnippetEditorWordsToHighlight:d,isCornerstoneContent:u,getContentLocale:p,getSiteName:h,getReplaceVars:m}=e("yoast-seo/editor");return{baseUrl:t(),data:a(),date:s(),faviconSrc:i(),isLoading:l(),keyword:o(),mobileImageSrc:r(),mode:c(),recommendedReplacementVariables:n(),replacementVariables:m(),wordsToHighlight:d(),isCornerstone:u(),locale:p(),siteName:h()}}),(0,t.withDispatch)(e=>{const{updateData:t,switchMode:s,updateAnalysisData:r,loadSnippetEditorData:o}=e("yoast-seo/editor");return{onChange:(e,r)=>{switch(e){case"mode":s(r);break;case"slug":t({slug:r});break;default:t({[e]:r})}},onChangeAnalysisData:r,onLoad:o}}),Ut()])(Zo),Qo=y()(Wo())`
712 +`,Yo=({location:e="sidebar"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]),o=$();return(0,f.jsx)(zo,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-modal-${e}`,shouldCloseOnClickOutside:!s,showChangesWarning:!1,SuffixHeroIcon:(0,f.jsx)(Ko,{className:"yst-text-slate-500",...o}),children:(0,f.jsxs)("div",{className:"yoast-insights yoast-modal-content--columns",children:[(0,f.jsx)(fs,{location:e}),(0,f.jsxs)("div",{children:[r&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(ps,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(cs,{}),(0,f.jsx)(xs,{})]}),(0,rs.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(_s,{location:e,name:"YoastTextFormalityMetabox"})]})]})})};Yo.propTypes={location:m().string};const Vo=Yo;var Go=s(8290),Xo=s.n(Go);class Zo{constructor(e){this.refresh=e,this.loaded=!1,this.preloadThreshold=3e3,this.plugins={},this.modifications={},this._registerPlugin=this._registerPlugin.bind(this),this._ready=this._ready.bind(this),this._reloaded=this._reloaded.bind(this),this._registerModification=this._registerModification.bind(this),this._registerAssessment=this._registerAssessment.bind(this),this._applyModifications=this._applyModifications.bind(this),setTimeout(this._pollLoadingPlugins.bind(this),1500)}_registerPlugin(e,t){return(0,u.isString)(e)?(0,u.isUndefined)(t)||(0,u.isObject)(t)?!1===this._validateUniqueness(e)?(console.error("Failed to register plugin. Plugin with name "+e+" already exists"),!1):(this.plugins[e]=t,!0):(console.error("Failed to register plugin "+e+". Expected parameters `options` to be a object."),!1):(console.error("Failed to register plugin. Expected parameter `pluginName` to be a string."),!1)}_ready(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to modify status for plugin "+e+". The plugin was not properly registered."),!1):(this.plugins[e].status="ready",!0):(console.error("Failed to modify status for plugin "+e+". Expected parameter `pluginName` to be a string."),!1)}_reloaded(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to reload Content Analysis for plugin "+e+". The plugin was not properly registered."),!1):(this.refresh(),!0):(console.error("Failed to reload Content Analysis for "+e+". Expected parameter `pluginName` to be a string."),!1)}_registerModification(e,t,s,r){if(!(0,u.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,u.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,u.isString)(s))return console.error("Failed to register modification for plugin "+s+". Expected parameter `pluginName` to be a string."),!1;if(!1===this._validateOrigin(s))return console.error("Failed to register modification for plugin "+s+". The integration has not finished loading yet."),!1;const o={callable:t,origin:s,priority:(0,u.isNumber)(r)?r:10};return(0,u.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(o),!0}_registerAssessment(e,t,s,r){return(0,u.isString)(t)?(0,u.isObject)(s)?(0,u.isString)(r)?(t=r+"-"+t,e.addAssessment(t,s),!0):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `pluginName` to be a string."),!1):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `assessment` to be a function."),!1):(console.error("Failed to register test for plugin "+r+". Expected parameter `name` to be a string."),!1)}_applyModifications(e,t,s){let r=this.modifications[e];return!(0,u.isArray)(r)||r.length<1||(r=this._stripIllegalModifications(r),r.sort((e,t)=>e.priority-t.priority),(0,u.forEach)(r,function(r){const o=r.callable(t,s);typeof o==typeof t?t=o:console.error("Modification with name "+e+" performed by plugin with name "+r.origin+" was ignored because the data that was returned by it was of a different type than the data we had passed it.")})),t}_pollLoadingPlugins(e){e=(0,u.isUndefined)(e)?0:e,!0===this._allReady()?(this.loaded=!0,this.refresh()):e>=this.preloadThreshold?(this._pollTimeExceeded(),this.loaded=!0,this.refresh()):(e+=50,setTimeout(this._pollLoadingPlugins.bind(this,e),50))}_allReady(){return(0,u.reduce)(this.plugins,function(e,t){return e&&"ready"===t.status},!0)}_pollTimeExceeded(){(0,u.forEach)(this.plugins,function(e,t){(0,u.isUndefined)(e.options)||"ready"===e.options.status||(console.error("Error: Plugin "+t+". did not finish loading in time."),delete this.plugins[t])})}_stripIllegalModifications(e){return(0,u.forEach)(e,(t,s)=>{!1===this._validateOrigin(t.origin)&&delete e[s]}),e}_validateOrigin(e){return"ready"===this.plugins[e].status}_validateUniqueness(e){return(0,u.isUndefined)(this.plugins[e])}}let Jo=null;const Qo=()=>{if(null===Jo){const e=(0,t.dispatch)("yoast-seo/editor").runAnalysis;Jo=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new Zo(e)}return Jo},en=(e,t,s)=>Qo().loaded?Qo()._applyModifications(e,t,s):t,{stripHTMLTags:tn}=z.strings,sn=(e,s)=>{const r=(0,t.select)("yoast-seo/editor").getSnippetEditorTemplates();""===e.title&&(e.title=r.title),""===e.description&&(e.description=r.description);let o=0;return s.shortenedBaseUrl&&"string"==typeof s.shortenedBaseUrl&&(o=s.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[o]&&(e.url=e.url.slice(0,o)+e.url.slice(o+1)),{url:e.url,title:tn(en("data_page_title",e.title)),description:tn(en("data_meta_desc",e.description)),filteredSEOTitle:tn(en("data_page_title",e.filteredSEOTitle))}},rn=({isLoading:e,onLoad:t,location:s,...r})=>((0,n.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,f.jsx)(Yt,{icon:"eye",hasPaperStyle:r.hasPaperStyle,children:(0,f.jsx)(Wt.SnippetEditor,{...r,descriptionPlaceholder:(0,i.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:sn,showCloseButton:!1,idSuffix:s})}));rn.propTypes={isLoading:m().bool.isRequired,onLoad:m().func.isRequired,hasPaperStyle:m().bool.isRequired,location:m().string.isRequired};const on=(0,O.compose)([(0,t.withSelect)(e=>{const{getBaseUrlFromSettings:t,getDateFromSettings:s,getEditorDataImageUrl:r,getFocusKeyphrase:o,getRecommendedReplaceVars:n,getSiteIconUrlFromSettings:i,getSnippetEditorData:a,getSnippetEditorIsLoading:l,getSnippetEditorMode:c,getSnippetEditorWordsToHighlight:d,isCornerstoneContent:u,getContentLocale:p,getSiteName:h,getReplaceVars:m}=e("yoast-seo/editor");return{baseUrl:t(),data:a(),date:s(),faviconSrc:i(),isLoading:l(),keyword:o(),mobileImageSrc:r(),mode:c(),recommendedReplacementVariables:n(),replacementVariables:m(),wordsToHighlight:d(),isCornerstone:u(),locale:p(),siteName:h()}}),(0,t.withDispatch)(e=>{const{updateData:t,switchMode:s,updateAnalysisData:r,loadSnippetEditorData:o}=e("yoast-seo/editor");return{onChange:(e,r)=>{switch(e){case"mode":s(r);break;case"slug":t({slug:r});break;default:t({[e]:r})}},onChangeAnalysisData:r,onLoad:o}}),Ut()])(rn),nn=y()(Xo())`
600 713 width: 18px;
601 714 height: 18px;
602 715 margin: 3px;
603 -`,en=()=>{const e=$(),s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]);return(0,f.jsxs)(qo,{title:(0,i.__)("Search appearance","wordpress-seo"),id:"yoast-search-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(Qo,{className:"yst-text-slate-500",...e}),children:[!0===s&&(0,f.jsx)(Jo,{showCloseButton:!1,hasPaperStyle:!1}),!1===s&&(0,f.jsx)(ts,{showCloseButton:!1,hasPaperStyle:!1})]})};var tn=s(3041),sn=s.n(tn);const rn=y()(S.Collapsible)`
716 +`,an=()=>{const e=$(),s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]);return(0,f.jsxs)(zo,{title:(0,i.__)("Search appearance","wordpress-seo"),id:"yoast-search-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(nn,{className:"yst-text-slate-500",...e}),children:[!0===s&&(0,f.jsx)(on,{showCloseButton:!1,hasPaperStyle:!1}),!1===s&&(0,f.jsx)(ts,{showCloseButton:!1,hasPaperStyle:!1})]})};var ln=s(3041),cn=s.n(ln);const dn=y()(S.Collapsible)`
604 717 h2 > button {
605 718 padding-left: 0;
606 719 padding-top: 16px;
607 720
@@ -615,45 +728,15 @@
615 728 margin: 0 24px;
616 729 border-top: 1px solid rgba(0,0,0,0.2);
617 730 }
618 731
619 -`,on=e=>(0,f.jsx)(rn,{hasPadding:!1,hasSeparator:!0,...e}),nn=y()(sn())`
732 +`,un=e=>(0,f.jsx)(dn,{hasPadding:!1,hasSeparator:!0,...e}),pn=y()(cn())`
620 733 width: 18px;
621 734 height: 18px;
622 735 margin: 3px;
623 -`,an=e=>{const{useOpenGraphData:t,useTwitterData:s}=e;if(!t&&!s)return;const r=$();return(0
624 -/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,f.jsxs)(qo,{title:(0,i.__)("Social media appearance","wordpress-seo"),id:"yoast-social-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(nn,{className:"yst-text-slate-500",...r}),children:[t&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(ir,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(er,{}),s&&(0,f.jsx)(nr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),t&&s&&(0,f.jsx)(on,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(or,{})}),!t&&s&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(ir,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(or,{})]})]})};an.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const ln=an,cn=({title:e,children:t,id:s=null,prefixIcon:r=null,subTitle:o="",hasBetaBadgeLabel:i=!1,hasNewBadgeLabel:a=!1,buttonId:l=null,renderNewBadgeLabel:c=()=>{},initialIsOpen:d=!1})=>{const[u,p]=(0,n.useState)(d),h=(0,n.useRef)(null);(0,n.useEffect)(()=>{d&&h.current&&h.current.focus()},[]);const m=(0,n.useCallback)(()=>{p(e=>!e)},[p]);return(0,f.jsxs)("div",{id:s,className:"yoast components-panel__body "+(u?"is-opened":""),children:[(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{ref:h,onClick:m,className:"components-button components-panel__body-toggle",type:"button",id:l,children:[(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${r&&r.color||""}`},children:r&&(0,f.jsx)(S.SvgIcon,{icon:r.icon,color:r.color,size:r.size})}),!a&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),o&&(0,f.jsx)("div",{className:"yoast-subtitle",children:o})]}),i&&(0,f.jsx)(S.BetaBadge,{})]}),a&&(0,f.jsxs)("div",{className:"yst-flex-grow yst-flex yst-items-center yst-gap-2",children:[(0,f.jsxs)("span",{className:"yst-overflow-x-hidden yst-leading-normal",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),o&&(0,f.jsx)("div",{className:"yoast-subtitle",children:o})]}),c()]}),(0,f.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),u&&t]})},dn=cn;function un({settings:e}){const s=(({webinarIntroUrl:e})=>{const{shouldShow:t}=Eo(),s=(e=>{for(const t of e)if(null!=t&&t.getIsEligible())return t;return null})([{getIsEligible:()=>t,component:Io},{getIsEligible:Po,component:t=>(0,f.jsx)(No,{hasIcon:!1,image:null,url:e,className:"yst-m-0",...t})},{getIsEligible:()=>!0,component:e=>(0,f.jsx)(Fr,{...e})}]);return(null==s?void 0:s.component)||null})({webinarIntroUrl:(0,u.get)(window,"wpseoScriptData.webinarIntroBlockEditorUrl","https://yoa.st/webinar-intro-block-editor")}),{isAiFeatureActive:r,isPost:o}=(0,t.useSelect)(e=>({isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive"),isPost:"post"===e("yoast-seo/editor").getPostType()}),[]),a=Dr();return a&&qr(),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastSidebar",children:[(0,f.jsx)(Ls,{renderPriority:0,children:(0,f.jsx)(ss,{})},"warning"),(0,f.jsx)(Ls,{renderPriority:1,children:(0,f.jsxs)(Hr,{children:[s&&(0,f.jsx)(s,{}),(0,f.jsx)(Wr,{withPromptForContentSuggestions:r&&o}),o&&r&&(0,f.jsx)(Br,{location:"sidebar"})]})},"editor-intro"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:8,children:(0,f.jsx)(Bt.TopicInputs,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive})},"keyword-input"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:10,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo"),e.isContentAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:20,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ls,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Ir,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ls,{renderPriority:23,children:(0,f.jsx)($t,{location:"sidebar"})}),e.shouldUpsell&&(0,f.jsx)(Ls,{renderPriority:25,children:(0,f.jsx)(As,{})},"internal-linking-suggestions-upsell"),(0,f.jsx)(Ls,{renderPriority:26,children:(0,f.jsx)(en,{})},"search-appearance"),(e.useOpenGraphData||e.useTwitterData)&&(0,f.jsx)(Ls,{renderPriority:27,children:(0,f.jsx)(ln,{useOpenGraphData:e.useOpenGraphData,useTwitterData:e.useTwitterData})},"social-appearance"),e.displaySchemaSettings&&(0,f.jsx)(Ls,{renderPriority:28,children:(0,f.jsx)(dn,{title:(0,i.__)("Schema","wordpress-seo"),children:(0,f.jsx)(Sr,{})})},"schema"),a&&(0,f.jsx)(Ls,{renderPriority:29,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),e.displayAdvancedTab&&(0,f.jsx)(Ls,{renderPriority:30,children:(0,f.jsx)(dn,{title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)($s,{})})},"advanced"),e.isCornerstoneActive&&(0,f.jsx)(Ls,{renderPriority:31,children:(0,f.jsx)(Ht,{})},"cornerstone"),e.isInsightsEnabled&&(0,f.jsx)(Ls,{renderPriority:32,children:(0,f.jsx)(Uo,{location:"sidebar"})})]})})}cn.propTypes={title:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,id:m().string,prefixIcon:m().object,subTitle:m().string,hasBetaBadgeLabel:m().bool,hasNewBadgeLabel:m().bool,buttonId:m().string,renderNewBadgeLabel:m().func,initialIsOpen:m().bool},un.propTypes={settings:m().object.isRequired};const pn=(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})(un);function hn({trackAll:e=u.noop,hasTrackedKeyphrases:t=!1}){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("SEO performance","wordpress-seo"),linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
625 -/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo"),wrapperClassName:"yoast-field-group yoast-wincher-post-publish"}),(0,f.jsx)(Be,{}),t&&(0,f.jsx)("p",{children:(0,i.__)("Tracking has already been enabled for one or more keyphrases of this page. Clicking the button below will enable tracking for all of its keyphrases.","wordpress-seo")}),(0,f.jsx)("div",{className:"yoast",children:(0,f.jsx)(S.NewButton,{variant:"secondary",small:!0,onClick:e,children:(0,i.__)("Track all keyphrases on this page","wordpress-seo")})}),(0,f.jsx)($t,{location:"postpublish"})]})}hn.propTypes={trackAll:m().func,hasTrackedKeyphrases:m().bool};const mn=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherTrackedKeyphrases:t,hasWincherTrackedKeyphrases:s}=e("yoast-seo/editor");return{trackedKeyphrases:t(),hasTrackedKeyphrases:s()}}),(0,t.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherTrackAllKeyphrases:s}=e("yoast-seo/editor");return{trackAll:()=>{s(!0),t("postpublish")}}})])(hn);window.wp.annotations;const gn=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:yn}=T.helpers.htmlEntities,fn=e=>{let t=0;return(0,u.forEachRight)(e,e=>{const[s]=e;let r=s.length;/^<\/?br/.test(s)&&(r-=1),t+=r}),t},xn="<yoastmark class='yoast-text-mark'>",wn="</yoastmark>",bn='<yoastmark class="yoast-text-mark">';function vn(e,t,s,r,o){const n=r.clientId,i=(0,l.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,u.flatMap)(o,s=>{let o;return o=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,r,o){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),n=e.getBlockPositionEnd();if(e.isMarkForFirstBlockSection()){const e=((e,t,s)=>{const r="yoast/faq-block"===s?'<strong class="schema-faq-question">':'<strong class="schema-how-to-step-name">';return{blockStartOffset:e-=r.length,blockEndOffset:t-=r.length}})(t,n,s);t=e.blockStartOffset,n=e.blockEndOffset}if(r.slice(t,n)===o.slice(t,n))return[{startOffset:t,endOffset:n}];const i=((e,t,s)=>{const r=s.slice(0,e),o=s.slice(0,t),n=((e,t,s,r)=>{const o=[...e.matchAll(gn)];s-=fn(o);const n=[...t.matchAll(gn)];return{blockStartOffset:s,blockEndOffset:r-=fn(n)}})(r,o,e,t),i=((e,t,s,r)=>{let o=[...e.matchAll(yn)];return(0,u.forEachRight)(o,e=>{const[,t]=e;s-=t.length}),o=[...t.matchAll(yn)],(0,u.forEachRight)(o,e=>{const[,t]=e;r-=t.length}),{blockStartOffset:s,blockEndOffset:r}})(r,o,e=n.blockStartOffset,t=n.blockEndOffset);return{blockStartOffset:e=i.blockStartOffset,blockEndOffset:t=i.blockEndOffset}})(t,n,r);return[{startOffset:i.blockStartOffset,endOffset:i.blockEndOffset}]}return[]}(s,n,r.name,e,i):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),r=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),o=function(e,t,s=!0){const r=[];if(0===e.length)return r;let o,n=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(o=e.indexOf(t,n))>-1;)r.push(o),n=o+t.length;return r}(e,s);if(0===o.length)return[];const n=function(e){let t=e.indexOf(xn);const s=t>=0;s||(t=e.indexOf(bn));let r=null;const o=[];for(;t>=0;){if(r=(e=s?e.replace(xn,""):e.replace(bn,"")).indexOf(wn),r<t)return[];e=e.replace(wn,""),o.push({startOffset:t,endOffset:r}),t=s?e.indexOf(xn):e.indexOf(bn),r=null}return o}(r),i=[];return n.forEach(e=>{o.forEach(r=>{const o=r+e.startOffset;let n=r+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(n=r+s.length),i.push({startOffset:o,endOffset:n})})}),i}(i,s),o?o.map(e=>({...e,block:n,richTextIdentifier:t})):[]})}const kn=e=>e[0].toUpperCase()+e.slice(1),jn=(e,t,s,r,o)=>(e=e.map(e=>{const n=`${e.id}-${o[0]}`,i=`${e.id}-${o[1]}`,a=kn(o[0]),l=kn(o[1]),c=e[`json${a}`],d=e[`json${l}`],{marksForFirstSection:u,marksForSecondSection:p}=((e,t)=>({marksForFirstSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&e.isMarkForFirstBlockSection():e),marksForSecondSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&!e.isMarkForFirstBlockSection():e)}))(t,e),h=vn(c,n,s,r,u),m=vn(d,i,s,r,p);return h.concat(m)}),(0,u.flattenDeep)(e)),Sn="yoast";let Cn=[];const Tn={"core/paragraph":[{key:"content"}],"core/list":[{key:"values",multilineTag:"li",multilineWrapperTag:["ul","ol"]}],"core/list-item":[{key:"content"}],"core/heading":[{key:"content"}],"core/audio":[{key:"caption"}],"core/embed":[{key:"caption"}],"core/gallery":[{key:"caption"}],"core/image":[{key:"caption"}],"core/table":[{key:"caption"}],"core/video":[{key:"caption"}],"yoast/faq-block":[{key:"questions"}],"yoast/how-to-block":[{key:"steps"},{key:"jsonDescription"}]};function Rn(){const e=Cn.shift();e&&((0,t.dispatch)("core/annotations").__experimentalAddAnnotation(e),En())}function En(){(0,u.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(Rn,{timeout:1e3}):setTimeout(Rn,150)}function An(){const e=(0,t.select)("core/block-editor").getSelectedBlock(),s=(0,t.select)("yoast-seo/editor").getActiveMarker();if(!e||!s)return;var r;r=e.clientId,(0,t.select)("core/annotations").__experimentalGetAnnotations().filter(e=>e.blockClientId===r&&e.source===Sn).forEach(e=>{(0,t.dispatch)("core/annotations").__experimentalRemoveAnnotation(e.id)});const o=(0,t.select)("yoast-seo/editor").getResultById(s);if(void 0===o)return;const n=o.marks;var i;i=((e,t)=>{return(0,u.flatMap)((s=e.name,Tn.hasOwnProperty(s)?Tn[s]:[]),s=>"yoast/faq-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];return 0===r.length?[]:jn(r,s,e,t,["question","answer"])})(s,e,t):"yoast/how-to-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];if(r&&0===r.length)return[];const o=[];return"steps"===e.key&&o.push(jn(r,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e),o.push(vn(r,"description",e,t,s))),(0,u.flattenDeep)(o)})(s,e,t):function(e,t,s){const r=e.key,o=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:(s||"").toString()})(t,r);return vn(o,r,e,t,s)}(s,e,t));var s})(e,n),Cn=i.map(e=>({blockClientId:e.block,source:Sn,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}})),En()}const In=window.wp.htmlEntities,Ln=(0,z.makeOutboundLink)(y().a`
626 - display: inline-block;
627 - position: relative;
628 - outline: none;
629 - text-decoration: none;
630 - border-radius: 100%;
631 - width: 24px;
632 - height: 24px;
633 - margin: -4px 0;
634 - vertical-align: middle;
635 -
636 - color: ${C.colors.$color_help_text};
637 -
638 - &:hover,
639 - &:focus {
640 - color: ${C.colors.$color_snippet_focus};
641 - }
642 -
643 - // Overwrite the default blue active color for links.
644 - &:active {
645 - color: ${C.colors.$color_help_text};
646 - }
647 -
648 - &::before {
649 - position: absolute;
650 - top: 0;
651 - left: 0;
652 - padding: 2px;
653 - content: "\f223";
654 - }
655 -`);function Nn({value:e,onChange:t}){var s;const[r,o]=(0,n.useState)(Boolean(null==e?void 0:e.cssClasses)),a=`${(0,O.useInstanceId)(Nn,"css-classes-setting")}-input`;return(0,n.useEffect)(()=>{o(Boolean(null==e?void 0:e.cssClasses))},[null==e?void 0:e.cssClasses]),(0,f.jsxs)(v.__experimentalVStack,{spacing:"2",children:[(0,f.jsx)(v.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),checked:r,onChange:s=>{o(s),s||t({...e,cssClasses:""})}}),r&&(0,f.jsx)(v.__experimentalInputControl,{__next40pxDefaultSize:!0,id:a,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),hideLabelFromVision:!0,value:null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"",onChange:s=>{const r=(null!=s?s:"").replace(/,/g," ").replace(/\s+/g," ");t({...e,cssClasses:r})},onBlur:()=>{var s;const r=(null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"").trim();r!==(null==e?void 0:e.cssClasses)&&t({...e,cssClasses:r})},placeholder:(0,i.__)("Separate multiple classes with spaces","wordpress-seo"),help:(0,i.__)("Separate multiple classes with spaces.","wordpress-seo")})]})}function Pn({isActive:e=!1,activeAttributes:t={},addingLink:s=!1,value:o={},onChange:a=u.noop,speak:c,stopAddingLink:d,contentRef:p={}}){const h=(0,n.useMemo)(u.uniqueId,[s]),[m,g]=(0,n.useState)(),y=(0,l.useAnchor)({editableContentElement:p.current,settings:{...Dn,isActive:e}}),x=(0,l.getActiveFormat)(o,"core/link"),w=e=>{var t;const{formats:s,start:r,text:o}=e,n=null==x||null===(t=x.attributes)||void 0===t?void 0:t.url;let i=r,a=r;const l=e=>{var t;return null===(t=s[e])||void 0===t?void 0:t.some(e=>{var t;return"core/link"===(null==e?void 0:e.type)&&(null==e||null===(t=e.attributes)||void 0===t?void 0:t.url)===n})};for(!l(i)&&i>0&&l(i-1)&&(i--,a=i);i>0&&l(i-1);)i--;for(;a<((null==o?void 0:o.length)||0)&&l(a);)a++;return{start:i,end:a}};let b="";if(e&&x){const{start:e,end:t}=w(o);e<t&&(b=o.text.substring(e,t))}else o.start!==o.end&&(b=(0,l.getTextContent)((0,l.slice)(o)));const _={url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,noFollow:t.rel&&t.rel.split(" ").includes("nofollow"),sponsored:t.rel&&t.rel.split(" ").includes("sponsored"),title:b,className:t.class,cssClasses:t.class,...m},k=e=>_.url===e.url&&(_.opensInNewTab!==e.opensInNewTab||_.noFollow!==e.noFollow||_.sponsored!==e.sponsored||_.cssClasses!==e.cssClasses),j=e=>{if("number"==typeof e||"string"==typeof e)return String(e)},S=(0,f.jsx)(Ln,{href:window.wpseoAdminL10n["shortlinks.nofollow_sponsored"],className:"dashicons",children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
736 +`,hn=e=>{const{useOpenGraphData:t,useTwitterData:s}=e;if(!t&&!s)return;const r=$();return(0
737 +/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,f.jsxs)(zo,{title:(0,i.__)("Social media appearance","wordpress-seo"),id:"yoast-social-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(pn,{className:"yst-text-slate-500",...r}),titleHelpLink:t?(0,f.jsx)(pr,{}):null,children:[t&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(cr,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(rr,{}),s&&(0,f.jsx)(lr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),t&&s&&(0,f.jsx)(un,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(ar,{})}),!t&&s&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(cr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(ar,{})]})]})};hn.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const mn=hn,gn=({title:e,children:t,id:s=null,prefixIcon:r=null,subTitle:o="",hasBetaBadgeLabel:i=!1,hasNewBadgeLabel:a=!1,buttonId:l=null,renderNewBadgeLabel:c=()=>{},initialIsOpen:d=!1})=>{const[u,p]=(0,n.useState)(d),h=(0,n.useRef)(null);(0,n.useEffect)(()=>{d&&h.current&&h.current.focus()},[]);const m=(0,n.useCallback)(()=>{p(e=>!e)},[p]);return(0,f.jsxs)("div",{id:s,className:"yoast components-panel__body "+(u?"is-opened":""),children:[(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{ref:h,onClick:m,className:"components-button components-panel__body-toggle",type:"button",id:l,children:[(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${r&&r.color||""}`},children:r&&(0,f.jsx)(S.SvgIcon,{icon:r.icon,color:r.color,size:r.size})}),!a&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),o&&(0,f.jsx)("div",{className:"yoast-subtitle",children:o})]}),i&&(0,f.jsx)(S.BetaBadge,{})]}),a&&(0,f.jsxs)("div",{className:"yst-flex-grow yst-flex yst-items-center yst-gap-2",children:[(0,f.jsxs)("span",{className:"yst-overflow-x-hidden yst-leading-normal",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),o&&(0,f.jsx)("div",{className:"yoast-subtitle",children:o})]}),c()]}),(0,f.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),u&&t]})},yn=gn;function fn({settings:e}){const s=(({webinarIntroUrl:e})=>{const{shouldShow:t}=Mo(),s=(e=>{for(const t of e)if(null!=t&&t.getIsEligible())return t;return null})([{getIsEligible:()=>t,component:Fo},{getIsEligible:$o,component:t=>(0,f.jsx)(qo,{hasIcon:!1,image:null,url:e,className:"yst-m-0",...t})},{getIsEligible:()=>!0,component:e=>(0,f.jsx)(Hr,{...e})}]);return(null==s?void 0:s.component)||null})({webinarIntroUrl:(0,u.get)(window,"wpseoScriptData.webinarIntroBlockEditorUrl","https://yoa.st/webinar-intro-block-editor")}),{isAiFeatureActive:r,isPost:o}=(0,t.useSelect)(e=>({isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive"),isPost:"post"===e("yoast-seo/editor").getPostType()}),[]),a=Wr();return a&&zr(),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastSidebar",children:[(0,f.jsx)(Ms,{renderPriority:0,children:(0,f.jsx)(ss,{})},"warning"),(0,f.jsx)(Ms,{renderPriority:1,children:(0,f.jsxs)(Gr,{children:[s&&(0,f.jsx)(s,{}),(0,f.jsx)(Xr,{withPromptForContentSuggestions:r&&o}),o&&r&&(0,f.jsx)(Yr,{location:"sidebar"})]})},"editor-intro"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:8,children:(0,f.jsx)(Bt.TopicInputs,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive})},"keyword-input"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:10,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo"),e.isContentAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:20,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ms,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Fr,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ms,{renderPriority:23,children:(0,f.jsx)($t,{location:"sidebar"})}),e.shouldUpsell&&(0,f.jsx)(Ms,{renderPriority:25,children:(0,f.jsx)(Ps,{})},"internal-linking-suggestions-upsell"),(0,f.jsx)(Ms,{renderPriority:26,children:(0,f.jsx)(an,{})},"search-appearance"),(e.useOpenGraphData||e.useTwitterData)&&(0,f.jsx)(Ms,{renderPriority:27,children:(0,f.jsx)(mn,{useOpenGraphData:e.useOpenGraphData,useTwitterData:e.useTwitterData})},"social-appearance"),e.displaySchemaSettings&&(0,f.jsx)(Ms,{renderPriority:28,children:(0,f.jsx)(yn,{title:(0,i.__)("Schema","wordpress-seo"),children:(0,f.jsx)(Ir,{})})},"schema"),a&&(0,f.jsx)(Ms,{renderPriority:29,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),e.displayAdvancedTab&&(0,f.jsx)(Ms,{renderPriority:30,children:(0,f.jsx)(yn,{title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(Hs,{})})},"advanced"),e.isCornerstoneActive&&(0,f.jsx)(Ms,{renderPriority:31,children:(0,f.jsx)(Ht,{})},"cornerstone"),e.isInsightsEnabled&&(0,f.jsx)(Ms,{renderPriority:32,children:(0,f.jsx)(Vo,{location:"sidebar"})})]})})}gn.propTypes={title:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,id:m().string,prefixIcon:m().object,subTitle:m().string,hasBetaBadgeLabel:m().bool,hasNewBadgeLabel:m().bool,buttonId:m().string,renderNewBadgeLabel:m().func,initialIsOpen:m().bool},fn.propTypes={settings:m().object.isRequired};const xn=(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})(fn);function wn({trackAll:e=u.noop,hasTrackedKeyphrases:t=!1}){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("SEO performance","wordpress-seo"),linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
738 +/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo"),wrapperClassName:"yoast-field-group yoast-wincher-post-publish"}),(0,f.jsx)(Be,{}),t&&(0,f.jsx)("p",{children:(0,i.__)("Tracking has already been enabled for one or more keyphrases of this page. Clicking the button below will enable tracking for all of its keyphrases.","wordpress-seo")}),(0,f.jsx)("div",{className:"yoast",children:(0,f.jsx)(S.NewButton,{variant:"secondary",small:!0,onClick:e,children:(0,i.__)("Track all keyphrases on this page","wordpress-seo")})}),(0,f.jsx)($t,{location:"postpublish"})]})}wn.propTypes={trackAll:m().func,hasTrackedKeyphrases:m().bool};const bn=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherTrackedKeyphrases:t,hasWincherTrackedKeyphrases:s}=e("yoast-seo/editor");return{trackedKeyphrases:t(),hasTrackedKeyphrases:s()}}),(0,t.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherTrackAllKeyphrases:s}=e("yoast-seo/editor");return{trackAll:()=>{s(!0),t("postpublish")}}})])(wn);window.wp.annotations;const vn=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:kn}=T.helpers.htmlEntities,jn=e=>{let t=0;return(0,u.forEachRight)(e,e=>{const[s]=e;let r=s.length;/^<\/?br/.test(s)&&(r-=1),t+=r}),t},Sn="<yoastmark class='yoast-text-mark'>",Cn="</yoastmark>",Tn='<yoastmark class="yoast-text-mark">';function En(e,t,s,r,o){const n=r.clientId,i=(0,l.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,u.flatMap)(o,s=>{let o;return o=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,r,o){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),n=e.getBlockPositionEnd();if(e.isMarkForFirstBlockSection()){const e=((e,t,s)=>{const r="yoast/faq-block"===s?'<strong class="schema-faq-question">':'<strong class="schema-how-to-step-name">';return{blockStartOffset:e-=r.length,blockEndOffset:t-=r.length}})(t,n,s);t=e.blockStartOffset,n=e.blockEndOffset}if(r.slice(t,n)===o.slice(t,n))return[{startOffset:t,endOffset:n}];const i=((e,t,s)=>{const r=s.slice(0,e),o=s.slice(0,t),n=((e,t,s,r)=>{const o=[...e.matchAll(vn)];s-=jn(o);const n=[...t.matchAll(vn)];return{blockStartOffset:s,blockEndOffset:r-=jn(n)}})(r,o,e,t),i=((e,t,s,r)=>{let o=[...e.matchAll(kn)];return(0,u.forEachRight)(o,e=>{const[,t]=e;s-=t.length}),o=[...t.matchAll(kn)],(0,u.forEachRight)(o,e=>{const[,t]=e;r-=t.length}),{blockStartOffset:s,blockEndOffset:r}})(r,o,e=n.blockStartOffset,t=n.blockEndOffset);return{blockStartOffset:e=i.blockStartOffset,blockEndOffset:t=i.blockEndOffset}})(t,n,r);return[{startOffset:i.blockStartOffset,endOffset:i.blockEndOffset}]}return[]}(s,n,r.name,e,i):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),r=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),o=function(e,t,s=!0){const r=[];if(0===e.length)return r;let o,n=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(o=e.indexOf(t,n))>-1;)r.push(o),n=o+t.length;return r}(e,s);if(0===o.length)return[];const n=function(e){let t=e.indexOf(Sn);const s=t>=0;s||(t=e.indexOf(Tn));let r=null;const o=[];for(;t>=0;){if(r=(e=s?e.replace(Sn,""):e.replace(Tn,"")).indexOf(Cn),r<t)return[];e=e.replace(Cn,""),o.push({startOffset:t,endOffset:r}),t=s?e.indexOf(Sn):e.indexOf(Tn),r=null}return o}(r),i=[];return n.forEach(e=>{o.forEach(r=>{const o=r+e.startOffset;let n=r+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(n=r+s.length),i.push({startOffset:o,endOffset:n})})}),i}(i,s),o?o.map(e=>({...e,block:n,richTextIdentifier:t})):[]})}const Rn=e=>e[0].toUpperCase()+e.slice(1),An=(e,t,s,r,o)=>(e=e.map(e=>{const n=`${e.id}-${o[0]}`,i=`${e.id}-${o[1]}`,a=Rn(o[0]),l=Rn(o[1]),c=e[`json${a}`],d=e[`json${l}`],{marksForFirstSection:u,marksForSecondSection:p}=((e,t)=>({marksForFirstSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&e.isMarkForFirstBlockSection():e),marksForSecondSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&!e.isMarkForFirstBlockSection():e)}))(t,e),h=En(c,n,s,r,u),m=En(d,i,s,r,p);return h.concat(m)}),(0,u.flattenDeep)(e)),In="yoast";let Ln=[];const Pn={"core/paragraph":[{key:"content"}],"core/list":[{key:"values",multilineTag:"li",multilineWrapperTag:["ul","ol"]}],"core/list-item":[{key:"content"}],"core/heading":[{key:"content"}],"core/audio":[{key:"caption"}],"core/embed":[{key:"caption"}],"core/gallery":[{key:"caption"}],"core/image":[{key:"caption"}],"core/table":[{key:"caption"}],"core/video":[{key:"caption"}],"yoast/faq-block":[{key:"questions"}],"yoast/how-to-block":[{key:"steps"},{key:"jsonDescription"}]};function Nn(){const e=Ln.shift();e&&((0,t.dispatch)("core/annotations").__experimentalAddAnnotation(e),Mn())}function Mn(){(0,u.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(Nn,{timeout:1e3}):setTimeout(Nn,150)}function On(){const e=(0,t.select)("core/block-editor").getSelectedBlock(),s=(0,t.select)("yoast-seo/editor").getActiveMarker();if(!e||!s)return;var r;r=e.clientId,(0,t.select)("core/annotations").__experimentalGetAnnotations().filter(e=>e.blockClientId===r&&e.source===In).forEach(e=>{(0,t.dispatch)("core/annotations").__experimentalRemoveAnnotation(e.id)});const o=(0,t.select)("yoast-seo/editor").getResultById(s);if(void 0===o)return;const n=o.marks;var i;i=((e,t)=>{return(0,u.flatMap)((s=e.name,Pn.hasOwnProperty(s)?Pn[s]:[]),s=>"yoast/faq-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];return 0===r.length?[]:An(r,s,e,t,["question","answer"])})(s,e,t):"yoast/how-to-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];if(r&&0===r.length)return[];const o=[];return"steps"===e.key&&o.push(An(r,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e),o.push(En(r,"description",e,t,s))),(0,u.flattenDeep)(o)})(s,e,t):function(e,t,s){const r=e.key,o=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:(s||"").toString()})(t,r);return En(o,r,e,t,s)}(s,e,t));var s})(e,n),Ln=i.map(e=>({blockClientId:e.block,source:In,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}})),Mn()}const Fn=window.wp.htmlEntities;function Dn({value:e,onChange:t}){var s;const[r,o]=(0,n.useState)(Boolean(null==e?void 0:e.cssClasses)),a=`${(0,O.useInstanceId)(Dn,"css-classes-setting")}-input`;return(0,n.useEffect)(()=>{o(Boolean(null==e?void 0:e.cssClasses))},[null==e?void 0:e.cssClasses]),(0,f.jsxs)(v.__experimentalVStack,{spacing:"2",children:[(0,f.jsx)(v.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),checked:r,onChange:s=>{o(s),s||t({...e,cssClasses:""})}}),r&&(0,f.jsx)(v.__experimentalInputControl,{__next40pxDefaultSize:!0,id:a,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),hideLabelFromVision:!0,value:null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"",onChange:s=>{const r=(null!=s?s:"").replace(/,/g," ").replace(/\s+/g," ");t({...e,cssClasses:r})},onBlur:()=>{var s;const r=(null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"").trim();r!==(null==e?void 0:e.cssClasses)&&t({...e,cssClasses:r})},placeholder:(0,i.__)("Separate multiple classes with spaces","wordpress-seo"),help:(0,i.__)("Separate multiple classes with spaces.","wordpress-seo")})]})}function qn({isActive:e=!1,activeAttributes:t={},addingLink:s=!1,value:o={},onChange:a=u.noop,speak:c,stopAddingLink:d,contentRef:p={}}){const h=(0,n.useMemo)(u.uniqueId,[s]),[m,g]=(0,n.useState)(),y=(0,l.useAnchor)({editableContentElement:p.current,settings:{...Hn,isActive:e}}),x=(0,l.getActiveFormat)(o,"core/link"),w=e=>{var t;const{formats:s,start:r,text:o}=e,n=null==x||null===(t=x.attributes)||void 0===t?void 0:t.url;let i=r,a=r;const l=e=>{var t;return null===(t=s[e])||void 0===t?void 0:t.some(e=>{var t;return"core/link"===(null==e?void 0:e.type)&&(null==e||null===(t=e.attributes)||void 0===t?void 0:t.url)===n})};for(!l(i)&&i>0&&l(i-1)&&(i--,a=i);i>0&&l(i-1);)i--;for(;a<((null==o?void 0:o.length)||0)&&l(a);)a++;return{start:i,end:a}};let b="";if(e&&x){const{start:e,end:t}=w(o);e<t&&(b=o.text.substring(e,t))}else o.start!==o.end&&(b=(0,l.getTextContent)((0,l.slice)(o)));const k={url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,noFollow:t.rel&&t.rel.split(" ").includes("nofollow"),sponsored:t.rel&&t.rel.split(" ").includes("sponsored"),title:b,className:t.class,cssClasses:t.class,...m},_=e=>k.url===e.url&&(k.opensInNewTab!==e.opensInNewTab||k.noFollow!==e.noFollow||k.sponsored!==e.sponsored||k.cssClasses!==e.cssClasses),j=e=>{if("number"==typeof e||"string"==typeof e)return String(e)},S=(0,f.jsx)(dr,{href:window.wpseoAdminL10n["shortlinks.nofollow_sponsored"],className:"dashicons",children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
656 739 (0,i.__)("Learn more about marking a link as nofollow or sponsored.","wordpress-seo")})}),C=(0,De.x)((0,i.sprintf)(
657 740 // translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
658 741 // translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
659 742 (0,i.__)("Search engines should ignore this link (mark as %1$snofollow%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),T=(0,De.x)((0,i.sprintf)(
@@ -658,8 +741,8 @@
658 741 // translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
659 742 (0,i.__)("Search engines should ignore this link (mark as %1$snofollow%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),T=(0,De.x)((0,i.sprintf)(
660 743 // translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
661 744 // translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
662 -(0,i.__)("This is a sponsored link or advert (mark as %1$ssponsored%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),R=[{id:"opensInNewTab",title:(0,i.__)("Open in new tab","wordpress-seo")},{id:"noFollow",title:C},{id:"sponsored",title:T},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)","wordpress-seo"),render:(e,t,s)=>(0,f.jsx)(Nn,{value:t,onChange:s},e.id)}],{__experimentalLinkControl:E}=window.wp.blockEditor;return(0,f.jsx)(v.Popover,{anchor:y,focusOnMount:!!s&&"firstElement",onClose:d,position:"bottom center",placement:"bottom",shift:!0,children:(0,f.jsx)(E,{value:_,onChange:t=>{var s;t={...m,...t};const n=k(t);if((e=>k(e)&&!e.url)(t=(e=>{var t;return k(t=e)&&!0===t.sponsored&&!0!==_.sponsored&&(e.noFollow=!0),(e=>k(e)&&!1===e.noFollow&&!1!==_.noFollow)(e)&&(e.sponsored=!1),e})(t)))return void g(t);const p=(0,r.prependHTTP)(t.url),h=function({url:e,type:t,id:s,opensInNewWindow:r,noFollow:o,sponsored:n,className:i}){const a={type:"core/link",attributes:{url:e}};t&&(a.attributes.type=t),s&&(a.attributes.id=s);let l=[];return r&&(a.attributes.target="_blank",l.push("noreferrer noopener")),n&&(l.push("sponsored"),l.push("nofollow")),o&&l.push("nofollow"),l.length>0&&(l=(0,u.uniq)(l),a.attributes.rel=l.join(" ")),i&&(a.attributes.class=i),a}({url:p,type:t.type,id:j(t.id),opensInNewWindow:t.opensInNewTab,noFollow:t.noFollow,sponsored:t.sponsored,className:null!==(s=t.cssClasses)&&void 0!==s?s:t.className});(0,l.isCollapsed)(o)&&!e?((e,t,s)=>{const r=((e,t)=>e.title?e.title:t)(t,s),n=(0,l.applyFormat)((0,l.create)({text:r}),e,0,r.length);a((0,l.insert)(o,n))})(h,t,p):((e,t)=>{const{start:s,end:r}=w(o),n=s<r?o.text.substring(s,r):"";let i;if(void 0!==t&&""!==t&&t!==n&&s<r){const n=(0,l.remove)(o,s,r);n.start=s,n.end=s;const a=(0,l.applyFormat)((0,l.create)({text:t}),e,0,t.length);i=(0,l.insert)(n,a)}else i=(0,l.applyFormat)(o,e),i.start=i.end;i.activeFormats=[],a(i)})(h,t.title),n||d(),(t=>{!function(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,r.getProtocol)(t);if(!(0,r.isValidProtocol)(e))return!1;if((0,u.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const s=(0,r.getAuthority)(t);if(!(0,r.isValidAuthority)(s))return!1;const o=(0,r.getPath)(t);if(o&&!(0,r.isValidPath)(o))return!1;const n=(0,r.getQueryString)(t);if(n&&!(0,r.isValidQueryString)(n))return!1;const i=(0,r.getFragment)(t);if(i&&!(0,r.isValidFragment)(i))return!1}return!((0,u.startsWith)(t,"#")&&!(0,r.isValidFragment)(t))}(t)?c((0,i.__)("Warning: the link has been inserted but may have errors. Please test it.","wordpress-seo"),"assertive"):c(e?(0,i.__)("Link edited.","wordpress-seo"):(0,i.__)("Link inserted.","wordpress-seo"),"assertive")})(p)},forceIsEditingLink:s,hasTextControl:!0,settings:R})},h)}Pn.propTypes={isActive:m().bool,activeAttributes:m().object,addingLink:m().bool,value:m().object,onChange:m().func,speak:m().func.isRequired,stopAddingLink:m().func.isRequired,contentRef:m().object};const Mn=(0,v.withSpokenMessages)(Pn),On="core/link",Fn=(0,i.__)("Link","wordpress-seo"),Dn={name:On,title:Fn,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},replaces:"core/link",__unstablePasteRule(e,{html:t,plainText:s}){if((0,l.isCollapsed)(e))return e;const o=(t||s).replace(/<[^>]+>/g,"").trim();return(0,r.isURL)(o)?(window.console.log("Created link:\n\n",o),(0,l.applyFormat)(e,{type:On,attributes:{url:(0,In.decodeEntities)(o)}})):e},edit:(0,v.withSpokenMessages)(class extends n.Component{constructor(){super(...arguments),this.addLink=this.addLink.bind(this),this.stopAddingLink=this.stopAddingLink.bind(this),this.onRemoveFormat=this.onRemoveFormat.bind(this),this.state={addingLink:!1}}addLink(){const{value:e,onChange:t}=this.props,s=(0,l.getTextContent)((0,l.slice)(e));s&&(0,r.isURL)(s)?t((0,l.applyFormat)(e,{type:On,attributes:{url:s}})):s&&(0,r.isEmail)(s)?t((0,l.applyFormat)(e,{type:On,attributes:{url:`mailto:${s}`}})):this.setState({addingLink:!0})}stopAddingLink(){this.setState({addingLink:!1}),this.props.onFocus()}onRemoveFormat(){const{value:e,onChange:t,speak:s}=this.props;t((0,l.removeFormat)(e,On)),s((0,i.__)("Link removed.","wordpress-seo"),"assertive")}render(){const{isActive:e,activeAttributes:t,value:s,onChange:r}=this.props,{RichTextToolbarButton:o,RichTextShortcut:a}=window.wp.blockEditor;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(a,{type:"primary",character:"k",onUse:this.addLink}),(0,f.jsx)(a,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&(0,f.jsx)(o,{name:"link",icon:"editor-unlink",title:(0,i.__)("Unlink","wordpress-seo"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,f.jsx)(o,{name:"link",icon:"admin-links",title:Fn,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&(0,f.jsx)(Mn,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:t,value:s,onChange:r,contentRef:this.props.contentRef})]})}})};var qn=s(5424),$n=s(8213);function Bn(e){return(0,u.get)(e,"editorContext.postType")}const Un=(0,$n.createSelector)([Bn],e=>"product"===e),Hn=(0,$n.createSelector)([Bn],e=>["product_cat","product_tag"].includes(e)),Wn=(0,$n.createSelector)([Un,Hn],(e,t)=>e||t),zn=(e,t,s=null)=>(0,u.get)(e,`preferences.${t}`,s),Kn=e=>zn(e,"isWooCommerceActive",!1),Yn=e=>zn(e,"isWooCommerceSeoActive",!1);function Vn(){const e=p();return(0,u.get)(e,"contentLocale","en_US")}(0,$n.createSelector)([Yn,Kn,Wn],(e,t,s)=>!e&&t&&s),(0,$n.createSelector)([Yn,Kn,Hn],(e,t,s)=>!e&&t&&s),(0,$n.createSelector)([Wn,Kn],(e,t)=>t&&e);const{updateReplacementVariable:Gn,updateData:Xn,hideReplacementVariables:Zn,setContentImage:Jn,updateSettings:Qn,setEditorDataContent:ei,setEditorDataTitle:ti,setEditorDataExcerpt:si,setEditorDataImageUrl:ri,setEditorDataSlug:oi}=d.actions,ni=globalThis.jQuery;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){(function(s){const r=p(),l=r.isPremium?"Yoast SEO Premium":"Yoast SEO",d=(0,f.jsx)(b,{});(0,e.updateCategory)("yoast-structured-data-blocks",{icon:d}),(0,e.updateCategory)("yoast-internal-linking-blocks",{icon:d}),(0,e.updateCategory)("yoast-ai-blocks",{icon:d});const u={isRtl:r.isRtl},h=s.getState().preferences,m=h.isKeywordAnalysisActive||h.isContentAnalysisActive,g=h.isKeywordAnalysisActive&&h.isWincherIntegrationActive;!function(){var e;const s="yoast-seo/document-panel",r=null===(e=(0,t.select)("core/preferences"))||void 0===e?void 0:e.get("core","openPanels");var o;r&&!r.includes(s)&&(null===(o=(0,t.dispatch)("core/editor"))||void 0===o||o.toggleEditorPanelOpened(s))}();const y={locationContext:"block-sidebar"},x={locationContext:"block-metabox"};(0,a.registerPlugin)("yoast-seo",{render:()=>(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(o.PluginSidebarMoreMenuItem,{target:"seo-sidebar",icon:(0,f.jsx)(io,{}),children:l}),(0,f.jsx)(o.PluginSidebar,{name:"seo-sidebar",title:l,children:(0,f.jsx)(c.Root,{context:y,children:(0,f.jsx)(Zr,{store:s,theme:u})})}),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(pn,{store:s,theme:u}),(0,f.jsx)(c.Root,{context:x,children:(0,f.jsx)(Gr,{target:"wpseo-metabox-root",store:s,theme:u})})]}),m&&(0,f.jsx)(o.PluginPrePublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(ko,{})}),(0,f.jsxs)(o.PluginPostPublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:[(0,f.jsx)(go,{}),g&&(0,f.jsx)(mn,{})]}),m&&(0,f.jsx)(o.PluginDocumentSettingPanel,{name:"document-panel",className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(no,{})})]}),icon:(0,f.jsx)(io,{})})})(s),function(){if("function"==typeof(0,u.get)(window,"wp.blockEditor.__experimentalLinkControl")){const e=(0,t.select)("core/rich-text").getFormatType("core/link"),s=(0,t.select)("core/rich-text").getFormatType("core/unknown");void 0!==s&&(0,t.dispatch)("core/rich-text").removeFormatTypes("core/unknown"),[Dn].forEach(({name:s,replaces:r,...o})=>{if(r&&(0,t.dispatch)("core/rich-text").removeFormatTypes(r),s){const t=e&&"core/link"===s?{...e,...o}:o;(0,l.registerFormatType)(s,t)}}),void 0!==s&&(0,l.registerFormatType)("core/unknown",s)}else console.warn((0,i.__)("Marking links with nofollow/sponsored has been disabled for WordPress installs < 5.4.","wordpress-seo")+" "+(0,i.sprintf)(
745 +(0,i.__)("This is a sponsored link or advert (mark as %1$ssponsored%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),E=[{id:"opensInNewTab",title:(0,i.__)("Open in new tab","wordpress-seo")},{id:"noFollow",title:C},{id:"sponsored",title:T},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)","wordpress-seo"),render:(e,t,s)=>(0,f.jsx)(Dn,{value:t,onChange:s},e.id)}],{__experimentalLinkControl:R}=window.wp.blockEditor;return(0,f.jsx)(v.Popover,{anchor:y,focusOnMount:!!s&&"firstElement",onClose:d,position:"bottom center",placement:"bottom",shift:!0,children:(0,f.jsx)(R,{value:k,onChange:t=>{var s;t={...m,...t};const n=_(t);if((e=>_(e)&&!e.url)(t=(e=>{var t;return _(t=e)&&!0===t.sponsored&&!0!==k.sponsored&&(e.noFollow=!0),(e=>_(e)&&!1===e.noFollow&&!1!==k.noFollow)(e)&&(e.sponsored=!1),e})(t)))return void g(t);const p=(0,r.prependHTTP)(t.url),h=function({url:e,type:t,id:s,opensInNewWindow:r,noFollow:o,sponsored:n,className:i}){const a={type:"core/link",attributes:{url:e}};t&&(a.attributes.type=t),s&&(a.attributes.id=s);let l=[];return r&&(a.attributes.target="_blank",l.push("noreferrer noopener")),n&&(l.push("sponsored"),l.push("nofollow")),o&&l.push("nofollow"),l.length>0&&(l=(0,u.uniq)(l),a.attributes.rel=l.join(" ")),i&&(a.attributes.class=i),a}({url:p,type:t.type,id:j(t.id),opensInNewWindow:t.opensInNewTab,noFollow:t.noFollow,sponsored:t.sponsored,className:null!==(s=t.cssClasses)&&void 0!==s?s:t.className});(0,l.isCollapsed)(o)&&!e?((e,t,s)=>{const r=((e,t)=>e.title?e.title:t)(t,s),n=(0,l.applyFormat)((0,l.create)({text:r}),e,0,r.length);a((0,l.insert)(o,n))})(h,t,p):((e,t)=>{const{start:s,end:r}=w(o),n=s<r?o.text.substring(s,r):"";let i;if(void 0!==t&&""!==t&&t!==n&&s<r){const n=(0,l.remove)(o,s,r);n.start=s,n.end=s;const a=(0,l.applyFormat)((0,l.create)({text:t}),e,0,t.length);i=(0,l.insert)(n,a)}else i=(0,l.applyFormat)(o,e),i.start=i.end;i.activeFormats=[],a(i)})(h,t.title),n||d(),(t=>{!function(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,r.getProtocol)(t);if(!(0,r.isValidProtocol)(e))return!1;if((0,u.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const s=(0,r.getAuthority)(t);if(!(0,r.isValidAuthority)(s))return!1;const o=(0,r.getPath)(t);if(o&&!(0,r.isValidPath)(o))return!1;const n=(0,r.getQueryString)(t);if(n&&!(0,r.isValidQueryString)(n))return!1;const i=(0,r.getFragment)(t);if(i&&!(0,r.isValidFragment)(i))return!1}return!((0,u.startsWith)(t,"#")&&!(0,r.isValidFragment)(t))}(t)?c((0,i.__)("Warning: the link has been inserted but may have errors. Please test it.","wordpress-seo"),"assertive"):c(e?(0,i.__)("Link edited.","wordpress-seo"):(0,i.__)("Link inserted.","wordpress-seo"),"assertive")})(p)},forceIsEditingLink:s,hasTextControl:!0,settings:E})},h)}qn.propTypes={isActive:m().bool,activeAttributes:m().object,addingLink:m().bool,value:m().object,onChange:m().func,speak:m().func.isRequired,stopAddingLink:m().func.isRequired,contentRef:m().object};const $n=(0,v.withSpokenMessages)(qn),Bn="core/link",Un=(0,i.__)("Link","wordpress-seo"),Hn={name:Bn,title:Un,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},replaces:"core/link",__unstablePasteRule(e,{html:t,plainText:s}){if((0,l.isCollapsed)(e))return e;const o=(t||s).replace(/<[^>]+>/g,"").trim();return(0,r.isURL)(o)?(window.console.log("Created link:\n\n",o),(0,l.applyFormat)(e,{type:Bn,attributes:{url:(0,Fn.decodeEntities)(o)}})):e},edit:(0,v.withSpokenMessages)(class extends n.Component{constructor(){super(...arguments),this.addLink=this.addLink.bind(this),this.stopAddingLink=this.stopAddingLink.bind(this),this.onRemoveFormat=this.onRemoveFormat.bind(this),this.state={addingLink:!1}}addLink(){const{value:e,onChange:t}=this.props,s=(0,l.getTextContent)((0,l.slice)(e));s&&(0,r.isURL)(s)?t((0,l.applyFormat)(e,{type:Bn,attributes:{url:s}})):s&&(0,r.isEmail)(s)?t((0,l.applyFormat)(e,{type:Bn,attributes:{url:`mailto:${s}`}})):this.setState({addingLink:!0})}stopAddingLink(){this.setState({addingLink:!1}),this.props.onFocus()}onRemoveFormat(){const{value:e,onChange:t,speak:s}=this.props;t((0,l.removeFormat)(e,Bn)),s((0,i.__)("Link removed.","wordpress-seo"),"assertive")}render(){const{isActive:e,activeAttributes:t,value:s,onChange:r}=this.props,{RichTextToolbarButton:o,RichTextShortcut:a}=window.wp.blockEditor;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(a,{type:"primary",character:"k",onUse:this.addLink}),(0,f.jsx)(a,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&(0,f.jsx)(o,{name:"link",icon:"editor-unlink",title:(0,i.__)("Unlink","wordpress-seo"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,f.jsx)(o,{name:"link",icon:"admin-links",title:Un,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&(0,f.jsx)($n,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:t,value:s,onChange:r,contentRef:this.props.contentRef})]})}})};var Wn=s(8993),zn=s(8213);function Kn(e){return(0,u.get)(e,"editorContext.postType")}const Yn=(0,zn.createSelector)([Kn],e=>"product"===e),Vn=(0,zn.createSelector)([Kn],e=>["product_cat","product_tag"].includes(e)),Gn=(0,zn.createSelector)([Yn,Vn],(e,t)=>e||t),Xn=(e,t,s=null)=>(0,u.get)(e,`preferences.${t}`,s),Zn=e=>Xn(e,"isWooCommerceActive",!1),Jn=e=>Xn(e,"isWooCommerceSeoActive",!1);function Qn(){const e=p();return(0,u.get)(e,"contentLocale","en_US")}(0,zn.createSelector)([Jn,Zn,Gn],(e,t,s)=>!e&&t&&s),(0,zn.createSelector)([Jn,Zn,Vn],(e,t,s)=>!e&&t&&s),(0,zn.createSelector)([Gn,Zn],(e,t)=>t&&e);const{updateReplacementVariable:ei,updateData:ti,hideReplacementVariables:si,setContentImage:ri,updateSettings:oi,setEditorDataContent:ni,setEditorDataTitle:ii,setEditorDataExcerpt:ai,setEditorDataImageUrl:li,setEditorDataSlug:ci}=d.actions,di=globalThis.jQuery;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){(function(s){const r=p(),l=r.isPremium?"Yoast SEO Premium":"Yoast SEO",d=(0,f.jsx)(b,{});(0,e.updateCategory)("yoast-structured-data-blocks",{icon:d}),(0,e.updateCategory)("yoast-internal-linking-blocks",{icon:d}),(0,e.updateCategory)("yoast-ai-blocks",{icon:d});const u={isRtl:r.isRtl},h=s.getState().preferences,m=h.isKeywordAnalysisActive||h.isContentAnalysisActive,g=h.isKeywordAnalysisActive&&h.isWincherIntegrationActive;!function(){var e;const s="yoast-seo/document-panel",r=null===(e=(0,t.select)("core/preferences"))||void 0===e?void 0:e.get("core","openPanels");var o;r&&!r.includes(s)&&(null===(o=(0,t.dispatch)("core/editor"))||void 0===o||o.toggleEditorPanelOpened(s))}();const y={locationContext:"block-sidebar"},x={locationContext:"block-metabox"};(0,a.registerPlugin)("yoast-seo",{render:()=>(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(o.PluginSidebarMoreMenuItem,{target:"seo-sidebar",icon:(0,f.jsx)(ho,{}),children:l}),(0,f.jsx)(o.PluginSidebar,{name:"seo-sidebar",title:l,children:(0,f.jsx)(c.Root,{context:y,children:(0,f.jsx)(ro,{store:s,theme:u})})}),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(xn,{store:s,theme:u}),(0,f.jsx)(c.Root,{context:x,children:(0,f.jsx)(to,{target:"wpseo-metabox-root",store:s,theme:u})})]}),m&&(0,f.jsx)(o.PluginPrePublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(Ro,{})}),(0,f.jsxs)(o.PluginPostPublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:[(0,f.jsx)(vo,{}),g&&(0,f.jsx)(bn,{})]}),m&&(0,f.jsx)(o.PluginDocumentSettingPanel,{name:"document-panel",className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(po,{})})]}),icon:(0,f.jsx)(ho,{})})})(s),function(){if("function"==typeof(0,u.get)(window,"wp.blockEditor.__experimentalLinkControl")){const e=(0,t.select)("core/rich-text").getFormatType("core/link"),s=(0,t.select)("core/rich-text").getFormatType("core/unknown");void 0!==s&&(0,t.dispatch)("core/rich-text").removeFormatTypes("core/unknown"),[Hn].forEach(({name:s,replaces:r,...o})=>{if(r&&(0,t.dispatch)("core/rich-text").removeFormatTypes(r),s){const t=e&&"core/link"===s?{...e,...o}:o;(0,l.registerFormatType)(s,t)}}),void 0!==s&&(0,l.registerFormatType)("core/unknown",s)}else console.warn((0,i.__)("Marking links with nofollow/sponsored has been disabled for WordPress installs < 5.4.","wordpress-seo")+" "+(0,i.sprintf)(
663 746 // translators: %1$s expands to Yoast SEO.
664 747 // translators: %1$s expands to Yoast SEO.
665 -(0,i.__)("Please upgrade your WordPress version or install the Gutenberg plugin to get this %1$s feature.","wordpress-seo"),"Yoast SEO"))}(),function(e){(0,t.select)("core/editor")&&(0,t.select)("core/block-editor")&&(0,u.isFunction)((0,t.select)("core/block-editor").getBlocks)&&(0,t.select)("core/annotations")&&(0,u.isFunction)((0,t.dispatch)("core/annotations").__experimentalAddAnnotation)&&e.dispatch(d.actions.setMarkerStatus("enabled"))}(s),(()=>{var e;const s=null===(e=(0,t.select)("yoast-seo-premium/editor"))||void 0===e?void 0:e.getIsAiFeatureEnabled;return s?s():Boolean(window.wpseoAdminL10n.isAiFeatureActive)})()&&(0,qn.Ay)();const h=(0,r.getQueryArg)(window.location.href,"yoast-tab");"readability"!==h&&"seo"!==h||(0,t.dispatch)("core/edit-post").openGeneralSidebar("yoast-seo/seo-sidebar")},window.yoast.EditorData=class{constructor(e,t){this._refresh=e,this._store=t,this._data={},this.getPostAttribute=this.getPostAttribute.bind(this),this.refreshYoastSEO=this.refreshYoastSEO.bind(this)}initialize(e,t=[]){this._data=this.getInitialData(e),(0,Vt.fillReplacementVariables)(this._data,this._store),this._store.dispatch(Zn(t)),this.subscribeToGutenberg(),this.subscribeToYoastSEO()}getInitialData(e){const t=this.collectGutenbergData();return e=(0,Vt.mapCustomFields)(e,this._store),e=(0,Vt.mapCustomTaxonomies)(e,this._store),{...e,...t}}setRefresh(e){this._refresh=e}isShallowEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e.hasOwnProperty(s)&&(!(s in t)||e[s]!==t[s]))return!1;return!0}getMediaById(e){return this._coreDataSelect||(this._coreDataSelect=(0,t.select)("core")),this._coreDataSelect.getMedia(e)}getPostAttribute(e){return this._coreEditorSelect||(this._coreEditorSelect=(0,t.select)("core/editor")),this._coreEditorSelect.getEditedPostAttribute(e)}getSlug(){if("auto-draft"===this.getPostAttribute("status"))return"";let e=this.getPostAttribute("generated_slug")||"";"auto-draft"===e&&(e="");const t=this.getPostAttribute("slug")||e;try{return decodeURI(t)}catch(e){return t}}getPostBaseUrl(){const e=(0,t.select)("core/editor").getPermalinkParts();if(null===e||null==e||!e.prefix)return window.wpseoScriptData.metabox.base_url;let s=e.prefix;if((0,t.select)("core/editor").isEditedPostNew())try{const e=new URL(s);s=e.origin+e.pathname}catch(e){}return s.endsWith("/")||(s+="/"),s}collectGutenbergData(){let s=(0,t.select)("core/editor").getEditedPostContent();const r=(0,t.select)("core/editor").getEditorBlocks();1===r.length&&"core/freeform"===r[0].name&&(s=(0,e.getBlockContent)(r[0]));const o=this.calculateContentImage(s),n=this.getPostAttribute("excerpt")||"";return{content:s,title:this.getPostAttribute("title")||"",slug:this.getSlug(),excerpt:n||(0,Vt.excerptFromContent)(s,"ja"===Vn()?80:156),excerpt_only:n,snippetPreviewImageURL:this.getFeaturedImage()||o,contentImage:o,baseUrl:this.getPostBaseUrl()}}getFeaturedImage(){const e=this.getPostAttribute("featured_media");if(e){const t=this.getMediaById(e);if(t)return t.source_url}return null}calculateContentImage(e){const t=T.languageProcessing.imageInText(e);if(0===t.length)return"";const s=ni.parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}handleEditorChange(e){this._data.content!==e.content&&this._store.dispatch(ei(e.content)),this._data.title!==e.title&&(this._store.dispatch(ti(e.title)),this._store.dispatch(Gn("title",e.title))),this._data.excerpt!==e.excerpt&&(this._store.dispatch(si(e.excerpt)),this._store.dispatch(Gn("excerpt",e.excerpt)),this._store.dispatch(Gn("excerpt_only",e.excerpt_only))),this._data.slug!==e.slug&&(this._store.dispatch(oi(e.slug)),this._store.dispatch(Xn({slug:e.slug}))),this._data.snippetPreviewImageURL!==e.snippetPreviewImageURL&&(this._store.dispatch(ri(e.snippetPreviewImageURL)),this._store.dispatch(Xn({snippetPreviewImageURL:e.snippetPreviewImageURL}))),this._data.contentImage!==e.contentImage&&this._store.dispatch(Jn(e.contentImage)),this._data.baseUrl!==e.baseUrl&&this._store.dispatch(Qn({baseUrl:e.baseUrl}))}reapplyMarkers(){const{getActiveMarker:e,getMarkerPauseStatus:s}=(0,t.select)("yoast-seo/editor"),r=e(),o=s();r&&!o&&An()}refreshYoastSEO(){const e=this.collectGutenbergData();!this.isShallowEqual(this._data,e)&&(this.handleEditorChange(e),this._data=e,this._refresh())}areNewAnalysisResultsAvailable(){const e=(0,t.select)("yoast-seo/editor"),s=e.getReadabilityResults(),r=e.getResultsForFocusKeyword();return(this._previousReadabilityResults!==s||this._previousSeoResults!==r)&&(this._previousReadabilityResults=s,this._previousSeoResults=r,!0)}onNewAnalysisResultsAvailable(){this.reapplyMarkers()}subscribeToGutenberg(){this._previousRenderingMode=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode(),this.subscriber=(0,u.debounce)(()=>{const e=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode();if(e!==this._previousRenderingMode)return this._previousRenderingMode=e,void this._refresh();this.refreshYoastSEO()},500),(0,t.subscribe)(this.subscriber)}subscribeToYoastSEO(){this.yoastSubscriber=()=>{this.areNewAnalysisResultsAvailable()&&this.onNewAnalysisResultsAvailable()},(0,t.subscribe)(this.yoastSubscriber)}getData(){return this._data}}})()})();
748 +(0,i.__)("Please upgrade your WordPress version or install the Gutenberg plugin to get this %1$s feature.","wordpress-seo"),"Yoast SEO"))}(),function(e){(0,t.select)("core/editor")&&(0,t.select)("core/block-editor")&&(0,u.isFunction)((0,t.select)("core/block-editor").getBlocks)&&(0,t.select)("core/annotations")&&(0,u.isFunction)((0,t.dispatch)("core/annotations").__experimentalAddAnnotation)&&e.dispatch(d.actions.setMarkerStatus("enabled"))}(s),(()=>{var e;const s=null===(e=(0,t.select)("yoast-seo-premium/editor"))||void 0===e?void 0:e.getIsAiFeatureEnabled;return s?s():Boolean(window.wpseoAdminL10n.isAiFeatureActive)})()&&(0,Wn.Ay)();const h=(0,r.getQueryArg)(window.location.href,"yoast-tab");"readability"!==h&&"seo"!==h||(0,t.dispatch)("core/edit-post").openGeneralSidebar("yoast-seo/seo-sidebar")},window.yoast.EditorData=class{constructor(e,t){this._refresh=e,this._store=t,this._data={},this.getPostAttribute=this.getPostAttribute.bind(this),this.refreshYoastSEO=this.refreshYoastSEO.bind(this)}initialize(e,t=[]){this._data=this.getInitialData(e),(0,Vt.fillReplacementVariables)(this._data,this._store),this._store.dispatch(si(t)),this.subscribeToGutenberg(),this.subscribeToYoastSEO()}getInitialData(e){const t=this.collectGutenbergData();return e=(0,Vt.mapCustomFields)(e,this._store),e=(0,Vt.mapCustomTaxonomies)(e,this._store),{...e,...t}}setRefresh(e){this._refresh=e}isShallowEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e.hasOwnProperty(s)&&(!(s in t)||e[s]!==t[s]))return!1;return!0}getMediaById(e){return this._coreDataSelect||(this._coreDataSelect=(0,t.select)("core")),this._coreDataSelect.getMedia(e)}getPostAttribute(e){return this._coreEditorSelect||(this._coreEditorSelect=(0,t.select)("core/editor")),this._coreEditorSelect.getEditedPostAttribute(e)}getSlug(){if("auto-draft"===this.getPostAttribute("status"))return"";let e=this.getPostAttribute("generated_slug")||"";"auto-draft"===e&&(e="");const t=this.getPostAttribute("slug")||e;try{return decodeURI(t)}catch(e){return t}}getPostBaseUrl(){const e=(0,t.select)("core/editor").getPermalinkParts();if(null===e||null==e||!e.prefix)return window.wpseoScriptData.metabox.base_url;let s=e.prefix;if((0,t.select)("core/editor").isEditedPostNew())try{const e=new URL(s);s=e.origin+e.pathname}catch(e){}return s.endsWith("/")||(s+="/"),s}collectGutenbergData(){let s=(0,t.select)("core/editor").getEditedPostContent();const r=(0,t.select)("core/editor").getEditorBlocks();1===r.length&&"core/freeform"===r[0].name&&(s=(0,e.getBlockContent)(r[0]));const o=this.calculateContentImage(s),n=this.getPostAttribute("excerpt")||"";return{content:s,title:this.getPostAttribute("title")||"",slug:this.getSlug(),excerpt:n||(0,Vt.excerptFromContent)(s,"ja"===Qn()?80:156),excerpt_only:n,snippetPreviewImageURL:this.getFeaturedImage()||o,contentImage:o,baseUrl:this.getPostBaseUrl()}}getFeaturedImage(){const e=this.getPostAttribute("featured_media");if(e){const t=this.getMediaById(e);if(t)return t.source_url}return null}calculateContentImage(e){const t=T.languageProcessing.imageInText(e);if(0===t.length)return"";const s=di.parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}handleEditorChange(e){this._data.content!==e.content&&this._store.dispatch(ni(e.content)),this._data.title!==e.title&&(this._store.dispatch(ii(e.title)),this._store.dispatch(ei("title",e.title))),this._data.excerpt!==e.excerpt&&(this._store.dispatch(ai(e.excerpt)),this._store.dispatch(ei("excerpt",e.excerpt)),this._store.dispatch(ei("excerpt_only",e.excerpt_only))),this._data.slug!==e.slug&&(this._store.dispatch(ci(e.slug)),this._store.dispatch(ti({slug:e.slug}))),this._data.snippetPreviewImageURL!==e.snippetPreviewImageURL&&(this._store.dispatch(li(e.snippetPreviewImageURL)),this._store.dispatch(ti({snippetPreviewImageURL:e.snippetPreviewImageURL}))),this._data.contentImage!==e.contentImage&&this._store.dispatch(ri(e.contentImage)),this._data.baseUrl!==e.baseUrl&&this._store.dispatch(oi({baseUrl:e.baseUrl}))}reapplyMarkers(){const{getActiveMarker:e,getMarkerPauseStatus:s}=(0,t.select)("yoast-seo/editor"),r=e(),o=s();r&&!o&&On()}refreshYoastSEO(){const e=this.collectGutenbergData();!this.isShallowEqual(this._data,e)&&(this.handleEditorChange(e),this._data=e,this._refresh())}areNewAnalysisResultsAvailable(){const e=(0,t.select)("yoast-seo/editor"),s=e.getReadabilityResults(),r=e.getResultsForFocusKeyword();return(this._previousReadabilityResults!==s||this._previousSeoResults!==r)&&(this._previousReadabilityResults=s,this._previousSeoResults=r,!0)}onNewAnalysisResultsAvailable(){this.reapplyMarkers()}subscribeToGutenberg(){this._previousRenderingMode=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode(),this.subscriber=(0,u.debounce)(()=>{const e=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode();if(e!==this._previousRenderingMode)return this._previousRenderingMode=e,void this._refresh();this.refreshYoastSEO()},500),(0,t.subscribe)(this.subscriber)}subscribeToYoastSEO(){this.yoastSubscriber=()=>{this.areNewAnalysisResultsAvailable()&&this.onNewAnalysisResultsAvailable()},(0,t.subscribe)(this.yoastSubscriber)}getData(){return this._data}}})()})();