if(!dojo.hostenv.findModule("xg.index.util.ScrollIntoView",false)){ dojo.provide("xg.index.util.ScrollIntoView"); xg.index.util.ScrollIntoView={scrollIntoView:function(_1){ var _2=x$(_1); var _3=_2.css("padding-top"); var _4=_2.css("padding-bottom"); var _5=_3&&_3.indexOf("px")>-1?parseInt(_3,10):0; var _6=_4&&_4.indexOf("px")>-1?parseInt(_4,10):0; var _7={top:_2.offset().top+_5,bottom:_2.offset().top+_2.height()+_6}; var _8={top:x$(window).scrollTop(),bottom:x$(window).scrollTop()+x$(window).height()}; var _9; if(_7.top<_8.top){ _9=_7.top; }else{ if(_7.bottom>_8.bottom){ _9=Math.min(_7.top,_8.top+(_7.bottom-_8.bottom)); } } if(_9){ x$("html,body").animate({scrollTop:_9},100); } }}; } if(!dojo.hostenv.findModule("xg.shared.RecaptchaV2Popup",false)){ dojo.provide("xg.shared.RecaptchaV2Popup"); xg.shared.RecaptchaV2Popup=(function(_1){ var _2={}; var _={}; _.open=false; _.onSuccess; _.onCancel; _.initialize=function(){ }; _2.showIfNeeded=function(_4,_5){ if(_.open){ _.hide(); _.onCancel(); } _.onSuccess=_4; _.onCancel=_5||function(){ }; if(!xg.captcha.shouldShow){ _.hide(); _.onSuccess(""); return; } var _6=xg.shared.util.alert({"customDisplayClass":"xg_recaptcha_popup","bodyHtmlRaw":"
"+xg.shared.nls.html("cancel")+"
","noButtons":true}); x$(_6).find(".rp-cancel").click(function(e){ e.preventDefault(); _.hide(); _.onCancel(); }); _.renderRecaptcha(x$(_6).find(".rp-recaptcha")); _.open=true; }; _.renderRecaptcha=function(_8){ _.onRecaptchaReady(function(){ var _9=grecaptcha.render(_8[0],{"sitekey":xg.captcha.siteKey,"callback":function(){ var _a=grecaptcha.getResponse(_9); _.hide(); _.onSuccess(_a); }}); }); }; _.onRecaptchaReady=function(_b){ if(window.grecaptcha){ _b(); return; } var _c=setInterval(function(){ if(window.grecaptcha){ clearInterval(_c); _b(); } },1000); }; _.hide=function(){ if(!_.open){ return; } dojo.dom.removeNode(dojo.byId("xg_lightbox_alert")); xg.shared.util.hideOverlay(); _.open=false; }; xg.addOnRequire(_.initialize); return _2; })(); } if(!dojo.hostenv.findModule("xg.shared.editors.PlainEditor",false)){ dojo.provide("xg.shared.editors.PlainEditor"); xg.shared.editors.PlainEditor=function(_1){ var _2={}; var _={}; _2.setMaxLength=function(_4){ xg.shared.util.setAdvisableMaxLength(_1[0],_4); }; _2.updateBackgroundColor=function(){ }; _2.val=function(){ if(arguments.length){ _1.val(arguments[0]); return; } return _1.val(); }; _2.valWithLineBreakAdjustments=function(){ return _2.val(); }; _2.adjustLineBreaks=function(){ }; _2.unadjustLineBreaks=function(){ }; _2.initializeAfterPageLoad=function(){ return _2; }; _2.uninitialize=function(){ return _2; }; _2.focus=function(){ _1[0].focus(); }; _2.moveCursorToStart=function(){ xg.shared.editors.Editor.moveCursorToStart(_1[0]); }; _2.updateTextarea=function(){ }; _2.setEnabled=function(_5){ if(_5){ _1.removeClass("disabled").prop("disabled",false); }else{ _1.addClass("disabled").prop("disabled",true); } }; _2.getTextarea=function(){ return _1; }; return _2; }; } if(!dojo.hostenv.findModule("xg.shared.editors.tinymce.WordpressLineBreakRules",false)){ dojo.provide("xg.shared.editors.tinymce.WordpressLineBreakRules"); xg.shared.editors.tinymce.WordpressLineBreakRules=(function($){ var _2={}; var _={}; var _4="