Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ window.yoast=window.yoast||{},window.yoast.searchMetadataPreviews=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=742)}({0:function(e,t){e.exports=window.yoast.propTypes},1:function(e,t){e.exports=window.wp.element},10:function(e,t){e.exports=window.wp.i18n},11:function(e,t,n){var o=n(37);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},12:function(e,t,n){var o=n(23).default,r=n(14);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},122:function(e,t){e.exports=window.lodash.noop},125:function(e,t){e.exports=window.lodash.debounce},129:function(e,t,n){"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},13:function(e,t){e.exports=window.yoast.componentsNew},14:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},15:function(e,t){e.exports=window.yoast.helpers},16:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},17:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(d[e])}function g(e,t){for(var n=e.length,o=[];n--;)o[n]=t(e[n]);return o}function v(e,t){var n=e.split("@"),o="";return n.length>1&&(o=n[0]+"@",e=n[1]),o+g((e=e.replace(p,".")).split("."),t).join(".")}function b(e){for(var t,n,o=[],r=0,i=e.length;r=55296&&t<=56319&&r65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+f(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,n){var o=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;o+=36)e=h(e/35);return h(o+36*e/(e+38))}function O(e){var t,n,o,r,i,a,s,c,u,p,d,f=[],g=e.length,v=0,b=128,x=72;for((n=e.lastIndexOf("-"))<0&&(n=0),o=0;o=128&&m("not-basic"),f.push(e.charCodeAt(o));for(r=n>0?n+1:0;r=g&&m("invalid-input"),((c=(d=e.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((l-v)/a))&&m("overflow"),v+=c*a,!(c<(u=s<=x?1:s>=x+26?26:s-x));s+=36)a>h(l/(p=36-u))&&m("overflow"),a*=p;x=E(v-i,t=f.length+1,0==i),h(v/t)>l-b&&m("overflow"),b+=h(v/t),v%=t,f.splice(v++,0,b)}return y(f)}function w(e){var t,n,o,r,i,a,s,c,u,p,d,g,v,y,O,w=[];for(g=(e=b(e)).length,t=128,n=0,i=72,a=0;a=t&&dh((l-n)/(v=o+1))&&m("overflow"),n+=(s-t)*v,t=s,a=0;al&&m("overflow"),d==t){for(c=n,u=36;!(c<(p=u<=i?1:u>=i+26?26:u-i));u+=36)O=c-p,y=36-p,w.push(f(x(p+O%y,0))),c=h(O/y);w.push(f(x(c,0))),i=E(n,v,o==r),n=0,++o}++n,++t}return w.join("")}s={version:"1.4.1",ucs2:{decode:b,encode:y},decode:O,encode:w,toASCII:function(e){return v(e,(function(e){return u.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return v(e,(function(e){return c.test(e)?O(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return s}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(96)(e),n(25))},180:function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},181:function(e,t,n){"use strict";t.decode=t.parse=n(182),t.encode=t.stringify=n(183)},182:function(e,t,n){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u=0?(p=m.substr(0,g),d=m.substr(g+1)):(p=m,d=""),h=decodeURIComponent(p),f=decodeURIComponent(d),o(a,h)?r(a[h])?a[h].push(f):a[h]=[a[h],f]:a[h]=f}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},183:function(e,t,n){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(o(a))+n;return r(e[a])?i(e[a],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[a]))})).join(t):s?encodeURIComponent(o(s))+n+encodeURIComponent(o(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],o=0;o=0||(r[n]=e[n]);return r}(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(e,o);var i=r.default.Children.only(n);return r.default.cloneElement(i,o)},o}(r.default.Component);function c(){}l.contextTypes={transitionGroup:o.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:c,onEntering:c,onEntered:c,onExit:c,onExiting:c,onExited:c},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,a.polyfill)(l);t.default=u},262:function(e,t,n){"use strict";var o;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(o=n(0))&&o.__esModule,t.timeoutsShape=null,t.classNamesShape=null},263:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var o=s(n(0)),r=s(n(3)),i=n(129),a=n(585);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["component","childFactory"]),i=u(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?i:r.default.createElement(t,o,i)},o}(r.default.Component);p.childContextTypes={transitionGroup:o.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var d=(0,i.polyfill)(p);t.default=d,e.exports=t.default},3:function(e,t){e.exports=window.React},318:function(e,t,n){"use strict";var o=s(n(579)),r=s(n(584)),i=s(n(263)),a=s(n(261));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:r.default,CSSTransition:o.default}},319:function(e,t){e.exports=window.lodash.truncate},37:function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,o)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},38:function(e,t){e.exports=window.ReactDOM},4:function(e,t){e.exports=window.yoast.styledComponents},41:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=s(n(3)),i=s(n(72)),a=s(n(74));function s(e){return e&&e.__esModule?e:{default:e}}var l=void 0;t.default=function(e){var t=e.mixedString,n=e.components,s=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":o(n))){if(s)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var c=(0,a.default)(t);try{return function e(t,n){var a,s,c,u,p,d,h,f,m=[],g={};for(d=0;d "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){a=n[p.value],c=d;break}m.push(n[p.value])}else m.push(p.value);return a&&(u=function(e,t){var n,o,r=t[e],i=0;for(o=e+1;o=0||(r[n]=e[n]);return r}(e,["children","in"]),a=o.default.Children.toArray(t),s=a[0],l=a[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,o.default.createElement(i.default,r,n?o.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):o.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(o.default.Component);s.propTypes={};var l=s;t.default=l,e.exports=t.default},585:function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return r(e.children,(function(n){return(0,o.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=r(e.children),l=i(t,s);return Object.keys(l).forEach((function(r){var i=l[r];if((0,o.isValidElement)(i)){var c=r in t,u=r in s,p=t[r],d=(0,o.isValidElement)(p)&&!p.props.in;!u||c&&!d?u||!c||d?u&&c&&(0,o.isValidElement)(p)&&(l[r]=(0,o.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):l[r]=(0,o.cloneElement)(i,{in:!1}):l[r]=(0,o.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}})),l};var o=n(3);function r(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(r[l])for(o=0;o :first-child {\n\t\toverflow: hidden;\n\t\ttransition: height "," ease-out;\n\t}\n"])),(function(e){return"".concat(e.duration,"ms")})),Q=function(e){f()(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=b()(t);if(n){var r=b()(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return g()(this,e)});function r(){return l()(this,r),o.apply(this,arguments)}return u()(r,[{key:"resetHeight",value:function(e){e.style.height="0"}},{key:"setHeight",value:function(e){var t=function(e){return Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight)}(e);e.style.height=t+"px"}},{key:"removeHeight",value:function(e){e.style.height=null}},{key:"render",value:function(){return Object(E.createElement)(K,{duration:this.props.duration},Object(E.createElement)(q.CSSTransition,{in:this.props.isOpen,timeout:this.props.duration,classNames:"slide",unmountOnExit:!0,onEnter:this.resetHeight,onEntering:this.setHeight,onEntered:this.removeHeight,onExit:this.setHeight,onExiting:this.resetHeight},this.props.children))}}]),r}(w.a.Component);Q.propTypes={isOpen:_.a.bool.isRequired,duration:_.a.number.isRequired,children:_.a.node},Q.defaultProps={duration:300};var $=S.a.div(z||(z=x()(['\n\tmax-width: 600px;\n\tfont-weight: normal;\n\t// Don\'t apply a bottom margin to avoid "jumpiness".\n\tmargin: ',";\n"])),Object(V.getDirectionalStyle)("0 20px 0 25px","0 20px 0 15px")),X=S.a.div(W||(W=x()(["\n\tmax-width: ",";\n"])),(function(e){return e.panelMaxWidth})),Y=S()(L.Button)(H||(H=x()(["\n\tmin-width: 14px;\n\tmin-height: 14px;\n\twidth: 30px;\n\theight: 30px;\n\tborder-radius: 50%;\n\tborder: 1px solid transparent;\n\tbox-shadow: none;\n\tdisplay: block;\n\tmargin: -44px -10px 10px 0;\n\tbackground-color: transparent;\n\tfloat: ",";\n\tpadding: ",";\n\n\t&:hover {\n\t\tcolor: ",";\n\t}\n\t&:focus {\n\t\tborder: 1px solid ",";\n\t\toutline: none;\n\t\tbox-shadow: 0 0 3px ",";\n\n\t\tsvg {\n\t\t\tfill: ",";\n\t\t\tcolor: ",";\n\t\t}\n\t}\n\t&:active {\n\t\tbox-shadow: none;\n\t}\n"])),Object(V.getDirectionalStyle)("right","left"),Object(V.getDirectionalStyle)("3px 0 0 6px","3px 0 0 5px"),B.colors.$color_blue,B.colors.$color_blue,Object(B.rgba)(B.colors.$color_blue_dark,.8),B.colors.$color_blue,B.colors.$color_blue),J=S()(L.SvgIcon)(G||(G=x()(["\n\t&:hover {\n\t\tfill: ",";\n\t}\n"])),B.colors.$color_blue),Z=function(e){f()(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=b()(t);if(n){var r=b()(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return g()(this,e)});function r(e){var t;return l()(this,r),(t=o.call(this,e)).state={isExpanded:!1},t.uniqueId=U()("yoast-help-"),t}return u()(r,[{key:"onButtonClick",value:function(){this.setState({isExpanded:!this.state.isExpanded})}},{key:"render",value:function(){var e="".concat(this.uniqueId,"-panel"),t=this.state.isExpanded;return Object(E.createElement)($,{className:this.props.className},Object(E.createElement)(Y,{className:this.props.className+"__button",onClick:this.onButtonClick.bind(this),"aria-expanded":t,"aria-controls":t?e:null,"aria-label":this.props.helpTextButtonLabel},Object(E.createElement)(J,{size:"16px",color:B.colors.$color_grey_text,icon:"question-circle"})),Object(E.createElement)(Q,{isOpen:t},Object(E.createElement)(X,{id:e,className:this.props.className+"__panel",panelMaxWidth:this.props.panelMaxWidth},Object(E.createElement)(L.HelpText,null,this.props.helpText))))}}]),r}(w.a.Component);Z.propTypes={className:_.a.string,helpTextButtonLabel:_.a.string.isRequired,panelMaxWidth:_.a.string,helpText:_.a.oneOfType([_.a.string,_.a.array])},Z.defaultProps={className:"yoast-help",panelMaxWidth:null,helpText:""};var ee,te=Z,ne=n(17),oe=n.n(ne),re=n(41),ie=n.n(re),ae=n(319),se=n.n(ae),le=n(89),ce=n(63),ue=n(2),pe=S.a.span(ee||(ee=x()(["\n\tcolor: #70757a;\n\tline-height: 1.7;\n"])));function de(e){var t=e.shoppingData,n=Object(P.sprintf)(Object(P.__)("Rating: %s","yoast-components"),Object(ue.round)(2*t.rating,1)+"/10"),o=Object(P.sprintf)(Object(P.__)("%s reviews","yoast-components"),t.reviewCount); /* Translators: %s expands to the actual rating, e.g. 8/10. */return Object(E.createElement)(pe,null,t.reviewCount>0&&Object(E.createElement)(O.Fragment,null,Object(E.createElement)(L.StarRating,{rating:t.rating}),Object(E.createElement)("span",null," ",n," · "),Object(E.createElement)("span",null,o," · ")),t.price&&Object(E.createElement)(O.Fragment,null,Object(E.createElement)("span",{dangerouslySetInnerHTML:{__html:t.price}})),t.availability&&Object(E.createElement)("span",null," · ".concat(Object(ue.capitalize)(t.availability))))}var he,fe,me,ge,ve=de;de.propTypes={shoppingData:_.a.shape({rating:_.a.number,reviewCount:_.a.number,availability:_.a.string,price:_.a.string}).isRequired};var be=S.a.div(he||(he=x()(["\n\tdisplay: flex;\n\tmargin-top: -16px;\n\tline-height: 1.6;\n"]))),ye=S.a.div(fe||(fe=x()(["\n\tflex: 1;\n\tmax-width: 50%;\n"]))),xe=S.a.div(me||(me=x()(["\n\tflex: 1;\n\tmax-width: 25%;\n"]))),Ee=S.a.div(ge||(ge=x()(["\n\tcolor: #70757a;\n"])));function Oe(e){var t=e.shoppingData;return Object(E.createElement)(be,null,t.rating>0&&Object(E.createElement)(ye,{className:"yoast-shopping-data-preview__column"},Object(E.createElement)("div",{className:"yoast-shopping-data-preview__upper"},Object(P.__)("Rating","yoast-components")),Object(E.createElement)(Ee,{className:"yoast-shopping-data-preview__lower"},Object(E.createElement)("span",null,Object(ue.round)(2*t.rating,1),"/10 "),Object(E.createElement)(L.StarRating,{rating:t.rating}),Object(E.createElement)("span",null," (",t.reviewCount,")"))),t.price&&Object(E.createElement)(xe,{className:"yoast-shopping-data-preview__column"},Object(E.createElement)("div",{className:"yoast-shopping-data-preview__upper"},Object(P.__)("Price","yoast-components")),Object(E.createElement)(Ee,{className:"yoast-shopping-data-preview__lower",dangerouslySetInnerHTML:{__html:t.price}})),t.availability&&Object(E.createElement)(xe,{className:"yoast-shopping-data-preview__column"},Object(E.createElement)("div",{className:"yoast-shopping-data-preview__upper"},Object(P.__)("Availability","yoast-components")),Object(E.createElement)(Ee,{className:"yoast-shopping-data-preview__lower"},Object(ue.capitalize)(t.availability))))}var we=Oe;Oe.propTypes={shoppingData:_.a.shape({rating:_.a.number,reviewCount:_.a.number,availability:_.a.string,price:_.a.string}).isRequired};var je,Se,Ce,_e,Re,ke,Pe,Me,Ae,Te,Fe,De,Ie,Ne,Ue,Le,Ve,Be,qe,ze,We,He,Ge=["desktop","mobile"];var Ke=ce.languageProcessing.transliterate,Qe=ce.languageProcessing.createRegexFromArray,$e=ce.languageProcessing.replaceDiacritics,Xe=S()(D)(je||(je=x()(["\n\tbackground-color: #fff;\n\tfont-family: arial, sans-serif;\n\tbox-sizing: border-box;\n"]))),Ye=S.a.div(Se||(Se=x()(["\n\tborder-bottom: 1px hidden #fff;\n\tborder-radius: 8px;\n\tbox-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);\n\tfont-family: Arial, Roboto-Regular, HelveticaNeue, sans-serif;\n\tmax-width: ","px;\n\tbox-sizing: border-box;\n\tfont-size: 14px;\n"])),400),Je=S.a.div(Ce||(Ce=x()(["\n\tcursor: pointer;\n\tposition: relative;\n"])));function Ze(e,t,n){return S()(e)(_e||(_e=x()(["\n\t\t&::before {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t",": ",";\n\t\t\twidth: 22px;\n\t\t\theight: 22px;\n\t\t\tbackground-image: url( ",' );\n\t\t\tbackground-size: 24px;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tcontent: "";\n\t\t}\n\t'])),Object(V.getDirectionalStyle)("left","right"),(function(){return"desktop"===n?"-22px":"-40px"}),Object(V.getDirectionalStyle)(Object(B.angleRight)(t),Object(B.angleLeft)(t)))}var et=S.a.div(Re||(Re=x()(["\n\tcolor: ",";\n\ttext-decoration: none;\n\tfont-size: ",";\n\tline-height: ",";\n\tfont-weight: normal;\n\tmargin: 0;\n\tdisplay: inline-block;\n\toverflow: hidden;\n\tmax-width: ","px;\n\tvertical-align: top;\n\ttext-overflow: ellipsis;\n"])),(function(e){return"desktop"===e.screenMode?"#1a0dab":"#1558d6"}),(function(e){return e.screenMode,"20px"}),(function(e){return"desktop"===e.screenMode?"1.3":"26px"}),600),tt=S()(et)(ke||(ke=x()(["\n\tmax-width: ","px;\n\tvertical-align: top;\n\ttext-overflow: ellipsis;\n"])),600),nt=S.a.span(Pe||(Pe=x()(["\n\twhite-space: nowrap;\n"]))),ot=S.a.span(Me||(Me=x()(["\n\tdisplay: inline-block;\n\tmax-height: 52px; // max two lines of text\n\tpadding-top: 1px;\n\tvertical-align: top;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n"]))),rt=S.a.div(Ae||(Ae=x()(["\n\tdisplay: inline-block;\n\tcursor: pointer;\n\tposition: relative;\n\tmax-width: 90%;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n\tvertical-align: top;\n"]))),it=S()(rt)(Te||(Te=x()(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tmax-width: 100%;\n\tmargin-bottom: ",";\n\tpadding-top: 1px;\n\tline-height: ",";\n\tvertical-align: ",";\n"])),(function(e){return"desktop"===e.screenMode?"0":"12px"}),(function(e){return"desktop"===e.screenMode?"1.5":"20px"}),(function(e){return"desktop"===e.screenMode?"baseline":"top"})),at=S.a.span(Fe||(Fe=x()(["\n\tfont-size: ",";\n\tline-height: ",";\n\tcolor: ",";\n"])),(function(e){return"desktop"===e.screenMode?"14px":"12px"}),(function(e){return"desktop"===e.screenMode?"1.3":"20px"}),(function(e){return"desktop"===e.screenMode?"#5f6368":"#70757a"})),st=S.a.span(De||(De=x()(["\n\tcolor: ",";\n"])),(function(e){return e.screenMode,"#202124"}));it.displayName="SnippetPreview__BaseUrlOverflowContainer";var lt=S.a.div(Ie||(Ie=x()(["\n\tcolor: ",";\n\tcursor: pointer;\n\tposition: relative;\n\tmax-width: ","px;\n\tpadding-top: ",";\n\tfont-size: 14px;\n\tline-height: 1.58;\n"])),(function(e){return e.isDescriptionPlaceholder?"4d5156":"#4d5156"}),600,(function(e){return"desktop"===e.screenMode?"0":"1px"})),ct=S.a.div(Ne||(Ne=x()(["\n\tcolor: ",";\n\tfont-size: 14px;\n\tline-height: 20px;\n\tcursor: pointer;\n\tposition: relative;\n\tmax-width: ",'px;\n\n\t/* Clearing pseudo element to contain the floated image. */\n\t&:after {\n\t\tdisplay: table;\n\t\tcontent: "";\n\t\tclear: both;\n\t}\n'])),"#3c4043",600),ut=S.a.div(Ue||(Ue=x()(["\n\tfloat: right;\n\twidth: 104px;\n\theight: 104px;\n\tmargin: 4px 0 4px 16px;\n\tborder-radius: 8px;\n\toverflow: hidden;\n"]))),pt=S.a.img(Le||(Le=x()(["\n\t/* Higher specificity is necessary to make sure inherited CSS rules don't alter the image ratio. */\n\t&&& {\n\t\tdisplay: block;\n\t\twidth: 104px;\n\t\theight: 104px;\n\t\tobject-fit: cover;\n\t}\n"]))),dt=S.a.div(Ve||(Ve=x()(["\n\tpadding: 12px 16px;\n\n\t&:first-child {\n\t\tmargin-bottom: -16px;\n\t}\n"]))),ht=S.a.div(Be||(Be=x()(["\n"]))),ft=S.a.div(qe||(qe=x()(["\n\tdisplay: inline-block;\n\tmargin-top: 9px;\n\tmargin-left: 6px;\n\tborder-top: 5px solid #70757a;\n\tborder-right: 4px solid transparent;\n\tborder-left: 4px solid transparent;\n\tvertical-align: top;\n"]))),mt=S.a.span(ze||(ze=x()(["\n\tcolor: ",";\n"])),(function(e){return"desktop"===e.screenMode?"#777":"#70757a"})),gt=S.a.img(We||(We=x()(["\n\twidth: 16px;\n\theight: 16px;\n\tmargin-right: 12px;\n\tvertical-align: middle;\n"]))),vt=S.a.div(He||(He=x()(["\n\tbackground-size: 100% 100%;\n\tdisplay: inline-block;\n\theight: 12px;\n\twidth: 12px;\n\tmargin-bottom: -1px;\n\topacity: 0.46;\n\tmargin-right: 6px;\n\tbackground-image: url( "," );\n"])),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAABr0lEQVR4AbWWJYCUURhFD04Zi7hrLzgFd4nzV9x6wKHinmYb7g4zq71gIw2LWBnZ3Q8df/fh96Tn/t2HVIw4CVKk+fSFNCkSxInxW1pFkhLmoMRjVvFLmkEX5ocuZuBVPw5jv8hh+iEU5QEmuMK+prz7RN3dPMMEGQYzxpH/lGjzou5jgl7mAvOdZfcbF+jbm3MAbFZ7VX9SJnlL1D8UMyjLe+BrAYDb+jJUr59JrlNWRtcqX9GkrPCR4QBAf4qYJAkQoyQrbKKs8RiaEjEI0GvvQ1mLMC9xaBFFBaZS1TbMSwJSomg39erDF+TxpCCNOXjGQJTCvG6qn4ZPzkcxA61Tjhaf4KMj+6Q3XvW6Lopraa8IozRQxIi0a7NXorULc5JyHX/3F3q+0PsFYytVTaGgjz/AvCyiegE69IUsPxHNBMpa738i6tGWlzkAABjKe/+j9YeRHGVd9oWRnwe2ewDASp/L/UqoPQ5AmFeYZMavBP8dAJz0GWWDHQlzXApMdz4KYUfKICcxkKeOfGmQyrIPcgE9m+g/+kT812/Nr3+0kqzitxQjoKXh6xfor99nlEdFjyvH15gAAAAASUVORK5CYII="),bt=function(e){f()(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=b()(t);if(n){var r=b()(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return g()(this,e)});function r(e){var t;return l()(this,r),(t=o.call(this,e)).state={title:e.title,description:e.description,isDescriptionPlaceholder:!0},t.setTitleRef=t.setTitleRef.bind(d()(t)),t.setDescriptionRef=t.setDescriptionRef.bind(d()(t)),t}return u()(r,[{key:"setTitleRef",value:function(e){this._titleElement=e}},{key:"setDescriptionRef",value:function(e){this._descriptionElement=e}},{key:"hasOverflowedContent",value:function(e){return Math.abs(e.clientHeight-e.scrollHeight)>=2}},{key:"fitTitle",value:function(){var e=this._titleElement;if(this.hasOverflowedContent(e)){var t=this.state.title,n=e.clientWidth/3;t.length>n&&(t=t.substring(0,n));var o=this.dropLastWord(t);this.setState({title:o})}}},{key:"dropLastWord",value:function(e){var t=e.split(" ");return t.pop(),t.join(" ")}},{key:"getTitle",value:function(){return this.props.title!==this.state.title?this.state.title+" ...":this.props.title}},{key:"getDescription",value:function(){return this.props.description?se()(this.props.description,{length:156,separator:" ",omission:" ..."}):Object(P.__)("Please provide a meta description by editing the snippet below. If you don’t, Google will try to find a relevant part of your post to show in the search results.","yoast-components")}},{key:"renderDate",value:function(){var e="desktop"===this.props.mode?"—":"-";return this.props.date&&Object(E.createElement)(mt,{screenMode:this.props.mode},this.props.date," ",e," ")}},{key:"addCaretStyles",value:function(e,t){var n=this.props,o=n.mode,r=n.hoveredField;return n.activeField===e?Ze(t,B.colors.$color_snippet_active,o):r===e?Ze(t,B.colors.$color_snippet_hover,o):t}},{key:"getBreadcrumbs",value:function(e){var t=this.props.breadcrumbs,n=encodeURI(e.replace(/\?|#/g,"")),o=Object(le.parse)(n),r=o.hostname,i=o.pathname,a=" › "+(t||i.split("/")).filter((function(e){return!!e})).join(" › ");return{hostname:decodeURI(r),breadcrumbs:decodeURI(a)}}},{key:"renderUrl",value:function(){var e=this.props,t=e.url,n=e.onMouseUp,o=e.onMouseEnter,r=e.onMouseLeave,i=e.mode,a=e.faviconSrc,s="mobile"===i,l=$e(t),c=this.getBreadcrumbs(l),u=c.hostname,p=c.breadcrumbs,d=this.addCaretStyles("url",rt);return Object(E.createElement)(w.a.Fragment,null,Object(E.createElement)(L.ScreenReaderText,null,Object(P.__)("Url preview","yoast-components")+":"),Object(E.createElement)(d,null,Object(E.createElement)(it,{onMouseUp:n.bind(null,"url"),onMouseEnter:o.bind(null,"url"),onMouseLeave:r.bind(null),screenMode:i},s&&Object(E.createElement)(gt,{src:a||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR4AWL4//8/RRjO8Iucx+noO0MWUDo16FYABMGP6ZfUcRnWtm27jVPbtm3bttuH2t3eFPcY9pLz7NxiLjCyVd87pKnHyqXyxtCs8APd0rnyxiu4qSeA3QEDrAwBDrT1s1Rc/OrjLZwqVmOSu6+Lamcpp2KKMA9PH1BYXMe1mUP5qotvXTywsOEEYHXxrY+3cqk6TMkYpNr2FeoY3KIr0RPtn9wQ2unlA+GMkRw6+9TFw4YTwDUzx/JVvARj9KaedXRO8P5B1Du2S32smzqUrcKGEyA+uAgQjKX7zf0boWHGfn71jIKj2689gxp7OAGShNcBUmLMPVjZuiKcA2vuWHHDCQxMCz629kXAIU4ApY15QwggAFbfOP9DhgBJ+nWVJ1AZAfICAj1pAlY6hCADZnveQf7bQIwzVONGJonhLIlS9gr5mFg44Xd+4S3XHoGNPdJl1INIwKyEgHckEhgTe1bGiFY9GSFBYUwLh1IkiJUbY407E7syBSFxKTszEoiE/YdrgCEayDmtaJwCI9uu8TKMuZSVfSa4BpGgzvomBR/INhLGzrqDotp01ZR8pn/1L0JN9d9XNyx0AAAAAElFTkSuQmCC",alt:""}),Object(E.createElement)(at,{screenMode:i},Object(E.createElement)(st,null,u),p))))}},{key:"componentWillReceiveProps",value:function(e){var t={};this.props.title!==e.title&&(t.title=e.title),this.props.description!==e.description&&(t.description=e.description),this.setState(t)}},{key:"componentDidUpdate",value:function(){var e=this;this.setState({isDescriptionPlaceholder:!this.props.description}),"mobile"===this.props.mode&&(clearTimeout(this.fitTitleTimeout),this.fitTitleTimeout=setTimeout((function(){e.fitTitle()}),10))}},{key:"componentDidMount",value:function(){this.setState({isDescriptionPlaceholder:!this.props.description})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.fitTitleTimeout)}},{key:"renderDescription",value:function(){var e=this.props,t=e.wordsToHighlight,n=e.locale,o=e.onMouseUp,r=e.onMouseLeave,i=e.onMouseEnter,a=e.mode,s=e.mobileImageSrc,l=this.renderDate(),c={isDescriptionPlaceholder:this.state.isDescriptionPlaceholder,onMouseUp:o.bind(null,"description"),onMouseEnter:i.bind(null,"description"),onMouseLeave:r.bind(null)};if("desktop"===a){var u=this.addCaretStyles("description",lt);return Object(E.createElement)(u,oe()({},c,{ref:this.setDescriptionRef}),l,function(e,t,n,o){if(0===t.length)return n;var r=n,i=[];t.forEach((function(t){t=t,i.push(t);var n=Ke(t,e);n!==t&&i.push(n)}));var a=Qe(i,!1,"",!1);return r=r.replace(a,(function(e){return"{{strong}}".concat(e,"{{/strong}}")})),ie()({mixedString:r,components:{strong:Object(E.createElement)("strong",null)}})}(n,t,this.getDescription()))}if("mobile"===a){var p=this.addCaretStyles("description",ct);return Object(E.createElement)(p,c,Object(E.createElement)(ct,{isDescriptionPlaceholder:this.state.isDescriptionPlaceholder,ref:this.setDescriptionRef},s&&Object(E.createElement)(ut,null,Object(E.createElement)(pt,{src:s,alt:""})),l,this.getDescription()))}return null}},{key:"renderProductData",value:function(e){var t=this.props,n=t.mode,o=t.shoppingData;return 0===Object.values(o).length?null:"desktop"===n?Object(E.createElement)(e,{className:"yoast-shopping-data-preview--desktop"},Object(E.createElement)(L.ScreenReaderText,null,Object(P.__)("Shopping data preview:","yoast-components")),Object(E.createElement)(ve,{shoppingData:o})):"mobile"===n?Object(E.createElement)(e,{className:"yoast-shopping-data-preview--mobile"},Object(E.createElement)(L.ScreenReaderText,null,Object(P.__)("Shopping data preview:","yoast-components")),Object(E.createElement)(we,{shoppingData:o})):null}},{key:"render",value:function(){var e=this.props,t=e.onMouseUp,n=e.onMouseLeave,o=e.onMouseEnter,r=e.mode,i=e.isAmp,a=this.getPreparedComponents(r),s=a.PartContainer,l=a.Container,c=a.TitleUnbounded,u=a.SnippetTitle,p="desktop"===r,d=p?Object(E.createElement)(ft,null):null,h=p||!i?null:Object(E.createElement)(vt,null);return Object(E.createElement)("section",null,Object(E.createElement)(l,{id:"yoast-snippet-preview-container",width:p?640:null,padding:20},Object(E.createElement)(s,null,this.renderUrl(),d,Object(E.createElement)(L.ScreenReaderText,null,Object(P.__)("SEO title preview","yoast-components")+":"),Object(E.createElement)(u,{onMouseUp:t.bind(null,"title"),onMouseEnter:o.bind(null,"title"),onMouseLeave:n.bind(null)},Object(E.createElement)(tt,{screenMode:r},Object(E.createElement)(c,{ref:this.setTitleRef},this.getTitle()))),h),Object(E.createElement)(s,null,Object(E.createElement)(L.ScreenReaderText,null,Object(P.__)("Meta description preview:","yoast-components")),this.renderDescription()),this.renderProductData(s)))}},{key:"getPreparedComponents",value:function(e){return{PartContainer:"desktop"===e?ht:dt,Container:"desktop"===e?Xe:Ye,TitleUnbounded:"desktop"===e?nt:ot,SnippetTitle:this.addCaretStyles("title",Je)}}}]),r}(O.PureComponent);bt.propTypes={title:_.a.string.isRequired,url:_.a.string.isRequired,description:_.a.string.isRequired,date:_.a.string,breadcrumbs:_.a.array,hoveredField:_.a.string,activeField:_.a.string,keyword:_.a.string,wordsToHighlight:_.a.array,locale:_.a.string,mode:_.a.oneOf(Ge),isAmp:_.a.bool,faviconSrc:_.a.string,mobileImageSrc:_.a.string,shoppingData:_.a.object,onMouseUp:_.a.func.isRequired,onHover:_.a.func,onMouseEnter:_.a.func,onMouseLeave:_.a.func},bt.defaultProps={date:"",keyword:"",wordsToHighlight:[],breadcrumbs:null,locale:"en",hoveredField:"",activeField:"",mode:"mobile",isAmp:!1,faviconSrc:"",mobileImageSrc:"",shoppingData:{},onHover:function(){},onMouseEnter:function(){},onMouseLeave:function(){}};var yt,xt=n(24),Et=n(16),Ot=n.n(Et),wt=n(122),jt=n.n(wt),St=_.a.shape({max:_.a.number,actual:_.a.number,score:_.a.number});var Ct=S.a.input(yt||(yt=x()(["\n\tborder: none;\n\twidth: 100%;\n\theight: inherit;\n\tline-height: 1.71428571; // 24px based on 14px font-size\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tcolor: inherit;\n\n\t&:focus {\n\t\toutline: 0;\n\t}\n"]))),_t=Object(B.withCaretStyles)(L.VariableEditorInputContainer),Rt=function(e){f()(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=b()(t);if(n){var r=b()(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return g()(this,e)});function r(e){var t;return l()(this,r),(t=o.call(this,e)).elements={title:null,slug:null,description:null},t.uniqueId=U()("snippet-editor-field-"),t.setRef=t.setRef.bind(d()(t)),t.setTitleRef=t.setTitleRef.bind(d()(t)),t.setSlugRef=t.setSlugRef.bind(d()(t)),t.setDescriptionRef=t.setDescriptionRef.bind(d()(t)),t.triggerReplacementVariableSuggestions=t.triggerReplacementVariableSuggestions.bind(d()(t)),t.onFocusTitle=t.onFocusTitle.bind(d()(t)),t.onChangeTitle=t.onChangeTitle.bind(d()(t)),t.onFocusSlug=t.onFocusSlug.bind(d()(t)),t.focusSlug=t.focusSlug.bind(d()(t)),t.onChangeSlug=t.onChangeSlug.bind(d()(t)),t.onFocusDescription=t.onFocusDescription.bind(d()(t)),t.onChangeDescription=t.onChangeDescription.bind(d()(t)),t}return u()(r,[{key:"setRef",value:function(e,t){this.elements[e]=t}},{key:"setTitleRef",value:function(e){this.setRef("title",e)}},{key:"setSlugRef",value:function(e){this.setRef("slug",e)}},{key:"setDescriptionRef",value:function(e){this.setRef("description",e)}},{key:"componentDidUpdate",value:function(e){e.activeField!==this.props.activeField&&this.focusOnActiveFieldChange()}},{key:"focusOnActiveFieldChange",value:function(){var e=this.props.activeField,t=e?this.elements[e]:null;t&&t.focus()}},{key:"triggerReplacementVariableSuggestions",value:function(e){this.elements[e].triggerReplacementVariableSuggestions()}},{key:"onFocusTitle",value:function(){this.props.onFocus("title")}},{key:"onChangeTitle",value:function(e){this.props.onChange("title",e)}},{key:"onFocusSlug",value:function(){this.props.onFocus("slug")}},{key:"focusSlug",value:function(){this.elements.slug.focus()}},{key:"onChangeSlug",value:function(e){this.props.onChange("slug",e.target.value)}},{key:"onFocusDescription",value:function(){this.props.onFocus("description")}},{key:"onChangeDescription",value:function(e){this.props.onChange("description",e)}},{key:"render",value:function(){var e=this.props,t=e.activeField,n=e.hoveredField,o=e.replacementVariables,r=e.recommendedReplacementVariables,i=e.titleLengthProgress,a=e.descriptionLengthProgress,s=e.onBlur,l=e.descriptionEditorFieldPlaceholder,c=e.data,u=c.title,p=c.slug,d=c.description,h=e.containerPadding,f=e.titleInputId,m=e.slugInputId,g=e.descriptionInputId,v="".concat(this.uniqueId,"-slug");return Object(E.createElement)(xt.StyledEditor,{padding:h},Object(E.createElement)(xt.ReplacementVariableEditor,{withCaret:!0,label:Object(P.__)("SEO title","yoast-components"),onFocus:this.onFocusTitle,onBlur:s,isActive:"title"===t,isHovered:"title"===n,editorRef:this.setTitleRef,replacementVariables:o,recommendedReplacementVariables:r,content:u,onChange:this.onChangeTitle,fieldId:f,type:"title"}),Object(E.createElement)(L.ProgressBar,{max:i.max,value:i.actual,progressColor:this.getProgressColor(i.score)}),Object(E.createElement)(L.SimulatedLabel,{id:v,onClick:this.onFocusSlug},Object(P.__)("Slug","yoast-components")),Object(E.createElement)(_t,{onClick:this.focusSlug,isActive:"slug"===t,isHovered:"slug"===n},Object(E.createElement)(Ct,{value:p,onChange:this.onChangeSlug,onFocus:this.onFocusSlug,onBlur:s,ref:this.setSlugRef,"aria-labelledby":this.uniqueId+"-slug",id:m})),Object(E.createElement)(xt.ReplacementVariableEditor,{withCaret:!0,type:"description",placeholder:l,label:Object(P.__)("Meta description","yoast-components"),onFocus:this.onFocusDescription,onBlur:s,isActive:"description"===t,isHovered:"description"===n,editorRef:this.setDescriptionRef,replacementVariables:o,recommendedReplacementVariables:r,content:d,onChange:this.onChangeDescription,fieldId:g}),Object(E.createElement)(L.ProgressBar,{max:a.max,value:a.actual,progressColor:this.getProgressColor(a.score)}))}},{key:"getProgressColor",value:function(e){return e>=7?B.colors.$color_good:e>=5?B.colors.$color_ok:B.colors.$color_bad}}]),r}(w.a.Component);Rt.propTypes={replacementVariables:xt.replacementVariablesShape,recommendedReplacementVariables:xt.recommendedReplacementVariablesShape,onChange:_.a.func.isRequired,onFocus:_.a.func,onBlur:_.a.func,data:_.a.shape({title:_.a.string.isRequired,slug:_.a.string.isRequired,description:_.a.string.isRequired}).isRequired,activeField:_.a.oneOf(["title","slug","description"]),hoveredField:_.a.oneOf(["title","slug","description"]),titleLengthProgress:St,descriptionLengthProgress:St,descriptionEditorFieldPlaceholder:_.a.string,containerPadding:_.a.string,titleInputId:_.a.string,slugInputId:_.a.string,descriptionInputId:_.a.string},Rt.defaultProps={replacementVariables:[],onFocus:function(){},onBlur:function(){},titleLengthProgress:{max:600,actual:0,score:0},descriptionLengthProgress:{max:156,actual:0,score:0},containerPadding:"0 20px",titleInputId:"yoast-google-preview-title",slugInputId:"yoast-google-preview-slug",descriptionInputId:"yoast-google-preview-description"};var kt,Pt,Mt,At,Tt=Rt;var Ft=S.a.fieldset(kt||(kt=x()(["\n\tborder: 0;\n\tpadding: 0;\n\tmargin: 0 0 16px;\n"]))),Dt=S.a.legend(Pt||(Pt=x()(["\n\tmargin: 8px 0;\n\tpadding: 0;\n\tcolor: ",";\n\tfont-size: 14px;\n\tfont-weight: 600;\n"])),B.colors.$color_headings),It=S()(L.Label)(Mt||(Mt=x()(["\n\t",";\n\tcolor: inherit;\n\tfont-size: 14px;\n\tline-height: 1.71428571;\n\tcursor: pointer;\n\t/* Helps RTL in Chrome */\n\tdisplay: inline-block;\n"])),Object(V.getDirectionalStyle)("margin-right: 16px","margin-left: 16px")),Nt=S()(L.Input)(At||(At=x()(["\n\t&& {\n\t\t",";\n\t\tcursor: pointer;\n\t}\n"])),Object(V.getDirectionalStyle)("margin: 0 8px 0 0","margin: 0 0 0 8px")),Ut=function(e){f()(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=b()(t);if(n){var r=b()(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return g()(this,e)});function r(e){var t;return l()(this,r),(t=o.call(this,e)).switchToMobile=t.props.onChange.bind(d()(t),"mobile"),t.switchToDesktop=t.props.onChange.bind(d()(t),"desktop"),t}return u()(r,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.mobileModeInputId,o=e.desktopModeInputId,r=n.length>0?n:"yoast-google-preview-mode-mobile",i=o.length>0?o:"yoast-google-preview-mode-desktop";return Object(E.createElement)(Ft,null,Object(E.createElement)(Dt,null,Object(P.__)("Preview as:","yoast-components")),Object(E.createElement)(Nt,{onChange:this.switchToMobile,type:"radio",name:"screen",value:"mobile",optionalAttributes:{id:r,checked:"mobile"===t}}),Object(E.createElement)(It,{for:r},Object(P.__)("Mobile result","yoast-components")),Object(E.createElement)(Nt,{onChange:this.switchToDesktop,type:"radio",name:"screen",value:"desktop",optionalAttributes:{id:i,checked:"desktop"===t}}),Object(E.createElement)(It,{for:i},Object(P.__)("Desktop result","yoast-components")))}}]),r}(O.Component);Ut.propTypes={onChange:_.a.func.isRequired,active:_.a.oneOf(Ge),mobileModeInputId:_.a.string,desktopModeInputId:_.a.string},Ut.defaultProps={active:"mobile",mobileModeInputId:"",desktopModeInputId:""};var Lt,Vt,Bt,qt=Ut;function zt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Wt(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:this.props.replacementVariables,o=zt(n);try{for(o.s();!(t=o.n()).done;){var r=t.value,i=r.name,a=r.value;e=e.replace(new RegExp("%%"+i+"%%","g"),a)}}catch(e){o.e(e)}finally{o.f()}return e}},{key:"mapDataToMeasurements",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.replacementVariables,n=this.props,o=n.baseUrl,r=n.mapEditorDataToPreview,i=this.processReplacementVariables(e.description,t);i=ce.languageProcessing.stripSpaces(i);var a=o.replace(/^https?:\/\//i,""),s={title:this.processReplacementVariables(e.title,t),url:o+e.slug,description:i},l={shortenedBaseUrl:a};return r?r(s,l):s}},{key:"mapDataToPreview",value:function(e){return{title:e.title,url:e.url,description:e.description}}},{key:"mapFieldToPreview",value:function(e){return"slug"===e&&(e="url"),e}},{key:"mapFieldToEditor",value:function(e){return"url"===e&&(e="slug"),e}},{key:"setEditButtonRef",value:function(e){this._editButton=e}},{key:"render",value:function(){var e=this.props,t=e.onChange,n=e.data,o=e.mode,r=e.date,i=e.locale,a=e.keyword,s=e.wordsToHighlight,l=e.showCloseButton,c=e.faviconSrc,u=e.mobileImageSrc,p=e.idSuffix,d=e.shoppingData,h=this.state,f=h.activeField,m=h.hoveredField,g=h.isOpen,v=this.mapDataToMeasurements(n),b=this.mapDataToPreview(v);return Object(E.createElement)(L.ErrorBoundary,null,Object(E.createElement)("div",null,Object(E.createElement)(qt,{onChange:function(e){return t("mode",e)},active:o,mobileModeInputId:Object(V.join)(["yoast-google-preview-mode-mobile",p]),desktopModeInputId:Object(V.join)(["yoast-google-preview-mode-desktop",p])}),Object(E.createElement)(bt,oe()({keyword:a,wordsToHighlight:s,mode:o,date:r,activeField:this.mapFieldToPreview(f),hoveredField:this.mapFieldToPreview(m),onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseUp:this.onMouseUp,locale:i,faviconSrc:c,mobileImageSrc:u,shoppingData:d},b)),l&&Object(E.createElement)(Jt,{onClick:g?this.close:this.open,"aria-expanded":g,ref:this.setEditButtonRef},Object(E.createElement)(L.SvgIcon,{icon:"edit"}),Object(P.__)("Edit snippet","yoast-components")),this.renderEditor()))}}]),r}(w.a.Component);nn.propTypes={replacementVariables:xt.replacementVariablesShape,recommendedReplacementVariables:xt.recommendedReplacementVariablesShape,data:_.a.shape({title:_.a.string.isRequired,slug:_.a.string.isRequired,description:_.a.string.isRequired}).isRequired,descriptionEditorFieldPlaceholder:_.a.string,baseUrl:_.a.string.isRequired,mode:_.a.oneOf(Ge),date:_.a.string,onChange:_.a.func.isRequired,onChangeAnalysisData:_.a.func,titleLengthProgress:St,descriptionLengthProgress:St,mapEditorDataToPreview:_.a.func,keyword:_.a.string,wordsToHighlight:_.a.array,locale:_.a.string,hasPaperStyle:_.a.bool,showCloseButton:_.a.bool,faviconSrc:_.a.string,mobileImageSrc:_.a.string,idSuffix:_.a.string,shoppingData:_.a.object,isCornerstone:_.a.bool,isTaxonomy:_.a.bool},nn.defaultProps={mode:"mobile",date:"",wordsToHighlight:[],replacementVariables:[],recommendedReplacementVariables:[],titleLengthProgress:{max:600,actual:0,score:0},descriptionLengthProgress:{max:156,actual:0,score:0},mapEditorDataToPreview:null,keyword:"",locale:"en",descriptionEditorFieldPlaceholder:"",onChangeAnalysisData:jt.a,hasPaperStyle:!0,showCloseButton:!0,faviconSrc:"",mobileImageSrc:"",idSuffix:"",shoppingData:{},isCornerstone:!1,isTaxonomy:!1};var on=nn},8:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},87:function(e,t){e.exports=window.lodash.uniqueId},89:function(e,t,n){"use strict";var o=n(179),r=n(180);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return r.isString(e)&&(e=y(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),p=["%","/","?",";","#"].concat(u),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(181);function y(e,t,n){if(e&&r.isObject(e)&&e instanceof i)return e;var o=new i;return o.parse(e,t,n),o}i.prototype.parse=function(e,t,n){if(!r.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i127?T+="x":T+=A[F];if(!T.match(h)){var I=P.slice(0,_),N=P.slice(_+1),U=A.match(f);U&&(I.push(U[1]),N.unshift(U[2])),N.length&&(y="/"+N.join(".")+y),this.hostname=I.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=o.toASCII(this.hostname));var L=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+L,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[O])for(_=0,M=u.length;_0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift())),n.search=e.search,n.query=e.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=w.slice(-1)[0],C=(n.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,_=0,R=w.length;R>=0;R--)"."===(S=w[R])?w.splice(R,1):".."===S?(w.splice(R,1),_++):_&&(w.splice(R,1),_--);if(!E&&!O)for(;_--;_)w.unshift("..");!E||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),C&&"/"!==w.join("/").substr(-1)&&w.push("");var k,P=""===w[0]||w[0]&&"/"===w[0].charAt(0);return j&&(n.hostname=n.host=P?"":w.length?w.shift():"",(k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift())),(E=E||n.host&&w.length)&&!P&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},9:function(e,t){function n(e,t){for(var n=0;n