| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/builder-v2.min.js.tar |
home/xbodynamge/lebauwcentre/wp-content/themes/customify/assets/js/customizer/builder-v2.min.js 0000644 00000016753 15113650247 0027153 0 ustar 00 var CustomizeBuilder_V2;!function(d){var o=d(document),r=wp.customize||null,t=Customify_Layout_Builder.is_rtl;CustomizeBuilder_V2=function(c,s){var e={id:s,version:"v2",controlId:"",items:[],container:null,ready:!1,devices:{desktop:"Desktop",mobile:"Mobile/Tablet"},activePanel:"desktop",panels:{},activeRow:"main",draggingItem:null,getTemplate:_.memoize(function(){var n=this,a={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e,i,t){return _.isUndefined(i)&&(i="tmpl-customize-control-"+n.type),!_.isUndefined(t)&&_.isString(t)?a.variable=t:a.variable="data",_.template(d("#"+i).html(),null,a)(e)}}),drag_drop:function(){var t=this;d(".customify--device-panel",t.container).each(function(){var e=d(this),n=e.data("device"),a=[];d(".col-items",e).each(function(e){var i,t=d(this).attr("data-id")||"";i=t?"_sid_"+n+"-"+t:"_sid_"+n+e,d(this).attr("id",i),a[e]="#"+i}),d(".col-items, .customify-available-items",e).each(function(){d(this).droppable().sortable({placeholder:"sortable-placeholder grid-stack-item",connectWith:".col-items",update:function(){t.save()}})});var i=d("#_sid_mobile-sidebar",e);i.attr("id");0<i.length&&i.sortable({revert:!0,change:function(e,i){t.save()}})})},addPanel:function(e){var i=this.getTemplate(),t="tmpl-customify--cb-panel-v2";if(0!=d("#"+t).length)return _.isObject(c.rows)||(c.rows={}),'<div class="customify--device-panel customify-vertical-panel customify--panel-'+e+'" data-device="'+e+'">'+i({device:e,id:c.id,rows:c.rows},t)+"</div>"},addDevicePanels:function(){var n=this;_.each(n.devices,function(e,i){var t=n.addPanel(i);d(".customify--cb-devices-switcher",n.container).append('<a href="#" class="switch-to switch-to-'+i+'" data-device="'+i+'">'+e+"</a>"),d(".customify--cb-body",n.container).append(t)}),d("#customify-upsell-tmpl").length&&d(d("#customify-upsell-tmpl").html()).insertAfter(d(".customify--cb-devices-switcher",n.container))},addItem:function(e){var i=this.getTemplate(),t="tmpl-customify--cb-item";if(0!=d("#"+t).length){var n=i(e,t);return d(n)}},addAvailableItems:function(){var s=this;_.each(s.devices,function(e,a){var c=d('<div class="customify-available-items" data-device="'+a+'"></div>');d(".customify--panel-"+a,s.container).append(c),_.each(s.items,function(e){var i=!0;if(!_.isUndefined(e.devices)&&!_.isEmpty(e.devices))if(_.isString(e.devices))e.devices!=a&&(i=!1);else{var t=!1;_.each(e.devices,function(e){a==e&&(t=!0)}),t||(i=!1)}if(i){var n=s.addItem(e);c.append(n)}})})},switchToDevice:function(e,i){var t=this;1<_.size(t.devices)?(d(".customify--cb-devices-switcher a",t.container).removeClass("customify--tab-active"),d(".customify--cb-devices-switcher .switch-to-"+e,t.container).addClass("customify--tab-active"),d(".customify--device-panel",t.container).addClass("customify--panel-hide"),d(".customify--device-panel.customify--panel-"+e,t.container).removeClass("customify--panel-hide"),t.activePanel=e):d(".customify--cb-devices-switcher a",t.container).addClass("customify--tab-active"),(_.isUndefined(i)||i)&&("desktop"==e?d("#customize-footer-actions .preview-desktop").trigger("click"):d("#customize-footer-actions .preview-mobile").trigger("click"))},addNewWidget:function(e,i,t,n,a){var c,s,o;c=this.container.find(".customify--device-panel.customify--panel-"+e),s=d(".customify--cb-row.customify--row-"+i,c),o=d(".col-items.col-"+t,s);var r=d('.customify-available-items .grid-stack-item[data-id="'+n.id+'"]',c);o.append(r)},addExistingRowsItems:function(){var c=this,t=r.control(c.controlId).params.value;_.isObject(t)||(t={}),_.each(c.devices,function(e,a){var i={};_.isObject(t[a])&&(i=t[a]),_.each(i,function(e,n){_.isUndefined(e)||_.each(e,function(e,t){_.each(e,function(e,i){c.addNewWidget(a,n,t,e,i)})})})}),c.ready=!0},focus:function(){this.container.on("click",".customify--cb-item-setting, .customify--cb-item-name, .item-tooltip",function(e){e.preventDefault();var i=d(this).data("section")||"",t=d(this).attr("data-control")||"",n=!1;t&&(_.isUndefined(r.control(t))||(r.control(t).focus(),n=!0)),n||i&&!_.isUndefined(r.section(i))&&(r.section(i).focus(),n=!0)}),this.container.on("click",".customify--cb-row-settings",function(e){e.preventDefault();var i=d(this).attr("data-id")||"",t=c.id+"_"+i;_.isUndefined(r.section(t))||r.section(t).focus()})},remove:function(){var n=this;o.on("click",".customify--device-panel .customify--cb-item-remove",function(e){e.preventDefault();var i=d(this).closest(".grid-stack-item"),t=i.closest(".customify--device-panel");i.removeAttr("style"),d(".customify-available-items",t).append(i),n.save()})},encodeValue:function(e){return encodeURI(JSON.stringify(e))},decodeValue:function(e){return JSON.parse(decodeURI(e))},save:function(){var n=this;if(n.ready){var a={};_.each(n.devices,function(e,t){a[t]={};var i=d(".customify--panel-"+t,n.container);d(".customify--cb-row",i).each(function(){var e=d(this),i=e.attr("data-row-id")||!1,n={};i&&(d(".col-items",e).each(function(){var e=d(this),i=e.attr("data-id")||!1;if(i){var t=_.map(d(" > .grid-stack-item",e),function(e){return{id:(e=d(e)).data("id")||""}});n[i]=t}}),a[t][i]=n)})}),r.control(n.controlId).setting.set(n.encodeValue(a))}},showPanel:function(){var e=this;this.container.removeClass("customify--builder--hide").addClass("customify--builder-show"),setTimeout(function(){e.container.height();d("#customize-preview").addClass("cb--preview-panel-show")},100)},hidePanel:function(){this.container.removeClass("customify--builder-show"),d("#customize-preview").removeClass("cb--preview-panel-show").removeAttr("style")},togglePanel:function(){var i=this;r.state("expandedPanel").bind(function(e){r.panel(c.panel).expanded()?(o.trigger("customify_panel_builder_open",[c.panel]),top._current_builder_panel=s,i.showPanel()):i.hidePanel()}),i.container.on("click",".customify--panel-close",function(e){e.preventDefault(),i.container.toggleClass("customify--builder--hide"),i.container.hasClass("customify--builder--hide")?d("#customize-preview").removeClass("cb--preview-panel-show"):d("#customize-preview").addClass("cb--preview-panel-show")})},panelLayoutCSS:function(){var e=d("#customize-controls").width();r.state("paneVisible").get()||(e=0),t?this.container.find(".customify--cb-inner").css({"margin-right":e}):this.container.find(".customify--cb-inner").css({"margin-left":e})},init:function(e,i,t){var n=this,a=n.getTemplate()(c,"tmpl-customify--builder-panel");n.container=d(a),n.container.addClass("customify--panel-v2"),d("body .wp-full-overlay").append(n.container),n.controlId=e,n.items=i,n.devices=t,c.section&&r.section(c.section).container.addClass("customify--hide"),n.addDevicePanels(),n.switchToDevice(n.activePanel),n.addAvailableItems(),n.switchToDevice(n.activePanel),n.drag_drop(),n.focus(),n.remove(),n.addExistingRowsItems(),r.panel(c.panel).expanded()?n.showPanel():n.hidePanel(),r.previewedDevice.bind(function(e){"desktop"===e?n.switchToDevice("desktop",!1):n.switchToDevice("mobile",!1)}),n.togglePanel(),r.state("paneVisible").get()&&n.panelLayoutCSS(),r.state("paneVisible").bind(function(){n.panelLayoutCSS()}),d(window).resize(_.throttle(function(){n.panelLayoutCSS()},100)),n.container.on("click",".customify--cb-devices-switcher a.switch-to",function(e){e.preventDefault();var i=d(this).data("device");n.switchToDevice(i)}),o.trigger("customify_builder_panel_loaded",[s,n]),d(".grid-stack-item",n.container).addClass("no-tooltip").removeAttr("title")}},i=c.control_id;if(void 0!==c.versions){if(void 0===c.versions[e.version])return alert("Invaild settings"),!1;i=c.versions[e.version].control_id}return e.init(i,c.items,c.devices),e}}(jQuery);