elementor.hooks.addAction("panel/open_editor/widget",(function(e,t){let i=t.get("widgetType");if(i.split("-").includes("mf")){let t=jQuery(e.el).find("[data-setting=mf_input_name]"),n=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(i.concat("_",n)),t.trigger("input"))}));const l=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(i)&&(l.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)})))}}));