!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=263)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.yoast.propTypes},10:function(e,t){e.exports=window.yoast.uiLibrary},11:function(e,t){function a(){return e.exports=a=Object.assign||function(e){for(var t=1;t1?t-1:0),n=1;ne.height),d(b,this.animationStateClasses.animatingToHeightZero,0===j.height),d(b,this.animationStateClasses.animatingToHeightAuto,"auto"===j.height),d(b,this.animationStateClasses.animatingToHeightSpecific,j.height>0),b)),x=this.getStaticStateClasses(j.height);this.setState({animationStateClasses:E,height:v,overflow:"hidden",shouldUseTransitions:!w}),clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),w?(j.shouldUseTransitions=!0,m(this.animationFrameIDs),this.animationFrameIDs=(a=function(){r.setState(j),y(p,{newHeight:j.height})},(n=[])[0]=requestAnimationFrame((function(){n[1]=requestAnimationFrame((function(){a()}))})),n),this.animationClassesTimeoutID=setTimeout((function(){r.setState({animationStateClasses:x,shouldUseTransitions:!1}),r.hideContent(j.height),y(u,{newHeight:j.height})}),O)):(y(p,{newHeight:v}),this.timeoutID=setTimeout((function(){j.animationStateClasses=x,j.shouldUseTransitions=!1,r.setState(j),"auto"!==c&&r.hideContent(v),y(u,{newHeight:v})}),O))}}},{key:"componentWillUnmount",value:function(){m(this.animationFrameIDs),clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),this.timeoutID=null,this.animationClassesTimeoutID=null,this.animationStateClasses=null}},{key:"showContent",value:function(e){0===e&&(this.contentElement.style.display="")}},{key:"hideContent",value:function(e){0===e&&(this.contentElement.style.display="none")}},{key:"getStaticStateClasses",value:function(e){var t;return(0,l.default)((d(t={},this.animationStateClasses.static,!0),d(t,this.animationStateClasses.staticHeightZero,0===e),d(t,this.animationStateClasses.staticHeightSpecific,e>0),d(t,this.animationStateClasses.staticHeightAuto,"auto"===e),t))}},{key:"render",value:function(){var e,t=this,a=this.props,n=a.animateOpacity,s=a.applyInlineTransitions,o=a.children,c=a.className,u=a.contentClassName,m=a.delay,f=a.duration,h=a.easing,y=a.id,g=a.style,O=this.state,v=O.height,j=O.overflow,w=O.animationStateClasses,E=O.shouldUseTransitions,x=r({},g,{height:v,overflow:j||g.overflow});E&&s&&(x.transition="height "+f+"ms "+h+" "+m+"ms",g.transition&&(x.transition=g.transition+", "+x.transition),x.WebkitTransition=x.transition);var S={};n&&(S.transition="opacity "+f+"ms "+h+" "+m+"ms",S.WebkitTransition=S.transition,0===v&&(S.opacity=0));var C=(0,l.default)((d(e={},w,!0),d(e,c,c),e)),R=void 0!==this.props["aria-hidden"]?this.props["aria-hidden"]:0===v;return i.default.createElement("div",r({},b.apply(void 0,[this.props].concat(p)),{"aria-hidden":R,className:C,id:y,style:x}),i.default.createElement("div",{className:u,style:S,ref:function(e){return t.contentElement=e}},o))}}]),t}(i.default.Component);g.propTypes={"aria-hidden":o.default.bool,animateOpacity:o.default.bool,animationStateClasses:o.default.object,applyInlineTransitions:o.default.bool,children:o.default.any.isRequired,className:o.default.string,contentClassName:o.default.string,delay:o.default.number,duration:o.default.number,easing:o.default.string,height:function(e,t,a){var r=e[t];return"number"==typeof r&&r>=0||h(r)||"auto"===r?null:new TypeError('value "'+r+'" of type "'+(void 0===r?"undefined":n(r))+'" is invalid type for '+t+" in "+a+'. It needs to be a positive number, string "auto" or percentage string (e.g. "15%").')},id:o.default.string,onAnimationEnd:o.default.func,onAnimationStart:o.default.func,style:o.default.object},g.defaultProps={animateOpacity:!1,animationStateClasses:u,applyInlineTransitions:!0,duration:250,delay:0,easing:"ease",style:{}},t.default=g},119:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n extends Error{constructor(e,t,a,n,r){super(e),this.name="RequestError",this.url=t,this.method=a,this.statusCode=n,this.stackTrace=r}}},121:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(3),r=a(73);function s(){let[e]=Object(n.useState)(r.a);return Object(n.useEffect)(()=>()=>e.dispose(),[e]),e}},129:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(3);let r={serverHandoffComplete:!1};function s(){let[e,t]=Object(n.useState)(r.serverHandoffComplete);return Object(n.useEffect)(()=>{!0!==e&&t(!0)},[e]),Object(n.useEffect)(()=>{!1===r.serverHandoffComplete&&(r.serverHandoffComplete=!0)},[]),e}},130:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(11),r=a.n(n),s=a(0),i=a(1),o=a.n(i),l=a(146);function c(e){let{id:t,onChange:a,socialMedium:n,isDisabled:i,...o}=e;const c=Object(s.useCallback)(e=>{a(e.target.value,"other"===n?o.index:n)},[n,o.index]);return Object(s.createElement)(l.a,r()({onChange:c,disabled:i,id:t},o))}c.propTypes={id:o.a.string.isRequired,onChange:o.a.func.isRequired,socialMedium:o.a.string,isDisabled:o.a.bool},c.defaultProps={socialMedium:"",isDisabled:!1}},146:function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(11),r=a.n(n),s=a(0),i=a(212),o=a(187),l=a(21),c=a.n(l),d=a(1),u=a(71),p=a(147);function b(e){let{hasError:t,hasSuccess:a}=e;return t?Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-absolute yst-inset-y-0 yst-right-0 yst-mr-3"},Object(s.createElement)(i.a,{className:"yst-pointer-events-none yst-h-5 yst-w-5 yst-text-red-500"})):a?Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-absolute yst-inset-y-0 yst-right-0 yst-mr-3"},Object(s.createElement)(o.a,{className:"yst-pointer-events-none yst-h-5 yst-w-5 yst-text-emerald-600"})):null}function m(e){let{className:t,id:a,label:n,description:i,value:o,onChange:l,placeholder:d,feedback:m,type:f,...h}=e;const y=f||"text",g=Object(s.useMemo)(()=>m.isVisible&&"error"===m.type,[m.isVisible,m.type]),O=Object(s.useMemo)(()=>m.isVisible&&"success"===m.type,[m.isVisible,m.type]);return Object(s.createElement)("div",{className:t},n&&Object(s.createElement)("label",{className:"yst-block yst-mb-2 yst-font-medium yst-text-gray-700",htmlFor:a},n),Object(s.createElement)("div",{className:"yst-relative"},Object(s.createElement)("input",r()({id:a,type:y,value:o,className:c()("yst-block yst-w-full yst-h-[45px] yst-input focus:yst-ring-1",{"yst-border-red-300 yst-text-red-900 focus:yst-ring-red-500 focus:yst-border-red-500":g,"yst-border-emerald-600 yst-text-gray-700 focus:yst-ring-emerald-600 focus:yst-border-emerald-600":O,"yst-text-gray-700 yst-border-gray-300 focus:yst-ring-primary-500 focus:yst-border-primary-500":!g&&!O}),onChange:l,placeholder:d},Object(u.b)(a,m),h)),Object(s.createElement)(b,{hasError:g,hasSuccess:O})),m.isVisible&&Object(s.createElement)(p.a,{id:`${g?"error-":"success-"}${a}`,className:c()("yst-mt-2 yst-text-sm",{"yst-text-red-600":g,"yst-text-emerald-600":O}),texts:m.message}),i)}b.propTypes={hasError:d.PropTypes.bool,hasSuccess:d.PropTypes.bool},b.defaultProps={hasError:!1,hasSuccess:!1},m.propTypes={className:d.PropTypes.string,id:d.PropTypes.string.isRequired,label:d.PropTypes.string,description:d.PropTypes.node,value:d.PropTypes.string,onChange:d.PropTypes.func.isRequired,placeholder:d.PropTypes.string,feedback:d.PropTypes.shape({type:d.PropTypes.string,message:d.PropTypes.array,isVisible:d.PropTypes.bool}),type:d.PropTypes.string},m.defaultProps={value:"",className:"",label:"",description:null,placeholder:"",feedback:{message:[],isVisible:!1},type:"text"}},147:function(e,t,a){"use strict";var n=a(11),r=a.n(n),s=a(0),i=a(1),o=a.n(i),l=a(4);const c=e=>{let{texts:t,id:a,as:n,...i}=e;const o=Object(s.useMemo)(()=>Object(l.last)(t),[t]);return Object(s.createElement)(n,r()({id:a},i),t.map((e,t)=>Object(s.createElement)(s.Fragment,{key:`${a}-text-${t}`},e,o!==e&&Object(s.createElement)("br",null))))};c.defaultProps={as:"p"},c.propTypes={texts:o.a.arrayOf(o.a.string).isRequired,id:o.a.string.isRequired,as:o.a.oneOfType([o.a.string,o.a.elementType])},t.a=c},15:function(e,t){e.exports=window.yoast.styleGuide},157:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n extends Error{constructor(e,t){super(e),this.name="ParseError",this.parseString=t}}},164:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return m})),a.d(t,"c",(function(){return h}));var n=a(0),r=a(188),s=a(1),i=a.n(s),o=a(72),l=a(48);const{slideDuration:c,delayUntilStepFaded:d}=o.b,u=`yst-transition-opacity ${c} yst-absolute yst-inset-0 yst-border-2 yst-flex yst-items-center yst-justify-center yst-rounded-full`;function p(e){return`${u} ${e?"yst-opacity-100":d+" yst-opacity-0"}`}function b(e){let{isVisible:t}=e;return Object(n.createElement)("span",{className:"yst-bg-white yst-border-primary-500 "+p(t)},Object(n.createElement)("span",{className:"yst-h-2.5 yst-w-2.5 yst-rounded-full yst-bg-primary-500"}))}function m(e){let{isVisible:t}=e;return Object(n.createElement)("span",{className:"yst-bg-primary-500 yst-border-primary-500 "+p(t)},Object(n.createElement)(r.a,{className:"yst-w-5 yst-h-5 yst-text-white","aria-hidden":"true"}))}function f(e){let{isVisible:t}=e;return Object(n.createElement)("span",{className:"yst-bg-white yst-border-gray-300 "+p(t)},Object(n.createElement)("span",{className:"yst-h-2.5 yst-w-2.5 yst-rounded-full yst-bg-transparent"}))}function h(e){let{activationDelay:t,deactivationDelay:a,isFinished:r}=e;const{activeStepIndex:s,stepIndex:i,lastStepIndex:o}=Object(l.c)(),c=i===o,d=s===i,[u,p]=Object(n.useState)(()=>!!d&&!c);return Object(n.useEffect)(()=>{if(d){const e=setTimeout(()=>{p(!0)},t);return()=>clearTimeout(e)}const e=setTimeout(()=>{p(!1)},a);return()=>clearTimeout(e)},[d,c,t,a]),Object(n.createElement)("span",{className:"yst-relative yst-z-10 yst-w-8 yst-h-8 yst-rounded-full"},Object(n.createElement)(f,{isVisible:!0}),Object(n.createElement)(m,{isVisible:r}),Object(n.createElement)(b,{isVisible:u&&!c}))}b.propTypes={isVisible:i.a.bool},b.defaultProps={isVisible:!0},m.propTypes={isVisible:i.a.bool},m.defaultProps={isVisible:!0},f.propTypes={isVisible:i.a.bool},f.defaultProps={isVisible:!0},h.propTypes={isFinished:i.a.bool.isRequired,activationDelay:i.a.number,deactivationDelay:i.a.number},h.defaultProps={activationDelay:0,deactivationDelay:0}},173:function(e,t,a){"use strict";function n(e,t){const a=new URL(e);return a.searchParams.delete(t),a.href}function r(e,t,a){window.history.pushState(e,t,a)}a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return r}))},187:function(e,t,a){"use strict";var n=a(3);const r=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),n.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"}))}));t.a=r},188:function(e,t,a){"use strict";var n=a(3);const r=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));t.a=r},19:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return s}));var n=a(0);function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function s(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Object(n.createInterpolateElement)(e,{a:Object(n.createElement)("a",{id:a,href:t,target:"_blank",rel:"noopener noreferrer"})})}},198:function(e,t,a){"use strict";a.d(t,"b",(function(){return p})),a.d(t,"a",(function(){return b}));var n=a(0),r=a(2),s=a(1),i=a.n(s),o=a(219),l=a(220);const c=e=>{let{items:t,onAddProfile:a,onRemoveProfile:s,onChangeProfile:i,errorFields:c,fieldType:d,addButtonChildren:u}=e;const p=Object(n.useCallback)(e=>{s(parseInt(e.currentTarget.dataset.index,10))},[s]);return Object(n.createElement)("div",null,t.map((e,t)=>Object(n.createElement)("div",{key:"url-"+t},Object(n.createElement)("div",{className:"yst-flex yst-flex-row yst-items-start yst-mt-4"},Object(n.createElement)(d,{className:"yst-w-full",label:Object(r.__)("Other social profile","wordpress-seo"),id:"social-input-other-url-"+t,value:e,socialMedium:"other",index:t,onChange:i,placeholder:Object(r.__)("E.g. https://social-platform.com/yoast","wordpress-seo"),feedback:{type:"error",isVisible:c.includes("other_social_urls-"+t),message:[Object(r.__)("Could not save this value. Please check the URL.","wordpress-seo")]}}),Object(n.createElement)("button",{type:"button",className:"yst-mt-[27.5px] yst-ml-2 yst-p-3 yst-text-gray-500 yst-rounded-md hover:yst-text-primary-500 focus:yst-text-primary-500 focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-primary-500 yst-no-underline;",id:"remove-profile-"+t,"data-index":t,onClick:p},Object(n.createElement)("span",{className:"yst-sr-only"},Object(r.__)("Delete item","wordpress-seo")),Object(n.createElement)(o.a,{className:"yst-relative yst--top-0.5 yst-w-5 yst-h-5"}))))),Object(n.createElement)("button",{type:"button",id:"add-profile",className:"yst-button yst-button--secondary yst-items-center yst-mt-8",onClick:a},Object(n.createElement)(l.a,{className:"yst-w-5 yst-h-5 yst-mr-1 yst-text-gray-400"}),u))};c.propTypes={fieldType:s.PropTypes.elementType.isRequired,items:s.PropTypes.array.isRequired,onAddProfile:s.PropTypes.func.isRequired,onRemoveProfile:s.PropTypes.func.isRequired,onChangeProfile:s.PropTypes.func.isRequired,errorFields:s.PropTypes.array,addButtonChildren:s.PropTypes.node},c.defaultProps={errorFields:[],addButtonChildren:Object(r.__)("Add another profile","wordpress-seo")};var d=c,u=a(130);function p(e){let{socialProfiles:t,errorFields:a,dispatch:r}=e;const s=Object(n.useCallback)((e,t)=>{r({type:"CHANGE_SOCIAL_PROFILE",payload:{socialMedium:t,value:e}})},[]),i=Object(n.useCallback)((e,t)=>{r({type:"CHANGE_OTHERS_SOCIAL_PROFILE",payload:{index:t,value:e}})},[]),o=Object(n.useCallback)(()=>{r({type:"ADD_OTHERS_SOCIAL_PROFILE",payload:{value:""}})},[]),l=Object(n.useCallback)(e=>{r({type:"REMOVE_OTHERS_SOCIAL_PROFILE",payload:{index:e}})},[]);return Object(n.createElement)(b,{socialProfiles:t,onChangeHandler:s,onChangeOthersHandler:i,onAddProfileHandler:o,onRemoveProfileHandler:l,errorFields:a})}function b(e){let{socialProfiles:t,onChangeHandler:a,onChangeOthersHandler:s,onAddProfileHandler:i,onRemoveProfileHandler:o,errorFields:l}=e;return Object(n.createElement)("div",{id:"social-input-section"},Object(n.createElement)(u.a,{className:"yst-mt-4",label:Object(r.__)("Facebook","wordpress-seo"),id:"social-input-facebook-url",value:t.facebookUrl,socialMedium:"facebookUrl",onChange:a,placeholder:Object(r.__)("E.g. https://www.facebook.com/yoast","wordpress-seo"),feedback:{message:[Object(r.__)("Could not save this value. Please check the URL.","wordpress-seo")],isVisible:l.includes("facebook_site"),type:"error"}}),Object(n.createElement)(u.a,{className:"yst-mt-4",label:Object(r.__)("Twitter","wordpress-seo"),id:"social-input-twitter-url",value:t.twitterUsername,socialMedium:"twitterUsername",onChange:a,placeholder:Object(r.__)("E.g. https://www.twitter.com/yoast","wordpress-seo"),feedback:{message:[Object(r.__)("Could not save this value. Please check the URL or username.","wordpress-seo")],isVisible:l.includes("twitter_site"),type:"error"}}),Object(n.createElement)(d,{items:t.otherSocialUrls,onAddProfile:i,onRemoveProfile:o,onChangeProfile:s,errorFields:l,fieldType:u.a}))}p.propTypes={socialProfiles:i.a.object.isRequired,dispatch:i.a.func.isRequired,errorFields:i.a.array},p.defaultProps={errorFields:[]},b.propTypes={socialProfiles:i.a.object.isRequired,onChangeHandler:i.a.func.isRequired,onChangeOthersHandler:i.a.func.isRequired,onAddProfileHandler:i.a.func.isRequired,onRemoveProfileHandler:i.a.func.isRequired,errorFields:i.a.array.isRequired}},2:function(e,t){e.exports=window.wp.i18n},21:function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;tnull,1:()=>d({...t,hidden:!0,style:{display:"none"}},a,n,o)})}return d(l,a,n,o)}function d(e,t={},a,n){let{as:r=a,children:i,refName:o="ref",...l}=m(e,["unmount","static"]),c=void 0!==e.ref?{[o]:e.ref}:{},d="function"==typeof i?i(t):i;l.className&&"function"==typeof l.className&&(l.className=l.className(t));let p={};if(r===s.Fragment&&Object.keys(b(l)).length>0){if(!Object(s.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> 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"));return Object(s.cloneElement)(d,Object.assign({},u(d.props,b(m(l,["ref"]))),p,c))}return Object(s.createElement)(r,Object.assign({},m(l,["ref"]),r!==s.Fragment&&c,r!==s.Fragment&&p),d)}function u(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},a={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=a[e]||(a[e]=[]),a[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(a).map(e=>[e,void 0])));for(let e in a)Object.assign(t,{[e](t,...n){let r=a[e];for(let e of r){if(t.defaultPrevented)return;e(t,...n)}}});return t}function p(e){var t;return Object.assign(Object(s.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function b(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function m(e,t=[]){let a=Object.assign({},e);for(let e of t)e in a&&delete a[e];return a}},245:function(e,t,a){"use strict";var n=a(3);const r=n.forwardRef((function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"}))}));t.a=r},26:function(e,t){e.exports=window.wp.apiFetch},263:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a(64),s=a.n(r),i=a(10),o=a(4),l=a(26),c=a.n(l),d=a(2),u=a(19),p=a(71),b=a(1),m=a.n(b),f=a(198),h=a(53),y=a(130);function g(e){let{socialProfiles:t,errorFields:a,dispatch:r,canEditUser:s,personId:i}=e;const o=Object(n.useCallback)((e,t)=>{r({type:"CHANGE_PERSON_SOCIAL_PROFILE",payload:{socialMedium:t,value:e}})},[r]);return Object(n.useEffect)(()=>{c()({path:"yoast/v1/configuration/person_social_profiles?user_id="+i}).then(e=>{e.success&&r({type:"INIT_PERSON_SOCIAL_PROFILES",payload:{socialProfiles:e.social_profiles}})}).catch(e=>{console.error(e.message)})},[i,r]),Object(n.createElement)("div",null,0===i&&Object(n.createElement)(h.b,{type:"info",className:"yst-mt-5"},// translators: please note that "Site representation" here refers to the name of a step in the first-time configuration, so this occurrence needs to be translated in the same manner as that step's heading. Object(d.__)("Please select a name in the site representation step for this step to be effective.","wordpress-seo")),0!==i&&!s&&Object(n.createElement)(h.b,{type:"info",className:"yst-mt-5"},Object(n.createInterpolateElement)(Object(d.sprintf)(// translators: %1$s is replaced by the selected person's username Object(d.__)("You're not allowed to edit the social profiles of the user %1$s. Please ask this user or an admin to do this.","wordpress-seo"),window.wpseoFirstTimeConfigurationData.personName),{b:Object(n.createElement)("b",null)})),0!==i&&Object(n.createElement)("div",{id:"social-input-section",className:"yoast-social-profiles-input-fields"},p.f.map((e,r)=>Object(n.createElement)(y.a,{key:r,className:"yst-mt-4",label:e.name,id:e.name.toLowerCase(),value:t[e.name.toLowerCase()],socialMedium:e.name.toLowerCase(),onChange:o,isDisabled:!s,placeholder:e.placeholder,feedback:{message:["Twitter"===e.name?Object(d.__)("Could not save this value. Please check the URL or username.","wordpress-seo"):Object(d.__)("Could not save this value. Please check the URL.","wordpress-seo")],isVisible:a.includes(e.name.toLowerCase()),type:"error"}}))))}var O=g;function v(e){let{state:t,dispatch:a,setErrorFields:r}=e;return["company","emptyChoice"].includes(t.companyOrPerson)?Object(n.createElement)(n.Fragment,null,Object(n.createElement)("p",null,Object(d.__)("We need a little more help from you! Add your organization's Facebook and Twitter profile so we can optimize the metadata for those platforms too.","wordpress-seo")),Object(n.createElement)(f.b,{socialProfiles:t.socialProfiles,dispatch:a,errorFields:t.errorFields,setErrorFields:r})):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("p",null,Object(d.__)("We need a little more help from you! Add your Facebook and Twitter profile so we can optimize the metadata for those platforms too.","wordpress-seo")),Object(n.createElement)(O,{socialProfiles:t.personSocialProfiles,errorFields:t.errorFields,dispatch:a,canEditUser:!!t.canEditUser,personId:t.personId}))}g.propTypes={dispatch:m.a.func.isRequired,canEditUser:m.a.bool.isRequired,socialProfiles:m.a.object,errorFields:m.a.array,personId:m.a.number},g.defaultProps={socialProfiles:{},errorFields:[],personId:0},v.propTypes={state:m.a.object.isRequired,dispatch:m.a.func.isRequired,setErrorFields:m.a.func.isRequired};var j=a(48),w=a(11),E=a.n(w),x=a(72),S=a(21),C=a.n(S);function R(e){let{beforeGo:t,children:a,additionalClasses:r,...s}=e;return Object(n.createElement)(j.a.GoButton,E()({className:"yst-button yst-button--primary "+r,destination:1,beforeGo:t},s),a)}function _(e){let{beforeGo:t,isVisible:a,children:r,additionalClasses:s,...i}=e;const o=`yst-transition-opacity ${x.b.slideDuration} yst-ease-out ${a?"yst-opacity-100":x.b.delayBeforeOpening+" yst-opacity-0 yst-pointer-events-none yst-hidden"}`;return Object(n.createElement)(j.a.GoButton,E()({className:C()("yst-button yst-button--secondary yst-button--small",o,s),destination:0,beforeGo:t},i),r)}function P(e){let{beforeGo:t,children:a,additionalClasses:r,...s}=e;return Object(n.createElement)(j.a.GoButton,E()({className:"yst-button yst-button--secondary "+r,destination:-1,beforeGo:t},s),a)}function k(e){let{beforeContinue:t,continueLabel:a,beforeBack:r,backLabel:s}=e;return Object(n.createElement)("div",{className:"yst-mt-12"},Object(n.createElement)(R,{beforeGo:t},a),Object(n.createElement)(P,{additionalClasses:"yst-ml-3",beforeGo:r},s))}function T(e){let{stepperFinishedOnce:t,saveFunction:a,setEditState:r}=e;const s=Object(n.useCallback)(async()=>{const e=await a();return r(!e),e});return t?Object(n.createElement)(j.a.GoButton,{className:"yst-button yst-button--primary yst-mt-12",destination:"last",beforeGo:s},Object(d.__)("Save changes","wordpress-seo")):Object(n.createElement)(k,{beforeContinue:a,continueLabel:Object(d.__)("Save and continue","wordpress-seo")})}R.propTypes={additionalClasses:m.a.string,beforeGo:m.a.func,children:m.a.node},R.defaultProps={additionalClasses:"",beforeGo:null,children:null},_.propTypes={additionalClasses:m.a.string,isVisible:m.a.bool,beforeGo:m.a.func,children:m.a.node},_.defaultProps={additionalClasses:"",isVisible:!0,beforeGo:null,children:null},P.propTypes={additionalClasses:m.a.string,beforeGo:m.a.func,children:m.a.node},P.defaultProps={additionalClasses:"",beforeGo:null,children:null},k.propTypes={beforeContinue:m.a.func,continueLabel:m.a.string,beforeBack:m.a.func,backLabel:m.a.string},k.defaultProps={beforeContinue:null,continueLabel:Object(d.__)("Continue","wordpress-seo"),beforeBack:null,backLabel:Object(d.__)("Go back","wordpress-seo")},T.propTypes={stepperFinishedOnce:m.a.bool.isRequired,saveFunction:m.a.func.isRequired,setEditState:m.a.func.isRequired};var I=a(271),N=a(114),M=a.n(N),F=a(173),L=a(119);function z(e){let{title:t,value:a}=e;return a?Object(n.createElement)("p",null,Object(n.createElement)("strong",null,t),Object(n.createElement)("br",null),a):null}function A(e){let{title:t,value:a}=e;return a?Object(n.createElement)("details",null,Object(n.createElement)("summary",null,t),Object(n.createElement)("pre",{className:"yst-overflow-x-scroll yst-max-w-[500px] yst-border-px yst-p-4"},a)):null}function D(e){let{message:t,error:a,className:r}=e;return Object(n.createElement)(h.b,{type:"error",className:r},Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),Object(n.createElement)("details",null,Object(n.createElement)("summary",null,Object(d.__)("Error details","wordpress-seo")),Object(n.createElement)("div",{className:"yst-mt-2"},Object(n.createElement)(z,{title:Object(d.__)("Request URL","wordpress-seo"),value:a.url}),Object(n.createElement)(z,{title:Object(d.__)("Request method","wordpress-seo"),value:a.method}),Object(n.createElement)(z,{title:Object(d.__)("Status code","wordpress-seo"),value:a.statusCode}),Object(n.createElement)(z,{title:Object(d.__)("Error message","wordpress-seo"),value:a.message}),Object(n.createElement)(A,{title:Object(d.__)("Response","wordpress-seo"),value:a.parseString}),Object(n.createElement)(A,{title:Object(d.__)("Error stack trace","wordpress-seo"),value:a.stackTrace}))))}z.propTypes={title:m.a.string.isRequired,value:m.a.any},z.defaultProps={value:""},A.propTypes={title:m.a.string.isRequired,value:m.a.string},A.defaultProps={value:""},D.propTypes={message:m.a.string.isRequired,error:m.a.oneOfType([m.a.instanceOf(Error),m.a.instanceOf(L.a)]).isRequired,className:m.a.string},D.defaultProps={className:""};var q=a(157);class U extends n.Component{constructor(e){super(e),this.settings=yoastIndexingData,this.state={state:"idle",processed:0,error:null,amount:parseInt(this.settings.amount,10),firstTime:"1"===this.settings.firstTime},this.startIndexing=this.startIndexing.bind(this),this.stopIndexing=this.stopIndexing.bind(this)}async doIndexingRequest(e,t){const a=await fetch(e,{method:"POST",headers:{"X-WP-Nonce":t}}),n=await a.text();let r;try{r=JSON.parse(n)}catch(e){throw new q.a("Error parsing the response to JSON.",n)}if(!a.ok){const t=r.data?r.data.stackTrace:"";throw new L.a(r.message,e,"POST",a.status,t)}return r}async doPreIndexingAction(e){"function"==typeof this.props.preIndexingActions[e]&&await this.props.preIndexingActions[e](this.settings)}async doPostIndexingAction(e,t){"function"==typeof this.props.indexingActions[e]&&await this.props.indexingActions[e](t.objects,this.settings)}async doIndexing(e){let t=this.settings.restApi.root+this.settings.restApi.indexing_endpoints[e];for(;this.isState("in_progress")&&!1!==t;)try{await this.doPreIndexingAction(e);const a=await this.doIndexingRequest(t,this.settings.restApi.nonce);await this.doPostIndexingAction(e,a),this.setState(e=>({processed:e.processed+a.objects.length,firstTime:!1})),t=a.next_url}catch(e){this.setState({state:"errored",error:e,firstTime:!1})}}async index(){for(const e of Object.keys(this.settings.restApi.indexing_endpoints))await this.doIndexing(e);this.isState("errored")||this.isState("idle")||this.completeIndexing()}async startIndexing(){this.setState({processed:0,state:"in_progress"},this.index)}completeIndexing(){this.setState({state:"completed"})}stopIndexing(){this.setState(e=>({state:"idle",processed:0,amount:e.amount-e.processed}))}componentDidMount(){if(!this.settings.disabled&&(this.props.indexingStateCallback(0===this.state.amount?"already_done":this.state.state),"true"===new URLSearchParams(window.location.search).get("start-indexation"))){const e=Object(F.b)(window.location.href,"start-indexation");Object(F.a)(null,document.title,e),this.startIndexing()}}componentDidUpdate(e,t){this.state.state!==t.state&&this.props.indexingStateCallback(this.state.state)}isState(e){return this.state.state===e}renderFirstIndexationNotice(){return Object(n.createElement)(h.b,{type:"info",className:"yst-mt-6"},Object(d.__)("This feature includes and replaces the Text Link Counter and Internal Linking Analysis","wordpress-seo"))}renderStartButton(){return Object(n.createElement)("button",{type:"button",className:"yst-button yst-button--secondary",onClick:this.startIndexing},Object(d.__)("Start SEO data optimization","wordpress-seo"))}renderStopButton(){return Object(n.createElement)("button",{type:"button",className:"yst-button yst-button--secondary",onClick:this.stopIndexing},Object(d.__)("Stop SEO data optimization","wordpress-seo"))}renderDisabledTool(){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("p",null,Object(n.createElement)("button",{type:"button",className:"yst-button yst-button--secondary yst-button--disabled",disabled:!0},Object(d.__)("Start SEO data optimization","wordpress-seo"))),Object(n.createElement)(h.b,{type:"info",className:"yst-mt-6"},Object(d.__)("SEO data optimization is disabled for non-production environments.","wordpress-seo")))}renderProgressBar(){let e=0;return this.isState("completed")&&(e=100),this.isState("in_progress")&&(e=this.state.processed/parseInt(this.state.amount,10)*100),Object(n.createElement)("div",{className:"yst-w-full yst-bg-gray-200 yst-rounded-full yst-h-2.5 yst-mb-4"},Object(n.createElement)("div",{className:"yst-transition-[width] yst-ease-linear yst-bg-primary-500 yst-h-2.5 yst-rounded-full",style:{width:e+"%"}}))}renderCaption(){return Object(n.createElement)(M.a,{id:"optimization-in-progress-text",height:this.isState("in_progress")?"auto":0,easing:"linear",duration:300},Object(n.createElement)("p",{className:"yst-text-sm yst-italic yst-mb-4 yst-mt-4"},Object(d.__)("SEO data optimization is running… You can safely move on to the next steps of this configuration.","wordpress-seo")))}renderErrorAlert(){return Object(n.createElement)(D,{message:yoastIndexingData.errorMessage,error:this.state.error,className:"yst-mb-4"})}render(){return this.settings.disabled?this.renderDisabledTool():Object(n.createElement)("div",{className:"yst-relative"},this.props.children,Object(n.createElement)(I.a,{unmount:!1,show:this.isState("errored")||this.isState("in_progress")||this.isState("idle")&&this.state.amount>0,leave:"yst-transition-opacity yst-duration-1000",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0"},this.renderProgressBar(),this.isState("errored")&&this.renderErrorAlert(),this.isState("in_progress")?this.renderStopButton():this.renderStartButton(),this.renderCaption(),this.isState("idle")&&this.state.firstTime&&this.renderFirstIndexationNotice()))}}U.propTypes={indexingActions:m.a.object,preIndexingActions:m.a.object,indexingStateCallback:m.a.func,children:m.a.node},U.defaultProps={indexingActions:{},preIndexingActions:{},indexingStateCallback:()=>{},children:null};var H=U;const V={},$={};function B(e){let{indexingStateCallback:t,indexingState:a,isEnabled:r,isStepperFinished:s}=e;return r?Object(n.createElement)(H,{preIndexingActions:V,indexingActions:$,indexingStateCallback:t},Object(n.createElement)(I.a,{unmount:!1,show:["completed","already_done"].includes(a),enter:"yst-transition-opacity yst-duration-1000",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100"},Object(n.createElement)(h.b,{type:"success"},"already_done"!==a||s?Object(d.__)("We've successfully analyzed your site!","wordpress-seo"):Object(d.__)("We've already successfully analyzed your site. You can move on to the next step.","wordpress-seo")))):"completed"===a?Object(n.createElement)(h.b,{type:"success"},Object(d.__)("We've already successfully analyzed your site. You can move on to the next step.","wordpress-seo")):Object(n.createElement)("button",{className:"yoast-button--secondary",type:"button",disabled:!0},Object(d.__)("Start SEO data optimization","wordpress-seo"))}window.yoast=window.yoast||{},window.yoast.indexing=window.yoast.indexing||{},B.propTypes={indexingStateCallback:m.a.func.isRequired,indexingState:m.a.string.isRequired,isEnabled:m.a.bool,isStepperFinished:m.a.bool},B.defaultProps={isEnabled:!0,isStepperFinished:!1},window.yoast.indexing.registerPreIndexingAction=(e,t)=>{V[e]=t},window.yoast.indexing.registerIndexingAction=(e,t)=>{$[e]=t};var G,W,Y,Q,K,J,Z,X,ee,te,ae,ne,re,se,ie,oe,le,ce,de,ue,pe,be,me,fe,he,ye,ge,Oe,ve,je,we,Ee,xe,Se,Ce,Re,_e,Pe,ke,Te,Ie,Ne,Me,Fe,Le,ze,Ae,De,qe,Ue,He,Ve=a(3),$e=a.n(Ve);function Be(){return(Be=Object.assign||function(e){for(var t=1;t",""),window.wpseoFirstTimeConfigurationData.shortlinks.configIndexablesBenefits,"yoast-configuration-index-data-link")),Object(n.createElement)(Ge,{className:"yst-h-28 yst-w-24 yst-mr-6"})),Object(n.createElement)("div",{id:"yoast-configuration-indexing-container",className:"indexation-container"},Object(n.createElement)(B,{indexingStateCallback:a,isEnabled:!window.wpseoFirstTimeConfigurationData.shouldUpdatePremium,indexingState:t,isStepperFinished:s})),window.wpseoFirstTimeConfigurationData.shouldUpdatePremium&&"completed"!==t&&Object(n.createElement)(h.b,{type:"warning"},Object(n.createElement)("p",null,// translators: %1$s is replaced by a version number. Object(d.sprintf)(Object(d.__)("This configuration step is currently disabled, because you're not running the latest version of Yoast SEO Premium. Please update to the latest version (at least %1$s). ","wordpress-seo"),"17.7")),Object(n.createElement)("p",null,Object(u.a)(Object(d.sprintf)(// translators: %1$s and %2$s are replaced by anchor tags to make a link to the tool section. Object(d.__)("You can still run the SEO data optimization in the %1$sTools section%2$s. Once that is finished, please refresh this page.","wordpress-seo"),"",""),window.wpseoFirstTimeConfigurationData.toolsPageUrl))),Object(n.createElement)(h.a,{id:"indexation-alert",isVisible:"idle"===t&&r,expandDuration:400,type:"info"},Object(d.__)("Be aware that you should run the SEO data optimization for this configuration to take maximum effect.","wordpress-seo")))}We.propTypes={indexingState:m.a.string.isRequired,setIndexingState:m.a.func.isRequired,showRunIndexationAlert:m.a.bool,isStepperFinished:m.a.bool},We.defaultProps={showRunIndexationAlert:!1,isStepperFinished:!1};var Ye=a(121),Qe=a(93),Ke=a(31),Je=a(57);function Ze(e,t){let[a,n]=Object(Ve.useState)(e),r=Object(Je.a)(e);return Object(Ke.a)(()=>n(r.current),[r,n,...t]),a}var Xe,et,tt=a(82),at=a(24),nt=a(29),rt=a(73),st=((Xe=st||{}).Space=" ",Xe.Enter="Enter",Xe.Escape="Escape",Xe.Backspace="Backspace",Xe.Delete="Delete",Xe.ArrowLeft="ArrowLeft",Xe.ArrowUp="ArrowUp",Xe.ArrowRight="ArrowRight",Xe.ArrowDown="ArrowDown",Xe.Home="Home",Xe.End="End",Xe.PageUp="PageUp",Xe.PageDown="PageDown",Xe.Tab="Tab",Xe),it=((et=it||{})[et.First=0]="First",et[et.Previous=1]="Previous",et[et.Next=2]="Next",et[et.Last=3]="Last",et[et.Specific=4]="Specific",et[et.Nothing=5]="Nothing",et);function ot(e,t){let a=t.resolveItems();if(a.length<=0)return null;let n=t.resolveActiveIndex(),r=null!=n?n:-1,s=(()=>{switch(e.focus){case 0:return a.findIndex(e=>!t.resolveDisabled(e));case 1:{let e=a.slice().reverse().findIndex((e,a,n)=>!(-1!==r&&n.length-a-1>=r||t.resolveDisabled(e)));return-1===e?e:a.length-1-e}case 2:return a.findIndex((e,a)=>!(a<=r||t.resolveDisabled(e)));case 3:{let e=a.slice().reverse().findIndex(e=>!t.resolveDisabled(e));return-1===e?e:a.length-1-e}case 4:return a.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===s?n:s}function lt(e){let t=e.parentElement,a=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(a=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(a))&&n}function ct(e){return"undefined"==typeof window?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let dt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>e+":not([tabindex='-1'])").join(",");var ut,pt,bt,mt=((bt=mt||{})[bt.First=1]="First",bt[bt.Previous=2]="Previous",bt[bt.Next=4]="Next",bt[bt.Last=8]="Last",bt[bt.WrapAround=16]="WrapAround",bt[bt.NoScroll=32]="NoScroll",bt),ft=((pt=ft||{})[pt.Error=0]="Error",pt[pt.Overflow=1]="Overflow",pt[pt.Success=2]="Success",pt[pt.Underflow=3]="Underflow",pt),ht=((ut=ht||{})[ut.Previous=-1]="Previous",ut[ut.Next=1]="Next",ut),yt=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(yt||{});function gt(e,t=0){var a;return e!==(null==(a=ct(e))?void 0:a.body)&&Object(nt.a)(t,{0:()=>e.matches(dt),1(){let t=e;for(;null!==t;){if(t.matches(dt))return!0;t=t.parentElement}return!1}})}function Ot(e,t=(e=>e)){return e.slice().sort((e,a)=>{let n=t(e),r=t(a);if(null===n||null===r)return 0;let s=n.compareDocumentPosition(r);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}["textarea","input"].join(",");var vt=a(50);function jt(e){var t;if(e.type)return e.type;let a=null!=(t=e.as)?t:"button";return"string"==typeof a&&"button"===a.toLowerCase()?"button":void 0}function wt(e,t){let[a,n]=Object(Ve.useState)(()=>jt(e));return Object(Ke.a)(()=>{n(jt(e))},[e.type,e.as]),Object(Ke.a)(()=>{a||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[a,t]),a}function Et(e,t,a){let n=Object(Je.a)(t);Object(Ve.useEffect)(()=>{function t(e){n.current(e)}return window.addEventListener(e,t,a),()=>window.removeEventListener(e,t,a)},[e,a])}function xt(e,t,a=!0){let n=Object(Ve.useRef)(!1);function r(a,r){if(!n.current||a.defaultPrevented)return;let s=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),i=r(a);if(null!==i&&i.ownerDocument.documentElement.contains(i)){for(let e of s){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(i))return}return!gt(i,yt.Loose)&&-1!==i.tabIndex&&a.preventDefault(),t(a,i)}}Object(Ve.useEffect)(()=>{requestAnimationFrame(()=>{n.current=a})},[a]),Et("click",e=>r(e,e=>e.target),!0),Et("blur",e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var St=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(St||{});let Ct=Object(at.d)((function(e,t){let{features:a=1,...n}=e,r={ref:t,"aria-hidden":2==(2&a)||void 0,style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&a)&&2!=(2&a)&&{display:"none"}}};return Object(at.e)({ourProps:r,theirProps:n,slot:{},defaultTag:"div",name:"Hidden"})}));function Rt(e={},t=null,a=[]){for(let[n,r]of Object.entries(e))Pt(a,_t(t,n),r);return a}function _t(e,t){return e?e+"["+t+"]":t}function Pt(e,t,a){if(Array.isArray(a))for(let[n,r]of a.entries())Pt(e,_t(t,n.toString()),r);else a instanceof Date?e.push([t,a.toISOString()]):"boolean"==typeof a?e.push([t,a?"1":"0"]):"string"==typeof a?e.push([t,a]):"number"==typeof a?e.push([t,""+a]):null==a?e.push([t,""]):Rt(a,t,e)}var kt=a(30),Tt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tt||{}),It=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(It||{}),Nt=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Nt||{}),Mt=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(Mt||{});function Ft(e,t=(e=>e)){let a=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=Ot(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=a?n.indexOf(a):null;return-1===r&&(r=null),{options:n,activeOptionIndex:r}}let Lt={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{value:a,mode:n,compare:r}=e.propsRef.current,s=e.options.findIndex(e=>{let t=e.dataRef.current.value;return Object(nt.a)(n,{1:()=>a.some(e=>r(e,t)),0:()=>r(a,t)})});return-1!==s&&(t=s),{...e,listboxState:0,activeOptionIndex:t}},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){var a;if(e.disabled||1===e.listboxState)return e;let n=Ft(e),r=ot(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeOptionIndex:r,activationTrigger:null!=(a=t.trigger)?a:1}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let a=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),r=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+a).concat(e.options.slice(0,e.activeOptionIndex+a)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}),s=r?e.options.indexOf(r):-1;return-1===s||s===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:s,activationTrigger:1}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{let a={id:t.id,dataRef:t.dataRef},n=Ft(e,e=>[...e,a]);if(null===e.activeOptionIndex){let{value:r,mode:s,compare:i}=e.propsRef.current,o=t.dataRef.current.value;Object(nt.a)(s,{1:()=>r.some(e=>i(e,o)),0:()=>i(r,o)})&&(n.activeOptionIndex=n.options.indexOf(a))}return{...e,...n}},8:(e,t)=>{let a=Ft(e,e=>{let a=e.findIndex(e=>e.id===t.id);return-1!==a&&e.splice(a,1),e});return{...e,...a,activationTrigger:1}}},zt=Object(Ve.createContext)(null);function At(e){let t=Object(Ve.useContext)(zt);if(null===t){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,At),t}return t}function Dt(e,t){return Object(nt.a)(t.type,Lt,e,t)}zt.displayName="ListboxContext";let qt=Ve.Fragment,Ut=Object(at.d)((function(e,t){let{value:a,name:n,onChange:r,disabled:s=!1,horizontal:i=!1,multiple:o=!1,...l}=e;const c=i?"horizontal":"vertical";let d=Object(tt.a)(t),u=Object(Ve.useReducer)(Dt,{listboxState:1,propsRef:{current:{value:a,onChange:r,mode:o?1:0,compare:Object(kt.a)((e,t)=>e===t)}},labelRef:Object(Ve.createRef)(),buttonRef:Object(Ve.createRef)(),optionsRef:Object(Ve.createRef)(),disabled:s,orientation:c,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:p,propsRef:b,optionsRef:m,buttonRef:f},h]=u;b.current.value=a,b.current.mode=o?1:0,Object(Ke.a)(()=>{b.current.onChange=e=>Object(nt.a)(b.current.mode,{0:()=>r(e),1(){let t=b.current.value.slice(),a=t.indexOf(e);return-1===a?t.push(e):t.splice(a,1),r(t)}})},[r,b]),Object(Ke.a)(()=>h({type:2,disabled:s}),[s]),Object(Ke.a)(()=>h({type:3,orientation:c}),[c]),xt([f,m],(e,t)=>{var a;h({type:1}),gt(t,yt.Loose)||(e.preventDefault(),null==(a=f.current)||a.focus())},0===p);let y=Object(Ve.useMemo)(()=>({open:0===p,disabled:s}),[p,s]),g={ref:d};return $e.a.createElement(zt.Provider,{value:u},$e.a.createElement(vt.a,{value:Object(nt.a)(p,{0:vt.b.Open,1:vt.b.Closed})},null!=n&&null!=a&&Rt({[n]:a}).map(([e,t])=>$e.a.createElement(Ct,{features:St.Hidden,...Object(at.c)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:t})})),Object(at.e)({ourProps:g,theirProps:l,slot:y,defaultTag:qt,name:"Listbox"})))})),Ht=Object(at.d)((function(e,t){var a;let[n,r]=At("Listbox.Button"),s=Object(tt.a)(n.buttonRef,t),i="headlessui-listbox-button-"+Object(Qe.a)(),o=Object(Ye.a)(),l=Object(kt.a)(e=>{switch(e.key){case st.Space:case st.Enter:case st.ArrowDown:e.preventDefault(),r({type:0}),o.nextFrame(()=>{n.propsRef.current.value||r({type:4,focus:it.First})});break;case st.ArrowUp:e.preventDefault(),r({type:0}),o.nextFrame(()=>{n.propsRef.current.value||r({type:4,focus:it.Last})})}}),c=Object(kt.a)(e=>{switch(e.key){case st.Space:e.preventDefault()}}),d=Object(kt.a)(e=>{if(lt(e.currentTarget))return e.preventDefault();0===n.listboxState?(r({type:1}),o.nextFrame(()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),r({type:0}))}),u=Ze(()=>{if(n.labelRef.current)return[n.labelRef.current.id,i].join(" ")},[n.labelRef.current,i]),p=Object(Ve.useMemo)(()=>({open:0===n.listboxState,disabled:n.disabled}),[n]),b=e,m={ref:s,id:i,type:wt(e,n.buttonRef),"aria-haspopup":!0,"aria-controls":null==(a=n.optionsRef.current)?void 0:a.id,"aria-expanded":n.disabled?void 0:0===n.listboxState,"aria-labelledby":u,disabled:n.disabled,onKeyDown:l,onKeyUp:c,onClick:d};return Object(at.e)({ourProps:m,theirProps:b,slot:p,defaultTag:"button",name:"Listbox.Button"})})),Vt=Object(at.d)((function(e,t){let[a]=At("Listbox.Label"),n="headlessui-listbox-label-"+Object(Qe.a)(),r=Object(tt.a)(a.labelRef,t),s=Object(kt.a)(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),i=Object(Ve.useMemo)(()=>({open:0===a.listboxState,disabled:a.disabled}),[a]);return Object(at.e)({ourProps:{ref:r,id:n,onClick:s},theirProps:e,slot:i,defaultTag:"label",name:"Listbox.Label"})})),$t=at.a.RenderStrategy|at.a.Static,Bt=Object(at.d)((function(e,t){var a;let[n,r]=At("Listbox.Options"),s=Object(tt.a)(n.optionsRef,t),i="headlessui-listbox-options-"+Object(Qe.a)(),o=Object(Ye.a)(),l=Object(Ye.a)(),c=Object(vt.c)(),d=null!==c?c===vt.b.Open:0===n.listboxState;Object(Ve.useEffect)(()=>{var e;let t=n.optionsRef.current;!t||0===n.listboxState&&t!==(null==(e=ct(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[n.listboxState,n.optionsRef]);let u=Object(kt.a)(e=>{switch(l.dispose(),e.key){case st.Space:if(""!==n.searchQuery)return e.preventDefault(),e.stopPropagation(),r({type:5,value:e.key});case st.Enter:if(e.preventDefault(),e.stopPropagation(),null!==n.activeOptionIndex){let{dataRef:e}=n.options[n.activeOptionIndex];n.propsRef.current.onChange(e.current.value)}0===n.propsRef.current.mode&&(r({type:1}),Object(rt.a)().nextFrame(()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case Object(nt.a)(n.orientation,{vertical:st.ArrowDown,horizontal:st.ArrowRight}):return e.preventDefault(),e.stopPropagation(),r({type:4,focus:it.Next});case Object(nt.a)(n.orientation,{vertical:st.ArrowUp,horizontal:st.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),r({type:4,focus:it.Previous});case st.Home:case st.PageUp:return e.preventDefault(),e.stopPropagation(),r({type:4,focus:it.First});case st.End:case st.PageDown:return e.preventDefault(),e.stopPropagation(),r({type:4,focus:it.Last});case st.Escape:return e.preventDefault(),e.stopPropagation(),r({type:1}),o.nextFrame(()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case st.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(r({type:5,value:e.key}),l.setTimeout(()=>r({type:6}),350))}}),p=Ze(()=>{var e,t,a;return null!=(a=null==(e=n.labelRef.current)?void 0:e.id)?a:null==(t=n.buttonRef.current)?void 0:t.id},[n.labelRef.current,n.buttonRef.current]),b=Object(Ve.useMemo)(()=>({open:0===n.listboxState}),[n]),m=e,f={"aria-activedescendant":null===n.activeOptionIndex||null==(a=n.options[n.activeOptionIndex])?void 0:a.id,"aria-multiselectable":1===n.propsRef.current.mode||void 0,"aria-labelledby":p,"aria-orientation":n.orientation,id:i,onKeyDown:u,role:"listbox",tabIndex:0,ref:s};return Object(at.e)({ourProps:f,theirProps:m,slot:b,defaultTag:"ul",features:$t,visible:d,name:"Listbox.Options"})})),Gt=Object(at.d)((function(e,t){let{disabled:a=!1,value:n,...r}=e,[s,i]=At("Listbox.Option"),o="headlessui-listbox-option-"+Object(Qe.a)(),l=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===o,{value:c,compare:d}=s.propsRef.current,u=Object(nt.a)(s.propsRef.current.mode,{1:()=>c.some(e=>d(e,n)),0:()=>d(c,n)}),p=Object(Ve.useRef)(null),b=Object(tt.a)(t,p);Object(Ke.a)(()=>{if(0!==s.listboxState||!l||0===s.activationTrigger)return;let e=Object(rt.a)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[p,l,s.listboxState,s.activationTrigger,s.activeOptionIndex]);let m=Object(Ve.useRef)({disabled:a,value:n,domRef:p});Object(Ke.a)(()=>{m.current.disabled=a},[m,a]),Object(Ke.a)(()=>{m.current.value=n},[m,n]),Object(Ke.a)(()=>{var e,t;m.current.textValue=null==(t=null==(e=p.current)?void 0:e.textContent)?void 0:t.toLowerCase()},[m,p]);let f=Object(kt.a)(()=>s.propsRef.current.onChange(n));Object(Ke.a)(()=>(i({type:7,id:o,dataRef:m}),()=>i({type:8,id:o})),[m,o]);let h=Object(kt.a)(e=>{if(a)return e.preventDefault();f(),0===s.propsRef.current.mode&&(i({type:1}),Object(rt.a)().nextFrame(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),y=Object(kt.a)(()=>{if(a)return i({type:4,focus:it.Nothing});i({type:4,focus:it.Specific,id:o})}),g=Object(kt.a)(()=>{a||l||i({type:4,focus:it.Specific,id:o,trigger:0})}),O=Object(kt.a)(()=>{a||!l||i({type:4,focus:it.Nothing})}),v=Object(Ve.useMemo)(()=>({active:l,selected:u,disabled:a}),[l,u,a]);return Object(at.e)({ourProps:{id:o,ref:b,role:"option",tabIndex:!0===a?void 0:-1,"aria-disabled":!0===a||void 0,"aria-selected":!0===u||void 0,disabled:void 0,onClick:h,onFocus:y,onPointerMove:g,onMouseMove:g,onPointerLeave:O,onMouseLeave:O},theirProps:r,slot:v,defaultTag:"li",name:"Listbox.Option"})})),Wt=Object.assign(Ut,{Button:Ht,Label:Vt,Options:Bt,Option:Gt});var Yt=Ve.forwardRef((function(e,t){return Ve.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ve.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))})),Qt=a(212),Kt=a(188),Jt=a(147);function Zt(e){let{id:t,value:a,choices:r,label:s,onChange:i,error:o,disabled:l}=e;const c=Object(n.useMemo)(()=>{const e=r.find(e=>a===e.value);return e?e.label:Object(d.__)("Select an option","wordpress-seo")},[r,a]);return Object(n.createElement)(Wt,{id:t,as:"div",value:a,onChange:i,disabled:l},e=>{let{open:i}=e;return Object(n.createElement)(n.Fragment,null,s&&Object(n.createElement)(Wt.Label,{className:"yst-block yst-max-w-sm yst-mb-1 yst-text-sm yst-font-medium yst-text-gray-700"},s),Object(n.createElement)("div",{className:"yst-max-w-sm"},Object(n.createElement)("div",{className:"yst-relative"},Object(n.createElement)(Wt.Button,E()({className:C()("yst-relative yst-h-[45px] yst-w-full yst-leading-6 yst-py-2 yst-pl-3 yst-pr-10 yst-text-left yst-bg-white yst-border yst-border-gray-300 yst-rounded-md yst-shadow-sm yst-cursor-default focus:yst-outline-none focus:yst-ring-1 focus:yst-ring-primary-500 focus:yst-border-primary-500 sm:yst-text-sm",{"yst-border-red-300":o.isVisible,"yst-opacity-50":l},"emptyChoice"===a?"yst-text-gray-400":"yst-text-gray-700")},Object(p.b)(t,o)),Object(n.createElement)("span",{className:"yst-block yst-truncate"},c),Object(n.createElement)("span",{className:"yst-absolute yst-inset-y-0 yst-right-0 yst-flex yst-items-center yst-pr-2 yst-pointer-events-none"},Object(n.createElement)(Yt,{className:"yst-w-5 yst-h-5 yst-text-gray-400","aria-hidden":"true"})),o.isVisible&&Object(n.createElement)("div",{className:"yst-flex yst-items-center yst-absolute yst-inset-y-0 yst-right-0 yst-mr-8"},Object(n.createElement)(Qt.a,{className:"yst-pointer-events-none yst-h-5 yst-w-5 yst-text-red-500"}))),Object(n.createElement)(I.a,{show:i,as:n.Fragment,leave:"yst-transition yst-ease-in yst-duration-100",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0"},Object(n.createElement)(Wt.Options,{static:!0,className:"yst-absolute yst-z-10 yst-w-full yst-mt-1 yst-overflow-auto yst-bg-white yst-rounded-md yst-shadow-lg yst-max-h-60 yst-ring-1 yst-ring-black yst-ring-opacity-5 focus:yst-outline-none sm:yst-text-sm"},r.map(e=>Object(n.createElement)(Wt.Option,{key:e.id,as:n.Fragment,value:e.value},t=>{let{selected:a,active:r}=t;return Object(n.createElement)("li",{className:Object(p.d)({selected:a,active:r})},Object(n.createElement)("span",{className:C()(a?"yst-font-semibold":"yst-font-normal","yst-block yst-truncate")},e.label),a?Object(n.createElement)("span",{className:C()("yst-text-white yst-absolute yst-inset-y-0 yst-right-0 yst-flex yst-items-center yst-pr-4")},Object(n.createElement)(Kt.a,{className:"yst-w-5 yst-h-5","aria-hidden":"true"})):null)}))))),o.isVisible&&Object(n.createElement)(Jt.a,{id:Object(p.c)(t),className:"yst-mt-2 yst-text-sm yst-text-red-600",texts:o.message})))})}Zt.propTypes={value:b.PropTypes.string.isRequired,choices:b.PropTypes.arrayOf(b.PropTypes.shape({id:b.PropTypes.oneOfType([b.PropTypes.number,b.PropTypes.string]).isRequired,value:b.PropTypes.string.isRequired,label:b.PropTypes.string.isRequired})).isRequired,label:b.PropTypes.string.isRequired,onChange:b.PropTypes.func.isRequired,id:b.PropTypes.string.isRequired,error:b.PropTypes.shape({message:b.PropTypes.string,isVisible:b.PropTypes.bool}),disabled:b.PropTypes.bool},Zt.defaultProps={error:{message:"",isVisible:!1},disabled:!1};var Xt=a(146),ea=a(245);const ta=e=>{let{className:t}=e;return Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:C()("yst-animate-spin",t)},Object(n.createElement)("circle",{className:"yst-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Object(n.createElement)("path",{className:"yst-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))};ta.propTypes={className:m.a.string},ta.defaultProps={className:""};var aa=ta;function na(e){let{id:t,imageAltText:a,url:r,fallbackUrl:s,label:i,onSelectImageClick:o,onRemoveImageClick:l,className:c,error:u,status:b}=e;const m=C()("yst-relative yst-w-full yst-h-48 yst-mt-2 yst-flex yst-justify-center yst-items-center yst-rounded-md yst-mb-4 focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-offset-2 focus:yst-ring-primary-500",u.isVisible?"yst-border-red-300":"yst-border-gray-300","yst-border-2 yst-border-dashed"),f=Object(n.useCallback)(()=>"loading"===b?Object(n.createElement)("div",{className:"yst-text-center"},Object(n.createElement)(aa,{size:"10",color:"gray-400",className:"yst-inline-block"}),Object(n.createElement)("p",{className:"yst-mt-3"},Object(d.__)("Uploading image...","admin-ui"))):r?Object(n.createElement)("img",{src:r,alt:a,className:"yst-w-full yst-h-full yst-object-contain"}):s?Object(n.createElement)("img",{src:s,alt:a,className:"yst-w-full yst-h-full yst-object-contain"}):Object(n.createElement)(ea.a,{id:t+"-no-image-svg",className:"yst-w-14 yst-h-14 yst-text-gray-500"}),[b,t,r,a]);return Object(n.createElement)("div",E()({className:C()("yst-max-w-sm",c)},Object(p.b)(t,u)),Object(n.createElement)("label",{htmlFor:t,className:"yst-block yst-mb-2 yst-font-medium yst-text-gray-700"},i),Object(n.createElement)("button",{id:t,className:m,onClick:o,type:"button"},f()),Object(n.createElement)("div",null,Object(n.createElement)("button",{type:"button",id:r?t+"__replace-image":t+"__select-image",className:"yst-button yst-button yst-button--secondary yst-mr-2",onClick:o},r?Object(d.__)("Replace image","admin-ui"):Object(d.__)("Select image","admin-ui")),r&&Object(n.createElement)("button",{type:"button",id:t+"__remove-image",className:"yst-button--remove",onClick:l},Object(d.__)("Remove image","admin-ui"))),"error"===b&&Object(n.createElement)("p",{className:"yst-mt-2 yst-text-sm yst-text-red-600"},u),u.isVisible&&Object(n.createElement)(Jt.a,{id:Object(p.c)(t),className:"yst-mt-2 yst-text-sm yst-text-red-600",texts:u.message}))}na.propTypes={label:m.a.string,id:m.a.string.isRequired,url:m.a.string,fallbackUrl:m.a.string,imageAltText:m.a.string,onRemoveImageClick:m.a.func,onSelectImageClick:m.a.func,className:m.a.string,error:m.a.shape({message:m.a.string,isVisible:m.a.bool}),status:m.a.string},na.defaultProps={label:"",url:"",fallbackUrl:"",imageAltText:"",onRemoveImageClick:o.noop,onSelectImageClick:o.noop,className:"",error:{message:"",isVisible:!1},status:"idle"};var ra=a(40);function sa(e){let{dispatch:t,imageUrl:a,fallbackImageUrl:r,organizationName:s,fallbackOrganizationName:i,errorFields:o}=e;const l=Object(n.useCallback)(()=>{Object(ra.b)(e=>{t({type:"SET_COMPANY_LOGO",payload:{...e}})})},[ra.b]),c=Object(n.useCallback)(()=>{t({type:"REMOVE_COMPANY_LOGO"})}),u=Object(n.useCallback)(e=>{t({type:"CHANGE_COMPANY_NAME",payload:e.target.value})});return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Xt.a,{className:"yst-mt-6",id:"organization-name-input",name:"organization-name",label:Object(d.__)("Organization name","wordpress-seo"),value:""===s?i:s,onChange:u,feedback:{isVisible:o.includes("company_name"),message:[Object(d.__)("We could not save the organization name. Please check the value.","wordpress-seo")],type:"error"}}),Object(n.createElement)(na,{className:"yst-mt-6",id:"organization-logo-input",url:a,fallbackUrl:r,onSelectImageClick:l,onRemoveImageClick:c,imageAltText:"",hasPreview:!0,label:Object(d.__)("Organization logo","wordpress-seo")}))}sa.propTypes={dispatch:m.a.func.isRequired,imageUrl:m.a.string,fallbackImageUrl:m.a.string,organizationName:m.a.string,fallbackOrganizationName:m.a.string,errorFields:m.a.array},sa.defaultProps={imageUrl:"",fallbackImageUrl:"",organizationName:"",fallbackOrganizationName:"",errorFields:[]};var ia=a(9),oa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(oa||{}),la=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(la||{}),ca=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ca||{}),da=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e))(da||{});function ua(e,t=(e=>e)){let a=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=Ot(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=a?n.indexOf(a):null;return-1===r&&(r=null),{options:n,activeOptionIndex:r}}let pa={1:e=>e.dataRef.current.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1},0(e){if(e.dataRef.current.disabled||0===e.comboboxState)return e;let t=e.activeOptionIndex,{isSelected:a}=e.dataRef.current,n=e.options.findIndex(e=>a(e.dataRef.current.value));return-1!==n&&(t=n),{...e,comboboxState:0,activeOptionIndex:t}},2(e,t){var a;if(e.dataRef.current.disabled||e.dataRef.current.optionsRef.current&&!e.dataRef.current.optionsPropsRef.current.static&&1===e.comboboxState)return e;let n=ua(e);if(null===n.activeOptionIndex){let e=n.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(n.activeOptionIndex=e)}let r=ot(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...n,activeOptionIndex:r,activationTrigger:null!=(a=t.trigger)?a:1}},3:(e,t)=>{let a={id:t.id,dataRef:t.dataRef},n=ua(e,e=>[...e,a]);null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(a));let r={...e,...n,activationTrigger:1};return e.dataRef.current.__demoMode&&void 0===e.dataRef.current.value&&(r.activeOptionIndex=0),r},4:(e,t)=>{let a=ua(e,e=>{let a=e.findIndex(e=>e.id===t.id);return-1!==a&&e.splice(a,1),e});return{...e,...a,activationTrigger:1}}},ba=Object(Ve.createContext)(null);function ma(e){let t=Object(Ve.useContext)(ba);if(null===t){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ma),t}return t}ba.displayName="ComboboxActionsContext";let fa=Object(Ve.createContext)(null);function ha(e){let t=Object(Ve.useContext)(fa);if(null===t){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ha),t}return t}function ya(e,t){return Object(nt.a)(t.type,pa,e,t)}fa.displayName="ComboboxDataContext";let ga=Ve.Fragment,Oa=Object(at.d)((function(e,t){let{name:a,value:n,onChange:r,disabled:s=!1,__demoMode:i=!1,nullable:o=!1,multiple:l=!1,...c}=e,[d,u]=Object(Ve.useReducer)(ya,{dataRef:Object(Ve.createRef)(),comboboxState:i?0:1,options:[],activeOptionIndex:null,activationTrigger:1}),p=Object(Ve.useRef)(!1),b=Object(Ve.useRef)({static:!1,hold:!1}),m=Object(Ve.useRef)({displayValue:void 0}),f=Object(Ve.useRef)(null),h=Object(Ve.useRef)(null),y=Object(Ve.useRef)(null),g=Object(Ve.useRef)(null),O=Object(kt.a)((e,t)=>e===t),v=Object(Ve.useCallback)(e=>Object(nt.a)(j.mode,{1:()=>n.some(t=>O(t,e)),0:()=>O(n,e)}),[n]),j=Object(Ve.useMemo)(()=>({...d,optionsPropsRef:b,inputPropsRef:m,labelRef:f,inputRef:h,buttonRef:y,optionsRef:g,value:n,disabled:s,mode:l?1:0,get activeOptionIndex(){if(p.current&&null===d.activeOptionIndex&&d.options.length>0){let e=d.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==e)return e}return d.activeOptionIndex},compare:O,isSelected:v,nullable:o,__demoMode:i}),[n,s,l,o,i,d]);Object(Ke.a)(()=>{d.dataRef.current=j},[j]),xt([j.buttonRef,j.inputRef,j.optionsRef],()=>u({type:1}),0===j.comboboxState);let w=Object(Ve.useMemo)(()=>({open:0===j.comboboxState,disabled:s,activeIndex:j.activeOptionIndex,activeOption:null===j.activeOptionIndex?null:j.options[j.activeOptionIndex].dataRef.current.value}),[j,s]),E=Object(Ve.useCallback)(()=>{var e;if(!j.inputRef.current)return;let t=m.current.displayValue;j.inputRef.current.value="function"==typeof t?null!=(e=t(n))?e:"":"string"==typeof n?n:""},[n,j.inputRef,m]),x=Object(kt.a)(e=>{let t=j.options.find(t=>t.id===e);!t||(k(t.dataRef.current.value),E())}),S=Object(kt.a)(()=>{if(null!==j.activeOptionIndex){let{dataRef:e,id:t}=j.options[j.activeOptionIndex];k(e.current.value),E(),u({type:2,focus:it.Specific,id:t})}}),C=Object(kt.a)(()=>{u({type:0}),p.current=!0}),R=Object(kt.a)(()=>{u({type:1}),p.current=!1}),_=Object(kt.a)((e,t,a)=>(p.current=!1,e===it.Specific?u({type:2,focus:it.Specific,id:t,trigger:a}):u({type:2,focus:e,trigger:a}))),P=Object(kt.a)((e,t)=>(u({type:3,id:e,dataRef:t}),()=>u({type:4,id:e}))),k=Object(kt.a)(e=>Object(nt.a)(j.mode,{0:()=>r(e),1(){let t=j.value.slice(),a=t.indexOf(e);return-1===a?t.push(e):t.splice(a,1),r(t)}})),T=Object(Ve.useMemo)(()=>({onChange:k,registerOption:P,goToOption:_,closeCombobox:R,openCombobox:C,selectActiveOption:S,selectOption:x}),[]);Object(Ke.a)(()=>{1===j.comboboxState&&E()},[E,j.comboboxState]),Object(Ke.a)(E,[E]);let I=null===t?{}:{ref:t};return $e.a.createElement(ba.Provider,{value:T},$e.a.createElement(fa.Provider,{value:j},$e.a.createElement(vt.a,{value:Object(nt.a)(j.comboboxState,{0:vt.b.Open,1:vt.b.Closed})},null!=a&&null!=n&&Rt({[a]:n}).map(([e,t])=>$e.a.createElement(Ct,{features:St.Hidden,...Object(at.c)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:t})})),Object(at.e)({ourProps:I,theirProps:c,slot:w,defaultTag:ga,name:"Combobox"}))))})),va=Object(at.d)((function(e,t){var a,n;let{value:r,onChange:s,displayValue:i,type:o="text",...l}=e,c=ha("Combobox.Input"),d=ma("Combobox.Input"),u=Object(tt.a)(c.inputRef,t),p=c.inputPropsRef,b="headlessui-combobox-input-"+Object(Qe.a)(),m=Object(Ye.a)();Object(Ke.a)(()=>{p.current.displayValue=i},[i,p]);let f=Object(kt.a)(e=>{switch(e.key){case st.Backspace:case st.Delete:if(0!==c.mode||!c.nullable)return;let t=e.currentTarget;m.requestAnimationFrame(()=>{""===t.value&&(d.onChange(null),c.optionsRef.current&&(c.optionsRef.current.scrollTop=0),d.goToOption(it.Nothing))});break;case st.Enter:if(0!==c.comboboxState)return;if(e.preventDefault(),e.stopPropagation(),null===c.activeOptionIndex)return void d.closeCombobox();d.selectActiveOption(),0===c.mode&&d.closeCombobox();break;case st.ArrowDown:return e.preventDefault(),e.stopPropagation(),Object(nt.a)(c.comboboxState,{0:()=>{d.goToOption(it.Next)},1:()=>{d.openCombobox()}});case st.ArrowUp:return e.preventDefault(),e.stopPropagation(),Object(nt.a)(c.comboboxState,{0:()=>{d.goToOption(it.Previous)},1:()=>{d.openCombobox(),m.nextFrame(()=>{c.value||d.goToOption(it.Last)})}});case st.Home:case st.PageUp:return e.preventDefault(),e.stopPropagation(),d.goToOption(it.First);case st.End:case st.PageDown:return e.preventDefault(),e.stopPropagation(),d.goToOption(it.Last);case st.Escape:return 0!==c.comboboxState?void 0:(e.preventDefault(),c.optionsRef.current&&!c.optionsPropsRef.current.static&&e.stopPropagation(),d.closeCombobox());case st.Tab:if(0!==c.comboboxState)return;d.selectActiveOption(),d.closeCombobox()}}),h=Object(kt.a)(e=>{d.openCombobox(),null==s||s(e)}),y=Ze(()=>{if(c.labelRef.current)return[c.labelRef.current.id].join(" ")},[c.labelRef.current]),g=Object(Ve.useMemo)(()=>({open:0===c.comboboxState,disabled:c.disabled}),[c]),O={ref:u,id:b,role:"combobox",type:o,"aria-controls":null==(a=c.optionsRef.current)?void 0:a.id,"aria-expanded":c.disabled?void 0:0===c.comboboxState,"aria-activedescendant":null===c.activeOptionIndex||null==(n=c.options[c.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===c.mode||void 0,"aria-labelledby":y,disabled:c.disabled,onKeyDown:f,onChange:h};return Object(at.e)({ourProps:O,theirProps:l,slot:g,defaultTag:"input",name:"Combobox.Input"})})),ja=Object(at.d)((function(e,t){var a;let n=ha("Combobox.Button"),r=ma("Combobox.Button"),s=Object(tt.a)(n.buttonRef,t),i="headlessui-combobox-button-"+Object(Qe.a)(),o=Object(Ye.a)(),l=Object(kt.a)(e=>{switch(e.key){case st.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&r.openCombobox(),o.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case st.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&(r.openCombobox(),o.nextFrame(()=>{n.value||r.goToOption(it.Last)})),o.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case st.Escape:return 0!==n.comboboxState?void 0:(e.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&e.stopPropagation(),r.closeCombobox(),o.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})}));default:return}}),c=Object(kt.a)(e=>{if(lt(e.currentTarget))return e.preventDefault();0===n.comboboxState?r.closeCombobox():(e.preventDefault(),r.openCombobox()),o.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})})}),d=Ze(()=>{if(n.labelRef.current)return[n.labelRef.current.id,i].join(" ")},[n.labelRef.current,i]),u=Object(Ve.useMemo)(()=>({open:0===n.comboboxState,disabled:n.disabled}),[n]),p=e,b={ref:s,id:i,type:wt(e,n.buttonRef),tabIndex:-1,"aria-haspopup":!0,"aria-controls":null==(a=n.optionsRef.current)?void 0:a.id,"aria-expanded":n.disabled?void 0:0===n.comboboxState,"aria-labelledby":d,disabled:n.disabled,onClick:c,onKeyDown:l};return Object(at.e)({ourProps:b,theirProps:p,slot:u,defaultTag:"button",name:"Combobox.Button"})})),wa=Object(at.d)((function(e,t){let a=ha("Combobox.Label"),n="headlessui-combobox-label-"+Object(Qe.a)(),r=Object(tt.a)(a.labelRef,t),s=Object(kt.a)(()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}),i=Object(Ve.useMemo)(()=>({open:0===a.comboboxState,disabled:a.disabled}),[a]);return Object(at.e)({ourProps:{ref:r,id:n,onClick:s},theirProps:e,slot:i,defaultTag:"label",name:"Combobox.Label"})})),Ea=at.a.RenderStrategy|at.a.Static,xa=Object(at.d)((function(e,t){var a;let{hold:n=!1,...r}=e,s=ha("Combobox.Options"),i=Object(tt.a)(s.optionsRef,t),o="headlessui-combobox-options-"+Object(Qe.a)(),l=Object(vt.c)(),c=null!==l?l===vt.b.Open:0===s.comboboxState;Object(Ke.a)(()=>{var t;s.optionsPropsRef.current.static=null!=(t=e.static)&&t},[s.optionsPropsRef,e.static]),Object(Ke.a)(()=>{s.optionsPropsRef.current.hold=n},[s.optionsPropsRef,n]),function({container:e,accept:t,walk:a,enabled:n=!0}){let r=Object(Ve.useRef)(t),s=Object(Ve.useRef)(a);Object(Ve.useEffect)(()=>{r.current=t,s.current=a},[t,a]),Object(Ke.a)(()=>{if(!e||!n)return;let t=ct(e);if(!t)return;let a=r.current,i=s.current,o=Object.assign(e=>a(e),{acceptNode:a}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,o,!1);for(;l.nextNode();)i(l.currentNode)},[e,n,r,s])}({container:s.optionsRef.current,enabled:0===s.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let d=Ze(()=>{var e,t,a;return null!=(a=null==(e=s.labelRef.current)?void 0:e.id)?a:null==(t=s.buttonRef.current)?void 0:t.id},[s.labelRef.current,s.buttonRef.current]),u=Object(Ve.useMemo)(()=>({open:0===s.comboboxState}),[s]),p={"aria-activedescendant":null===s.activeOptionIndex||null==(a=s.options[s.activeOptionIndex])?void 0:a.id,"aria-labelledby":d,role:"listbox",id:o,ref:i};return Object(at.e)({ourProps:p,theirProps:r,slot:u,defaultTag:"ul",features:Ea,visible:c,name:"Combobox.Options"})})),Sa=Object(at.d)((function(e,t){var a,n;let{disabled:r=!1,value:s,...i}=e,o=ha("Combobox.Option"),l=ma("Combobox.Option"),c="headlessui-combobox-option-"+Object(Qe.a)(),d=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===c,u=o.isSelected(s),p=Object(Ve.useRef)(null),b=Object(Je.a)({disabled:r,value:s,domRef:p,textValue:null==(n=null==(a=p.current)?void 0:a.textContent)?void 0:n.toLowerCase()}),m=Object(tt.a)(t,p),f=Object(kt.a)(()=>l.selectOption(c));Object(Ke.a)(()=>l.registerOption(c,b),[b,c]);let h=Object(Ve.useRef)(!o.__demoMode);Object(Ke.a)(()=>{if(!o.__demoMode)return;let e=Object(rt.a)();return e.requestAnimationFrame(()=>{h.current=!0}),e.dispose},[]),Object(Ke.a)(()=>{if(0!==o.comboboxState||!d||!h.current||0===o.activationTrigger)return;let e=Object(rt.a)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[p,d,o.comboboxState,o.activationTrigger,o.activeOptionIndex]);let y=Object(kt.a)(e=>{var t;if(r)return e.preventDefault();f(),0===o.mode&&(l.closeCombobox(),null==(t=o.inputRef.current)||t.focus({preventScroll:!0}))}),g=Object(kt.a)(()=>{if(r)return l.goToOption(it.Nothing);l.goToOption(it.Specific,c)}),O=Object(kt.a)(()=>{r||d||l.goToOption(it.Specific,c,0)}),v=Object(kt.a)(()=>{r||!d||o.optionsPropsRef.current.hold||l.goToOption(it.Nothing)}),j=Object(Ve.useMemo)(()=>({active:d,selected:u,disabled:r}),[d,u,r]);return Object(at.e)({ourProps:{id:c,ref:m,role:"option",tabIndex:!0===r?void 0:-1,"aria-disabled":!0===r||void 0,"aria-selected":!0===u||void 0,disabled:void 0,onClick:y,onFocus:g,onPointerMove:O,onMouseMove:O,onPointerLeave:v,onMouseLeave:v},theirProps:i,slot:j,defaultTag:"li",name:"Combobox.Option"})})),Ca=Object.assign(Oa,{Input:va,Button:ja,Label:wa,Options:xa,Option:Sa});function Ra(e){return e&&e.label?e.label:null}function _a(e){let{id:t,value:a,label:r,onChange:s,onQueryChange:i,options:o,placeholder:l,isLoading:c}=e;const[u,b]=Object(n.useState)(o),[m,f]=Object(n.useState)(""),h=Object(n.useCallback)(e=>{f(e.target.value)},[f]),y=Object(n.useCallback)(()=>{f("")},[f]);Object(n.useEffect)(()=>{b(o)},[o]),Object(n.useEffect)(()=>{i?i(m):b(o.filter(e=>e.label.toLowerCase().includes(m.toLowerCase())))},[m,i]);const g=Object(n.useCallback)((e,t)=>a=>{let{selected:n,active:r}=a;return Object(p.d)({selected:n||e===t,active:r})},[p.d]),O=Object(n.useCallback)(e=>t=>{e&&t.stopPropagation()},[]);return Object(n.createElement)(Ca,{id:t,as:"div",value:a,onChange:s,onBlur:y},e=>{let{open:t}=e;return Object(n.createElement)(n.Fragment,null,r&&Object(n.createElement)(Ca.Label,{className:"yst-block yst-mb-1 yst-max-w-sm yst-text-sm yst-font-medium yst-text-gray-700"},r),Object(n.createElement)("div",{className:"yst-h-[45px] yst-max-w-sm yst-relative"},Object(n.createElement)(Ca.Button,{role:"button",className:"yst-w-full yst-h-full yst-rounded-md yst-border yst-border-gray-300 yst-flex yst-items-center yst-rounded-r-md yst-pl-3 yst-pr-2 focus-within:yst-border-primary-500 focus-within:yst-outline-none focus-within:yst-ring-1 focus-within:yst-ring-primary-500",as:"div"},Object(n.createElement)(Ca.Input,{className:"yst-w-full yst-text-gray-700 yst-rounded-md yst-border-0 yst-outline-none yst-bg-white yst-py-2 yst-pl-0 yst-pr-10 yst-shadow-none sm:yst-text-sm",onChange:h,displayValue:Ra,placeholder:l,onClick:O(t)}),Object(n.createElement)(Yt,{className:"yst-h-5 yst-w-5 yst-text-gray-400 yst-inset-y-0 yst-right-0","aria-hidden":"true"})),u.length>0&&Object(n.createElement)(Ca.Options,{className:"yst-absolute yst-z-10 yst-mt-1 yst-max-h-60 yst-w-full yst-overflow-auto yst-rounded-md yst-bg-white yst-text-base yst-shadow-lg yst-ring-1 yst-ring-black yst-ring-opacity-5 focus:yst-outline-none sm:yst-text-sm"},c&&Object(n.createElement)("div",{className:"yst-flex yst-bg-white yst-sticky yst-z-20 yst-text-sm yst-italic yst-top-0 yst-py-2 yst-pl-3 yst-pr-9 yst-my-0"},Object(n.createElement)(aa,{className:"yst-text-primary-500 yst-h-4 yst-w-4 yst-mr-2 yst-self-center"}),Object(d.__)("Loading...","wordpress-seo")),u.map(e=>Object(n.createElement)(Ca.Option,{key:"yst-option-"+e.value,value:e,className:g(e.value,a.value)},t=>{let{selected:r}=t;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:C()("yst-block yst-truncate",(r||a.value===e.value)&&"yst-font-semibold")},e.label),(r||a.value===e.value)&&Object(n.createElement)("span",{className:"yst-absolute yst-inset-y-0 yst-right-0 yst-flex yst-items-center yst-pr-4 yst-text-white"},Object(n.createElement)(Kt.a,{className:"yst-h-5 yst-w-5","aria-hidden":"true"})))})))))})}_a.propTypes={onChange:m.a.func.isRequired,options:m.a.array.isRequired,id:m.a.string.isRequired,value:m.a.shape({value:m.a.number,label:m.a.string}),label:m.a.string,onQueryChange:m.a.func,placeholder:m.a.string,isLoading:m.a.bool},_a.defaultProps={value:null,label:"",onQueryChange:null,placeholder:Object(d.__)("Select an option","wordpress-seo"),isLoading:!1};const Pa={"X-WP-NONCE":wpApiSettings.nonce},ka=wpApiSettings.root;function Ta(e){let{initialValue:t,onChangeCallback:a,placeholder:r}=e;const[s,i]=Object(n.useState)([]),[l,c]=Object(n.useState)({value:t.id,label:t.name}),[u,p]=Object(n.useState)(!1),b=Object(n.useRef)(!0);Object(n.useEffect)(()=>()=>{b.current=!1},[]);const m=Object(n.useCallback)(e=>{c(e),a(e)}),f=Object(n.useCallback)(Object(o.debounce)(async e=>{p(!0);const t=await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=`${ka}wp/v2/users?per_page=20${e?"&search="+encodeURIComponent(e):""}`;return Object(ia.sendRequest)(t,{method:"GET",headers:Pa})}(e);b.current&&(p(!1),i(t.map(e=>({value:e.id,label:e.name}))))},500),[]);return Object(n.createElement)(_a,{id:"yoast-configuration-user-select",value:l,label:Object(d.__)("Name","wordpress-seo"),onChange:m,onQueryChange:f,options:s,placeholder:r,isLoading:u})}function Ia(e){let{dispatch:t,imageUrl:a,fallbackImageUrl:r,person:s,canEditUser:i}=e;const o=Object(n.useCallback)(()=>{Object(ra.b)(e=>{t({type:"SET_PERSON_LOGO",payload:{...e}})})},[ra.b]),l=Object(n.useCallback)(()=>{t({type:"REMOVE_PERSON_LOGO"})}),u=Object(n.useCallback)(e=>{t({type:"SET_PERSON",payload:e}),c()({path:"yoast/v1/configuration/check_capability?user_id="+e.value}).then(e=>{t({type:"SET_CAN_EDIT_USER",payload:e.success})}).catch(e=>{console.error(e.message)})},[t]),p=Object(n.useMemo)(()=>Object(n.createInterpolateElement)(Object(d.sprintf)(// translators: %1$s is replaced by the selected user's name, and %2$s and %3$s are opening and closing anchor tags. i?Object(d.__)("You have selected the user %1$s as the person this site represents. This user profile information will now be used in search results. %2$sUpdate this profile to make sure the information is correct%3$s.","wordpress-seo"):Object(d.__)("You have selected the user %1$s as the person this site represents. This user profile information will now be used in search results. You're not allowed to update this user profile, so please ask this user or an admin to make sure the information is correct.","wordpress-seo"),`${s.name}`,"",""),{b:Object(n.createElement)("b",null),a:Object(n.createElement)("a",{id:"yoast-configuration-user-selector-user-link",href:window.wpseoScriptData.userEditUrl.replace("{user_id}",s.id),target:"_blank",rel:"noopener noreferrer"})}),[s.id,s.name,i]);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ta,{initialValue:s,onChangeCallback:u,name:"person_id",placeholder:Object(d.__)("Select a user","wordpress-seo")}),Object(n.createElement)(h.a,{id:"user-representation-alert",isVisible:0!==s.id,type:"info",className:"yst-mt-5"},p),Object(n.createElement)(na,{className:"yst-mt-6",id:"person-logo-input",url:a,fallbackUrl:r,onSelectImageClick:o,onRemoveImageClick:l,imageAltText:"",hasPreview:!0,label:Object(d.__)("Personal logo or avatar","wordpress-seo")}))}function Na(e){let{onOrganizationOrPersonChange:t,dispatch:a,state:r,siteRepresentationEmpty:s}=e;const[i,o]=Object(n.useState)("emptyChoice"===r.companyOrPerson?"yst-opacity-0":"yst-opacity-100"),l=Object(n.useCallback)(()=>{o("yst-opacity-100")}),c=Object(u.a)(Object(d.sprintf)( /* translators: %1$s expands to opening 'a' HTML tag, %2$s expands to closing 'a' HTML tag */ Object(d.__)("Completing this step will help Google to understand your website, and improve your chance of getting %1$srich results%2$s.","wordpress-seo"),"",""),"https://yoa.st/config-workout-rich-results","yoast-configuration-rich-text-link");return Object(n.createElement)(n.Fragment,null,window.wpseoFirstTimeConfigurationData.knowledgeGraphMessage&&Object(n.createElement)(h.b,{type:"info"},window.wpseoFirstTimeConfigurationData.knowledgeGraphMessage),Object(n.createElement)("p",{className:C()("yst-text-sm yst-whitespace-pre-line yst-mb-6",r.shouldForceCompany?"yst-mt-4":"yst-mt-0")},r.shouldForceCompany?c:Object(n.createElement)(n.Fragment,null,Object(d.__)("Help us out here! Is your site about an organization or a person? ","wordpress-seo"),c)),Object(n.createElement)(Zt,{id:"organization-person-select",htmlFor:"organization-person-select",name:"organization",label:Object(d.__)("Does your site represent an Organization or Person?","wordpress-seo"),value:r.shouldForceCompany?"company":r.companyOrPerson,onChange:t,choices:r.companyOrPersonOptions,disabled:!!r.shouldForceCompany}),!("company"===r.companyOrPerson&&r.companyName&&r.companyLogo||"company"===r.companyOrPerson&&!r.companyLogoFallback||"person"===r.companyOrPerson&&r.personLogo||"person"===r.companyOrPerson&&!r.personLogoFallback)&&Object(n.createElement)(h.b,{type:"info",className:"yst-mt-6"},Object(d.__)("We took the liberty of using your site title and logo for the organization name and logo. Feel free to change them below.","wordpress-seo")),Object(n.createElement)(M.a,{height:["company","person"].includes(r.companyOrPerson)?"auto":0,duration:400,easing:"linear",onAnimationEnd:l},Object(n.createElement)("div",{className:C()("yst-transition-opacity yst-duration-300 yst-mt-6",i)},"company"===r.companyOrPerson&&Object(n.createElement)(sa,{dispatch:a,imageUrl:r.companyLogo,fallbackImageUrl:r.companyLogoFallback,organizationName:r.companyName,fallbackOrganizationName:r.fallbackCompanyName,errorFields:r.errorFields}),"person"===r.companyOrPerson&&Object(n.createElement)(Ia,{dispatch:a,imageUrl:r.personLogo,fallbackImageUrl:r.personLogoFallback,person:{id:r.personId,name:r.personName},canEditUser:!!r.canEditUser,errorFields:r.errorFields}))),Object(n.createElement)(h.a,{id:"site-representation-empty-alert",isVisible:s,className:"yst-mt-6"},Object(u.a)(Object(d.sprintf)(Object(d.__)("Please be aware that you need to fill out all settings in this step to get the most value out of structured data. %1$sRead more about the importance of structured data%2$s.","wordpress-seo"),"",""),"https://yoa.st/config-workout-structured-data","yoast-configuration-structured-data-link")))}Ta.propTypes={initialValue:m.a.shape({id:m.a.number,name:m.a.string}),onChangeCallback:m.a.func,placeholder:m.a.string},Ta.defaultProps={initialValue:{id:0,name:""},onChangeCallback:o.noop,placeholder:Object(d.__)("Select a user","wordpress-seo")},Ia.propTypes={dispatch:m.a.func.isRequired,imageUrl:m.a.string,fallbackImageUrl:m.a.string,person:m.a.shape({id:m.a.number,name:m.a.string}),canEditUser:m.a.bool.isRequired},Ia.defaultProps={imageUrl:"",fallbackImageUrl:"",person:{id:0,name:""}},Na.propTypes={onOrganizationOrPersonChange:m.a.func.isRequired,dispatch:m.a.func.isRequired,state:m.a.object.isRequired,siteRepresentationEmpty:m.a.bool.isRequired};var Ma=a(41);const Fa=Object(d.__)("Oops! Something went wrong. Check your email address and try again.","wordpress-seo"),La=Object(d.__)("Please enter a valid email address.","wordpress-seo"),za=Object(d.__)("Thank you! Check your inbox for the confirmation email.","wordpress-seo");function Aa(e){let{gdprLink:t}=e;const[a,r]=Object(n.useState)(""),[s,i]=Object(n.useState)("waiting"),[o,l]=Object(n.useState)(""),c=Object(n.useCallback)((async function(){if(!Object(Ma.isEmail)(a))return i("error"),void l(La);i("loading"),(await async function(e){return(await fetch("https://my.yoast.com/api/Mailing-list/subscribe",{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({customerDetails:{firstName:"",email:e},list:"Yoast newsletter"})})).json()}(a)).error?(i("error"),l(Fa)):(i("success"),l(za))}),[a]),p=Object(n.useCallback)(e=>{i("waiting"),r(e.target.value)},[r]);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("h4",{className:"yst-text-gray-900 yst-text-base yst-leading-6 yst-font-normal"},// translators: %s is replaced by "Yoast" Object(d.sprintf)(Object(d.__)("%s newsletter","wordpress-seo"),"Yoast")),Object(n.createElement)("p",{className:"yst-my-2"},Object(d.sprintf)(// translators: %1$s expands to "Yoast", %2$s expands to "Yoast SEO" Object(d.__)("Sign up for the %1$s newsletter to receive best-practice tips on how to rank, stay up-to-date with the latest SEO news and get guidance on how to use %2$s to the fullest!","wordpress-seo"),"Yoast","Yoast SEO")),Object(n.createElement)("div",{className:"yst-flex yst-items-start yst-gap-2 yst-mt-4"},Object(n.createElement)(Xt.a,{label:Object(d.__)("Email address","wordpress-seo"),id:"newsletter-email",name:"newsletter email",value:a,onChange:p,className:"yst-grow",type:"email",placeholder:Object(d.__)("E.g. example@email.com","wordpress-seo"),feedback:{isVisible:["error","success"].includes(s),type:s,message:[o]}}),Object(n.createElement)("button",{type:"button",id:"newsletter-sign-up-button",className:"yst-button yst-button--primary yst-h-[45px] yst-items-center yst-mt-[27.5px] yst-shrink-0",onClick:c,disabled:"loading"===s},Object(d.__)("Sign up!","wordpress-seo"))),Object(n.createElement)("p",{className:"yst-text-gray-500 yst-text-xxs yst-leading-4"},Object(u.a)(Object(d.sprintf)(// translators: %1$s and %2$s are replaced by opening and closing anchor tags. Object(d.__)("Yoast respects your privacy. Read %1$sour privacy policy%2$s on how we handle your personal information.","wordpress-seo"),"",""),t,"yoast-configuration-gdpr-link")))}Aa.propTypes={gdprLink:m.a.string},Aa.defaultProps={gdprLink:""};const Da={variant:{default:"","inline-block":"yst-radio-group--inline-block"}},qa=e=>{let{id:t,name:a,value:r,label:s,className:i,...o}=e;return Object(n.createElement)("div",{className:C()("yst-radio",i)},Object(n.createElement)("input",E()({type:"radio",id:t,name:a,value:r,className:"yst-radio__input"},o)),s&&Object(n.createElement)(Ua,{htmlFor:t,className:"yst-radio__label"},s))};qa.propTypes={name:m.a.string.isRequired,id:m.a.string.isRequired,value:m.a.oneOfType([m.a.string,m.a.number]).isRequired,label:m.a.string.isRequired,variant:m.a.oneOf(Object.keys({default:"","inline-block":"yst-radio--inline-block"})),className:m.a.string},qa.defaultProps={variant:"default",className:""};const Ua=e=>{let{children:t,as:a,className:r,...s}=e;return Object(n.createElement)(a,E()({className:C()("yst-label",r)},s),t)};Ua.propTypes={children:m.a.node.isRequired,as:m.a.elementType,className:m.a.string},Ua.defaultProps={as:"label",className:""};const Ha=e=>{let{children:t,id:a,name:r,value:s,label:i,options:o,onChange:l,variant:c,className:d,...u}=e;const p=Object(n.useCallback)(e=>{let{target:t}=e;return t.checked&&l(t.value)},[l]);return Object(n.createElement)("fieldset",{className:C()("yst-radio-group",Da.variant[c],d)},i&&Object(n.createElement)(Ua,{as:"legend",className:"yst-radio-group__label"},i),t&&Object(n.createElement)("div",{className:"yst-radio-group__description"},t),Object(n.createElement)("div",{className:"yst-radio-group__options"},o.map((e,t)=>{const i=`${a}-${t}`;return Object(n.createElement)(qa,E()({key:i,id:i,name:r,value:e.value,label:e.label,variant:c,checked:s===e.value,onChange:p},u))})))};Ha.propTypes={children:m.a.node,id:m.a.string.isRequired,name:m.a.string.isRequired,value:m.a.oneOfType([m.a.string,m.a.number]).isRequired,options:m.a.arrayOf(m.a.shape({value:m.a.oneOfType([m.a.string,m.a.number]).isRequired,label:m.a.string.isRequired})).isRequired,onChange:m.a.func.isRequired,label:m.a.node,variant:m.a.oneOf(Object.keys(Da.variant)),className:m.a.string},Ha.defaultProps={children:null,label:null,variant:"default",className:""};var Va=Ha;const $a=Object(ia.makeOutboundLink)();function Ba(e){let{state:t,setTracking:a}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("h4",{className:"yst-text-gray-900 yst-text-base yst-leading-6 yst-font-normal"},// translators: %s is replaced by "Yoast SEO" Object(d.sprintf)(Object(d.__)("%s usage tracking","wordpress-seo"),"Yoast SEO")),!!t.isMainSite&&!t.isTrackingAllowedMultisite&&Object(n.createElement)(h.b,{type:"warning",className:"yst-mt-2"},Object(d.__)("This feature has been disabled by the network admin.","wordpress-seo")),!t.isMainSite&&Object(n.createElement)(h.b,{type:"warning",className:"yst-mt-2"},Object(d.__)("This feature has been disabled since subsites never send tracking data.","wordpress-seo")),Object(n.createElement)("p",{className:C()("yst-text-normal yst-mt-2 yst-mb-4",t.isMainSite&&t.isTrackingAllowedMultisite?"":"yst-opacity-50")},Object(d.__)("We need your help to improve Yoast SEO. Can we collect anonymous information about your website and how you use it?","wordpress-seo")),Object(n.createElement)(Va,{id:"yoast-configuration-tracking-radio-button",name:"yoast-configuration-tracking",value:t.tracking,onChange:a,className:t.isMainSite&&t.isTrackingAllowedMultisite?"":"yst-opacity-50",disabled:!t.isMainSite||!t.isTrackingAllowedMultisite,options:[{value:0,label:Object(d.__)("No, don’t track my site data","wordpress-seo")},{value:1,label:Object(d.__)("Yes, you can track my site data","wordpress-seo")}]}),!!t.isMainSite&&!!t.isTrackingAllowedMultisite&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)($a,{className:"yst-inline-block yst-mt-4",href:"https://yoa.st/config-workout-tracking"},Object(d.__)("What data will be tracked and for what reasons?","wordpress-seo")),Object(n.createElement)("p",{className:"yst-my-2"},Object(n.createElement)("i",null,Object(d.__)("Important: We will never sell this data. And of course, as always, we won't collect any personal data about you or your visitors.","wordpress-seo")))),!t.isPremium&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("br",null),Object(n.createElement)(Aa,{gdprLink:window.wpseoFirstTimeConfigurationData.shortlinks.gdpr})))}Ba.propTypes={state:m.a.object.isRequired,setTracking:m.a.func.isRequired};var Ga,Wa,Ya,Qa,Ka,Ja,Za,Xa,en,tn,an,nn,rn,sn,on,ln,cn,dn,un,pn,bn,mn,fn,hn,yn,gn,On,vn,jn,wn,En,xn,Sn,Cn,Rn,Pn,kn,Tn,In,Nn,Mn,Fn,Ln,zn,An,Dn,qn,Un,Hn,Vn,$n,Bn=a(6);function Gn(){return(Gn=Object.assign||function(e){for(var t=1;te("yoast-seo/settings").getIsPremium());return Object(n.createElement)("div",{className:"yst-flex yst-flex-row yst-justify-between yst-items-center yst--mt-4"},Object(n.createElement)("div",{className:"yst-mr-6"},e?Object(n.createElement)(n.Fragment,null,Object(n.createElement)("p",{className:"yst-text-sm yst-mb-6"},Object(d.__)("That’s it! By providing this information our indexables squad has been able to do a lot of optimization for your site already. Now, let's have a look at the SEO fitness of your site!","wordpress-seo")),Object(n.createElement)("button",{type:"button",onClick:Yn,className:"yst-button yst-button--primary"},Object(d.__)("Go to your SEO dashboard","wordpress-seo"))):function(){const e=Object(o.get)(window,"wpseoScriptData.webinarIntroSettingsUrl","https://yoa.st/webinar-intro-first-time-config");return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("p",{className:"yst-text-sm yst-mb-4"},Object(d.__)("That's it! By providing this information our Indexables squad has been able to do a lot of optimization for your site already.","wordpress-seo")),Object(n.createElement)("p",{className:"yst-text-sm yst-mb-6"},Object(d.__)("Want to optimize even further and get the most out of Yoast SEO? Make sure you don't miss our free weekly webinar!","wordpress-seo")),Object(n.createElement)("a",{href:e,target:"_blank",rel:"noreferrer",className:"yst-button yst-button--primary yst-text-white"},Object(d.__)("Register now!","wordpress-seo")),Object(n.createElement)("button",{type:"button",onClick:Yn,className:"yst-ml-4 yst-text-indigo-600 hover:yst-text-indigo-500"},Object(d.__)("Or visit your SEO dashboard","wordpress-seo")))}()),Object(n.createElement)(Wn,{className:"yst-shrink-0 yst-h-28"}))}window.wpseoScriptData=window.wpseoScriptData||{},window.wpseoScriptData.searchAppearance={...window.wpseoScriptData.searchAppearance,userEditUrl:"/wp-admin/user-edit.php?user_id={user_id}"};function Kn(e,t){let{companyOrPerson:a,companyName:n,companyLogo:r,companyOrPersonOptions:s,shouldForceCompany:i}=e;return("company"!==a||n||r||t("siteRepresentation"))&&!i||(a="company"),{...e,companyOrPerson:a,companyOrPersonOptions:s,personSocialProfiles:{},errorFields:[],stepErrors:{},editedSteps:[]}}function Jn(){const[e,t]=Object(n.useState)(wpseoFirstTimeConfigurationData.finishedSteps),a=Object(n.useCallback)(t=>e.includes(t),[e]),r=Object(n.useCallback)(e=>{t(t=>Object(o.uniq)([...t,e]))},[t]);Object(n.useEffect)(()=>{!async function(e){const t=await c()({path:"yoast/v1/configuration/save_configuration_state",method:"POST",data:{finishedSteps:e}});await t.json}(e)},[e]);const[s,i]=Object(n.useReducer)(p.a,{...Kn(window.wpseoFirstTimeConfigurationData,a)}),[l,b]=Object(n.useState)(()=>"0"===window.yoastIndexingData.amount?"already_done":"idle"),[m,f]=Object(n.useState)(!1),[h,y]=Object(n.useState)(!1),g=Object(n.useCallback)((e,t)=>{i({type:"SET_STEP_ERROR",payload:{step:e,message:t}})},[]),O=Object(n.useCallback)(e=>{i({type:"REMOVE_STEP_ERROR",payload:e})},[]);Object(n.useEffect)(()=>{if("completed"===l){const e=document.getElementById("wpseo-reindex");if(e){const t=document.querySelectorAll(".yoast-issue-counter, #toplevel_page_wpseo_dashboard .update-plugins");if(t.length>0&&"0"!==t[0].firstChild.textContent){const e=t[0].firstChild.textContent,a=(parseInt(e,10)-1).toString();t.forEach(t=>{t.classList.replace("count-"+e,"count-"+a)||"0"!==a?(t.firstChild.textContent=t.firstChild.textContent.replace(e,a),t.lastChild.textContent=t.lastChild.textContent.replace(e,a)):t.style.display="none"})}e.remove()}window.yoastIndexingData.amount="0"}},[l]);const w=a("siteRepresentation"),E=a("socialProfiles"),S=a("personalPreferences"),C=Object(n.useCallback)(e=>{i({type:"SET_TRACKING",payload:parseInt(e,10)})}),P=Object(n.useCallback)(e=>{i({type:"SET_ERROR_FIELDS",payload:e})}),k="company"===s.companyOrPerson&&(!s.companyName||!s.companyLogo&&!s.companyLogoFallback),I="person"===s.companyOrPerson&&(!s.personId||!s.personLogo&&!s.personLogoFallback),N=Object(n.useCallback)(e=>i({type:"SET_COMPANY_OR_PERSON",payload:e}),[i]),M=[w,E,S].every(Boolean),[F,L]=Object(n.useState)(a("siteRepresentation")),z=[F,a("siteRepresentation"),a("socialProfiles"),a("personalPreferences"),M],[A,D]=Object(n.useState)(Object(x.a)(z)),[q,U]=Object(n.useState)(M),[H,V]=Object(n.useState)(!1),[$,B]=Object(n.useState)(q&&!H);function G(){return B(!1),V(!0),!0}Object(n.useEffect)(()=>{M&&U(!0)},[M]);const W=Object(n.useRef)(w&&E&&S);Object(n.useEffect)(()=>{if(M&&!W.current){const e=document.getElementById("yoast-first-time-configuration-notice");e&&e.remove()}},[M,W]),Object(n.useEffect)(()=>{B(q&&!H)},[q,H]),Object(n.useEffect)(()=>{function e(e){"Enter"===e.key&&"first-time-configuration-tab"===document.querySelector(".nav-tab.nav-tab-active").id&&"INPUT"===e.target.tagName&&e.preventDefault()}return addEventListener("keydown",e),()=>removeEventListener("keydown",e)},[]),Object(n.useEffect)(()=>{s.editedSteps.includes(A+1)||"in_progress"===l?window.isStepBeingEdited=!0:window.isStepBeingEdited=!1},[s.editedSteps,l,A]);const Y=Object(n.useCallback)(e=>{(s.editedSteps.includes(A+1)||"in_progress"===l)&&-1!==location.href.indexOf("page=wpseo_dashboard#top#first-time-configuration")&&(e.preventDefault(),e.returnValue="")},[s.editedSteps,l,A]);return Object(n.useEffect)(()=>(window.addEventListener("beforeunload",Y),()=>{window.removeEventListener("beforeunload",Y)}),[Y]),Object(n.createElement)("div",{id:"yoast-configuration",className:"yst-card yst-text-gray-500"},Object(n.createElement)("h2",{id:"yoast-configuration-title",className:"yst-text-lg yst-text-primary-500 yst-font-medium"},Object(d.__)("Tell us about your site, so we can get your site ranked!","wordpress-seo")),Object(n.createElement)("p",{className:"yst-py-2"},Object(u.a)(Object(d.sprintf)(// translators: %1$s and %3$s are replaced by opening and closing anchor tags. %2$s is replaced by "Yoast SEO" Object(d.__)("Put the %1$s%2$s indexables squad%3$s to work! Make Google understand your site.","wordpress-seo"),"","Yoast SEO",""),window.wpseoFirstTimeConfigurationData.shortlinks.configIndexables,"yoast-configuration-guide-link")),Object(n.createElement)("p",{className:"yst-mb-6"},Object(d.__)("The Yoast indexables squad can't wait to get your site in tip-top shape for the search engines. Help us and take these 5 steps in order to put our Yoast indexables to work!","wordpress-seo")),Object(n.createElement)("hr",{id:"configuration-hr-top"}),Object(n.createElement)("div",{className:"yst-mt-8"},Object(n.createElement)(j.b,{setActiveStepIndex:D,activeStepIndex:A,isStepperFinished:M},Object(n.createElement)(j.a,null,Object(n.createElement)(j.a.Header,{name:Object(d.__)("SEO data optimization","wordpress-seo"),isFinished:F},Object(n.createElement)(_,{beforeGo:G,isVisible:$,additionalClasses:"yst-ml-auto"},Object(d.__)("Edit","wordpress-seo"))),Object(n.createElement)(j.a.Content,null,Object(n.createElement)(We,{setIndexingState:b,indexingState:l,showRunIndexationAlert:h,isStepperFinished:M}),Object(n.createElement)(R,{additionalClasses:"yst-mt-12",beforeGo:function(){return h||"idle"!==l?(L(!0),V(!1),!0):(y(!0),!1)},destination:q?"last":1},Object(d.__)("Continue","wordpress-seo")))),Object(n.createElement)(j.a,null,Object(n.createElement)(j.a.Header,{name:Object(d.__)("Site representation","wordpress-seo"),isFinished:w},Object(n.createElement)(_,{beforeGo:G,isVisible:$,additionalClasses:"yst-ml-auto"},Object(d.__)("Edit","wordpress-seo"))),Object(n.createElement)(j.a.Content,null,Object(n.createElement)(Na,{onOrganizationOrPersonChange:N,dispatch:i,state:s,siteRepresentationEmpty:m}),Object(n.createElement)(j.a.Error,{id:"yoast-site-representation-step-error",message:s.stepErrors.siteRepresentation||""}),Object(n.createElement)(T,{stepperFinishedOnce:q,saveFunction:function(){return!m&&k||!m&&I?(f(!0),!1):m||"emptyChoice"!==s.companyOrPerson?(f("emptyChoice"===s.companyOrPerson||k||I),async function(e){const t={company_or_person:"emptyChoice"===e.companyOrPerson?"company":e.companyOrPerson,company_name:e.companyName,company_logo:e.companyLogo,company_logo_id:e.companyLogoId?e.companyLogoId:0,person_logo:e.personLogo,person_logo_id:e.personLogoId?e.personLogoId:0,company_or_person_user_id:e.personId},a=await c()({path:"yoast/v1/configuration/site_representation",method:"POST",data:t});return await a.json}(s).then(()=>(P([]),O("siteRepresentation"),r("siteRepresentation"),!0)).catch(e=>e.failures?(P(e.failures),!1):(e.message&&g("siteRepresentation",e.message),!1))):(f(!0),!1)},setEditState:V}))),Object(n.createElement)(j.a,null,Object(n.createElement)(j.a.Header,{name:Object(d.__)("Social profiles","wordpress-seo"),isFinished:E},Object(n.createElement)(_,{beforeGo:G,isVisible:$,additionalClasses:"yst-ml-auto"},Object(d.__)("Edit","wordpress-seo"))),Object(n.createElement)(j.a.Content,null,Object(n.createElement)(v,{state:s,dispatch:i,setErrorFields:P}),Object(n.createElement)(j.a.Error,{id:"yoast-social-profiles-step-error",message:s.stepErrors.socialProfiles||""}),Object(n.createElement)(T,{stepperFinishedOnce:q,saveFunction:function(){return"person"===s.companyOrPerson?!s.canEditUser||async function(e){const t={user_id:e.personId,facebook:e.personSocialProfiles.facebook,instagram:e.personSocialProfiles.instagram,linkedin:e.personSocialProfiles.linkedin,myspace:e.personSocialProfiles.myspace,pinterest:e.personSocialProfiles.pinterest,soundcloud:e.personSocialProfiles.soundcloud,tumblr:e.personSocialProfiles.tumblr,twitter:e.personSocialProfiles.twitter,youtube:e.personSocialProfiles.youtube,wikipedia:e.personSocialProfiles.wikipedia},a=await c()({path:"yoast/v1/configuration/person_social_profiles",method:"POST",data:t});return await a.json}(s).then(e=>!1===e.success?(P(e.failures),Promise.reject("There were errors saving social profiles")):e).then(()=>{P([]),O("socialProfiles"),r("socialProfiles")}).then(()=>!0).catch(e=>(e.failures&&P(e.failures),e.message&&g("socialProfiles",e.message),!1)):async function(e){const t={facebook_site:e.socialProfiles.facebookUrl,twitter_site:e.socialProfiles.twitterUsername,other_social_urls:e.socialProfiles.otherSocialUrls},a=await c()({path:"yoast/v1/configuration/social_profiles",method:"POST",data:t});return await a.json}(s).then(e=>!1===e.success?(P(e.failures),Promise.reject("There were errors saving social profiles")):e).then(()=>{P([]),O("socialProfiles"),r("socialProfiles")}).then(()=>!0).catch(e=>(e.failures&&P(e.failures),e.message&&g("socialProfiles",e.message),!1))},setEditState:V}))),Object(n.createElement)(j.a,null,Object(n.createElement)(j.a.Header,{name:Object(d.__)("Personal preferences","wordpress-seo"),isFinished:S},Object(n.createElement)(_,{beforeGo:G,isVisible:$,additionalClasses:"yst-ml-auto"},Object(d.__)("Edit","wordpress-seo"))),Object(n.createElement)(j.a.Content,null,Object(n.createElement)(Ba,{state:s,setTracking:C}),Object(n.createElement)(j.a.Error,{id:"yoast-personal-preferences-step-error",message:s.stepErrors.personalPreferences||""}),Object(n.createElement)(T,{stepperFinishedOnce:q,saveFunction:function(){return async function(e){if(0!==e.tracking&&1!==e.tracking)throw"Value not set!";const t={tracking:e.tracking},a=await c()({path:"yoast/v1/configuration/enable_tracking",method:"POST",data:t});return await a.json}(s).then(()=>{1==!!s.tracking?document.getElementById("tracking-on").checked=!0:document.getElementById("tracking-off").checked=!0}).then(()=>r("personalPreferences")).then(()=>(O("personalPreferences"),!0)).catch(e=>(e.message&&g("personalPreferences",e.message),!1))},setEditState:V}))),Object(n.createElement)(j.a,null,Object(n.createElement)(j.a.Header,{name:Object(d.__)("Finish configuration","wordpress-seo"),isFinished:M}),Object(n.createElement)(j.a.Content,null,Object(n.createElement)(Qn,null))))))}s()(()=>{const e={isRtl:Boolean(Object(o.get)(window,"wpseoScriptData.metabox.isRtl",!1))},t=document.getElementById("wpseo-first-time-configuration");t&&Object(n.render)(Object(n.createElement)(i.Root,{context:e},Object(n.createElement)(Jn,null)),t)})},271:function(e,t,a){"use strict";a.d(t,"a",(function(){return F}));var n=a(3),r=a.n(n),s=a(24),i=a(50),o=a(29),l=a(93),c=a(31);function d(){let e=Object(n.useRef)(!1);return Object(c.a)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var u=a(57),p=a(129),b=a(82),m=a(73);function f(e,...t){e&&t.length>0&&e.classList.add(...t)}function h(e,...t){e&&t.length>0&&e.classList.remove(...t)}var y,g=((y=g||{}).Ended="ended",y.Cancelled="cancelled",y);var O=a(121),v=a(30);function j(e=""){return e.split(" ").filter(e=>e.trim().length>1)}let w=Object(n.createContext)(null);w.displayName="TransitionContext";var E,x=((E=x||{}).Visible="visible",E.Hidden="hidden",E);let S=Object(n.createContext)(null);function C(e){return"children"in e?C(e.children):e.current.filter(({state:e})=>"visible"===e).length>0}function R(e){let t=Object(u.a)(e),a=Object(n.useRef)([]),r=d(),i=Object(v.a)((e,n=s.b.Hidden)=>{let i=a.current.findIndex(({id:t})=>t===e);-1!==i&&(Object(o.a)(n,{[s.b.Unmount](){a.current.splice(i,1)},[s.b.Hidden](){a.current[i].state="hidden"}}),function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}(()=>{var e;!C(a)&&r.current&&(null==(e=t.current)||e.call(t))}))}),l=Object(v.a)(e=>{let t=a.current.find(({id:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):a.current.push({id:e,state:"visible"}),()=>i(e,s.b.Unmount)});return Object(n.useMemo)(()=>({children:a,register:l,unregister:i}),[l,i,a])}function _(){}S.displayName="NestingContext";let P=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function k(e){var t;let a={};for(let n of P)a[n]=null!=(t=e[n])?t:_;return a}let T=s.a.RenderStrategy,I=Object(s.d)((function(e,t){let{beforeEnter:a,afterEnter:y,beforeLeave:E,afterLeave:x,enter:_,enterFrom:P,enterTo:I,entered:N,leave:M,leaveFrom:F,leaveTo:L,...z}=e,A=Object(n.useRef)(null),D=Object(b.a)(A,t),[q,U]=Object(n.useState)("visible"),H=z.unmount?s.b.Unmount:s.b.Hidden,{show:V,appear:$,initial:B}=function(){let e=Object(n.useContext)(w);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),{register:G,unregister:W}=function(){let e=Object(n.useContext)(S);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),Y=Object(n.useRef)(null),Q=Object(l.a)();Object(n.useEffect)(()=>{if(Q)return G(Q)},[G,Q]),Object(n.useEffect)(()=>{if(H===s.b.Hidden&&Q){if(V&&"visible"!==q)return void U("visible");Object(o.a)(q,{hidden:()=>W(Q),visible:()=>G(Q)})}},[q,Q,G,W,V,H]);let K=Object(u.a)({enter:j(_),enterFrom:j(P),enterTo:j(I),entered:j(N),leave:j(M),leaveFrom:j(F),leaveTo:j(L)}),J=function(e){let t=Object(n.useRef)(k(e));return Object(n.useEffect)(()=>{t.current=k(e)},[e]),t}({beforeEnter:a,afterEnter:y,beforeLeave:E,afterLeave:x}),Z=Object(p.a)();Object(n.useEffect)(()=>{if(Z&&"visible"===q&&null===A.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[A,q,Z]);let X=B&&!$,ee=!Z||X||Y.current===V?"idle":V?"enter":"leave",te=Object(n.useRef)(!1),ae=R(()=>{te.current||(U("hidden"),W(Q))});(function({container:e,direction:t,classes:a,events:n,onStart:r,onStop:s}){let i=d(),l=Object(O.a)(),p=Object(u.a)(t),b=Object(v.a)(()=>Object(o.a)(p.current,{enter:()=>n.current.beforeEnter(),leave:()=>n.current.beforeLeave(),idle:()=>{}})),y=Object(v.a)(()=>Object(o.a)(p.current,{enter:()=>n.current.afterEnter(),leave:()=>n.current.afterLeave(),idle:()=>{}}));Object(c.a)(()=>{let t=Object(m.a)();l.add(t.dispose);let n=e.current;if(n&&"idle"!==p.current&&i.current)return t.dispose(),b(),r.current(p.current),t.add(function(e,t,a,n){let r=a?"enter":"leave",s=Object(m.a)(),i=void 0!==n?function(e){let t={called:!1};return(...a)=>{if(!t.called)return t.called=!0,e(...a)}}(n):()=>{},l=Object(o.a)(r,{enter:()=>t.enter,leave:()=>t.leave}),c=Object(o.a)(r,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),d=Object(o.a)(r,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return h(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),f(e,...l,...d),s.nextFrame(()=>{h(e,...d),f(e,...c),function(e,t){let a=Object(m.a)();if(!e)return a.dispose;let{transitionDuration:n,transitionDelay:r}=getComputedStyle(e),[s,i]=[n,r].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(s+i!==0){let n=[];n.push(a.addEventListener(e,"transitionrun",r=>{r.target===r.currentTarget&&(n.splice(0).forEach(e=>e()),n.push(a.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t("ended"),n.splice(0).forEach(e=>e()))}),a.addEventListener(e,"transitioncancel",e=>{e.target===e.currentTarget&&(t("cancelled"),n.splice(0).forEach(e=>e()))})))}))}else t("ended");a.add(()=>t("cancelled")),a.dispose}(e,a=>("ended"===a&&(h(e,...l),f(e,...t.entered)),i(a)))}),s.dispose}(n,a.current,"enter"===p.current,e=>{t.dispose(),Object(o.a)(e,{[g.Ended](){y(),s.current(p.current)},[g.Cancelled]:()=>{}})})),t.dispose},[t])})({container:A,classes:K,events:J,direction:ee,onStart:Object(u.a)(()=>{te.current=!0}),onStop:Object(u.a)(e=>{te.current=!1,"leave"===e&&!C(ae)&&(U("hidden"),W(Q))})}),Object(n.useEffect)(()=>{!X||(H===s.b.Hidden?Y.current=null:Y.current=V)},[V,X,q]);let ne=z,re={ref:D};return r.a.createElement(S.Provider,{value:ae},r.a.createElement(i.a,{value:Object(o.a)(q,{visible:i.b.Open,hidden:i.b.Closed})},Object(s.e)({ourProps:re,theirProps:ne,defaultTag:"div",features:T,visible:"visible"===q,name:"Transition.Child"})))})),N=Object(s.d)((function(e,t){let{show:a,appear:l=!1,unmount:d,...u}=e,m=Object(n.useRef)(null),f=Object(b.a)(m,t);Object(p.a)();let h=Object(i.c)();if(void 0===a&&null!==h&&(a=Object(o.a)(h,{[i.b.Open]:!0,[i.b.Closed]:!1})),![!0,!1].includes(a))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[y,g]=Object(n.useState)(a?"visible":"hidden"),O=R(()=>{g("hidden")}),[v,j]=Object(n.useState)(!0),E=Object(n.useRef)([a]);Object(c.a)(()=>{!1!==v&&E.current[E.current.length-1]!==a&&(E.current.push(a),j(!1))},[E,a]);let x=Object(n.useMemo)(()=>({show:a,appear:l,initial:v}),[a,l,v]);Object(n.useEffect)(()=>{if(a)g("visible");else if(C(O)){let e=m.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&g("hidden")}else g("hidden")},[a,O]);let _={unmount:d};return r.a.createElement(S.Provider,{value:O},r.a.createElement(w.Provider,{value:x},Object(s.e)({ourProps:{..._,as:n.Fragment,children:r.a.createElement(I,{ref:f,..._,...u})},theirProps:{},defaultTag:n.Fragment,features:T,visible:"visible"===y,name:"Transition"})))})),M=Object(s.d)((function(e,t){let a=null!==Object(n.useContext)(w),s=null!==Object(i.c)();return r.a.createElement(r.a.Fragment,null,!a&&s?r.a.createElement(N,{ref:t,...e}):r.a.createElement(I,{ref:t,...e}))})),F=Object.assign(N,{Child:M,Root:N})},28:function(e,t){e.exports=window.yoast.replacementVariableEditor},29:function(e,t,a){"use strict";function n(e,t,...a){if(e in t){let n=t[e];return"function"==typeof n?n(...a):n}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,n),r}a.d(t,"a",(function(){return n}))},3:function(e,t){e.exports=window.React},30:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(3),r=a.n(n),s=a(57);let i=function(e){let t=Object(s.a)(e);return r.a.useCallback((...e)=>t.current(...e),[t])}},31:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(3);let r="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},4:function(e,t){e.exports=window.lodash},40:function(e,t,a){"use strict";a.d(t,"a",(function(){return ue})),a.d(t,"b",(function(){return pe})),a.d(t,"c",(function(){return be})),a.d(t,"d",(function(){return me}));var n=a(4),r=a(9),s=a(0),i=a(3),o=a.n(i),l=a(1),c=a.n(l),d=a(8),u=a.n(d);const p=u.a.p` color: #606770; flex-shrink: 0; font-size: 12px; line-height: 16px; overflow: hidden; padding: 0; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; margin: 0; position: ${e=>"landscape"===e.mode?"relative":"static"}; `,b=e=>{const{siteUrl:t}=e;return Object(s.createElement)(i.Fragment,null,Object(s.createElement)("span",{className:"screen-reader-text"},t),Object(s.createElement)(p,{"aria-hidden":"true"},Object(s.createElement)("span",null,t)))};b.propTypes={siteUrl:c.a.string.isRequired};var m=b,f=a(2),h=a(15);const y=u.a.img` && { max-width: ${e=>e.width}px; height: ${e=>e.height}px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: none; } `,g=u.a.img` &&{ height: 100%; position: absolute; width: 100%; object-fit: cover; } `,O=u.a.div` padding-bottom: ${e=>e.aspectRatio}%; `,v=e=>{const{imageProps:t,width:a,height:n,imageMode:r}=e;return"landscape"===r?Object(s.createElement)(O,{aspectRatio:t.aspectRatio},Object(s.createElement)(g,{src:t.src,alt:t.alt})):Object(s.createElement)(y,{src:t.src,alt:t.alt,width:a,height:n,imageProperties:t})};v.propTypes={imageProps:c.a.shape({src:c.a.string.isRequired,alt:c.a.string.isRequired,aspectRatio:c.a.number.isRequired}).isRequired,width:c.a.number.isRequired,height:c.a.number.isRequired,imageMode:c.a.string},v.defaultProps={imageMode:"landscape"};const j={squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},w={squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}};function E(e){const{largeThreshold:t}=w;return e.height>e.width?"portrait":e.width{const n=new Image;n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=a,n.src=e})}function C(e,t,a){return"landscape"===a?{widthRatio:t.width/e.landscapeWidth,heightRatio:t.height/e.landscapeHeight}:"portrait"===a?{widthRatio:t.width/e.portraitWidth,heightRatio:t.height/e.portraitHeight}:{widthRatio:t.width/e.squareWidth,heightRatio:t.height/e.squareHeight}}function R(e,t){return t.widthRatio<=t.heightRatio?{width:Math.round(e.width/t.widthRatio),height:Math.round(e.height/t.widthRatio)}:{width:Math.round(e.width/t.heightRatio),height:Math.round(e.height/t.heightRatio)}}function _(e,t,a){return"square"===a&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:R(t,C(e,t,a))}async function P(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=await S(e);let r=a?"landscape":"square";"Facebook"===t&&(r=E(n));const s=x(t),i=_(s,n,r);return{mode:r,height:i.height,width:i.width}}async function k(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{return{imageProperties:await P(e,t,a),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}const T=u.a.div` position: relative; ${e=>"landscape"===e.mode?"max-width: "+e.dimensions.width:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`}; overflow: hidden; background-color: ${h.colors.$color_white}; `,I=u.a.div` box-sizing: border-box; max-width: ${w.landscapeWidth}px; height: ${w.landscapeHeight}px; background-color: ${h.colors.$color_grey}; border-style: dashed; border-width: 1px; // We're not using standard colors to increase contrast for accessibility. color: #006DAC; // We're not using standard colors to increase contrast for accessibility. background-color: #f1f1f1; display: flex; justify-content: center; align-items: center; text-decoration: underline; font-size: 14px; cursor: pointer; `;class N extends i.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 k(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:w.squareHeight+"px",width:w.squareWidth+"px"};case"portrait":return{height:w.portraitHeight+"px",width:w.portraitWidth+"px"};case"landscape":return{height:w.landscapeHeight+"px",width:w.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return Object(s.createElement)(I,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},Object(f.__)("Select image","wordpress-seo"));const a=this.retrieveContainerDimensions(e.mode);return Object(s.createElement)(T,{mode:e.mode,dimensions:a,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick},Object(s.createElement)(v,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:w.aspectRatio},width:e.width,height:e.height,imageMode:e.mode}))}}N.propTypes={src:c.a.string,alt:c.a.string,onImageLoaded:c.a.func,onImageClick:c.a.func,onMouseEnter:c.a.func,onMouseLeave:c.a.func},N.defaultProps={src:"",alt:"",onImageLoaded:n.noop,onImageClick:n.noop,onMouseEnter:n.noop,onMouseLeave:n.noop};var M=N,F=u.a.span` line-height: ${20}px; min-height : ${20}px; color: #1d2129; font-weight: 600; overflow: hidden; font-size: 16px; margin: 3px 0 0; letter-spacing: normal; white-space: normal; flex-shrink: 0; cursor: pointer; display: -webkit-box; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; `,L=u.a.p` line-height: ${16}px; min-height : ${16}px; color: #606770; font-size: 14px; padding: 0; text-overflow: ellipsis; margin: 3px 0 0 0; display: -webkit-box; cursor: pointer; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; @media all and ( max-width: ${e=>e.maxWidth} ) { display: none; } `;const z=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},A=u.a.div` box-sizing: border-box; display: flex; flex-direction: ${e=>"landscape"===e.mode?"column":"row"}; background-color: #f2f3f5; max-width: 527px; `,D=u.a.div` box-sizing: border-box; background-color: #f2f3f5; margin: 0; padding: 10px 12px; position: relative; border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""}; display: flex; flex-direction: column; flex-grow: 1; justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"}; font-size: 12px; overflow: hidden; `;class q extends i.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=o.a.createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:t}=this.state,a="landscape"===e?2:5;a!==t&&this.setState({maxLineCount:a})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:t,imageMode:a}=this.state,n=this.getTitleLineCount();let r=t-n;"portrait"===a&&(r=5===n?0:4),r!==e&&this.setState({descriptionLineCount:r})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:t,descriptionLineCount:a}=this.state;return Object(s.createElement)(A,{id:"facebookPreview",mode:e},Object(s.createElement)(M,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),Object(s.createElement)(D,{mode:e},Object(s.createElement)(m,{siteUrl:this.props.siteUrl,mode:e}),Object(s.createElement)(F,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t},this.props.title),a>0&&Object(s.createElement)(L,{maxWidth:z(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:a},this.props.description)))}}q.propTypes={siteUrl:c.a.string.isRequired,title:c.a.string.isRequired,description:c.a.string,imageUrl:c.a.string,imageFallbackUrl:c.a.string,alt:c.a.string,onSelect:c.a.func,onImageClick:c.a.func,onMouseHover:c.a.func},q.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};var U=q;const H=u.a.div` text-transform: lowercase; color: rgb(83, 100, 113); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; fill: currentcolor; display: flex; flex-direction: row; align-items: flex-end; `,V=e=>Object(s.createElement)(H,null,Object(s.createElement)("span",null,e.siteUrl));V.propTypes={siteUrl:c.a.string.isRequired};var $=V;const B=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e?`\n\t\t\tmax-width: ${j.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: ${j.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`},G=u.a.div` position: relative; box-sizing: content-box; overflow: hidden; background-color: #e1e8ed; flex-shrink: 0; ${e=>B(e.isLarge)} `,W=u.a.div` display: flex; justify-content: center; align-items: center; box-sizing: border-box; max-width: 100%; margin: 0; padding: 1em; text-align: center; font-size: 1rem; ${e=>B(e.isLarge,!1)} `,Y=u()(W)` ${e=>e.isLarge&&`height: ${j.landscapeHeight}px;`} border-top-left-radius: 14px; ${e=>e.isLarge?"border-top-right-radius":"border-bottom-left-radius"}: 14px; border-style: dashed; border-width: 1px; // We're not using standard colors to increase contrast for accessibility. color: #006DAC; // We're not using standard colors to increase contrast for accessibility. background-color: #f1f1f1; text-decoration: underline; font-size: 14px; cursor: pointer; `;class Q extends o.a.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 k(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?Object(s.createElement)(Y,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},Object(f.__)("Select image","wordpress-seo")):Object(s.createElement)(G,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},Object(s.createElement)(v,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:j.aspectRatio},width:t.width,height:t.height,imageMode:t.mode}))}}Q.propTypes={isLarge:c.a.bool.isRequired,src:c.a.string,alt:c.a.string,onImageClick:c.a.func,onMouseEnter:c.a.func,onMouseLeave:c.a.func},Q.defaultProps={src:"",alt:"",onMouseEnter:n.noop,onImageClick:n.noop,onMouseLeave:n.noop};const K=u.a.div` display: flex; flex-direction: column; padding: 12px; justify-content: center; margin: 0; box-sizing: border-box; flex: auto; min-width: 0px; gap:2px; > * { line-height:20px; min-height:20px; font-size:15px; } `,J=e=>Object(s.createElement)(K,null,e.children);J.propTypes={children:c.a.array.isRequired};var Z=J,X=u.a.p` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(15, 20, 25); cursor: pointer; `,ee=u.a.p` max-height: 55px; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(83, 100, 113); display: -webkit-box; cursor: pointer; -webkit-line-clamp: 2; -webkit-box-orient: vertical; @media all and ( max-width: ${j.landscapeWidth}px ) { display: none; } `;const te=u.a.div` font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; line-height: 20px; max-width: 507px; border: 1px solid #E1E8ED; box-sizing: border-box; border-radius: 14px; color: #292F33; background: #FFFFFF; text-overflow: ellipsis; display: flex; &:hover { background: #f5f8fa; border: 1px solid rgba(136,153,166,.5); } `,ae=u()(te)` flex-direction: column; max-height: 370px; `,ne=u()(te)` flex-direction: row; height: 125px; `;class re extends i.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:e,imageUrl:t,imageFallbackUrl:a,alt:n,title:r,description:i,siteUrl:o}=this.props,l=e?ae:ne;return Object(s.createElement)(l,{id:"twitterPreview"},Object(s.createElement)(Q,{src:t||a,alt:n,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),Object(s.createElement)(Z,null,Object(s.createElement)($,{siteUrl:o}),Object(s.createElement)(X,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle},r),Object(s.createElement)(ee,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription},i)))}}re.propTypes={siteUrl:c.a.string.isRequired,title:c.a.string.isRequired,description:c.a.string,isLarge:c.a.bool,imageUrl:c.a.string,imageFallbackUrl:c.a.string,alt:c.a.string,onSelect:c.a.func,onImageClick:c.a.func,onMouseHover:c.a.func},re.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};var se=re,ie=a(7),oe=a(65),le=a(28);class ce extends i.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Facebook"===e.socialMediumName?U:se,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:a,onRemoveImageClick:n,socialMediumName:r,imageWarnings:i,siteUrl:l,description:c,descriptionInputPlaceholder:d,descriptionPreviewFallback:u,imageUrl:p,imageFallbackUrl:b,alt:m,title:f,titleInputPlaceholder:h,titlePreviewFallback:y,replacementVariables:g,recommendedReplacementVariables:O,applyReplacementVariables:v,onReplacementVariableSearchChange:j,isPremium:w,isLarge:E,socialPreviewLabel:x,idSuffix:S,activeMetaTabId:C}=this.props,R=v({title:f||y,description:c||u});return Object(s.createElement)(o.a.Fragment,null,x&&Object(s.createElement)(ie.SimulatedLabel,null,x),Object(s.createElement)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:a,siteUrl:l,title:R.title,description:R.description,imageUrl:p,imageFallbackUrl:b,alt:m,isLarge:E,activeMetaTabId:C}),Object(s.createElement)(oe.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:r,title:f,titleInputPlaceholder:h,onRemoveImageClick:n,imageSelected:!!p,imageUrl:p,onTitleChange:t,onSelectImageClick:a,description:c,descriptionInputPlaceholder:d,imageWarnings:i,replacementVariables:g,recommendedReplacementVariables:O,onReplacementVariableSearchChange:j,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:w,setEditorRef:this.setEditorRef,idSuffix:S}))}}ce.propTypes={title:c.a.string.isRequired,onTitleChange:c.a.func.isRequired,description:c.a.string.isRequired,onDescriptionChange:c.a.func.isRequired,imageUrl:c.a.string.isRequired,imageFallbackUrl:c.a.string.isRequired,onSelectImageClick:c.a.func.isRequired,onRemoveImageClick:c.a.func.isRequired,socialMediumName:c.a.string.isRequired,alt:c.a.string,isPremium:c.a.bool,imageWarnings:c.a.array,isLarge:c.a.bool,siteUrl:c.a.string,descriptionInputPlaceholder:c.a.string,titleInputPlaceholder:c.a.string,descriptionPreviewFallback:c.a.string,titlePreviewFallback:c.a.string,replacementVariables:le.replacementVariablesShape,recommendedReplacementVariables:le.recommendedReplacementVariablesShape,applyReplacementVariables:c.a.func,onReplacementVariableSearchChange:c.a.func,socialPreviewLabel:c.a.string,idSuffix:c.a.string,activeMetaTabId:c.a.string},ce.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const de=e=>({type:e.subtype,width:e.width,height:e.height,url:e.url,id:e.id,sizes:e.sizes,alt:e.alt||e.title||e.name});function ue(e){return new Promise((t,a)=>{window.wp.media.attachment||a(),window.wp.media.attachment(e).fetch().then(e=>{t(de(e))}).catch(()=>a())})}function pe(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const a=t.state().get("selection").first();e(de(a.attributes))}),t})(e).open()}const be=e=>{const{width:t,height:a}=e,n=E({width:t,height:a}),s=w[n+"Width"],i=w[n+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=i);return{url:o?o.url:e.url,id:e.id,warnings:Object(r.validateFacebookImage)(e),alt:e.alt||""}},me=e=>{const t="summary"!==Object(n.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",a=j[t+"Width"],s=j[t+"Height"],i=Object.values(e.sizes).find(e=>e.width>=a&&e.height>=s);return{url:i?i.url:e.url,id:e.id,warnings:Object(r.validateTwitterImage)(e),alt:e.alt||""}}},41:function(e,t){e.exports=window.wp.url},48:function(e,t,a){"use strict";a.d(t,"c",(function(){return x})),a.d(t,"a",(function(){return R})),a.d(t,"b",(function(){return k}));var n=a(11),r=a.n(n),s=a(0),i=a(2),o=a(114),l=a.n(o),c=a(1),d=a.n(c),u=a(72),p=a(164);function b(e,t,a){return t&&!a?"yst-text-primary-500":e?"yst-text-gray-900":"yst-text-gray-500"}function m(e){let{name:t,description:a,isFinished:n,children:r}=e;const{stepIndex:i,activeStepIndex:o,lastStepIndex:l}=x(),c=o===i,d=l===i,[m,f]=Object(s.useState)(b(n,c,d));return Object(s.useEffect)(()=>{if(c){const e=b(n,c,d),t=setTimeout(()=>f(e),u.c.delayBeforeOpening);return()=>clearTimeout(t)}const e=b(n,c,d);f(e)},[o,n,d,b]),Object(s.createElement)("div",{className:"yst-relative yst-flex yst-items-center yst-group","aria-current":c?"step":null},Object(s.createElement)("span",{className:"yst-flex yst-items-center","aria-hidden":c?"true":null},Object(s.createElement)(p.c,{activationDelay:u.c.delayBeforeOpening,deactivationDelay:0,isFinished:n})),Object(s.createElement)("span",{className:"yst-ml-4 yst-min-w-0 yst-flex yst-flex-col"},Object(s.createElement)("span",{className:"yst-transition-colors yst-duration-500 yst-text-xs yst-font-[650] yst-tracking-wide yst-uppercase "+m},t),a&&Object(s.createElement)("span",{className:"yst-text-sm yst-text-gray-500"},a)),r)}m.propTypes={name:d.a.string.isRequired,isFinished:d.a.bool.isRequired,description:d.a.string,children:d.a.node},m.defaultProps={description:"",children:[]};var f=a(53);const{slideDuration:h,delayBeforeOpening:y,delayBeforeFadingIn:g,delayBeforeClosing:O}=u.c,{fadeDuration:v,delayUntilStepFaded:j,slideDuration:w}=u.b,E=Object(s.createContext)();function x(){const e=Object(s.useContext)(E);if(!e)throw new Error("Stepper compound components cannot be rendered outside the Stepper component");return e}function S(e){let{beforeGo:t,children:a,destination:n,...i}=e;const{stepIndex:o,setActiveStepIndex:l,lastStepIndex:c}=x(),d=Object(s.useCallback)(()=>{l("string"==typeof n?"last"===n?c:0:o+n)},[o,c,l,n]),u=Object(s.useCallback)(async()=>{let e=!0;t&&(e=!1,e=await t()),e&&d()},[d,t]);return Object(s.createElement)("button",r()({type:"button",onClick:u},i),a)}function C(e){let{children:t,...a}=e;const{stepIndex:n,setActiveStepIndex:i}=x(),o=Object(s.useCallback)(()=>{i(n)},[i,n]);return Object(s.createElement)("button",r()({type:"button",onClick:o,className:"yst-button yst-button--secondary yst-button--small"},a),t)}function R(e){let{children:t}=e;const{lastStepIndex:a,stepIndex:n,activeStepIndex:r}=x();return Object(s.createElement)(s.Fragment,null,n!==a&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"yst--ml-px yst-absolute yst-left-4 yst-w-0.5 yst-h-full yst-bg-gray-300 yst--bottom-6","aria-hidden":"true"}),Object(s.createElement)("div",{className:`yst-h-12 yst-transition-transform ${j} yst-ease-linear ${w} ${n{r?(o("auto"),setTimeout(()=>d(!1),g)):(d(!0),o(0))},[r]),Object(s.createElement)(s.Fragment,null,Object(s.createElement)(l.a,{id:"content-"+n,delay:0===i?O:y,height:i,easing:"ease-in-out",duration:h},Object(s.createElement)("div",{className:`yst-transition-opacity ${v} yst-relative yst-ml-12 yst-mt-4 yst-pb-1 ${c?"yst-opacity-0 yst-pointer-events-none":"yst-opacity-100"}`},t)))}function k(e){let{children:t,setActiveStepIndex:a,activeStepIndex:n,isStepperFinished:r}=e;return Object(s.createElement)("ol",null,t.map((e,i)=>Object(s.createElement)("li",{key:`${e.props.name}-${i}`,className:(i===t.length-1?"":"yst-pb-8")+" yst-mb-0 yst-relative yst-max-w-none"},Object(s.createElement)(E.Provider,{value:{stepIndex:i,activeStepIndex:n,setActiveStepIndex:a,lastStepIndex:t.length-1,isStepperFinished:r}},e))))}S.propTypes={beforeGo:d.a.func,children:d.a.node,destination:d.a.oneOfType([d.a.number,d.a.oneOf(["first","last"])])},S.defaultProps={beforeGo:null,children:Object(s.createElement)(s.Fragment,null,Object(i.__)("Continue","wordpress-seo")),destination:1},C.propTypes={children:d.a.node},C.defaultProps={children:Object(s.createElement)(s.Fragment,null,Object(i.__)("Edit","wordpress-seo"))},R.propTypes={children:d.a.node.isRequired},_.propTypes={id:d.a.string.isRequired,message:d.a.string.isRequired,className:d.a.string},_.defaultProps={className:""},P.propTypes={children:d.a.node.isRequired},k.propTypes={setActiveStepIndex:d.a.func.isRequired,activeStepIndex:d.a.number.isRequired,isStepperFinished:d.a.bool,children:d.a.node.isRequired},k.defaultProps={isStepperFinished:!1},R.Content=P,R.Error=_,R.Header=m,R.GoButton=S,R.EditButton=C},50:function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return l}));var n=a(3),r=a.n(n);let s=Object(n.createContext)(null);s.displayName="OpenClosedContext";var i,o=((i=o||{})[i.Open=0]="Open",i[i.Closed=1]="Closed",i);function l(){return Object(n.useContext)(s)}function c({value:e,children:t}){return r.a.createElement(s.Provider,{value:e},t)}},53:function(e,t,a){"use strict";a.d(t,"b",(function(){return m})),a.d(t,"a",(function(){return f}));var n=a(0),r=a(3),s=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 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"}))})),i=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.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))})),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 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))})),l=a(187),c=a(1),d=a(21),u=a.n(d),p=a(114),b=a.n(p);function m(e){let t,a,{type:r,children:c,className:d}=e;switch(r){case"info":t=Object(n.createElement)(s,{"aria-hidden":"true",className:"yst-flex-shrink-0 yst-w-5 yst-h-5 yst-text-blue-500"}),a="yst-bg-blue-100 yst-text-blue-800";break;case"warning":t=Object(n.createElement)(i,{"aria-hidden":"true",className:"yst-flex-shrink-0 yst-w-5 yst-h-5 yst-text-yellow-500"}),a="yst-bg-yellow-100 yst-text-yellow-800";break;case"error":t=Object(n.createElement)(o,{"aria-hidden":"true",className:"yst-flex-shrink-0 yst-w-5 yst-h-5 yst-text-red-500"}),a="yst-bg-red-100 yst-text-red-800";break;case"success":t=Object(n.createElement)(l.a,{"aria-hidden":"true",className:"yst-flex-shrink-0 yst-w-5 yst-h-5 yst-text-emerald-600"}),a="yst-bg-green-100 yst-text-green-800"}return Object(n.createElement)("div",{className:u()("yst-flex yst-p-4 yst-rounded-md",a,d)},t,Object(n.createElement)("div",{className:"yst-flex-1 yst-ml-3 yst-text-sm"},c))}function f(e){let{id:t,isVisible:a,expandDuration:r,type:s,children:i,className:o}=e;const[l,c]=Object(n.useState)(a?"yst-opacity-100":"yst-opacity-0"),d=Object(n.useCallback)(()=>{c("yst-opacity-100")});return Object(n.createElement)(b.a,{id:t,height:a?"auto":0,easing:"linear",duration:r,onAnimationEnd:d},Object(n.createElement)(m,{type:s,className:u()("yst-transition-opacity yst-duration-300 yst-mt-4",l,o)},i))}m.propTypes={type:c.PropTypes.oneOf(["info","warning","error","success"]),children:c.PropTypes.oneOfType([c.PropTypes.arrayOf(c.PropTypes.node),c.PropTypes.node]).isRequired,className:c.PropTypes.string},m.defaultProps={type:"info",className:""},f.propTypes={id:c.PropTypes.string.isRequired,isVisible:c.PropTypes.bool.isRequired,type:c.PropTypes.oneOf(["info","warning","error","success"]),children:c.PropTypes.oneOfType([c.PropTypes.arrayOf(c.PropTypes.node),c.PropTypes.node]).isRequired,expandDuration:c.PropTypes.number,className:c.PropTypes.string},f.defaultProps={expandDuration:400,type:"info",className:""}},57:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(3),r=a(31);function s(e){let t=Object(n.useRef)(e);return Object(r.a)(()=>{t.current=e},[e]),t}},6:function(e,t){e.exports=window.wp.data},64:function(e,t){e.exports=window.wp.domReady},65:function(e,t){e.exports=window.yoast.socialMetadataForms},7:function(e,t){e.exports=window.yoast.componentsNew},71:function(e,t,a){"use strict";a.d(t,"f",(function(){return o})),a.d(t,"c",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"d",(function(){return d})),a.d(t,"e",(function(){return p})),a.d(t,"a",(function(){return b}));var n=a(2),r=a(4),s=a(21),i=a.n(s);const o=[{name:"Facebook",placeholder:Object(n.__)("E.g. https://www.facebook.com/yoast","wordpress-seo")},{name:"Instagram",placeholder:Object(n.__)("E.g. https://www.instagram.com/yoast","wordpress-seo")},{name:"LinkedIn",placeholder:Object(n.__)("E.g. https://www.linkedin.com/yoast","wordpress-seo")},{name:"MySpace",placeholder:Object(n.__)("E.g. https://www.myspace.com/yoast","wordpress-seo")},{name:"Pinterest",placeholder:Object(n.__)("E.g. https://www.pinterest.com/yoast","wordpress-seo")},{name:"SoundCloud",placeholder:Object(n.__)("E.g. https://www.soundcloud.com/yoast","wordpress-seo")},{name:"Tumblr",placeholder:Object(n.__)("E.g. https://www.tumblr.com/yoast","wordpress-seo")},{name:"Twitter",placeholder:Object(n.__)("E.g. https://www.twitter.com/yoast","wordpress-seo")},{name:"YouTube",placeholder:Object(n.__)("E.g. https://www.youtube.com/yoast","wordpress-seo")},{name:"Wikipedia",placeholder:Object(n.__)("E.g. https://www.wikipedia.com/yoast","wordpress-seo")}],l=e=>"error-"+e,c=(e,t)=>{let{isVisible:a}=t;return a?{"aria-invalid":!0,"aria-describedby":l(e)}:{}};function d(e){let{active:t,selected:a}=e;return i()("yst-relative yst-cursor-default yst-select-none yst-py-2 yst-pl-3 yst-pr-9 yst-my-0",a&&"yst-bg-primary-500 yst-text-white",t&&!a&&"yst-bg-primary-200 yst-text-gray-700",!t&&!a&&"yst-text-gray-700")}function u(e,t){const a=function(e,t){return e.includes(t)?[...e]:[...e,t]}(e.editedSteps,t);return{...e,editedSteps:a}}function p(e,t){return e.map(e=>{const a=parseInt(e.replace("other_social_urls-",""),10);return a===t?"remove":a>t?"other_social_urls-"+(a-1):e}).filter(e=>"remove"!==e)}function b(e,t){let a=Object(r.cloneDeep)(e);switch(t.type){case"SET_COMPANY_OR_PERSON":return a=u(a,2),a.companyOrPerson=t.payload,a.companyOrPersonLabel=a.companyOrPersonOptions.filter(e=>e.value===t.payload).pop().label,a;case"CHANGE_COMPANY_NAME":return a=u(a,2),a.companyName=t.payload,a;case"SET_COMPANY_LOGO":return a=u(a,2),a.companyLogo=t.payload.url,a.companyLogoId=t.payload.id,a;case"REMOVE_COMPANY_LOGO":return a=u(a,2),a.companyLogo="",a.companyLogoId="",a;case"SET_PERSON_LOGO":return a=u(a,2),a.personLogo=t.payload.url,a.personLogoId=t.payload.id,a;case"REMOVE_PERSON_LOGO":return a=u(a,2),a.personLogo="",a.personLogoId="",a;case"SET_PERSON":return a=u(a,2),a.personId=t.payload.value,a.personName=t.payload.label,a;case"CHANGE_PERSON_SOCIAL_PROFILE":return a=u(a,3),a.personSocialProfiles[t.payload.socialMedium]=t.payload.value,a;case"INIT_PERSON_SOCIAL_PROFILES":return a.personSocialProfiles=t.payload.socialProfiles,a;case"SET_CAN_EDIT_USER":return a=u(a,2),a.canEditUser=!0===t.payload?1:0,a;case"CHANGE_SOCIAL_PROFILE":return a=u(a,3),a.socialProfiles[t.payload.socialMedium]=t.payload.value,a.errorFields=a.errorFields.filter(e=>"facebookUrl"===t.payload.socialMedium?"facebook_site"!==e:"twitterUsername"!==t.payload.socialMedium||"twitter_site"!==e),a;case"CHANGE_OTHERS_SOCIAL_PROFILE":return a=u(a,3),a.socialProfiles.otherSocialUrls[t.payload.index]=t.payload.value,a.errorFields=a.errorFields.filter(e=>e!=="other_social_urls-"+t.payload.index),a;case"ADD_OTHERS_SOCIAL_PROFILE":return a=u(a,3),a.socialProfiles.otherSocialUrls=[...a.socialProfiles.otherSocialUrls,t.payload.value],a;case"REMOVE_OTHERS_SOCIAL_PROFILE":return a=u(a,3),a.socialProfiles.otherSocialUrls.splice(t.payload.index,1),a.errorFields=p(a.errorFields,t.payload.index),a;case"SET_ERROR_FIELDS":return a.errorFields=t.payload,a;case"SET_STEP_ERROR":return a.stepErrors[t.payload.step]=t.payload.message,a;case"REMOVE_STEP_ERROR":return a.stepErrors=Object(r.pickBy)(a.stepErrors,(e,a)=>a!==t.payload),a;case"SET_TRACKING":return a=u(a,4),a.tracking=t.payload,a;default:return a}}},72:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return s}));const n={slideDuration:500,fadeDuration:200,delayBeforeOpening:900,delayBeforeFadingIn:1400,delayBeforeClosing:200},r={fadeDuration:"yst-duration-200",slideDuration:"yst-duration-500",delayBeforeOpening:"yst-delay-[900ms]",delayUntilStepFaded:"yst-delay-200"};function s(e){if(!Array.isArray(e)||0===e.length)return 0;const t=e.findIndex(e=>!1===e);return-1!==t?t:e.every(Boolean)?e.length-1:0}},73:function(e,t,a){"use strict";function n(){let e=[],t=[],a={enqueue(e){t.push(e)},addEventListener:(e,t,n,r)=>(e.addEventListener(t,n,r),a.add(()=>e.removeEventListener(t,n,r))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return a.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>a.requestAnimationFrame(()=>a.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return a.add(()=>clearTimeout(t))},add:t=>(e.push(t),()=>{let a=e.indexOf(t);if(a>=0){let[t]=e.splice(a,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return a}a.d(t,"a",(function(){return n}))},8:function(e,t){e.exports=window.yoast.styledComponents},82:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(3),r=a(30);let s=Symbol();function i(...e){let t=Object(n.useRef)(e);Object(n.useEffect)(()=>{t.current=e},[e]);let a=Object(r.a)(e=>{for(let a of t.current)null!=a&&("function"==typeof a?a(e):a.current=e)});return e.every(e=>null==e||(null==e?void 0:e[s]))?void 0:a}},9:function(e,t){e.exports=window.yoast.helpers},93:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n,r=a(3),s=a.n(r),i=a(31),o=a(129);let l=0;function c(){return++l}let d=null!=(n=s.a.useId)?n:function(){let e=Object(o.a)(),[t,a]=s.a.useState(e?c:null);return Object(i.a)(()=>{null===t&&a(c())},[t]),null!=t?""+t:void 0}}});