?
Current Path : /home1/savoy/sportsmeet.net/wp-content/plugins/js_composer/assets/js/dist/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/sportsmeet.net/wp-content/plugins/js_composer/assets/js/dist/edit-form.min.js |
_.isUndefined(window.vc)&&(window.vc={atts:{}}),(n=>{var i=Backbone.View.extend({events:{},$lg_offset_placeholder_value:!1,$lg_size_placeholder_value:!1,initialize:function(){_.bindAll(this,"setLgPlaceholders")},render:function(){return this},save:function(){var t=[];return this.$el.find(".vc_column_offset_field").each(function(){var e=n(this);e.is(":checkbox:checked")?t.push(e.attr("name")):e.is("select")&&""!==e.val()&&t.push(e.val())}),t},setLgPlaceholders:function(){var e=this.$lg_offset_placeholder_value.val().replace(/[^\d]/g,"");this.$lg_size.find("option:first").text(VcI8nColumnOffsetParam.inherit_default),this.$lg_offset.find("option:first").text(e?VcI8nColumnOffsetParam.inherit+e:"")}});vc.atts.column_offset={parse:function(e){return this.content().find("input.wpb_vc_param_value."+e.param_name).data("vcColumnOffset").save().join(" ")},init:function(e,t){n('[data-column-offset="true"]',t).each(function(){var e=n(this);e.find(".wpb_vc_param_value").data("vcColumnOffset",new i({el:e}).render())})}}})(window.jQuery); _.isUndefined(window.vc)&&(window.vc={atts:{}}),(s=>{var t,n,o;t=wp.media,n=ajaxurl.replace(/admin\-ajax\.php/,"images/wpspin_light.gif"),t.controller.VcCssSingleImage=t.controller.VcSingleImage.extend({setCssEditor:function(e){return e&&(this._css_editor=e),this},updateSelection:function(){var e,t=this.get("selection"),i=this._css_editor.getBackgroundImage();void 0!==i&&""!==i&&-1!==i&&(e=_.map(i.toString().split(/,/),function(e){e=wp.media.model.Attachment.get(e);return e.fetch(),e})),t.reset(e)}}),o=vc.CssEditor=Backbone.View.extend({attrs:{},layouts:["margin","border-width","padding"],positions:["top","right","bottom","left"],$field:!1,simplify:!1,$simplify:!1,events:{"click .vc_icon-remove":"removeImage","click .vc_add-image":"addBackgroundImage","change .vc_simplify":"changeSimplify"},initialize:function(){_.bindAll(this,"setSimplify")},render:function(e){return this.attrs={},this.$simplify=this.$el.find(".vc_simplify"),this.setPlaceholders(),_.isString(e)&&this.parse(e),this},parse:function(e){e=e.split(/\s*(\.[^\{]+)\s*\{\s*([^\}]+)\s*\}\s*/g);e&&e[2]&&this.parseAtts(e[2].replace(/\s+!important/g,""))},addBackgroundImage:function(e){if(e&&e.preventDefault&&e.preventDefault(),window.vc_selectedFilters={},this.image_media)return this.image_media.open("vc_editor");this.image_media=t({state:"vc_single-image",states:[(new t.controller.VcCssSingleImage).setCssEditor(this)]}),this.image_media.on("toolbar:create:vc_single-image",function(e){this.createSelectToolbar(e,{text:window.i18nLocale.set_image})},this.image_media),this.image_media.state("vc_single-image").on("select",this.setBgImage),this.image_media.open("vc_editor")},setBgImage:function(){var i,a,t,e=this.get("selection"),e=(i=e,a=this,t=[],s(".media-modal").addClass("processing-media"),i.each(function(e){t.push(e.get("id"))}),t),n=function(e){if(!window.vc||!window.vc.active_panel)return!1;var e=_.map(e,function(e){return e.attributes}),e=(i.reset(e),_.map(i.models,function(e){return e.attributes})),t=vc.template(s("#vc_css-editor-image-block").html(),_.defaults({},{variable:"img"},vc.templateOptions.custom));a._css_editor.$el.find(".vc_background-image .vc_image").html(t(e[0])),s(".media-modal").removeClass("processing-media"),a._css_editor.$el.closest(".vc_edit-form-tab").trigger("change")};s.ajax({dataType:"json",type:"POST",url:window.ajaxurl,data:{action:"vc_media_editor_add_image",filters:window.vc_selectedFilters,ids:e,vc_inline:!0,_vcnonce:window.vcAdminNonce}}).done(function(e){var t,i,a,r;if("function"==typeof n){for(t=[],a=[],r=0;r<e.data.ids.length;r++)i=wp.media.model.Attachment.get(e.data.ids[r]),a.push(i.fetch()),t.push(i);s.when.apply(s,a).done(function(){n(t)})}}).fail(function(e){s(".media-modal-close").click(),window.vc&&window.vc.active_panel&&window.i18nLocale&&window.i18nLocale.error_while_saving_image_filtered&&vc.active_panel.showMessage(window.i18nLocale.error_while_saving_image_filtered,"error"),window.console&&window.console.warn&&window.console.warn("css_editor processImages error",e)}).always(function(){s(".media-modal").removeClass("processing-media")})},setCurrentBgImage:function(t){var e,i,a=/([^\?]+)(\?id=\d+){0,1}/,r="";t.match(/^\d+$/)?(i=vc.template(s("#vc_css-editor-image-block").html(),_.defaults({},{variable:"img"},vc.templateOptions.custom)),this.$el.find(".vc_background-image .vc_image").html(i({url:n,id:t,css_class:"vc_preview"})),s.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_single_image_src",content:t,size:"full",_vcnonce:window.vcAdminNonce},dataType:"html",context:this}).done(function(e){this.$el.find(".vc_ce-image").attr("src",e+"?id="+t).removeClass("vc_preview")})):t.match(a)&&(e=(a=t.split(a))[1],a[2]&&(r=a[2].replace(/[^\d]+/,"")),i=vc.template(s("#vc_css-editor-image-block").html(),_.defaults({},{variable:"img"},vc.templateOptions.custom)),this.$el.find(".vc_background-image .vc_image").html(i({url:e,id:r})))},changeSimplify:function(){_.debounce(this.setSimplify,100)()},setSimplify:function(){this.simplifiedMode(this.$simplify[0].checked)},simplifiedMode:function(e){e?(this.simplify=!0,this.$el.addClass("vc_simplified")):(this.simplify=!1,this.$el.removeClass("vc_simplified"),_.each(this.layouts,function(e){var t=s("[data-attribute="+(e="border-width"===e?"border":e)+"].vc_top");this.$el.find("[data-attribute="+e+"]:not(.vc_top)").val(t.val())},this))},removeImage:function(e){var t=s(e.currentTarget);e&&e.preventDefault&&e.preventDefault(),t.parent().remove(),this.$el.closest(".vc_edit-form-tab").trigger("change")},getBackgroundImage:function(){return this.$el.find(".vc_ce-image").data("imageId")},setPlaceholders:function(){try{var e,t=this.$el.closest("#vc_ui-panel-edit-element").attr("data-vc-shortcode"),i=window.vc.map[t].params.find(function(e){return"css_editor"===e.type}).value;for(e in i){var a,r,n=e.replace(/\-+/g,"_"),s=this.$el.find("[name="+n+"]");s.length&&(a=s[0].tagName,s.attr("placeholder",i[e]),r=s.hasClass("vc_color-control"),"SELECT"===a||r)&&(s.val(i[e]),r)&&s.trigger("change")}}catch(e){console.error("Cannot set fields placeholders in css_editor.js.",e)}},parseAtts:function(e){var r=/(\d+\S*)\s+(\w+)\s+([\d\w#\(,]+)/,n=/^([^\s]+)\s+url\(([^\)]+)\)([\d\w]+\s+[\d\w]+)?$/,s=!1;_.map(e.split(";"),function(e){var i,e=e.split(/:\s/),t=e[1]||"",a=e[0]||"",t=t&&t.trim();a.match(new RegExp("^("+this.layouts.join("|").replace("-","\\-")+")$"))&&t?(1===(i=t.split(/\s+/g)).length?i=[i[0],i[0],i[0],i[0]]:2===i.length?(i[2]=i[0],i[3]=i[1]):3===i.length&&(i[3]=i[1]),_.each(this.positions,function(e,t){this.$el.find("[data-name="+a+"-"+e+"]").val(i[t])},this)):"background-size"===a?(s=t,this.$el.find("[name=background_style]").val(t)):"background-repeat"!==a||s?"background-image"===a?this.setCurrentBgImage(t.replace(/url\(([^\)]+)\)/,"$1")):"background"===a&&t?((e=t.split(n))&&e[1]&&this.$el.find("[name="+a+"_color]").val(e[1]),e&&e[2]&&this.setCurrentBgImage(e[2])):"border"===a&&t&&t.match(r)?(e=t.split(r),i=[e[1],e[1],e[1],e[1]],_.each(this.positions,function(e,t){this.$el.find("[name="+a+"_"+e+"_width]").val(i[t])},this),this.$el.find("[name=border_style]").val(e[2]),this.$el.find("[name=border_color]").val(e[3]).trigger("change")):-1!=a.indexOf("border")&&t?-1!=a.indexOf("style")?this.$el.find("[name=border_style]").val(t):-1!=a.indexOf("color")?this.$el.find("[name=border_color]").val(t).trigger("change"):-1!=a.indexOf("radius")?this.$el.find("[name=border_radius]").val(t):a.match(/^[\w\-\d]+$/)&&this.$el.find("[name="+a.replace(/\-+/g,"_")+"]").val(t):a.match(/^[\w\-\d]+$/)&&t&&this.$el.find("[name="+a.replace(/\-+/g,"_")+"]").val(t):this.$el.find("[name=background_style]").val(t)},this)},save:function(){var e="";return this.attrs={},_.each(this.layouts,function(e){this.getFields(e)},this),this.getBackground(),this.getBorder(),(e=_.isEmpty(this.attrs)?e:".vc_custom_"+Date.now()+"{"+_.reduce(this.attrs,function(e,t,i){return t?e+i+": "+t+" !important;":e},"",this)+"}")&&vc.frame_window&&vc.frame_window.vc_iframe.setCustomShortcodeCss(e),e},getBackgroundImageSrc:function(){return this.$el.find(".vc_background-image img").attr("src")},getBackgroundColor:function(){return this.$el.find("[name=background_color]").val()},getBackgroundStyle:function(){return this.$el.find("[name=background_style]").val()},getBackground:function(){var e=this.getBackgroundColor(),t=this.getBackgroundImageSrc(),i=this.getBackgroundStyle(),a=this.$el.find("[name=background_color]").attr("placeholder"),r=e;a&&e.toLowerCase()!==a.toLowerCase()&&(r=e),e&&t?this.attrs.background=e+" url("+t+")":r?this.attrs["background-color"]=r:t&&(this.attrs["background-image"]="url("+t+")"),i.match(/repeat/)?(this.attrs["background-position"]="0 0",this.attrs["background-repeat"]=i):i.match(/cover|contain/)&&(this.attrs["background-position"]="center",this.attrs["background-repeat"]="no-repeat",this.attrs["background-size"]=i),e.match(/^rgba/)&&(this.attrs["*background-color"]=e.replace(/\s+/,"").replace(/(rgb)a\((\d+)\,(\d+),(\d+),[^\)]+\)/,"$1($2,$3,$4)"))},getBorder:function(){var t=this.$el.find("[name=border_style]").val(),i=this.$el.find("[name=border_style]").attr("placeholder"),e=this.$el.find("[name=border_radius]").val(),a=this.$el.find("[name=border_radius]").attr("placeholder"),r=this.$el.find("[name=border_color]").val(),n=this.$el.find("[name=border_color]").attr("placeholder");this.attrs["border-width"]&&this.attrs["border-width"].match(/^\d+\S+$/)?(this.attrs.border=this.attrs["border-width"]+" "+(t||"initial")+" "+r,this.attrs["border-width"]=void 0,e&&a&&e!==a&&(this.attrs["border-radius"]=e)):(_.each(["left","right","top","bottom"],function(e){this.attrs["border-"+e+"-width"]&&t&&(i&&t!==i||!i)&&(this.attrs["border-"+e+"-style"]=t)},this),e&&(a&&e!==a||!a)&&(this.attrs["border-radius"]=e),r&&(n&&r.toLowerCase()!==n.toLowerCase()||!n)&&(this.attrs["border-color"]=r))},getFields:function(i){var a=[];if(this.simplify)return this.getSimplifiedField(i);_.each(this.positions,function(e){var t=this.$el.find("[data-name="+i+"-"+e+"]").val();(t=(t=t.replace(/\s+/,"")).match(/^-?\d*(\.\d+){0,1}(%|in|cm|mm|em|rem|ex|pt|pc|px|vw|vh|vmin|vmax)$/)?t:isNaN(parseFloat(t))?"":parseFloat(t)+"px")&&t.length&&a.push({name:e,val:t})},this),_.each(a,function(e){var t="border-width"===i?"border-"+e.name+"-width":i+"-"+e.name;this.attrs[t]=e.val},this)},getSimplifiedField:function(e){var t=this.$el.find("[data-name="+e+"-top]").val().replace(/\s+/,"");(t=t.match(/^-?\d*(\.\d+){0,1}(%|in|cm|mm|em|rem|ex|pt|pc|px|vw|vh|vmin|vmax)$/)?t:isNaN(parseFloat(t))?"":parseFloat(t)+"px").length&&(this.attrs[e]=t)}}),vc.atts.css_editor={parse:function(e){return this.content().find('input.wpb_vc_param_value[name="'+e.param_name+'"]').data("vcFieldManager").save()},init:function(n,e){s("[data-css-editor=true]",this.content()).each(function(){var r,e,t=s(this),i=t.find('input.wpb_vc_param_value[name="'+n.param_name+'"]'),a=i.val();a||(e={bg_color:"background-color",padding:"padding",margin_bottom:"margin-bottom",bg_image:"background-image"},r=vc.edit_element_block_view.model.get("params"),a=(e=_.reduce(e,function(e,t,i){var a=r[i];return _.isUndefined(a)||!a.length?e:e+t+": "+(a="bg_image"===i?"url("+a+")":a)+";"},""))?".tmp_class{"+e+"}":""),i.data("vcFieldManager",new o({el:t}).render(a))}),vc.atts.colorpicker.init.call(this,n,e)}}})(window.jQuery); _.isUndefined(window.vc)&&(window.vc={atts:{}}),(n=>{var t=Backbone.View.extend({events:{change:"setParams"},setParams:function(){var r,e=this.save(),e=this.$el.find('[value="'+e+'"]'),i=vc.edit_element_block_view.content(),n=this.$el;e.length&&(e=e.data("params"),r=[],_.each(e,function(e,a,n){var t,a=i.find("[name="+a+"].wpb_vc_param_value");a.length&&(a.unbind("change.vcParamsPreset"),(t=a.data("vcFieldManager"))&&t.render&&t.render(e),r.push(a),a.val(e).trigger("change"))}),_.each(r,function(e,a){e.bind("change.vcParamsPreset",function(e){_.isUndefined(e.extra_type)&&n.val("")})}))},render:function(){return this.setParams(),this},save:function(){return this.$el.val()}});vc.atts.params_preset={parse:function(e){return n("select[name="+e.param_name+"]",this.content()).val()},init:function(e,a){n(".vc_params-preset-select",a).each(function(){var e=n(this);_.isUndefined(e.data("fieldManager"))&&e.data("fieldManager",new t({el:e}).render())})}}})(window.jQuery); (t=>{new function(){t(".gallery_widget_attached_images_list",this.$view).off("click.removeImage").on("click.removeImage","a.vc_icon-remove",function(e){e.preventDefault();var e=t(this).closest(".edit_form_line"),a=(t(this).parent().remove(),[]);e.find(".added img").each(function(){a.push(t(this).attr("rel"))}),e.find(".gallery_widget_attached_images_ids").val(a.join(",")).trigger("change")}),t(".gallery_widget_attached_images_list").each(function(e){var a=t(this);a.sortable({forcePlaceholderSize:!0,placeholder:"widgets-placeholder-gallery",cursor:"move",items:"li",update:function(){var e=[];t(this).find(".added img").each(function(){e.push(t(this).attr("rel"))}),a.closest(".edit_form_line").find(".gallery_widget_attached_images_ids").val(e.join(",")).trigger("change")}})})};var i=t("#vc_edit-form-tabs");i.length&&(t(".wpb-edit-form").addClass("vc_with-tabs"),i.find(".vc_edit-form-tab-control").removeClass("vc_active").eq(0).addClass("vc_active"),i.find('[data-vc-ui-element="panel-edit-element-tab"]').removeClass("vc_active").eq(0).addClass("vc_active"),i.find(".vc_edit-form-link").on("click",function(e){var a=t(this);e.preventDefault(),i.find(".vc_active").removeClass("vc_active"),a.parent().addClass("vc_active"),t(a.attr("href")).addClass("vc_active").parents(".vc_panel-body").scrollTop(0)}))})(window.jQuery); _.isUndefined(window.vc)&&(window.vc={atts:{}}),(n=>{vc.atts.vc_grid_item={init:function(t,a){!0===vc_user_access().getState("grid_builder")||null===vc_user_access().getState("grid_builder")?this.content().find('[data-vc-shortcode-param-name="'+t.param_name+'"] [data-vc-grid-element="value"]').on("change",function(){var a=n(this).val(),e=n(this).find("[value="+a+"]").data("vcLink");a&&n(this).parents('[data-vc-shortcode-param-name="'+t.param_name+'"]:first').find('[data-vc-grid-item="edit_link"]').attr("href",e)}).trigger("change"):this.content().find('[data-vc-shortcode-param-name="'+t.param_name+'"] .vc_description').remove()},parse:function(a){a=this.content().find('[data-vc-shortcode-param-name="'+a.param_name+'"] [data-vc-grid-element="value"]');return a.length?a.val():""}}})(window.jQuery);