!function(){var _;(_=jQuery)(window).on("et_pb_init_modules",(function(){window.et_pb_init_split_testing=function(){const{et_pb_custom:t}=window,e="object"==typeof window.ET_Builder;_((()=>{const o=window.et_pb_custom&&1e3*window.et_pb_custom.ab_bounce_rate,i={};if(_.each(t.ab_tests,((_,t)=>{window.et_pb_ab_logged_status=window.et_pb_ab_logged_status||{},window.et_pb_ab_logged_status[t.post_id]={read_page:!1,read_goal:!1,view_goal:!1,click_goal:!1,con_goal:!1,con_short:!1}})),window.et_pb_init_ab_test=function(c){if(e)return;const b=p(c.post_id),d=n(c.post_id);if(_.each(i[c.post_id],(_=>{const t="click_goal"===_||"con_short"===_?"":d;i[c.post_id][_]=et_pb_check_cookie_value(`et_pb_ab_${_}_${c.post_id}${c.test_id}${t}`,"true")})),i[c.post_id].read_page||setTimeout((()=>{a("read_page",c.post_id,void 0,c.test_id)}),o),"on"!==t.is_shortcode_tracking||i[c.post_id].con_short||et_pb_set_cookie(365,`et_pb_ab_shortcode_track_${c.post_id}=${c.post_id}_${d}_${c.test_id}`),b.length)if(b.hasClass("et_pb_module")&&(b.hasClass("et_pb_button")||b.find(".et_pb_button").length)){if(!b.hasClass("et_pb_contact_form_container")&&!b.hasClass("et_pb_newsletter")){const _=b.hasClass("et_pb_button")?b:b.find(".et_pb_button");if(b.hasClass("et_pb_comments_module")){const _=-1!==window.location.href.indexOf("#comment-"),t=et_pb_check_cookie_value(`et_pb_ab_comment_log_${c.post_id}${c.test_id}`,"true");_&&t&&(a("con_goal",c.post_id,void 0,c.test_id),et_pb_set_cookie(0,`et_pb_ab_comment_log_${c.post_id}${c.test_id}=true`))}_.on("click",(()=>{!b.hasClass("et_pb_comments_module")||i[c.post_id].con_goal?s(b,"click_goal"):et_pb_set_cookie(365,`et_pb_ab_comment_log_${c.post_id}${c.test_id}=true`)}))}}else b.on("click",(()=>{b.hasClass("et_pb_shop")&&!i[c.post_id].con_goal&&et_pb_set_cookie(365,`et_pb_ab_shop_log=${c.post_id}_${d}_${c.test_id}`),s(b,"click_goal")}))},window.et_pb_custom&&window.et_pb_custom.is_ab_testing_active&&_.each(t.ab_tests,((_,t)=>{et_pb_init_ab_test(t)})),_(".et_pb_ab_shop_conversion").length&&void 0!==et_pb_get_cookie_value("et_pb_ab_shop_log")&&""!==et_pb_get_cookie_value("et_pb_ab_shop_log")){const _=et_pb_get_cookie_value("et_pb_ab_shop_log").split("_");a("con_goal",_[0],_[1],_[2]),et_pb_set_cookie(0,"et_pb_ab_shop_log=true")}function s(_,t,o){if(e)return;const s=function(_){const t=_.attr("class"),e=parseInt(t.replace(/^.*et_pb_ab_goal_id-(\d+).*$/,"$1"));return isNaN(e)?0:e}(_),n=void 0===t?"con_goal":t;_.hasClass("et_pb_ab_goal")&&!i[s][n]?a(n,s):void 0!==o&&o()}function a(e,o,s,a,p){const c=void 0===o?t.page_id:o,b=void 0===s?n(c):s,d=void 0===a?function(_){for(let e=0;e<t.ab_tests;e++)if(t.ab_tests[e].post_id===_)return t.ab_tests[e].test_id;return t.unique_test_id}(c):a,l=JSON.stringify({test_id:c,subject_id:b,record_type:e});et_pb_set_cookie(365,`et_pb_ab_${e}_${c}${d}${"click_goal"===e||"con_short"===e?"":b}=true`),set(i,[c,e],!0),_.ajax({type:"POST",url:t.ajaxurl,data:{action:"et_pb_update_stats_table",stats_data_array:l,et_ab_log_nonce:t.et_ab_log_nonce}}).always((()=>{void 0!==p&&p()}))}function n(t){const e=_(`*[class*=et_pb_ab_subject_id-${t}_]`);return!(e.length<=0||_("html").is(".et_fb_preview_active--wireframe_preview"))&&e.attr("class").split("et_pb_ab_subject_id-")[1].split(" ")[0].split("_")[1]}function p(t){return _(`.et_pb_ab_goal_id-${t}`)}_(".et_pb_ab_split_track").length&&_(".et_pb_ab_split_track").each((function(){const t=`et_pb_ab_shortcode_track_${_(this).data("test_id")}`;if(void 0!==et_pb_get_cookie_value(t)&&""!==et_pb_get_cookie_value(t)){const _=et_pb_get_cookie_value(t).split("_");a("con_short",_[0],_[1],_[2]),et_pb_set_cookie(0,`${t}=true`)}})),window.et_reinit_waypoint_modules=et_pb_debounce((()=>{e?_.each(t.ab_tests,((_,t)=>{const e=p(t.post_id);return 0===e.length||!(!i[t.post_id].read_goal&&e.length&&e.visible(!0))||(setTimeout((()=>{e.length&&e.visible(!0)&&!i[t.post_id].read_goal&&a("read_goal",t.post_id,void 0,t.test_id)}),3e3),void s(e,"view_goal"))})):_.each(t.ab_tests,(function(t,e){const o=p(e.post_id);if(0===o.length)return!0;waypointExtended(o,{offset:et_get_offset(_(this),"80%"),handler(){!i[e.post_id].read_goal&&o.length&&o.visible(!0)&&(setTimeout((()=>{o.length&&o.visible(!0)&&!i[e.post_id].read_goal&&a("read_goal",e.post_id,void 0,e.test_id)}),3e3),s(o,"view_goal"))}})}))})),window.et_pb_maybe_log_event=s}))},window.et_pb_init_split_testing()})),((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{}).scriptLibrarySplitTesting={}}();