/** Advanced iframe pro functions v. Created: 2023-08-10 01:20:43 */ var aiInstance,aiEnableCookie="undefined"!=typeof x&&aiEnableCookie,aiId="",aiExtraSpace=void 0===aiExtraSpace?0:aiExtraSpace,aiAccTime=0,aiRealFullscreen=void 0!==aiRealFullscreen&&aiRealFullscreen,aiInFullscreen=!1,aiOnloadEventsCounter=0,aiOverflowHtml=jQuery("html").css("overflow")??"visible",aiOverflowBody=jQuery("body").css("overflow")??"visible",aiCallbackExists=void 0!==aiReadyCallbacks&&aiReadyCallbacks instanceof Array,aiReadyCallbacks=aiCallbackExists?aiReadyCallbacks:[];function aiDebugExtended(a){"undefined"!=typeof aiShowDebug&&aiShowDebug&&console&&console.log&&console.log("Advanced iframe: "+a)}function aiResizeIframe(a,i,t){aiDebugExtended("aiResizeIframe");try{if("about:blank"===a.contentWindow.location.href)return;if(null!=a.contentWindow.document.body){var o=jQuery(window).scrollTop();a.style.marginTop=0,a.style.marginBottom=0,a.height=Number(t),a.style.height=Number(t)+"px";var r=aiGetIframeHeight(a);if(aiDebugExtended("aiResizeIframe - newheight: "+r),a.height=r,a.style.height=r+"px",0!==jQuery("#ai-zoom-div-"+a.id).length){var n=window["zoom_"+a.id];jQuery("#ai-zoom-div-"+a.id).css("height",r*n)}aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(r);var l=aiGetIframeHash(a.contentWindow.location.href);if(-1!==l){var s="#"+a.id;try{var d=jQuery(s).contents().find("#"+l);if(0!==d.length){var c=d.offset().top;o=Math.round(jQuery(s).offset().top+c)}}catch(h){}}if(setTimeout(function(){jQuery("html,body").scrollTop(o)},50),"true"===i){var f=aiGetIframeWidth(a);a.width=f,a.style.width=f+"px"}(0,window["resizeCallback"+a.id])(),null!=window.frameElement&&parent.jQuery("iframe").trigger("onload")}else setTimeout(function(){aiResizeIframe(a,i)},100)}catch(u){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(u))}}function aiGetIframeHash(a){var i;return a.split("#")[1]||"-1"}function aiGetIframeHeight(a){var i;return Math.max(a.contentWindow.document.body.scrollHeight,a.contentWindow.document.body.offsetHeight,a.contentWindow.document.documentElement.scrollHeight,a.contentWindow.document.documentElement.offsetHeight)+aiExtraSpace}function aiGetIframeWidth(a){var i=a.width;a.width=1,a.style.width="1px";var t=Math.max(a.contentWindow.document.body.scrollWidth,a.contentWindow.document.body.offsetWidth,a.contentWindow.document.documentElement.scrollWidth,a.contentWindow.document.documentElement.offsetWidth);return 1!==t?(a.width=t,a.style.width=t+"px"):(a.width=i,a.style.width=i+"px"),t}function aiGetParentIframeWidth(a){return null!=a&&0!==jQuery("#"+a.id).length?jQuery("#"+a.id).width():-1}function aiResizeIframeHeightById(a,i){aiDebugExtended("aiResizeIframeHeightById - id: "+a+", nHeight: "+i);try{(0,window["resizeCallback"+a])();var t=parseInt(i,10)+aiExtraSpace,o=document.getElementById(a);if(null===o&&console&&console.error){console.error("Advanced iframe configuration error: The iframe to resize could not be found. The id of the iframe and the one defined for ai_external.js ("+a+") are most likely different! Check your settings."),console.log(e);return}var r=jQuery(document).scrollTop();o.height=t,o.style.height=t+"px",jQuery("html,body").scrollTop(r),aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(t);var n=window["aiExecuteWorkaround_"+a];null!=n&&n()}catch(l){console&&console.error&&(console.error("Advanced iframe configuration error: The id of the parent and the external workaround are different! Check your settings."),console.log(l))}}function aiScrollToTop(a,i){if(aiDebugExtended("aiScrollToTop - id: "+a+", position: "+i),aiOnloadEventsCounter>0){var t=0;"iframe"===i&&(t=jQuery("#"+a).offset().top),setTimeout(function(){aiDebugExtended("aiScrollToTop - posTop: "+t),window.scrollTo(0,t)},100)}setTimeout(function(){aiOnloadEventsCounter++},1e3)}function aiWriteCookie(a){var i="ai-last-height";""!==aiId&&(i=i+"-"+aiId);var t=i+"="+a;document.cookie=t}function aiUseCookie(){var a="ai-last-height";""!==aiId&&(a=a+"-"+aiId);for(var i=document.cookie.split(";"),t=0;t1)||-1!==t.id.toLowerCase().indexOf(n[1].toLowerCase())))return!0}return!1}function aiOpenSelectorWindow(a){aiDebugExtended("aiOpenSelectorWindow");var i=jQuery("#width").val(),t=jQuery("#ai-height-0").val();(i.indexOf("%")>=0||900>Number(i))&&(i=900),(i=Number(i)+40)>screen.width&&(i=screen.width),(t=t.indexOf("%")>=0?screen.height:Number(t)+480)>screen.height-50&&(t=screen.height-50);var o="width="+i+",height="+t+",left=0,top=0,resizable=1,scrollbars=1";window.open(a,"",o).focus()}function aiDisableAiResizeOptions(a){jQuery("#onload_resize_delay").prop("readonly",a),jQuery("input[id=store_height_in_cookie1]:radio, input[id=store_height_in_cookie2]:radio").attr("disabled",a),jQuery("#additional_height").prop("readonly",a),jQuery("input[id=onload_resize_width1]:radio, input[id=onload_resize_width2]:radio").attr("disabled",a),jQuery("#resize_on_click").prop("readonly",a),jQuery("#resize_on_click_elements").prop("readonly",a),jQuery("#resize_on_ajax").prop("readonly",a),jQuery("input[id=resize_on_ajax_jquery1]:radio, input[id=resize_on_ajax_jquery2]:radio").attr("disabled",a);var i="#onload_resize_delay, #store_height_in_cookie1, #additional_height, #onload_resize_width1, ";aiDisableTextSection(a,i+="#resize_on_click, #resize_on_click_elements, #resize_on_ajax, #resize_on_ajax_jquery1")}function aiDisablePartOfIframeOptions(a){jQuery("#show_part_of_iframe_x").prop("readonly",a),jQuery("#show_part_of_iframe_y").prop("readonly",a),jQuery("#show_part_of_iframe_height").prop("readonly",a),jQuery("#show_part_of_iframe_width").prop("readonly",a),jQuery("input[id=show_part_of_iframe_allow_scrollbar_horizontal1]:radio, input[id=show_part_of_iframe_allow_scrollbar_horizontal2]:radio").attr("disabled",a),jQuery("input[id=show_part_of_iframe_allow_scrollbar_vertical1]:radio, input[id=show_part_of_iframe_allow_scrollbar_vertical2]:radio").attr("disabled",a),jQuery("#show_part_of_iframe_next_viewports").prop("readonly",a),jQuery("input[id=show_part_of_iframe_next_viewports_loop1]:radio, input[id=show_part_of_iframe_next_viewports_loop2]:radio").attr("disabled",a),jQuery("#show_part_of_iframe_new_window").prop("readonly",a),jQuery("#show_part_of_iframe_new_url").prop("readonly",a),jQuery("input[id=show_part_of_iframe_next_viewports_hide1]:radio, input[id=show_part_of_iframe_next_viewports_hide2]:radio").attr("disabled",a),jQuery("#show_part_of_iframe_style").prop("readonly",a),jQuery("input[id=show_part_of_iframe_zoom1]:radio, input[id=show_part_of_iframe_zoom2]:radio, input[id=show_part_of_iframe_zoom3]:radio").attr("disabled",a),jQuery(".media-query-input").prop("readonly",a);var i="#show_part_of_iframe_x, #show_part_of_iframe_y, #show_part_of_iframe_height, #show_part_of_iframe_width, ";i+="#show_part_of_iframe_allow_scrollbar_horizontal1, #show_part_of_iframe_next_viewports, #show_part_of_iframe_next_viewports_loop1, ",i+="#show_part_of_iframe_new_window, #show_part_of_iframe_new_url, #show_part_of_iframe_next_viewports_hide1, #show_part_of_iframe_style, ",aiDisableTextSection(a,i+="#show_part_of_iframe_zoom1, #show_part_of_iframe_allow_scrollbar_vertical1, #add-media-query-show_part_of_iframe_media_query"),a?(jQuery("#add-media-query-show_part_of_iframe_media_query").hide(),jQuery(".ai-delete").hide()):(jQuery("#add-media-query-show_part_of_iframe_media_query").show(),jQuery(".ai-delete").show())}function aiDisableLazyLoadOptions(a){jQuery("#enable_lazy_load_threshold").prop("readonly",a),jQuery("#enable_lazy_load_fadetime").prop("readonly",a),jQuery("input[id=enable_lazy_load_reserve_space1]:radio, input[id=enable_lazy_load_reserve_space2]:radio").attr("disabled",a),jQuery("input[id=enable_lazy_load_manual1]:radio, input[id=enable_lazy_load_manual2]:radio, input[id=enable_lazy_load_manual3]:radio").attr("disabled",a),aiDisableTextSection(a,"#enable_lazy_load_threshold, #enable_lazy_load_fadetime, #enable_lazy_load_reserve_space1, #enable_lazy_load_manual1")}function aiDisableIframeAsLayerOptions(a){jQuery("input[id=show_iframe_as_layer_full]:radio").attr("disabled",a),jQuery("#show_iframe_as_layer_header_file").prop("readonly",a),jQuery("#show_iframe_as_layer_header_height").prop("readonly",a),jQuery("#show_iframe_as_layer_autoclick_delay").prop("readonly",a),jQuery("#show_iframe_as_layer_autoclick_hide_time").prop("readonly",a),jQuery("input[id=show_iframe_as_layer_header_position1]:radio, input[id=show_iframe_as_layer_header_position2]:radio").attr("disabled",a),jQuery("input[id=show_iframe_as_layer_full1]:radio, input[id=show_iframe_as_layer_full2]:radio, input[id=show_iframe_as_layer_full3]:radio").attr("disabled",a),jQuery("input[id=show_iframe_as_layer_keep_content1]:radio, input[id=show_iframe_as_layer_keep_content2]:radio").attr("disabled",a);var i="#show_iframe_as_layer_full, #show_iframe_as_layer_header_file, #show_iframe_as_layer_header_height, ";i+="#show_iframe_as_layer_header_position1, #show_iframe_as_layer_full1, #show_iframe_as_layer_keep_content1, ",aiDisableTextSection(a,i+="#show_iframe_as_layer_autoclick_delay, #show_iframe_as_layer_autoclick_hide_time")}function aiDisableAddParamOptions(a){jQuery("input[id=add_iframe_url_as_param_direct1]:radio, input[id=add_iframe_url_as_param_direct2]:radio").attr("disabled",a),jQuery("#add_iframe_url_as_param_prefix").prop("readonly",a),aiDisableTextSection(a,"#add_iframe_url_as_param_prefix, #add_iframe_url_as_param_direct1")}function aiDisableTextSection(a,i){a?jQuery(i).closest("tr").addClass("disabled"):jQuery(i).closest("tr").removeClass("disabled")}function aiInitAdminConfiguration(a,i){"false"===jQuery("input[type=radio][name=onload_resize]:checked").val()&&aiDisableAiResizeOptions(!0),jQuery("input[type=radio][name=onload_resize]").click(function(){"true"===jQuery(this).val()?(jQuery("input:radio[name=enable_external_height_workaround]")[1].checked=!0,aiDisableAiResizeOptions(!1)):(jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),jQuery("input[type=radio][name=enable_external_height_workaround]").click(function(){"true"===jQuery(this).val()&&(jQuery("input:radio[name=onload_resize]")[1].checked=!0,jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),"false"===jQuery("input[type=radio][name=show_part_of_iframe]:checked").val()&&aiDisablePartOfIframeOptions(!0),jQuery("input[type=radio][name=show_part_of_iframe]").click(function(){"false"===jQuery(this).val()?aiDisablePartOfIframeOptions(!0):aiDisablePartOfIframeOptions(!1)}),"false"===jQuery("input[type=radio][name=show_iframe_as_layer]:checked").val()&&aiDisableIframeAsLayerOptions(!0),jQuery("input[type=radio][name=show_iframe_as_layer]").click(function(){"false"===jQuery(this).val()?aiDisableIframeAsLayerOptions(!0):aiDisableIframeAsLayerOptions(!1)}),"true"===jQuery("input[type=radio][name=expert_mode]:checked").val()&&(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer"),jQuery("table.form-table th").css("padding-top","8px").css("padding-bottom","2px"),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px"),jQuery("table.form-table th").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")})),jQuery("input[type=radio][name=expert_mode]").click(function(){"false"===jQuery(this).val()?(jQuery(".description").css("display","block"),jQuery("table.form-table th").css("cursor","auto"),jQuery("table.form-table th").off("click"),jQuery("table.form-table th").css("padding-top","20px").css("padding-bottom","20px"),jQuery("table.form-table td").css("padding-top","15px").css("padding-bottom","15px")):(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer"),jQuery("table.form-table th").css("padding-top","8px").css("padding-bottom","2px"),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px"),jQuery("table.form-table th").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")}))}),jQuery("#accordion").find("h1").click(function(){jQuery(this).next().slideToggle(aiAccTime)}).next().hide(),jQuery("#accordion").find("a").click(function(){var a="#h1-"+jQuery(this).prop("hash").substring(1);jQuery(a).next().show(),location.hash=a}),"false"===jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val()&&jQuery("#enable_lazy_load_manual_element").prop("readonly",!0),jQuery("input[type=radio][name=enable_lazy_load_manual]").click(function(){"false"===jQuery(this).val()||"auto"===jQuery(this).val()?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1)}),"false"===jQuery("input[type=radio][name=add_iframe_url_as_param]:checked").val()&&aiDisableAddParamOptions(!0),jQuery("input[type=radio][name=add_iframe_url_as_param]").click(function(){aiDisableAddParamOptions("false"===jQuery(this).val())}),"false"===jQuery("input[type=radio][name=enable_lazy_load]:checked").val()&&(aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0)),jQuery("input[type=radio][name=enable_lazy_load]").click(function(){"false"===jQuery(this).val()?(aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0)):(aiDisableLazyLoadOptions(!1),"false"===jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val()||"auto"===jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val()?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1))}),jQuery(".confirmation").on("click",function(){return confirm("Are you sure? Selecting OK will set all settings to the default.")}),jQuery(".confirmation-file").on("click",function(){return confirm("Do you really want to delete the file?")}),jQuery(".confirmation-hash").on("click",function(){return confirm("Do you really want to delete the hash/URL cache?")}),jQuery("a.post").click(function(a){a.stopPropagation(),a.preventDefault();var i,t=this.href.split("?"),o=t[0],r=t[1].split("&"),n="";o+="?"+r[0];for(var l=1,s=r.length;l';var d=jQuery("#twg-options").val();n+='',jQuery("body").append('
'+n+"
"),jQuery("#poster").submit()}),jQuery(".ai-input-search").keyup(function(a){var t=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(t,i)}),jQuery(".ai-input-search").on("click",function(a){setTimeout(function(){var a=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(a,i)},100)}),jQuery(document).on("click",".nav-tab-wrapper a",function(){var a=jQuery(this).attr("id");return jQuery("section").hide(),jQuery("section."+a).show(),jQuery("#current_tab").val(a.substr(4,1)),jQuery(".nav-tab").removeClass("nav-tab-active"),jQuery(this).addClass("nav-tab-active"),jQuery(this).blur(),!1}),jQuery(document).on("click","a#external-workaround-link",function(){return jQuery(".external-workaround").click(),location.hash="tab_3",aiShowHeader("tab_3"),!1}),jQuery(document).on("click","a#resize-same-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-resize").removeClass("closed"),location.hash="id-advanced-resize",aiShowHeader("id-advanced-resize"),!1}),jQuery(document).on("click","a.jquery-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-jquery").removeClass("closed"),jQuery("#jquery-help").show(),location.hash="id-help-jquery",aiShowHeader("id-help-jquery"),!1}),jQuery(document).on("click","a#browser-detection-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-browser").removeClass("closed"),jQuery("#browser-help").show(),location.hash="id-help-browser",aiShowHeader("id-help-browser"),!1}),jQuery(document).on("click","a.howto-id-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-id").removeClass("closed"),location.hash="id-help-id",aiShowHeader("id-help-id"),!1}),jQuery(document).on("click",".modifycontent-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-advanced-modify-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".id-modify-css-iframe-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-css-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".modify-target",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-target",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click","a.link-external-domain",function(){return jQuery("#id-external-different").removeClass("closed"),location.hash="#id-external-different",aiShowHeader("id-external-different"),!1}),jQuery(document).on("click","a.link-id-external-ai-config-post",function(){return jQuery("#id-external-ai-config-post").removeClass("closed"),location.hash="#id-external-ai-config-post",aiShowHeader("id-external-ai-config-post","tr-use_post_message"),!1}),jQuery(document).on("click","a.link-id-external-ai-overview",function(){return jQuery("#id-external-ai-overview").removeClass("closed"),location.hash="#id-external-ai-overview",aiShowHeader("id-external-ai-overview","id-external-ai-overview"),!1}),jQuery(document).on("click","a.post-message-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-communication").removeClass("closed"),location.hash="#id-help-communication",aiShowHeader("id-help-communication","id-help-communication"),!1}),jQuery(document).on("click","a.enable-admin",function(){return jQuery(".options-tab").click(),jQuery("#id-options-display").removeClass("closed"),location.hash="#id-options-display",aiShowHeader("id-options-display","tr-demo"),!1}),jQuery(document).on("click","a.enter-registration",function(){return jQuery(".options-tab").click(),jQuery("#id-options-registration").removeClass("closed"),location.hash="#id-options-registration",aiShowHeader("id-options-registration","tr-demo"),!1}),jQuery(document).on("click","a#user-help-link",function(){return jQuery("#user-help").css("display","block"),!1}),jQuery(document).on("click","a#user-meta-link",function(){return jQuery("#meta-help").css("display","block"),!1}),jQuery(document).on("click","#ai-selector-help-link",function(){return jQuery("#ai-selector-help").slideDown(1e3),!1}),jQuery(document).on("click",".ai-selector-help-link-move",function(){return jQuery("#ai-selector-help").show("slow"),location.hash="#ai-selector-help-link",aiShowHeader("ai-selector-help-link"),!1}),jQuery("#ai_form").submit(function(){aiSetScrollposition()}),jQuery(".if-js-closed").removeClass("if-js-closed").addClass("closed"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles("toplevel_page_advanced-iframe"),jQuery(".ai-spinner").css("display","none"),jQuery("#"+i).next().show(),jQuery(document).on("click","#test-pro-admin.is-permanent-closable button",function(){closeInfoPermanent("test-pro-admin")}),jQuery(document).on("click","#show-registration-message.is-permanent-closable button",function(){closeInfoPermanent("show-registration-message")}),jQuery(document).on("click","#show-version-message.is-permanent-closable button",function(){closeInfoPermanent("show-version-message")}),jQuery(document).on("click",".mq-breakpoint-height a",function(a){return jQuery(this).parent().remove(),aiUpdateHeightHiddenField("height"),a.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-height",function(a){var i=jQuery(".mq-breakpoint-height").length+1;return jQuery(this).parent().append('
 Breakpoint: Delete'),a.preventDefault(),!1}),jQuery(document).on("click",".mq-breakpoint-show_part_of_iframe_media_query a",function(a){return jQuery(this).parent().remove(),aiUpdateHeightHiddenFieldMediaQuery("show_part_of_iframe_media_query"),a.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-show_part_of_iframe_media_query",function(a){var i=jQuery(".mq-breakpoint-show_part_of_iframe_media_query").length+1;return jQuery(this).parent().append('
x:  y:  w:  h:  iframe width:  Breakpoint: Delete'),a.preventDefault(),!1})}function aiCheckHeightNumber(a,i){aiCheckInputNumber(a),aiUpdateHeightHiddenField(i)}function aiCheckHeightNumberMediaQuery(a,i){aiCheckInputNumber(a),aiUpdateHeightHiddenFieldMediaQuery(i)}function aiUpdateHeightHiddenField(a){var i=jQuery("#ai-"+a+"-0").val(),t=[];jQuery(".mq-breakpoint-"+a).each(function(a){var i=jQuery(this).children().eq(0).val(),o=jQuery(this).children().eq(1).val();""!==i&&""!==o&&t.push({heightChild:i,breakpointChild:o})}),t.sort(function(a,i){return i.breakpointChild-a.breakpointChild});let o=i;t.forEach(function(a){o+=","+a.heightChild+"|"+a.breakpointChild}),jQuery("#"+a).val(o);let r=jQuery("#description-"+a).html().split("Shortcode attribute: ")[0];jQuery("#description-"+a).html(r+"Shortcode attribute: "+a+'="'+o+'"')}function aiUpdateHeightHiddenFieldMediaQuery(a){var i=[];jQuery(".mq-breakpoint-"+a).each(function(a){var t=jQuery(this).children().eq(0).val(),o=jQuery(this).children().eq(1).val(),r=jQuery(this).children().eq(2).val(),n=jQuery(this).children().eq(3).val(),l=jQuery(this).children().eq(4).val(),s=jQuery(this).children().eq(5).val();(""!==t||""!==o||""!==r||""!==n||""!==l)&&""!==s&&i.push({mediaX:t,mediaY:o,mediaW:r,mediaH:n,mediaIW:l,breakpointChild:s})}),i.sort(function(a,i){return i.breakpointChild-a.breakpointChild});let t="";i.forEach(function(a){t+=","+a.mediaX+"|"+a.mediaY+"|"+a.mediaW+"|"+a.mediaH+"|"+a.mediaIW+"|"+a.breakpointChild}),t=t.replace(/(^,)|(,$)/g,""),jQuery("#"+a).val(t);let o=jQuery("#description-"+a).html().split("Shortcode attribute: ")[0];jQuery("#description-"+a).html(o+"Shortcode attribute: "+a+'="'+t+'"')}function aiSettingsSearch(a,i){var t=0;""!==a?(jQuery("#ai p").not(".form-table p").hide(),jQuery("#ai ul").not(".form-table ul").hide(),jQuery("#ai ol").not(".form-table ol").hide(),"false"!==i&&(jQuery("#ai h1").not(".show-always").hide(),jQuery("#ai #accordion").attr("id","acc"),jQuery("#ai #acc > div").show(),jQuery("#ai #spacer-div").show()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").hide(),jQuery("#ai .form-table").addClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").hide(),jQuery("#ai .hide-always").hide(),jQuery("#ai .hide-search").hide(),jQuery("#ai .postbox-container").not(".show-always").hide(),jQuery("#ai .show-always p").show(),jQuery("#ai .show-always ul").show(),jQuery("#ai .show-always ol").show(),jQuery("#ai .show-always h2,#ai .show-always .icon_ai,#ai .show-always h3,#ai .show-always h4").show()):(jQuery("#ai p").not(".form-table p").show(),jQuery("#ai section .ai-anchor").show(),jQuery("#ai ul").not(".form-table ul").show(),jQuery("#ai ol").not(".form-table ol").show(),"false"!==i&&(jQuery("#ai h1").not(".show-always").show(),jQuery("#ai #acc").attr("id","accordion"),jQuery("#ai #accordion > div").hide(),jQuery("#ai #spacer-div").hide()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").show(),jQuery("#ai .form-table").removeClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").show(),jQuery("#ai .sub-domain-container").show(),jQuery("#ai .hide-search").show(),jQuery("#ai .hide-always").hide(),jQuery("#ai .postbox-container").show(),setTimeout(function(){jQuery("#ai .postbox-container .closed .inside").css("display","")},5)),jQuery("#ai .mark-tab-header").removeClass("mark-tab-header");var o="";if(jQuery("#ai tr").each(function(){var i=jQuery(this),r=i.find("th").text(),n=i.find("p.description").text();if(r=void 0!==r?r.toLowerCase():"XXXXXXX",n=void 0!==n?n.toLowerCase():"XXXXXXX",-1===r.indexOf(a)&&-1===n.indexOf(a))0==i.parents(".show-always").length&&i.addClass("hide-setting");else{if(i.closest("table").prevAll("h2:first").show(),i.closest(".postbox-container").show(),i.closest(".postbox-container").find("h2, .inside").show(),i.closest("table").prevAll("#ai .icon_ai:first").show(),i.closest("table").nextAll("p.button-submit:first").show(),i.removeClass("hide-setting"),i.closest(".hide-search").show(),a.length>2){var l=i.closest("section").attr("class");void 0!==l&&(jQuery("#"+l).addClass("mark-tab-header"),""===o&&(o=l))}t++}}),0===t)jQuery("#ai-input-search-result").show(),jQuery("#ai .mark-tab-header").removeClass("mark-tab-header");else{if(jQuery("#ai-input-search-result").hide(),aiInstance&&aiInstance.revert(),""!==a&&a.length>2){var r=RegExp(a,"gi");aiInstance=findAndReplaceDOMText(document.getElementById("tab_wrapper"),{find:r,wrap:"em"})}jQuery("#"+o).click()}}function aiResizeIframeRatio(a,i){aiDebugExtended("aiResizeIframeRatio");var t,o=Math.ceil(jQuery("#"+a.id).width()*parseFloat(i.replace(",",".")));a.height=o,a.style.height=o+"px"}function aiGenerateShortcode(a){var i="[advanced_iframe ";""!==jQuery("#securitykey").val()&&(i+='securitykey="'+jQuery("#securitykey").val()+'" '),i+='use_shortcode_attributes_only="true" ';var t=jQuery("#include_html").val(),o=jQuery("#include_url").val(),r=jQuery("#document_domain_add").val();if(void 0===t||""===t&&""===o){var n=jQuery("#src").val();""===n?alert("Required url is missing."):i+='src="'+n+'" ',i+=aiGenerateTextShortcode("src_hide"),i+=aiGenerateTextShortcode("width"),i+=aiGenerateTextShortcode("height"),i+=aiGenerateRadioShortcode("scrolling","none"),i+=aiGenerateRadioShortcode("add_surrounding_p","false"),i+=aiGenerateRadioShortcode("enable_ios_mobile_scolling","false"),i+=aiGenerateTextShortcode("marginwidth"),i+=aiGenerateTextShortcode("marginheight"),i+=aiGenerateTextShortcode("frameborder"),i+=aiGenerateRadioShortcode("transparency","true"),i+=aiGenerateTextShortcode("class"),i+=aiGenerateTextShortcode("style"),i+=aiGenerateTextShortcodeWithDefault("id","advanced_iframe"),i+=aiGenerateTextShortcode("name"),i+=aiGenerateRadioShortcode("allowfullscreen","false"),i+=aiGenerateTextShortcode("safari_fix_url"),i+=aiGenerateTextShortcode("sandbox"),i+=aiGenerateTextShortcode("title"),i+=aiGenerateTextShortcode("allow"),i+=aiGenerateRadioShortcode("loading","lazy"),i+=aiGenerateTextShortcode("referrerpolicy"),i+=aiGenerateTextShortcode("custom"),i+=aiGenerateTextShortcode("url_forward_parameter"),i+=aiGenerateTextShortcode("map_parameter_to_url"),i+=aiGenerateRadioShortcode("add_iframe_url_as_param","false"),i+=aiGenerateTextShortcode("add_iframe_url_as_param_prefix"),i+=aiGenerateRadioShortcode("add_iframe_url_as_param_direct","false"),i+=aiGenerateRadioShortcode("use_iframe_title_for_parent","false"),i+=aiGenerateRadioShortcode("onload_scroll_top","false"),i+=aiGenerateRadioShortcode("hide_page_until_loaded","false"),i+=aiGenerateRadioShortcode("show_iframe_loader","false"),i+=aiGenerateTextShortcode("hide_content_until_iframe_color"),i+=aiGenerateTextShortcode("iframe_zoom"),i+=aiGenerateRadioShortcode("iframe_zoom_ie8","false"),i+=aiGenerateRadioShortcode("use_zoom_absolute_fix","false"),i+=aiGenerateRadioShortcode("auto_zoom","false"),i+=aiGenerateTextShortcode("auto_zoom_by_ratio"),i+=aiGenerateRadioShortcode("enable_responsive_iframe","false"),i+=aiGenerateTextShortcode("iframe_height_ratio"),i+=aiGenerateRadioShortcode("enable_lazy_load","false"),i+=aiGenerateTextShortcodeWithDefault("enable_lazy_load_threshold","3000"),i+=aiGenerateRadioShortcode("enable_lazy_load_reserve_space","true"),i+=aiGenerateTextShortcode("enable_lazy_load_fadetime"),i+=aiGenerateRadioShortcode("enable_lazy_load_manual","false"),i+=aiGenerateRadioShortcode("enable_lazy_load_manual_element","false"),i+=aiGenerateTextShortcode("reload_interval"),i+=aiGenerateTextShortcode("hide_elements"),i+=aiGenerateTextShortcode("content_id"),i+=aiGenerateTextShortcode("content_styles"),i+=aiGenerateTextShortcode("parent_content_css"),i+=aiGenerateRadioShortcode("add_css_class_parent","false"),i+=aiGenerateTextShortcode("change_parent_links_target"),i+=aiGenerateRadioShortcode("show_iframe_as_layer","false"),i+=aiGenerateRadioShortcode("show_iframe_as_layer_full","false"),i+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_delay"),i+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_hide_time"),i+=aiGenerateTextShortcode("show_iframe_as_layer_header_file"),i+=aiGenerateTextShortcodeWithDefault("show_iframe_as_layer_header_height","100"),i+=aiGenerateRadioShortcode("show_iframe_as_layer_header_position","top"),i+=aiGenerateRadioShortcode("show_iframe_as_layer_keep_content","true");var l=aiGenerateRadioShortcode("show_part_of_iframe","false");i+=l,""!==l&&(i+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_x",-1),i+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_y",-1),i+=aiGenerateTextShortcode("show_part_of_iframe_width"),i+=aiGenerateTextShortcode("show_part_of_iframe_height"),i+=aiGenerateTextShortcode("show_part_of_iframe_media_query"),i+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_horizontal","false"),i+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_vertical","false"),i+=aiGenerateTextShortcode("show_part_of_iframe_style"),i+=aiGenerateRadioShortcode("show_part_of_iframe_zoom","false"),i+=aiGenerateTextShortcode("show_part_of_iframe_next_viewports"),i+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_loop","false"),i+=aiGenerateTextShortcode("show_part_of_iframe_new_window"),i+=aiGenerateTextShortcode("show_part_of_iframe_new_url"),i+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_hide","false")),i+=aiGenerateTextShortcode("hide_part_of_iframe"),i+=aiGenerateRadioShortcode("fullscreen_button","false"),i+=aiGenerateTextShortcode("fullscreen_button_hide_elements"),i+=aiGenerateRadioShortcode("fullscreen_button_full","false"),i+=aiGenerateRadioShortcode("fullscreen_button_style","black"),i+=aiGenerateRadioShortcode("add_css_class_iframe","false"),i+=aiGenerateTextShortcode("iframe_hide_elements"),i+=aiGenerateTextShortcode("onload_show_element_only"),i+=aiGenerateTextShortcode("iframe_content_id"),i+=aiGenerateTextShortcode("iframe_content_styles"),i+=aiGenerateTextShortcode("iframe_content_css"),i+=aiGenerateTextShortcode("change_iframe_links"),i+=aiGenerateTextShortcode("change_iframe_links_target"),i+=aiGenerateTextShortcode("change_iframe_links_href"),i+=aiGenerateTextShortcode("onload"),i+=aiGenerateRadioShortcode("onload_resize","false"),i+=aiGenerateTextShortcode("onload_resize_delay"),i+=aiGenerateRadioShortcode("store_height_in_cookie","false"),i+=aiGenerateTextShortcode("additional_height"),i+=aiGenerateRadioShortcode("onload_resize_width","false"),i+=aiGenerateTextShortcode("resize_on_ajax"),i+=aiGenerateRadioShortcode("resize_on_ajax_jquery","true"),i+=aiGenerateTextShortcode("resize_on_click"),i+=aiGenerateTextShortcodeWithDefault("resize_on_click_elements","a"),i+=aiGenerateTextShortcode("resize_on_element_resize"),i+=aiGenerateTextShortcodeWithDefault("resize_on_element_resize_delay","250"),i+=aiGenerateTextShortcode("tab_hidden"),i+=aiGenerateTextShortcode("tab_visible"),i+=aiGenerateRadioShortcode("add_document_domain","false"),"true"===r&&(i+=aiGenerateTextShortcode("document_domain")),i+=aiGenerateRadioShortcode("enable_external_height_workaround","external"),i+=aiGenerateRadioShortcode("hide_page_until_loaded_external","false"),i+=aiGenerateTextShortcode("pass_id_by_url"),i+=aiGenerateRadioShortcode("multi_domain_enabled","true"),"true"===a?i+=aiGenerateRadioShortcode("use_post_message","true"):i+=aiGenerateRadioShortcode("use_post_message","false"),i+=aiGenerateTextShortcode("additional_css"),i+=aiGenerateTextShortcode("additional_js"),i+=aiGenerateTextShortcode("additional_js_file_iframe"),i+=aiGenerateTextShortcode("additional_css_file_iframe")}else""===t?(i+=aiGenerateTextShortcode("include_url"),i+=aiGenerateTextShortcode("include_content"),i+=aiGenerateTextShortcode("include_height"),i+=aiGenerateTextShortcode("include_fade"),i+=aiGenerateRadioShortcode("include_hide_page_until_loaded","false")):i+=aiGenerateTextShortcode("include_html");i+=aiGenerateRadioShortcode("debug_js","false"),i=i.slice(0,-1),i+="]",jQuery("#gen-shortcode").html(i)}function aiGenerateTextShortcodeWithDefault(a,i){var t="",o=jQuery("#"+a),r=o.val();return o.length>0&&""!==r&&r!==i&&(t=a+'="'+r+'" '),t}function aiGenerateTextShortcode(a){var i="",t=jQuery("#"+a),o=t.val();return t.length>0&&""!==o&&"0"!==o&&(i=a+'="'+o+'" '),i}function aiGenerateRadioShortcode(a,i){var t="",o=jQuery("input:radio[name="+a+"]:checked"),r=o.val();return"enable_ios_mobile_scolling"===a&&(a="enable_ios_mobile_scrolling"),o.length>0&&r!==i&&(t+=a+'="'+r+'" '),t}function aiAddCssClassAllParents(a){for(var i=jQuery(a).parentsUntil("html"),t="ai-class-",o=0;o1&&(d=1),aiSetZoom(a,d),window["zoom_"+a]=d,n.width(l).css("max-width","none"),s}function aiAutoZoom(a,i,t){aiDebugExtended("aiAutoZoom");var o,r=t.split("|");t=r[0];var n=-1;1!==r.length&&(n=r[1]);var l=document.getElementById(a);-1===n?(l.width=1,l.style.width="1px",o=aiGetIframeWidth(l),l.width=o,l.style.width=o+"px"):o=n;var s=aiAutoZoomExternal(a,o,i);if(""===t)aiResizeIframe(l,!1);else{var d=Math.ceil(o*t);if(l.height=d,l.style.height=d+"px",0!==jQuery("#ai-zoom-div-"+l.id).length){var c=window["zoom_"+l.id];jQuery("#ai-zoom-div-"+l.id).css("height",Math.ceil(d*c))}}return s}function aiSetZoom(a,i){var t=jQuery("#"+a);!0===aiIsIe8&&t.css("-ms-zoom",i),t.css({"-ms-transform":"scale("+i+")","-moz-transform":"scale("+i+")","-o-transform":"scale("+i+")","-webkit-transform":"scale("+i+")",transform:"scale("+i+")"})}function aiAutoZoomViewport(a,i){for(var t=jQuery(a),o=t.parent(),r=0;o.is("p")||void 0!==o.attr("id")&&0===o.attr("id").indexOf("ai-");)if(o=o.parent(),r++>10){alert("Unexpected div structure. Please disable the zoom.");break}var n=t.width(),l=o.width(),s=t.height(),d=l/n;"true"===i&&d>1&&(d=1),aiSetZoom(t.attr("id"),d);var c=-Math.round((n-n*d)/2),h=-Math.round((s-s*d)/2);t.css({"margin-left":c+"px","margin-right":c+"px","margin-top":h+"px","margin-bottom":h+"px"})}function aiResetAiSettings(){jQuery("#action").val("reset")}function aiCheckInputNumber(a){a.value=a.value.split(" ").join("");var i=a.value;""!==a.value&&(i.match(/^(\-){0,1}([\d.])+(px|%|em|pt|vh|vw|rem|ch)?(\-|\+){0,1}([\d.]){0,7}(px|%|em|pt|vh|vw|rem|ch)?$/)||(alert("Please check the value you have entered. Only numbers with a dot or with an optional px, %, em or pt are allowed."),setTimeout(function(){a.focus()},10)))}function aiCheckInputPurchaseCode(a){a.value=a.value.split(" ").join("");var i=a.value;""!==a.value&&(i.match(/^([a-f0-9]{8})-(([a-f0-9]{4})-){3}([a-f0-9]{12})$/i)||(alert("Please check the value you have entered. Your input seems not to be a valid purchase code."),a.value="",setTimeout(function(){a.focus()},10)))}function aiCheckInputNumberOnly(a){a.value=a.value.split(" ").join("");var i=a.value;if(""===a.value){a.value="0";return}i.match(/^(\-){0,1}([\d.])+$/)||(alert("Please check the value you have entered. Only numbers without a dot or optional px, %, em or pt are allowed."),setTimeout(function(){a.focus()},10))}function aiShowHeader(a,i){var t=jQuery(window).scrollTop();jQuery(window).scrollTop(t-40),void 0!==i&&aiFlashElement(i)}function aiFlashElement(a){setTimeout(function(){jQuery("#"+a).css("background-color","#eee")},500),setTimeout(function(){jQuery("#"+a).css("background-color","#fff")},900),setTimeout(function(){jQuery("#"+a).css("background-color","#eee")},1300),setTimeout(function(){jQuery("#"+a).css("background-color","#fff")},1700)}function aiSetScrollposition(){var a=jQuery(document).scrollTop();jQuery("#scrollposition").val(a)}function aiResetShowPartOfAnIframe(a){jQuery("#"+a).css("top","0px").css("left","0px").css("position","static"),jQuery("#ai-div-"+a).css("width","auto").css("height","auto").css("overflow","auto").css("position","static")}function aiShowLayerIframe(a,i,t,o,r,n,l){aiDebugExtended("aiShowLayerIframe"),n=void 0!==n&&n,l=void 0===l||l;var s="#"+i;jQuery("#ai-zoom-div-"+i).show(),l&&"true"===o&&jQuery(s).css("visibility","hidden"),jQuery(s).show(),jQuery("#ai-layer-div-"+i).length&&jQuery(s="#ai-layer-div-"+i).show(),jQuery("body").css("overflow","hidden"),jQuery("html").css("overflow-y","visible"),jQuery("body").append('');var d="";l&&"true"===r&&(d='
Loading
'),0===jQuery("#ai_backlayer").length&&jQuery(s).parent().append('
'+d),jQuery("#ai_backlink, #ai_backlayer").click(function(){aiHideLayerIframe(i,n)}),l||(a.preventDefault(),a.stopPropagation())}function aiHideLayerIframe(a,i){aiDebugExtended("aiHideLayerIframe"),jQuery("#"+a).hide(),i||(jQuery("#"+a).attr("src","about:blank"),aiLayerIframeHrefs[a]="about:blank"),jQuery("#ai-zoom-div-"+a).hide(),jQuery("#ai-layer-div-"+a).hide(),jQuery("#ai_backlink").remove(),jQuery("#ai_backlayer").remove(),jQuery("#ai-div-loader-global").remove(),jQuery("body").css("overflow","auto"),jQuery("html").css("overflow-y","scroll")}var aiLayerIframeHrefs=[];function aiCheckReload(a,i){t=void 0===aiLayerIframeHrefs[i]?jQuery("#"+i).attr("src"):aiLayerIframeHrefs[i];var t,o=jQuery(a).attr("href");return aiLayerIframeHrefs[i]=o,t!==o}function aiChangeTitle(a){aiDebugExtended("aiChangeTitle");try{var i=document.getElementById(a).contentDocument.title;null!==i&&"undefined"!==i&&""!==i&&(document.title=i)}catch(t){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the title if the iframe to the parent on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(t))}}function aiChangeUrlParam(a,i,t,o,r){aiDebugExtended("aiChangeUrlParam");var n,l=!1;if(-1!==t.lastIndexOf("//",0)&&(t=location.protocol+t),a!==encodeURIComponent(t)){n=aiSetGetParameter(i,a);var s=!0;if(o.startsWith("hash"))return aiGetUrlMapping(a,i,o);if(o){var d=n.replace(o,"");d===n&&(s=!1),n=d}if(s&&(n=n.replace("http%3A%2F%2F",""),n=-1!==window.location.href.toLowerCase().lastIndexOf("http:",0)?n.replace("https%3A%2F%2F","s|"):n.replace("https%3A%2F%2F","")),r){var n=aiRemoveQueryString(window.location.href),c=decodeURIComponent(a),h=c.indexOf("?");-1!==h&&(n+="?"+c.slice(h+1),l=!0)}aiEndsWidth(n,i+"=")&&(n=aiRemoveURLParameter(n,i))}else{var f=window.location.href;n=aiRemoveURLParameter(f=f.split("/"+i+"/",1)[0],i)}aiSetBrowserUrl(n,l)}function aiGetUrlMappingUrl(a,i,t){var o,r=aiRemoveURLParameter(window.location.href,a=a.replace(":short",""));if(i.startsWith("hashrewrite")){var n="";if(r.indexOf("?")>=0){var l=r.split("?");r=l[0],n="?"+l[1]}var s=r.split("/"+a+"/",1)[0];aiEndsWidth(s,"/")||(s+="/"),r=s+(a+"/")+t+n}else{var d=r.indexOf("?")>=0?"&":"?";r+=d+a+"="+t}return r}function aiSetBrowserUrl(a,i){aiSupportsHistoryApi()&&(i||(a=a.replace(/%2F/g,"/")),window.history.pushState({},"",a),window.onpopstate=function(a){a&&a.state&&window.history.back()})}function aiRemoveQueryString(a){return a.indexOf("%3F")>=0?a.split("%3F")[0]:a.indexOf("?")>=0?a.split("?")[0]:a}function aiGetUrlMapping(a,i,t){var o={action:"aip_map_url_action",security:MyAjax.security,url:a};jQuery.post(MyAjax.ajaxurl,o,function(a){aiSetBrowserUrl(aiGetUrlMappingUrl(i,t,a),!1)})}function closeInfoPermanent(a){var i={action:"aip_close_message_permanent",security:MyAjax.security,id:a},t="The message before will only appear again when you reset the advanced iframe settings.";"show-discount-message"===a?t="The message of advanced iframe shown before will only appear again when you reset the advanced iframe settings or a new discount is available.":"show-registration-message"===a&&(t="The message will appear again until have entered your purchase code."),jQuery.post(MyAjax.ajaxurl,i,function(a){jQuery("h1").after('

'+t+"

")}),setTimeout(function(){jQuery(".message-notice").fadeOut()},4e3)}function aiSupportsHistoryApi(){return!!(window.history&&history.pushState)}function aigetIframeLocation(a){try{var i=document.getElementById(a).contentWindow.location;return encodeURIComponent(i)}catch(t){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the url to the url on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(t))}}function aiSetGetParameter(a,i){var t=window.location.href,o=t.split("#");t=o[0];var r=void 0===o[1]?"":"#"+o[1];if(t.indexOf(a+"=")>=0){var n=t.substring(0,t.indexOf(a+"=")),l=t.substring(t.indexOf(a+"="));t=n+a+"="+i+(l=(l=l.substring(l.indexOf("=")+1)).indexOf("&")>=0?l.substring(l.indexOf("&")):"")}else 0>t.indexOf("?")?t+="?"+a+"="+i:t+="&"+a+"="+i;return t+r}function aiRemoveURLParameter(a,i){var t=a.split("?");if(!(t.length>=2))return a;for(var o=encodeURIComponent(i)+"=",r=t[1].split(/[&;]/g),n=r.length;n-- >0;)-1!==r[n].lastIndexOf(o,0)&&r.splice(n,1);return a=0!==r.length?t[0]+"?"+r.join("&"):t[0]}function aiEndsWidth(a,i){return a.substr(-i.length)===i}function aiAddCss(a,i){i=decodeURIComponent(i.replace(/\+/g,"%20"));var t=jQuery(a).contents().find("body"),o=document.createElement("style");o.setAttribute("type","text/css"),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i)),t.append(o)}function aiAddCssFile(a,i){var t=jQuery(a).contents().find("body"),o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=i,t.append(o)}function aiAddJsFile(a,i){jQuery.ajaxSetup({cache:!0});var t=jQuery(a).contents().find("body"),o=document.createElement("script");o.type="text/javascript",o.src=i,t.append(o)}function aiPresetFullscreen(){jQuery("#style").val("position:fixed;z-index:9000;top:0px;left:0px;margin:0px"),jQuery("#width").val("100%"),jQuery("#ai-height-0").val("100%"),jQuery("#content_id").val("html,body"),jQuery("#content_styles").val("overflow:hidden"),jQuery("#hide_content_until_iframe_color").val("#ffffff")}function aiDisableCheckIframes(){var a=jQuery("").attr("type","hidden").attr("name","checkIframes").val("true");jQuery("#ai_form").append(a),jQuery("#ai_form").submit(),jQuery("#checkIframes").prop("disabled","disabled")}function aiProcessMessage(a,i,t){var o;try{var o=JSON.parse(a.data)}catch(r){"debug"===t&&console&&console.log&&(console.log("Advanced iframe: The received message cannot be parsed and seems not to belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log("Advanced iframe: Unknown event: ",a));var o=a.data}try{if(o.hasOwnProperty("aitype")&&i===o.id){var n=o.aitype;if("debug"===n)aiProcessDebug(o);else if("scrollToTop"===n)aiProcessScrollToTop(o);else for(var l in"height"===n?aiProcessHeight(o):"show"===n&&aiProcessShow(o),o.data)o.data.hasOwnProperty(l)&&jQuery(l).html(o.data[l])}}catch(s){"debug"===t&&console&&console.log&&(console.log("Advanced iframe: The received message do not belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log(s))}}function aiProcessDebug(a){var i=a.data;0!==jQuery("#aiDebugDiv").length&&(i=(i=i.replace(/&/g,"&").replace(//g,">")).replace('"','"').replace(/\\/g,""),jQuery("#aiDebugDiv").append('

r: '+i+"

"))}function aiProcessScrollToTop(a){aiScrollToTop(a.id,aiOnloadScrollTop)}function aiProcessHeight(a){var i=a.height,t=a.width,o=parseInt(a.anchor,10),r=a.id;if(null!=i)try{var n=a.loc;null==n||n.includes("send_console_log")||"function"!=typeof aiChangeUrl||aiChangeUrl(n);var l=a.title;if(null!=l&&"undefined"!=l&&""!=l&&(document.title=decodeURIComponent(l)),null!=r){var s=parseInt(i,10),d=parseInt(t,10);if(aiResizeIframeHeightId(s,d,r),!isNaN(o)&&o>-1){var c=jQuery("#"+r).offset().top;setTimeout(function(){jQuery("html,body").scrollTop(Math.round(c+o)),aiShowIframeId(r)},100)}else aiShowIframeId(r)}else alert("Please update the ai_external.js to the current version.")}catch(h){console&&console.log&&console.log(h)}}function aiProcessShow(a){var i=a.id;try{aiShowIframeId(i)}catch(t){console&&console.log&&console.log(t)}}function aiDisableRightClick(a){try{window.frames[a].document.oncontextmenu=function(){return!1}}catch(i){}}function aiRemoveElementsFromHeight(a,i,t){for(var o=jQuery("#"+a),r=t.split(","),n=0,l=0;l"300"?t.height("0px"):t.height("400px")}}),"undefined"!=typeof ai_show_id_only){if(0===jQuery("#"+ai_show_id_only).length)alert('The element with the id "'+ai_show_id_only+'" cannot be found. Please check your configuration.');else{var i=jQuery("#"+ai_show_id_only);i.siblings().hide();var t=i.parents();if(t.siblings().hide(),t.css("padding","0px").css("margin","0px").css("overflow","hidden"),parent===top){var o=i[0];o.style.marginTop=o.style.marginBottom=0,o.style.overflow="hidden";var r=JSON.stringify({aitype:"height",height:parseInt(Math.max(o.scrollHeight,o.offsetHeight),10),id:ai_show_id_only});window.parent.postMessage(r,"*")}}}jQuery("#ai #checkIframes").on("click",function(){jQuery(".ai-spinner").css("display","inline-table"),jQuery(this).addClass("disabled"),setTimeout(aiDisableCheckIframes,200)})}),String.prototype.includes||(String.prototype.includes=function(a,i){return"number"!=typeof i&&(i=0),!(i+a.length>this.length)&&-1!==this.indexOf(a,i)}),String.prototype.startsWith||(String.prototype.startsWith=function(a,i){return i=i||0,this.indexOf(a,i)===i});var elem=document.documentElement;function aiOpenFullscreen(){aiRealFullscreen&&(elem.requestFullscreen?elem.requestFullscreen():elem.webkitRequestFullscreen?elem.webkitRequestFullscreen():elem.msRequestFullscreen&&elem.msRequestFullscreen())}function aiCloseFullscreen(){aiRealFullscreen&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}function aiExitHandler(){document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||(aiInFullscreen=!1,jQuery(".ai-fullscreen-close").trigger("click"))}document.addEventListener("fullscreenchange",aiExitHandler),document.addEventListener("webkitfullscreenchange",aiExitHandler),document.addEventListener("mozfullscreenchange",aiExitHandler),document.addEventListener("MSFullscreenChange",aiExitHandler);