elementor.hooks.addAction("panel/open_editor/widget",(function(e,t){let n=t.get("widgetType");if(n.split("-").includes("mf")){let t=jQuery(e.el).find("[data-setting=mf_input_name]"),i=Math.floor(9e5*Math.random())+1e5;t.on("input",(function(){let e=jQuery(this).val().replace(/[^a-zA-Z0-9_-]/g,"_");jQuery(this).val(e)})),t.blur((()=>{t.val()||(jQuery(t).val(n.concat("_",i)),t.trigger("input"))}));const r=jQuery(e.el).find('[data-setting="mf_input_option_text"]'),a=jQuery(e.el).find('[data-setting="mf_input_option_value"]');["mf-checkbox","mf-multi-select","mf-radio","mf-image-select","mf-toggle-select","mf-select"].includes(n)&&(r.on("input",(function(){let e=jQuery(this).val().replace(/["]/g,"''");jQuery(this).val(e)})),a.on("input",(function(){let e=jQuery(this).val().replace(/["]/g,"''");jQuery(this).val(e)})))}}));const uniqueId=()=>Date.now().toString(36)+Math.random().toString(36).substring(2);elementor.hooks.addAction("panel/open_editor/widget",(function(e,t,n){"mf-simple-repeater"==t.get("widgetType")&&jQuery(e.el).find(".elementor-repeater-add").length>0&&jQuery(e.el).find(".elementor-repeater-add").on("click",(function(){setTimeout((()=>{jQuery(this).closest(".elementor-button-wrapper").prev().find(".elementor-repeater-fields").last().find('[data-setting="mf_input_repeater_name"]').prop("value","repeater-input-name-"+(Date.now().toString(36)+Math.random().toString(36).substring(2))).trigger("input")}),50)}))}));