!function(e,t){"use strict";if("undefined"==typeof window.parent)return;let n=window.parent;var o=function(){t.config.environmentMode.edit&&(n.jQuery("#elementor-editor-dark-mode-css").length>0&&n.jQuery("body").addClass("elementor-editor-dark-mode"),t.hooks.addAction("frontend/element_ready/global",(function(t){(t.find(".widgetarea_warper_edit").on("click",(async function(){var t=n.jQuery(".widgetarea_iframe_modal"),o=t.find("#widgetarea-control-iframe"),a=t.find(".dialog-lightbox-loading"),r=t.find(".dialog-type-lightbox"),i=e(this).parent().attr("data-elementskit-widgetarea-key"),d=e(this).parent().attr("data-elementskit-widgetarea-index"),l=window.elementskit.resturl+"dynamic-content/content_editor/widget/"+i+"-"+d;n.jQuery("body").attr("data-elementskit-widgetarea-key",i),n.jQuery("body").attr("data-elementskit-widgetarea-load","false"),r.show(),t.show(),a.show(),o.contents().find("#elementor-loading").show(),o.css("z-index","-1");try{const e=await fetch(l,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":n.ElementsKitLayoutManager.nonce}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);o.attr("src",e.url),o.loading="lazy"}catch(s){console.error("Error:",s)}o.on("load",(function(){a.hide(),o.show(),o.contents().find("#elementor-loading").hide(),o.css("z-index","1")}))})),"undefined"!=typeof n.jQuery)&&n.jQuery(".widgetarea_iframe_modal").find(".eicon-close").on("click",(function(){n.jQuery("body").attr("data-elementskit-widgetarea-load","true")}))})))};e(window).on("elementor/frontend/init",o)}(jQuery,window.elementorFrontend);