Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.226.214.1
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/so-widgets-bundle/base/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/so-widgets-bundle/base/js/admin.min.js
var sowbForms=window.sowbForms||{};!function(e){let i="";for(const[e,t]of Object.entries(soWidgets.fonts))i+='<option value="'+e+'">'+t+"</option>";const t=()=>{e(this).find("> .siteorigin-widget-section > .siteorigin-widget-field-font .siteorigin-widget-input").each((function(){n(e(this))}))},n=e=>{e.append(i);var t=e.data("selected");t&&e.val(t)};e.fn.sowSetupForm=function(){return e(this).each((function(r,a){var s,o=e(a),d=!0,l=e("body"),g=o.find("input[name]");if(g.length&&-1!==g.attr("name").indexOf("__i__"))return this;if(o.is(".siteorigin-widget-form-main")){if(!0===o.data("sow-form-setup"))return!0;if(l.hasClass("widgets-php")&&!l.hasClass("block-editor-page")&&!o.is(":visible")&&0===o.closest(".panel-dialog").length)return!0;o.on("sowstatechange",(function(i,t,n){o.find("[data-state-handler]").each((function(){var i,r,a,s,o,l,g=e(this),f=e.extend({},g.data("state-handler"),d?g.data("state-handler-initial"):{});if(0===Object.keys(f).length)return!0;var c={},p=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var w in f)u[w.replace("{$repeater}",p)]=f[w];f=u}var m=sowbForms.getContainerFieldId(g,"widget",".siteorigin-widget-widget");if(!1!==m){var v={};for(var h in f){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/);v[b&&b.length&&void 0===b[1]?b[2]+"_"+m+"["+b[3]+"]":"_else["+b[1]+"_"+m+"]"]=f[h]}f=v}for(var y in f)if(o=!1,null!==(i=y.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(r={group:"default",name:"",multi:!1},void 0!==i[2]?(r.group=i[1],r.name=i[3]):r.name=i[0],r.multi=void 0!==i[4],"_else"===r.group)r.group=r.name,r.name="",o=r.group===t&&void 0===c[r.group];else{l=r.name.split(",").map((function(e){return e.trim()}));for(var k=0;k<l.length&&!(o=r.group===t&&l[k]===n);k++);}if(o){a=f[y],r.multi||(a=[a]);for(k=0;k<a.length;k++){var F=!1;if((s=void 0!==a[k][1]&&Boolean(a[k][1])?g.find(a[k][1]):g).prop("style").length&&("show"==a[k][0]?(s.fadeIn("fast"),F=!0):"hide"==a[k][0]&&(s.fadeOut("fast"),F=!0)),F||s[a[k][0]].apply(s,void 0!==a[k][2]?a[k][2]:[]),s.is(".siteorigin-widget-field:visible"))if(s.is(".siteorigin-widget-field-type-section"))s.find("> .siteorigin-widget-section > .siteorigin-widget-field").trigger("sowsetupformfield");else s.trigger("sowsetupformfield")}c[r.group]=!0}}}))})),o.sowSetupPreview(),s=o;var f=o.find(".siteorigin-widget-teaser");if(f.find(".dashicons-dismiss").on("click",(function(){var i=e(this);e.get(i.data("dismiss-url")),f.slideUp("normal",(function(){f.remove()}))})),!o.data("backupDisabled")){var c=o.find("> .siteorigin-widgets-form-id").val(),p=o.find("> .siteorigin-widgets-form-timestamp"),u=parseInt(p.val()||0),w=JSON.parse(sessionStorage.getItem(c));w&&(w._sow_form_timestamp>u?sowbForms.displayNotice(o,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(s,w),e.slideUp("fast",(function(){e.remove()}))}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",(function(){sessionStorage.removeItem(c),e.remove()}))}}]):sessionStorage.removeItem(c)),o.on("change",(function(){p.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(o);sessionStorage.setItem(c,JSON.stringify(e))}))}}else s=o.closest(".siteorigin-widget-form-main");s.find("> .siteorigin-widgets-form-id").val();var m=o.find("> .siteorigin-widget-field");m.find("> .siteorigin-widget-section").sowSetupForm();var v=m.find("> .siteorigin-widget-widget");if(v.find("> .siteorigin-widget-section").sowSetupForm(),v.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),m.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),m.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),o.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),m.find("> .siteorigin-widget-font-selector").length&&i){m.find("> .siteorigin-widget-font-selector select").each((function(){const i=e(this).closest(".siteorigin-widget-field-type-section");i.length?i.find("> .siteorigin-widget-section-visible")?setTimeout(()=>{n(e(this))},200):i.data("font-setup")||(i.data("font-setup",!0),i.one("mouseover",t)):n(e(this))}))}m.find("> .siteorigin-widget-input-color").each((function(){var i=e(this),t="";if(i.data("alpha-enabled"))var n=function(){$container=i.parents(".wp-picker-container"),$colorResult=$container.find(".wp-color-result"),t=$colorResult.css("background-image"),$colorResult.css("background-image",""==i.val()?"none":t)};var r={change:function(t,r){setTimeout((function(){i.data("alpha-enabled")&&n(),e(t.target).trigger("change")}),100)}};i.data("defaultColor")&&(r.defaultColor=i.data("defaultColor")),i.data("palettes")&&(r.palettes=i.data("palettes")),"function"==typeof e.fn.wpColorPicker&&(i.wpColorPicker(r),i.data("alpha-enabled")&&i.on("change",n).trigger("change"))}));var h=function(i){("keyup"!=i.type||sowbForms.isEnter(i))&&(e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",(function(){(e(window).trigger("resize"),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible"))&&e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})))};m.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").on("click keyup",h).attr("tabindex",0),m.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").on("click keyup",h),m.filter(".siteorigin-widget-field-type-slider").each((function(){var i=e(this),t=i.find('input[type="number"]'),n=i.find(".siteorigin-widget-value-slider");n.slider({max:parseFloat(t.attr("max")),min:parseFloat(t.attr("min")),step:parseFloat(t.attr("step")),value:parseFloat(t.val()),slide:function(e,n){t.val(parseFloat(n.value)),t.trigger("change"),i.find(".siteorigin-widget-slider-value").html(n.value)}}),t.on("change",(function(e,r){r&&r.silent||(n.slider("value",parseFloat(t.val())),i.find(".siteorigin-widget-slider-value").html(t.val()))}))})),m.filter(".siteorigin-widget-field-type-link").each((function(){const i=e(this),t=i.find("input.siteorigin-widget-input"),n=i.find("ul.posts"),r=i.find(".content-no-results");const a=()=>{const t=i.find(".content-text-search"),a={action:"so_widgets_search_posts",query:t.val(),postTypes:t.data("postTypes")};"string"==typeof icl_this_lang&&(a.language=icl_this_lang),r.addClass("hidden"),n.empty(),n.removeClass("hidden"),n.addClass("loading"),e.get(soWidgets.ajaxurl,a,i=>{if(0===i.length)return r.removeClass("hidden"),n.addClass("hidden"),void n.removeClass("loading");for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),n.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]).attr("tabindex",0));n.removeClass("loading")})};i.find(".select-content-button, .button-close").on("click",(function(t){t.preventDefault(),e(this).trigger("blur");var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&a()})),i.on("click keyup",".posts li",(function(n){if(n.preventDefault(),"keyup"!=n.type||sowbForms.isEnter(n)){var r=e(this);t.val("post: "+r.data("value")+" ("+r.get(0).childNodes[0].nodeValue+")"),i.trigger("change"),i.find(".existing-content-selector").toggle()}}));var s=null;i.find(".content-text-search").on("keyup",(function(){null!==s&&clearTimeout(s),s=setTimeout((function(){a()}),500)}));var o=t.val().replace("post: ","");""!=o&&isFinite(o)&&e.get(soWidgets.ajaxurl,{action:"so_widgets_links_get_title",postId:o},(function(e){t.val(t.val()+" ("+e+")")}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&m.filter(".siteorigin-widget-field-type-builder").each((function(){e(this).find("> .siteorigin-page-builder-field").each((function(){var i=e(this);i.soPanelsSetupBuilderWidget({builderType:i.data("type")})}))}));var b=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n=function(t,n){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return n;if(i.is('[type="radio"]')&&!i.is(":checked"))return n;var r=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==r&&(t.args=t.args.map((function(e){return e.replace("{$repeater}",r)})));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map((function(e){return e="conditional"===t.callback?e.replace(/(.*)(\[.*)/,"$1_"+a+"$2"):e+"_"+a})));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return i.parent().hasClass("siteorigin-widget-field-type-media")&&"conditional"==t.callback&&(s||(s=i.hasClass("media-fallback-external")?i.prev().val():fallbackField=i.next().val()),0==s&&(s="")),e.extend(n,sowEmitters[t.callback](s,t.args,i))},r={default:""};void 0===t.length&&(t=[t]);for(var a=0;a<t.length;a++)r=n(t[a],r);var o=s.data("states");for(var d in void 0===o&&(o={default:""}),r)void 0!==o[d]&&r[d]===o[d]||(o[d]=r[d],s.trigger("sowstatechange",[d,r[d]]));s.data("states",o)}};m.filter("[data-state-emitter]").each((function(){var i=e(this).find(".siteorigin-widget-input");i.on("keyup change",b),i.each((function(){var i=e(this);i.is(":radio")?i.is(":checked")&&b.call(i[0]):b.call(i[0])}))})),o.trigger("sowsetupform",m).data("sow-form-setup",!0),m.trigger("sowsetupformfield"),o.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(l.hasClass("wp-customizer")||l.hasClass("widgets-php"))&&o.closest(".ui-sortable").on("sortstop",(function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),d=!1}))},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.preventDefault();var n=sowbForms.getWidgetFormValues(i),r=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");r.find('input[name="data"]').val(JSON.stringify(n)),r.find('input[name="class"]').val(i.data("class")),r.find("iframe").on("load",(function(){e(this).css("visibility","visible")})),r.find("form").trigger("submit"),r.find(".close").on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&r.remove()}))}))},e.fn.sowSetupRepeater=function(){return e(this).each((function(i,t){var n=e(t),a=n.find(".siteorigin-widget-field-repeater-items"),s=n.data("repeater-name"),o=n.data("max-items");a.on("updateFieldPositions",(function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each((function(i,t){e(t).find(".siteorigin-widget-input").each((function(t,n){var r=e(n).data("repeater-positions");void 0===r&&(r={}),r[s]=i,e(n).data("repeater-positions",r)}))})),i.find(".siteorigin-widget-input").each((function(i,t){var n=e(t),r=n.data("repeater-positions");if(void 0!==r){var a=n.attr("data-original-name");if(a||(n.attr("data-original-name",n.attr("name")),a=n.attr("name")),!a)return;if(r)for(var s in r)a=a.replace("#"+s+"#",r[s]);n.attr("name",a)}})),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each((function(i,t){var n=e(t);n.prop("checked",n.prop("defaultChecked"))})),i.data("initialSetup",!0));var r=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(r>0&&t.length>r){var a=t.first().outerHeight();i.css("max-height",a*r+"px"),i.css("overflow","auto")}else i.css("max-height","").css("overflow","")})),a.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){a.find('input[type="radio"].siteorigin-widget-input').attr("name",""),a.trigger("updateFieldPositions"),n.trigger("change")},sortstop:function(i,t){t.item.is(".siteorigin-widget-field-repeater-item")?t.item.find("> .siteorigin-widget-field-repeater-item-form").each((function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})):t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");n.trigger("change")}}),a.trigger("updateFieldPositions");var d=function(){n.addClass("sow-max-reached")};n.find("> .siteorigin-widget-field-repeater-add").disableSelection().on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||sowbForms.isEnter(i))&&(isNaN(o)||n.find(".siteorigin-widget-field-repeater-item").length+1<=o?(n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).trigger("resize")})),isFinite(o)&&a.find(".siteorigin-widget-field-repeater-item").length==o&&d()):d())})),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").on("click",(function(i){i.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).trigger("resize")}))}));const l=n.data("item-label");if(void 0!==l&&"table"in l){n.addClass("sow-repeater-has-table");let e=l.selectorArray.map(e=>e.label||"").map(e=>`<li role="listitem">${r(e)}</li>`).join("");n.find(".siteorigin-widget-field-repeater-top").append(`<ul class="sow-repeater-table" role="list" aria-label="${soWidgets.table.header}">${e}</ul>`).append(`<span class="sow-repeater-table-actions">${soWidgets.table.actions}</span>`)}}))},e.fn.sowAddRepeaterItem=function(){return e(this).each((function(i,t){var n=e(t),r=n.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+n.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each((function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))}));var s="";a.find("> .siteorigin-widget-field").each((function(i,t){var n=t.outerHTML;e(t).is(".siteorigin-widget-field-type-repeater")||(n=n.replace(/_id_/g,r)),s+=n}));var o=void 0!==n.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable"></div>').append(e('<div class="siteorigin-widget-field-repeater-item-top" tabindex="0" />').append(e('<div class="siteorigin-widget-field-expand" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" tabindex="0" />')).append(e("<h4></h4>").html(n.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form"></div>').html(s));n.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),n.trigger("change")}))},e.fn.sowRemoveRepeaterItem=function(){return e(this).each((function(i,t){var n=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),n.sortable("refresh").trigger("updateFieldPositions"),e(t).trigger("change")}))},e.fn.checkboxFormField=function(){return`<span class="dashicons dashicons-${e(this).is(":checked")?"yes":"minus"}"></span>`},e.fn.iconFormField=function(){return e(this).find(".siteorigin-widget-icon span[data-sow-icon]").prop("outerHTML")};const r=function(i){return void 0===i?"":(i=e("<div></div>").text(i).html()).length>80?i.substr(0,79)+"...":i},a=function(e,i){return"iconFormField"===i||"checkboxFormField"===i?e:r(e)};e.fn.sowSetupRepeaterItems=function(){return e(this).each((function(i,t){var n=e(t);if(void 0===n.data("sowrepeater-actions-setup")){var r=n.closest(".siteorigin-widget-field-repeater"),s=n.find("> .siteorigin-widget-field-repeater-item-top"),o=r.data("item-label"),d=n.parents(".siteorigin-widget-field-repeater").data("item-name");if(o&&(o.hasOwnProperty("selector")||o.hasOwnProperty("selectorArray"))){var l=function(){const i=void 0!==o&&"table"in o;var t,r,l;if(i)var g=[];if(o.hasOwnProperty("selectorArray"))for(var f=0;f<o.selectorArray.length;f++){t=(l=o.selectorArray[f]).hasOwnProperty("valueMethod")&&l.valueMethod?l.valueMethod:"val";let e=n.find(l.selector)[t]();if(i)g.push({value:e,type:l.valueMethod});else if(e){r=r?`${r} ${e}`:e;break}}else t=o.hasOwnProperty("valueMethod")&&o.valueMethod?o.valueMethod:"val",r=n.find(o.selector)[t]();if(i){s.find(".sow-repeater-table").length||(s.find("h4").after('<ul class="sow-repeater-table" role="list"></ul>'),s.find("h4").remove());let e="";g.forEach((i,t)=>{r=a(i.value,i.type),e+=`<li role="listitem">${r}</li>`}),s.find(".sow-repeater-table").empty().append(e)}else if(!i&&r)r=a(r,t);else if(r=d,o.increment){var c=n.index()+1;isNaN(c)||(r="before"===o.increment?`${c} ${r}`:`${r} ${c}`)}if(r)if("checkboxFormField"!==t){if("iconFormField"===t){if("Item"==r)return;const i=e(r);if(!i)return;return"none"===i.css("display")?void s.find("h4").text(d):void s.find("h4").html(r)}s.find("h4").text(r)}else s.find("h4").html(r)};l();var g=o.hasOwnProperty("updateEvent")&&o.updateEvent?o.updateEvent:"change";n.on(g,l)}s.on("click keyup",(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&("keyup"!=i.type||sowbForms.isEnter(i))&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).trigger("resize"),e(this).is(":visible")?(e(this).trigger("slideToggleOpenComplete"),e(this).find(".siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field").each((function(i,t){var n=e(t);n.is(":visible")&&n.trigger("sowsetupformfield")}))):e(this).trigger("slideToggleCloseComplete")})))})),s.find(".siteorigin-widget-field-remove").on("click keyup",(function(i,t){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var a=e(this).closest(".siteorigin-widget-field-repeater-items"),s=e(this).closest(".siteorigin-widget-field-repeater-item"),o=function(){s.remove(),a.sortable("refresh").trigger("updateFieldPositions"),e(window).trigger("resize"),r.trigger("change")};if(t&&t.silent)o();else if(confirm(soWidgets.sure)){s.slideUp("fast",o),"string"==typeof n.closest(".siteorigin-widget-field-repeater").data("item-label").increment&&n.parent().find(".siteorigin-widget-field-repeater-item").trigger("change");var d=e(this).parents(".siteorigin-widget-field-repeater");d.hasClass("sow-max-reached")&&d.removeClass("sow-max-reached")}}})),s.find(".siteorigin-widget-field-copy").on("click keyup",(function(i){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var t=e(this).closest(".siteorigin-widget-field-repeater-items"),r=e(this).parents(".siteorigin-widget-field-repeater"),a=r.data("max-items");if(isNaN(a)||t.find(".siteorigin-widget-field-repeater-item").length+1<=a){var s=e(this).closest(".siteorigin-widget-form-main"),o=e(this).closest(".siteorigin-widget-field-repeater-item"),d=o.clone(),l=t.children().length,g={};d.find("*[name]").each((function(){var i=e(this),t=i.attr("id"),r=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var a=tinymce.get(t);if(a){var f=a.getContent();_.isEmpty(f)?-1!==f.search("<")&&-1===f.search(">")&&$textarea.val(f.replace(/</g,"")):i.val(f)}}else if(i.is(".wp-color-picker")){var c=i.closest(".wp-picker-container"),p=i.closest(".siteorigin-widget-field");c.remove(),p.append(i.remove())}else{var u=t?o.find("#"+t):o.find('[name="'+r+'"]');u.length&&null!=u.val()&&i.val(u.val())}if(t){var w,m;if(i.is('[type="radio"]')){w=t.replace(/-\d+-\d+$/,"");var v=t.replace(/-\d+$/,"");if(!g[w]){var h={};g[w]=s.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").filter((function(i,t){var n=e(t).attr("name");return!h[n]&&(h[n]=!0,!0)})).length+1}var b=w+"-"+g[w];m=b+t.match(/-\d+$/)[0],d.find("label[for="+v+"]").attr("for",b)}else F=new RegExp("-\\d+$"),w=t.replace(F,""),g[w]||(g[w]=s.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").length+1),m=w+"-"+g[w]++;if(i.is(".wp-editor-area")&&(m+=Math.floor(1e3*Math.random()),i.data("tinymce-id",m)),i.attr("id",m),i.is(".wp-editor-area")){var y=i.closest(".siteorigin-widget-tinymce-container"),k=y.data("media-buttons");if(k&&k.html){var F=new RegExp(t,"g");k.html=k.html.replace(F,m),y.data("media-buttons",k)}}d.find("label[for="+t+"]").attr("for",m),d.find("[id*="+t+"]").each((function(){var i=e(this).attr("id").replace(t,m);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(m)&&tinymce.get(m).remove()}var C=o.parents(".siteorigin-widget-field-repeater").length,x=e("body");(x.hasClass("wp-customizer")||x.hasClass("widgets-php"))&&0===n.closest(".panel-dialog").length&&(C+=1);var E=r.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(C-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+l.toString()+"$3");i.attr("name",E),i.data("original-name",E)})),t.append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),"string"==typeof n.closest(".siteorigin-widget-field-repeater").data("item-label").increment?n.parent().find(".siteorigin-widget-field-repeater-item").trigger("change"):n.trigger("change"),isFinite(a)&&t.find(".siteorigin-widget-field-repeater-item").length==a&&r.addClass("sow-max-reached")}}})),n.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),n.data("sowrepeater-actions-setup",!0)}}))},sowbForms.getContainerFieldId=function(e,i,t){var n=i+"FieldId";this.hasOwnProperty(n)||(this[n]=1);var r=e.closest(t);if(r.length){var a=r.data("field-id");return void 0===a&&(a=this[n]++),r.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var n=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var r=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=r.length?n:null;r.length;)a=a[r.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,n){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},(function(e){window.sowVars[t]=e,n(window.sowVars[t][i])})):n(window.sowVars[t][i])},sowbForms.getWidgetIdBase=function(e){return e.data("id-base")},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each((function(){var i=e(this);try{var n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(n))return!0;var r=(n=n[1]).split("][");r=r.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),(function(i,t){return e(i).val()})))}else s=i.val();for(var g=0;g<r.length;g++)g===r.length-1?""===r[g]?a.push(s):a[r[g]]=s:(_.isUndefined(a[r[g]])&&(_.isNumber(r[g+1])||""===r[g+1]?a[r[g]]=[]:a[r[g]]={}),a=a[r[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}})),t},sowbForms.isEnter=function(i,t=!1){if(13==i.which){if(!t)return!0;e(i.target).trigger("click")}},sowbForms.setWidgetFormValues=function(i,t,n,r){n=n||!1,r=void 0!==r&&r||void 0===r;var a=0,s=function(i,t){10!=++a?(i.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each((function(i,r){var a=e(this),o=a.find("> .siteorigin-widget-field-repeater"),d=o.data("repeaterName"),l=t.hasOwnProperty(d)?t[d]:null;if(a.parent().is(".siteorigin-widget-section")){var g=o.data("element-name");g=g.replace(/\[#.*?#\]/g,"");for(var f=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(g)[1].split("]["),c=f.length?t:null;f.length;){var p=f.shift();c=c.hasOwnProperty(p)?c[p]:c}l=c}if(l&&Array.isArray(l)){var u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),w=l.length,m=u.length;if(w>m)for(var v=0;v<w-m;v++)o.find("> .siteorigin-widget-field-repeater-add").trigger("click");else if(!n&&w<m)for(var h=w;h<m;h++){e(u.eq(h)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var b=0;b<u.length;b++)u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),s(u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),l[b])}})),--a):--a};s(i,t),$fields=i.find("*[name]");var o=function(e){return e.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e})),e},d=function(e,i){for(var t,r=e,a=0;a<i.length;a++){if(!r.hasOwnProperty(i[a])){if(n)continue;break}a===i.length-1?t=r[i[a]]:r=r[i[a]]}return{sub:r,value:t}},l=function(e,i){if(i){if(e!==i)return!0}else if(e)return!0;return!1},g=function(i,a){for(;i<a.length;i++){if(0!=i&&i+1<a.length&&i%20==0)return void setTimeout(g,150,i+1,a);var s=e(a[i]),f=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(s.attr("name"));if(null==f)return!0;if(!(s.hasClass("sow-measurement-select-unit")||s.attr("data-presets")||s.parent().hasClass("siteorigin-widget-field-type-posts")||"hidden"==s.attr("type")&&!s.hasClass("sow-multi-measurement-input-values"))){var c=(f=f[1]).split("][");c=o(c);var p=d(t,c);if((!n||""!=p.value)&&void 0!==p.value){var u=!1;if("checkbox"===s.attr("type")&&s.is(":checked")!=p.value)s.prop("checked",p.value),u=!0;else if("radio"===s.attr("type"))s.prop("checked",p.value===s.val()),u=!0;else if("TEXTAREA"===s.prop("tagName")&&s.hasClass("wp-editor-area")){var w=null;"undefined"!=typeof tinyMCE&&(w=tinyMCE.get(s.attr("id"))),null!==w&&"function"==typeof w.setContent&&!w.isHidden()&&s.parent().is(":visible")?l(w.getContent(),p.value)&&(w.initialized?(w.setContent(p.value),u=!0):(w.on("init",(function(){w.setContent(p.value)})),u=!0)):l(s.val(),p.value)&&(s.val(p.value),u=!0)}else if(s.is(".panels-data")){if(l(s.val(),p.value)){s.val(p.value);var m=s.data("builder");m&&(m.setDataField(s),u=!0)}}else if(s.hasClass("sow-multi-measurement-input-values")){const i=s.prev().find(".sow-multi-measurement-input, .sow-multi-measurement-select-unit"),t=[];p.value.split(" ").forEach(e=>{t.push(parseInt(e,10)),t.push(e.replace(parseInt(e,10),""))}),i.each((function(i,n){const r=e(n),a=t[i];if("number"!=typeof a)return!0;r.val(a),!u&&l(r.val(),p.value[a])&&(u=!0)})),u&&s.val(p.value)}else l(s.val(),p.value)&&(s.val(p.value),u=!0);if(r&&u){if("preset"==r&&!s.hasClass("siteorigin-widget-input-color")&&!s.hasClass("siteorigin-widget-input-slider")&&!s.is("siteorigin-widget-input-select")&&"checkbox"==!s.attr("type"))continue;s.trigger("change"),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}}}}};g(0,$fields)},sowbForms.displayNotice=function(i,t,n,r,a){var s=e('<div class="siteorigin-widget-form-notification"></div>');t&&s.append("<span>"+t+"</span>"),r&&r.length&&r.forEach((function(i){var t="";i.classes&&i.classes.length&&(t=" "+i.classes.join(" "));var n=e('<a class="button button-small'+t+'" tabindex="0" target="_blank" rel="noopener noreferrer">'+i.label+"</a>");i.url&&n.attr("href",i.url),i.callback&&n.on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&i.callback(s)})),s.append(n)})),n&&s.append("<div><small>"+n+"</small></div>"),a?a.before(s):i.prepend(s)},sowbForms.validateFields=function(i,t=!0){var n=!0,r=e(document).triggerHandler("sow_validate_widget_data",[n,i,void 0!==jQuery(".widget-content").data("id-base")?i.find(".siteorigin-widget-form").data("id-base"):""]);if("boolean"!=typeof r||r||(n=!1),n){var a=!1;i.find(".siteorigin-widget-field-is-required").length&&(i.find(".siteorigin-widget-field-is-required").each((function(){var i=e(this),t=i.find(".siteorigin-widget-input");t.parents(".siteorigin-widget-field-repeater-item-html").length||((!t.val()||i.hasClass("siteorigin-widget-field-type-checkboxes")&&!t.prop("checked"))&&(a=!0,i.addClass("sow-required-error")),t.on("change",(function(e){i.removeClass("sow-required-error")})))})),!a||t&&confirm(soWidgets.missing_required)||(n=!1))}return n},"object"==typeof panelsOptions&&e(document).on("close_dialog_validation",(function(i,t,n,r,a){return sowbForms.validateFields(e(a.el))})),e("body").on("click",".widget-control-save",(function(i){var t=e(this).parents(".widget.open");t.length&&(t=t.find(".widget-content")).length&&(sowbForms.validateFields(t)||(i.preventDefault(),i.stopPropagation()))})),"undefined"!=typeof wp&&void 0!==wp.customize&&jQuery(document).on("widget-added widget-updated widget-synced",(function(i,t,n=!1){n.length&&sowbForms.validateFields(e(n))})),e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",(function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout((function(){i.sowSetupForm()}),200)}));var s=e("body");e(document).on("widget-added",(function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()})),s.hasClass("block-editor-page")&&e(document).on("panels_setup_preview",(function(){window.hasOwnProperty("sowb")&&e(sowb).trigger("setup_widgets",{preview:!0})})),e(document).on("open_dialog",(function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),e((function(){e(document).trigger("sowadminloaded")}))}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$").exec(e);if(null===t)return!1;var n="",r="default";return void 0!==t[3]?(r=t[1],n=t[3]):n=t[1],{match:t[4].trim(),group:r,state:n}},_checker:function(e,i,t,n){var r,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(r=sowEmitters._match(i[s],t))&&("_true"===r.match||n(e,i,r.match))&&(a[r.group]=r.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},n=0;n<i.length;n++)""===i[n]&&(i[n]="default"),t[i[n]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",(function(val,args,match){return eval(match)}))},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",(function(e,i,t){return-1!==t.split(",").map((function(e){return e.trim()})).indexOf(e)}))}};window.sowbForms=sowbForms;

Youez - 2016 - github.com/yon3zu
LinuXploit