Nimble Page Builder - Version 1.2.1

Version Description

  • fixed : php function function_exists() can return false when the tested namespaced function starts with a backslash.
  • fixed : parallax background only applied to section level
  • fixed : background smart load only applied to section level
  • improved : when dragging content, no need to print dropzones before or after empty sections
  • improved : introduce a Nimble content filter for the TinyMce editor module, in order to prevent a content "corruption" by third party plugins

=

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Nimble Page Builder
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -3934,7 +3934,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3934
  evt.originalEvent.dataTransfer.setData( "sek-section-type", $(this).data('sek-section-type') );
3935
  evt.originalEvent.dataTransfer.setData( "sek-is-user-section", $(this).data('sek-is-user-section') );
3936
  try {
3937
- evt.originalEvent.dataTransfer.setData( 'browserSupport', 'browserSupport' );
3938
  evt.originalEvent.dataTransfer.setData( 'browserSupport', 'browserSupport' );
3939
  evt.originalEvent.dataTransfer.clearData( 'browserSupport' );
3940
  } catch ( er ) {
3934
  evt.originalEvent.dataTransfer.setData( "sek-section-type", $(this).data('sek-section-type') );
3935
  evt.originalEvent.dataTransfer.setData( "sek-is-user-section", $(this).data('sek-is-user-section') );
3936
  try {
 
3937
  evt.originalEvent.dataTransfer.setData( 'browserSupport', 'browserSupport' );
3938
  evt.originalEvent.dataTransfer.clearData( 'browserSupport' );
3939
  } catch ( er ) {
assets/czr/sek/js/ccat-sek-control.min.js CHANGED
@@ -1 +1 @@
1
- var CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{initialize:function(){var o=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");o.MAX_NUMBER_OF_COLUMNS=12,o.SETTING_UPDATE_BUFFER=50,o.defaultSektionSettingValue=sektionsLocalizedData.defaultSektionSettingValue,o.sekCollectionSettingId=new r.Value({}),o.registered=new r.Value([]),r.bind("ready",function(){o.registerAndSetupDefaultPanelSectionOptions(),o.sekCollectionSettingId.callbacks.add(function(e,t){try{o.setupSettingToBeSaved()}catch(e){r.errare("Error in self.sekCollectionSettingId.callbacks => self.setupSettingsToBeSaved()",e)}});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),o.generateUI({action:"sek-generate-local-skope-options-ui"}),o.generateUI({action:"sek-generate-global-options-ui"})};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){r.previewedDevice("desktop")}),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){o.resetCollectionSetting()}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("select2"))||s(this).select2("destroy")})})}),r.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=s.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI()})},registerAndSetupDefaultPanelSectionOptions:function(){var n=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg",'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__globalAndLocalOptionsSection",title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__globalAndLocalOptionsSection",function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__localOptionsSection",title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__localOptionsSection",function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__content_picker__",title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__content_picker__",function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.sekCollectionSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarVisible=new l.Value(!1),t.topBarVisible.bind(function(e){t.toggleTopBar(e)}),t.mouseMovedRecently=new l.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(d(window).data("_scroll_move_timer_")),d(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};d(window).on("mousemove scroll,",_.throttle(e,50)),l.previewer.bind("ready",function(){d(l.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.historyLog=new l.Value([]),t.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){d("body").addClass("nimble-top-bar-visible")},200)}):(t=d.Deferred(),d("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){if(0<d("#nimble-top-bar").length)return d("#nimble-top-bar");var t=this;try{_tmpl=wp.template("nimble-top-bar")({})}catch(e){return l.errare("Error when parsing the the top note template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("[data-nimble-history]","#nimble-top-bar").on("click",function(e){try{t.navigateHistory(d(this).data("nimble-history"))}catch(e){l.errare("Error when firing self.navigateHistory",e)}}),d(".sek-settings","#nimble-top-bar").on("click",function(e){l.panel(sektionsLocalizedData.sektionsPanelId,function(e){t.rootPanelFocus(),e.focus()})}),d(".sek-add-content","#nimble-top-bar").on("click",function(e){e.preventDefault(),l.previewer.trigger("sek-pick-content",{})}),d(".sek-nimble-doc","#nimble-top-bar").on("click",function(e){e.preventDefault(),window.open(d(this).data("doc-href"),"_blank")}),d("#nimble-top-bar")},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){l(e.sekCollectionSettingId())(e.validateSettingValue(r),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){a.errorLog("ajax sek_save_section => error",e),a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,c){c.extend(CZRSeksPrototype,{setupSettingToBeSaved:function(){var e,s=this;e=a.czr_skopeBase.getSkopeProperty("sektions","local").db_values;var t=s.sekCollectionSettingId();if(_.isEmpty(t))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!a.has(t)){a.CZR_Helpers.register({what:"setting",id:t,value:s.validateSettingValue(_.isObject(e)?e:s.defaultSektionSettingValue),transport:"postMessage",type:"option",track:!1,origin:"nimble"});a(t,function(e){s.historyLog([{status:"current",value:e(),action:"initial"}]),e.bind(_.debounce(function(e,t,i){if(i&&!0!==i.navigatingHistoryLogs){var n,o=[],r=c.extend(!0,[],s.historyLog());_.isEmpty(i.in_sektion)?_.isEmpty(i.to_sektion)||(n=i.to_sektion):n=i.in_sektion,_.each(r,function(e){"future"!=e.status&&(c.extend(e,{status:"previous"}),o.push(e))}),o.push({status:"current",value:e,action:_.isObject(i)&&i.action||"",sektionToRefresh:n}),s.historyLog(o)}},1e3))})}},validateSettingValue:function(i){if(!_.isObject(i))return a.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){a.errare(e,i),a.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),o=!0},s=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&a.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),s(e)})}};return s(),o?null:i},resetCollectionSetting:function(){if(_.isEmpty(this.sekCollectionSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");a(this.sekCollectionSettingId())(this.defaultSektionSettingValue),a.previewer.refresh(),a.notifications.remove("sek-notify"),a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){a.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts"}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"section",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s)},"sek-notify":function(t){return a=!1,n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-notify",{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-notify")},t.duration||5e3)}),this.resolve()})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},s={},e.resolve()})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve()})},"sek-toggle-save-section-ui":function(e){return a=!1,o.saveUIVisible(!0,e),n.Deferred(function(e){r={},s={},e.resolve()})}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){a?c.previewer.send(n,{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e)&&e}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => error when firing "+n,e),c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(k,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(n){if(!_.isEmpty(n.settingParams)&&_.has(n.settingParams,"to")){var o,r=this,e=n.settingParams.to,t=null,i=!1;if(!_.isEmpty(n.settingParams.args)&&_.has(n.settingParams.args,"moduleRegistrationParams")){var s=n.settingParams.args.moduleRegistrationParams.control,a=n.settingParams.args.moduleRegistrationParams.id,c=s.czr_Module(a);if(_.isEmpty(c)?k.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",n):(t=c.module_type,i=c.isMultiItem()),!i&&_.isObject(e)?o=r.normalizeAndSanitizeSingleItemInputValues(e,t):(o=[],_.each(e,function(e){o.push(r.normalizeAndSanitizeSingleItemInputValues(e,t))})),_.isEmpty(n.defaultPreviewAction))k.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",n);else{var l,d="refresh_stylesheet"===n.defaultPreviewAction,u="refresh_markup"===n.defaultPreviewAction,p="refresh_fonts"===n.defaultPreviewAction,m="refresh_preview"===n.defaultPreviewAction,f=n.settingParams.args.input_changed;_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==n.isGlobalOptions)return r.updateAPISetting({action:n.uiParams.action,id:n.uiParams.id,value:o,in_column:n.uiParams.in_column,in_sektion:n.uiParams.in_sektion,options_type:n.options_type,settingParams:n.settingParams}).done(function(){!0===d&&k.previewer.send("sek-refresh-stylesheet",{skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}}),!0===u&&k.previewer.send("sek-refresh-level",{apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")}),!0===m&&k.previewer.refresh()});if(_.isEmpty(n.options_type))k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var g=n.settingParams.args.input_value;if(!_.isString(g))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",g);-1<g.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:g}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts"})})}):h()}else h()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},s=null,a=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o))&&k.infoLog("::updateAPISettingAndExecutePreviewActions => missing default value for input "+t+" in module "+o),i=e,n=s,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(r[t]=e))}),_.each(r,function(e,t){switch(a.getInputType(t,o)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"tiny_mce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=k.control.has(t):(i=!0,1<e.length&&k.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(n,e){var o=this,t={};a.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:0,settingValue:{content_type:n.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!0,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&a.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],r=t[i].settingControlId;return o.isUIControlAlreadyRegistered(r)?s.control(r,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}),s.section(t.section()).container.first().trigger("sek-content-type-refreshed",{content_type:n.content_type})}):(_do_register_=function(){_.each(t,function(i,e){s.has(i.settingControlId)||(s(i.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:n.level,what:"setting",id:i.settingControlId,dirty:!1,value:i.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:n.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__content_picker__",priority:i.priority||10,settings:{default:i.settingControlId},track:!1}).done(function(){s.control(i.settingControlId,function(e){e.content_type=i.content_type,!0===n.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),"section"===e.content_type?(e.container.find(".czr-items-wrapper").hide(),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&(e.container.find(".czr-items-wrapper").show(),t.trigger("click"))):e.container.attr("data-sek-accordion","no")})})})},s.section("__content_picker__",function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e,{expand_first_module:!0}),o._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(o,e){var r=this;_.isEmpty(o.id)&&e.reject("generateUI => missing id");var t=r.getLevelProperty({property:"value",id:o.id}),i=r.getLevelProperty({property:"module_type",id:o.id}),n=r.getRegisteredModuleProperty(i,"name");_.isEmpty(i)&&e.reject("generateUI => module => invalid module_type");var s={};if(!0===r.getRegisteredModuleProperty(i,"is_father")){var a=r.getRegisteredModuleProperty(i,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+i+" is missing children modules ");_.each(a,function(e,t){s[t]={settingControlId:o.id+"__"+t,module_type:e,controlLabel:r.getRegisteredModuleProperty(e,"name")}})}else s.__no_option_group_to_be_updated_by_children_modules__={settingControlId:o.id,module_type:i,controlLabel:n};var c=_.keys(s)[0],l=s[c].settingControlId;return r.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(r.cleanRegistered(),_do_register_=function(){_.each(s,function(i,n){if(!d.has(i.settingControlId)){d(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{r.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(o,{action:"sek-set-module-value"}),options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},r.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},t);"__no_option_group_to_be_updated_by_children_modules__"!==n&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[n])?e[n]:{}),d.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:i.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:o.id,priority:10,settings:{default:i.settingControlId}}).done(function(){d.control(i.settingControlId).focus({completeCallback:function(){}}),d.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})})},d.section.when(o.id,function(){d.section(o.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:o.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){d.section(o.id,function(e){e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),r.scheduleModuleAccordion.call(e)})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(r,e){var s=this,a=s.getLevelProperty({property:"options",id:r.id});a=_.isObject(a)?a:{};var t={};l.extend(t,{bg:{settingControlId:r.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[r.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:r.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:r.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:r.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Set a custom anchor for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:r.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:r.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===r.level&&(l.extend(t,{width:{settingControlId:r.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),l.extend(t,{breakpoint:{settingControlId:r.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}})),"module"===r.level&&l.extend(t,{width:{settingControlId:r.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return s.isUIControlAlreadyRegistered(n)?c.control(n).focus({completeCallback:function(){var e=c.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(t,function(i,n){if(s.isUIControlAlreadyRegistered(i.settingControlId))c.section(c.control(i.settingControlId).section()).expanded(!0);else{if(!c.has(i.settingControlId)){c(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:r,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},s.SETTING_UPDATE_BUFFER))});var e=a[n]||{},t=s.getModuleStartingValue(i.module_type);if("no_starting_value"!==t&&_.isObject(t)){var o=l.extend(!0,{},t);e=l.extend(o,e)}c.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:i.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:r.level,level_id:r.id,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:r.id,priority:0,settings:{default:i.settingControlId}}).done(function(){!0===i.expandAndFocusOnInit&&c.control(i.settingControlId).focus({completeCallback:function(){}}),c.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})}})},c.section.has(r.id)||c.section(r.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_module:!0})}),c.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+r.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){c.section(r.id,function(e){_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>')})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(a,e){var c=this,t=c.getLocalSkopeOptionId();if(c.isUIControlAlreadyRegistered(t))return e;var i={};return d.extend(i,{template:{settingControlId:t+"__template",module_type:"sek_local_template",controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'},widths:{settingControlId:t+"__widths",module_type:"sek_local_widths",controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'},custom_css:{settingControlId:t+"__custom_css",module_type:"sek_local_custom_css",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'},local_performances:{settingControlId:t+"__local_performances",module_type:"sek_local_performances",controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'},local_reset:{settingControlId:t+"__local_reset",module_type:"sek_local_reset",controlLabel:sektionsLocalizedData.i18n["Remove the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'}}),_do_register_=function(){_.each(i,function(i,n){if(!l.has(i.settingControlId)){l(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{c.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},c.SETTING_UPDATE_BUFFER))});var e=c.getModuleStartingValue(i.module_type),t=l(c.sekCollectionSettingId())(),o=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{}),r=_.isObject(o[n])?o[n]:{};if("no_starting_value"!==e&&_.isObject(e)){var s=d.extend(!0,{},e);r=d.extend(s,r)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:i.settingControlId,dirty:!1,value:r,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__localOptionsSection",priority:10,settings:{default:i.settingControlId}}).done(function(){l.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},l.section("__localOptionsSection",function(e){l(c.sekCollectionSettingId(),function(){_do_register_(),e.container.on("click",".accordion-section-title",function(){c.generateUI({action:"sek-generate-local-skope-options-ui"})})})}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,t=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(t))return e;var i={};return l.extend(i,{breakpoint:{settingControlId:t+"__breakpoint",module_type:"sek_global_breakpoint",controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">devices</i>'},widths:{settingControlId:t+"__widths",module_type:"sek_global_widths",controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'},performances:{settingControlId:t+"__performances",module_type:"sek_global_performances",controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'}}),_do_register_=function(){_.each(i,function(i,n){if(!c.has(i.settingControlId)){c(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:s,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},a.SETTING_UPDATE_BUFFER))});var e=sektionsLocalizedData.globalOptionDBValues,t=a.getModuleStartingValue(i.module_type),o=_.isObject(e)&&!_.isEmpty(e[n])?e[n]:{};if("no_starting_value"!==t&&_.isObject(t)){var r=l.extend(!0,{},t);o=l.extend(r,o)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:i.settingControlId,dirty:!1,value:o,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__globalAndLocalOptionsSection",priority:20,settings:{default:i.settingControlId},track:!1}).done(function(){c.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},c.section("__globalAndLocalOptionsSection",function(e){c(a.sekCollectionSettingId(),function(){_do_register_()})}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(Y,J){J.extend(CZRSeksPrototype,{updateAPISetting:function($){var q=this,G=J.Deferred();return Y(q.sekCollectionSettingId(),function(e){var n,t,o,i,r,s,a,c,l,d=e(),u=_.isObject(d)?J.extend(!0,{},d):q.defaultSektionSettingValue,p=!1;switch(u.collection=_.isArray(u.collection)?u.collection:q.defaultSektionSettingValue.collection,$.action){case"sek-add-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");if(!0===$.is_nested){if(o=q.getLevelModel($.in_column,u.collection),"no_match"==(l=q.getLevelModel($.in_sektion,u.collection))){G.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===l.is_nested){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(E,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");var m;try{m=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e);break}var f=q.getLevelPositionInCollection($.id,u.collection);if(!0===$.is_nested){if("no_match"==(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(f+1,10),0,m)}else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(f+1,10),0,m)}a=m.id;break;case"sek-remove-section":if(!0===$.is_nested)"no_match"!=(o=q.getLevelModel($.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):Y.errare("updateAPISetting => "+$.action+" => no parent column matched");else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=$.id})}break;case"sek-move-section":var h,g,k=q.getLevelModel($.to_location,u.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+$.action+" => missing target location");if($.from_location!=$.to_location){var v=q.getLevelModel($.from_location,u.collection);if(_.isEmpty(v)||"no_match"==v)throw new Error("updateAPISetting => "+$.action+" => missing source location");v.collection=_.isArray(v.collection)?v.collection:[],h=q.getLevelModel($.id,v.collection),g=J.extend(!0,{},h),v.collection=_.filter(v.collection,function(e){return e.id!=$.id})}k.collection=_.isArray(k.collection)?k.collection:[],r=J.extend(!0,[],k.collection),s=[],_.each($.newOrder,function(e){if($.from_location!=$.to_location&&e==g.id)s.push(g);else{if(t=q.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => move section => missing section candidate");s.push(t)}}),k.collection=s;break;case"sek-add-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(t.collection,function(e){e.width=""}),t.collection.push({id:$.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=q.getLevelModel($.in_sektion,u.collection))){if(1===_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=$.id}),_.each(t.collection,function(e){e.width=""})}else Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var y;try{y=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e);break}var b=q.getLevelPositionInCollection($.id,u.collection);a=y.id,t.collection.splice(parseInt(b+1,10),0,y),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if($.col_number<2)break;var z=q.getLevelModel($.resized_column,u.collection),I=q.getLevelModel($.sister_column,u.collection);if("no_match"==z){Y.errare("updateAPISetting => "+$.action+" => no resized column matched"),G.reject("updateAPISetting => "+$.action+" => no resized column matched");break}z.width=parseFloat($.resizedColumnWidthInPercent);var w=q.getLevelModel($.in_sektion,u.collection),M=_.filter(w.collection,function(e){return e.id!=z.id&&e.id!=I.id}),C=parseFloat(z.width.toFixed(3));_.isEmpty(M)||_.each(M,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/$.col_number).toFixed(3))),C=parseFloat((C+e.width).toFixed(3))}),I.width=parseFloat((100-C).toFixed(3));break;case"sek-move-column":var S,D,P=q.getLevelModel($.to_sektion,u.collection);if(_.isEmpty(P)||"no_match"==P)throw new Error("updateAPISetting => "+$.action+" => missing target sektion");if($.from_sektion!=$.to_sektion){var x=q.getLevelModel($.from_sektion,u.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+$.action+" => missing source column");x.collection=_.isArray(x.collection)?x.collection:[],S=q.getLevelModel($.id,x.collection),D=J.extend(!0,{},S),x.collection=_.filter(x.collection,function(e){return e.id!=$.id}),_.each(x.collection,function(e){e.width=""})}P.collection=_.isArray(P.collection)?P.collection:[],r=J.extend(!0,[],P.collection),s=[],_.each($.newOrder,function(e){if($.from_sektion!=$.to_sektion&&e==D.id)s.push(D);else{if(o=q.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");s.push(o)}}),P.collection=s,_.each(P.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.module_type))throw new Error("updateAPISetting => "+$.action+" => missing module_type");if("no_match"===(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var E=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_module===e.id&&(E=t),$.after_module===e.id&&(E=t+1)});var R={id:$.id,level:"module",module_type:$.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(c=q.getModuleStartingValue($.module_type))&&(R.value=c),o.collection.splice(E,0,R);break;case"sek-duplicate-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var L;o.collection=_.isArray(o.collection)?o.collection:[];try{L=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e),G.reject("updateAPISetting => "+$.action+" => error when cloning the level");break}var A=q.getLevelPositionInCollection($.id,u.collection);a=L.id,o.collection.splice(parseInt(A+1,10),0,L);break;case"sek-remove-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");"no_match"!=(o=q.getLevelModel($.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):Y.errare("updateAPISetting => "+$.action+" => no parent column matched");break;case"sek-move-module":var Z,j,F;if(Z=q.getLevelModel($.to_column,u.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+$.action+" => missing target column");if($.from_column!=$.to_column){var V;if(V=q.getLevelModel($.from_column,u.collection),_.isEmpty(V)||"no_match"==V)throw new Error("updateAPISetting => "+$.action+" => missing source column");V.collection=_.isArray(V.collection)?V.collection:[],j=q.getLevelModel($.id,u.collection),F=J.extend(!0,{},j),V.collection=_.filter(V.collection,function(e){return e.id!=$.id})}if(Z.collection=_.isArray(Z.collection)?Z.collection:[],r=J.extend(!0,[],Z.collection),s=[],_.each($.newOrder,function(e){if($.from_column!=$.to_column&&e==F.id)s.push(F);else{if(i=q.getLevelModel(e,u.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+$.action+" => missing moduleCandidate");s.push(i)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+$.action+" => there are duplicated modules in column : "+Z.id);Z.collection=s;break;case"sek-set-module-value":i=q.getLevelModel($.id,u.collection);var O={};if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(O[t]=e)}),"no_match"==i){Y.errare("updateAPISetting => "+$.action+" => no module matched",$),G.reject("updateAPISetting => "+$.action+" => error no module matched");break}if(_.isEmpty($.options_type)){Y.errare("updateAPISetting => "+$.action+" => missing options_type"),G.reject("updateAPISetting => "+$.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===$.options_type?i.value=O:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[$.options_type]=O);break;case"sek-generate-level-options-ui":var T=q.getLevelModel($.id,u.collection),U={};if("no_match"===T){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}T.options=T.options||{},_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(U[t]=e)}),_.isEmpty($.options_type)&&Y.errare("updateAPISetting => "+$.action+" => missing options_type"),T.options[$.options_type]=U;break;case"sek-generate-local-skope-options-ui":U={};var N=J.extend(!0,{},_.isObject(u.local_options)?u.local_options:{});if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(U[t]=e)}),_.isEmpty($.options_type)||!_.isString($.options_type))Y.errare("updateAPISetting => "+$.action+" => missing options_type");else{var B={};B[$.options_type]=U,u.local_options=J.extend(N,B)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(E=0,"no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),$.content_type){case"module":c=q.getModuleStartingValue($.content_id),n.collection.splice(E,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[{id:$.droppedModuleId,level:"module",module_type:$.content_id,value:"no_starting_value"!==c?c:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":p=J.Deferred();var Q=function(e){q.preparePresetSectionForInjection(e).fail(function(e){G.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),p.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty($.sektion_to_replace)){var i=q.getLevelModel($.sektion_to_replace,u.collection);"no_match"===i&&(Y.errare("updateAPISetting => "+$.action+" => no sektionToReplace matched"),G.reject("updateAPISetting => "+$.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=q.getLevelModel($.in_column,u.collection))&&(Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),o.collection.splice(E,0,{id:$.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(E,0,{id:$.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})};q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(e){Y.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",e),G.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(Y.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),G.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),Q(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(o=q.getLevelModel($.in_column,u.collection),"no_match"==(l=q.getLevelModel($.in_sektion,u.collection))){G.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===l.is_nested){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],p=J.Deferred(),Q=function(e){q.preparePresetSectionForInjection(e).fail(function(e){G.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),p.reject(e)}).done(function(e){o.collection.push({id:$.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})},q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(){Y.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",_er_),G.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(Y.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),G.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),Q(e)});break;case"sek-update-fonts":var W=q.sniffGFonts();if(!_.isEmpty($.font_family)&&_.isString($.font_family)&&!_.contains(W,$.font_family)){if($.font_family.indexOf("gfont")<0){Y.errare("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont"),G.reject("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont");break}W.push($.font_family)}u.fonts=W}if("pending"==G.state()){var H=function(){_.isEqual(d,u)?G.reject("updateAPISetting => the new setting value is unchanged when firing action : "+$.action):null!==q.validateSettingValue(u)?(e(u,$),G.resolve(a)):G.reject("updateAPISetting => the new setting value did not pass the validation checks for action "+$.action)};!1===p?H():p.done(function(){H()}).fail(function(e){Y.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}),G.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=J.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(Y.sek_userSavedSections)||_.isEmpty(Y.sek_userSavedSections[t.preset_section_id])?(Y.sek_userSavedSections=Y.sek_userSavedSections||{},_.isUndefined(Y.sek_fetchingUserSavedSections)||"pending"!=Y.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:Y.settings.nonce.save,preset_section_id:t.preset_section_id}),Y.sek_fetchingUserSavedSections=e):e=Y.sek_fetchingUserSavedSections,e.done(function(e){Y.sek_userSavedSections[t.preset_section_id]=e,i.resolve(Y.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(Y.sek_userSavedSections):_.isEmpty(Y.sek_presetSections)?(_.isUndefined(Y.sek_fetchingPresetSections)||"pending"!=Y.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:Y.settings.nonce.save}),Y.sek_fetchingPresetSections=e):e=Y.sek_fetchingPresetSections,e.done(function(e){Y.sek_presetSections=e,i.resolve(Y.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(Y.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=J.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=J.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+s.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.id=r.section_id,i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=J.Deferred(),s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("::img-path::")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("::img-path::",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("::img-path::")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return _.isEmpty(e.level)||"setting"!==e.what||n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"!==e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{rootPanelFocus:function(){s.section.has(s.czr_activeSectionId())?s.section(s.czr_activeSectionId()).expanded(!1):s.section.each(function(e){e.expanded(!1)}),s.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()},getLevelModel:function(t,e){var i=this,n="no_match";if(_.isUndefined(e)){var o=s(i.sekCollectionSettingId())(),r=_.isObject(o)?a.extend(!0,{},o):i.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==n&&(t===e.id?n=e:_.isArray(e.collection)&&(n=i.getLevelModel(t,e.collection)))}),n},getLevelPositionInCollection:function(i,e){var n=this,o="no_match";if(_.isUndefined(e)){var t=s(n.sekCollectionSettingId())(),r=_.isObject(t)?a.extend(!0,{},t):n.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e,t){"no_match"==o&&(i===e.id?o=t:_.isArray(e.collection)&&(o=n.getLevelPositionInCollection(i,e.collection)))}),o},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))s.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];s.errare("getLevelProperty => invalid model for id : "+e.id,t)}else s.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=a.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(!sektionsLocalizedData.registeredModules[e].is_father){var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i}s.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically")},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(i,e){var n=this;if(i=i||[],_.isUndefined(e)){var t=s(n.sekCollectionSettingId())();e=_.isObject(t)?a.extend(!0,{},t):n.defaultSektionSettingValue}return _.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===n.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n.sniffGFonts(i,e)}),i},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}s.errare("getInputDefaultValue => Father modules should be treated specifically")}},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}s.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}s.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}s.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return s.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return s.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t},selectNextTabbableOrFocusable:function(e){var t=a(e),i=a(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=a(e),i=a(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(){var n=this,e=(n.input_parent,n.module,s.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type).choices);_.isEmpty(e)?s.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in image module"):(_.each(e,function(e,t){var i={value:t,html:e};t==n()?a.extend(i,{selected:"selected"}):"px"===t&&a.extend(i,{selected:"selected"}),a("select[data-czrtype]",n.container).append(a("<option>",i))}),a("select[data-czrtype]",n.container).selecter())},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=a(".sek-font-size-line-height-wrapper",t.container),n=i.find("input[data-czrtype]").data("sek-unit"),o=function(e){return _.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(_.isEmpty(n)?"px":o(n)),t.css_unit.bind(function(e){e=_.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("change")}),i.find('input[type="number"]').on("input change",function(e){t(a(this).val()+o(t.css_unit()))}).stepper(),i.on("click","[data-sek-unit]",function(e){e.preventDefault(),i.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",a(this).data("sek-unit")),t.css_unit(a(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+n+'"]').addClass("is-selected").attr("aria-pressed",!0)},maybeSetupDeviceSwitcherForInput:function(){var i=this,e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");i.container.find(".customize-control-title").prepend(e),i.previewedDevice=new s.Value(s.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),a(this).addClass("active");var t="desktop";try{t=a(this).data("sek-device")}catch(e){s.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{s.previewedDevice(t)}catch(e){s.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}i.previewedDevice(t)},i.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=i.container.find('[data-sek-device="'+s.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_module:!0};var i=this;a(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=a(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){a(this).attr("data-sek-accordion")||(a(this).attr("data-sek-expanded","false"),a(this).find(".czr-items-wrapper").stop(!0,!0).slideUp("fast"))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:"fast",start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),"true"==t.attr("data-sek-expanded")?t.trigger("sek-accordion-expanded"):t.trigger("sek-accordion-collapsed")}}))}),e.expand_first_module&&i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")},isPromise:function(e){return e&&"function"==typeof e.then&&String(a.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=a.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(a.Deferred(function(t){(i.isPromise(e)?e:a.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),a.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||a.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:a.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{rel_path:t,nonce:s.settings.nonce.save}).fail(function(e){s.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,f){f.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){"draggable"in document.createElement("span")?t.setupNimbleDragZones(e.input_container):a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){a.notifications.remove("drag-drop-support")},1e4)})}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var t=this;e.find("[draggable]").each(function(){f(this).on("dragstart",function(e){(function(e){e.originalEvent.dataTransfer.setData("sek-content-type",f(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",f(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",f(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",f(this).data("sek-is-user-section"));try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){a.notifications.remove("drag-drop-support")},1e4)})}t.dnd_draggedType=f(this).data("sek-content-type"),f(this).addClass("sek-dragged"),f("body").addClass("sek-dragging"),a.previewer.send("sek-drag-start",{type:t.dnd_draggedType})}).call(f(this),e)}).on("dragend",function(e){(function(e){f("body").removeClass("sek-dragging"),f(this).removeClass("sek-dragged"),a.previewer.send("sek-drag-stop")}).call(f(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=f("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=f(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop(f(this))&&(e.stopPropagation(),t.dnd_OnEnterOver(f(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(f(this),e)||t.dnd_cleanOnLeaveDrop(f(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop(f(this)))return;e.preventDefault(),t.dnd_onDrop(f(this),e),t.dnd_cleanOnLeaveDrop(f(this),e),a.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_toggleDragApproachClassesToDropZones:function(m){this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.$dropZones.find(".sek-drop-zone").each(function(){var e=m.clientY,t=m.clientX,i=f(this)[0].getBoundingClientRect(),n=Math.abs(e-(i.bottom-(i.bottom-i.top)/2)),o=(Math.abs(i.top-e),Math.abs(t-(i.right-(i.right-i.left)/2))),r=(i.right,i.left,n<60),s=o<60,a=n<80,c=o<80,l=n<120,d=o<120,u=t<=i.right&&i.left<=t,p=e>=i.top&&i.bottom>=e;p&&u?(f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-very-close"),f(this).addClass("sek-drag-is-in")):((r||p)&&(s||u)?(f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close"),f(this).addClass("sek-drag-is-very-close")):((a||p)&&(c||u)?(f(this).removeClass("sek-drag-is-approaching"),f(this).addClass("sek-drag-is-close")):((l||p)&&(d||u)?f(this).addClass("sek-drag-is-approaching"):f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close")),f(this).removeClass("sek-drag-is-very-close")),f(this).removeClass("sek-drag-is-in"))}),this.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=f(e.currentTarget);switch(this.dnd_draggedType){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return f(a.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=e&&0<e.length&&e.hasClass("sek-content-preset_section-drop-zone"),i=e&&0<e.length&&e.hasClass("sek-module-drop-zone-for-first-module");return e.hasClass("sek-drop-zone")&&("preset_section"===this.dnd_draggedType&&t||"module"===this.dnd_draggedType&&!t||"preset_section"===this.dnd_draggedType&&i)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){a.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),f(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(f(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"))},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");f.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");a.previewer.trigger("sek-add-module",{level:r,id:s,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;r.sekEditorExpanded=new r.Value(!1),r.sekEditorSynchronizedInput=new r.Value,n.editorEventsListenerSetup=!1;var o=function(){r.sekTinyMceEditor=r.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===n.editorEventsListenerSetup&&(n.attachEventsToEditor(),n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};n.bind("sek-edit-module_done",function(e){if("tiny_mce_editor"==e.clicked_input_type){var i=e.id;if(!0===n.getRegisteredModuleProperty(e.module_type,"is_father")){var t=n.getRegisteredModuleProperty(e.module_type,"children");if(_.isEmpty(t))throw new Error("::generateUIforFrontModules => a father module "+e.module_type+" is missing children modules ");_.each(t,function(e,t){"czr_tinymce_child"===e&&(i=i+"__"+t)})}r.sekEditorSynchronizedInput({control_id:i,input_id:e.clicked_input_id}),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))r.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},r.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});r.sekEditorSynchronizedInput(n),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),r.sekEditorSynchronizedInput.bind(function(n,e){o(),r(n.control_id,function(e){var t=e(),i=_.isObject(t)&&!_.isEmpty(t[n.input_id])?t[n.input_id]:"";try{r.sekTinyMceEditor.setContent(i)}catch(e){r.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}r.sekTinyMceEditor.focus()})}),r.sekEditorExpanded.bind(function(e,t,i){o(),e&&r.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){r.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?n.czrResizeEditor(window.innerHeight-n.$editorPane.height()):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){r.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&r.sekEditorExpanded(!1,{context:"clicked anywhere"})}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(r.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?r.previewer.bind(e,function(){r.sekEditorExpanded(!1)}):r.previewer.bind(e,function(e){r.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),r.sekTinyMceEditor.on("input change keyup",function(e){if(r.control.has(r.sekEditorSynchronizedInput().control_id))try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:r.sekTinyMceEditor.getContent(),modified_editor_element:r.sekTinyMceEditor})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),s("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===s(e.target).attr("id")||s(e.target).hasClass("czr-resize-handle"))&&r.sekEditorExpanded())switch(e.type){case"mousedown":s(document).on("mousemove.czr-customize-content_editor",function(e){e.preventDefault(),s(document.body).addClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":s(document).off("mousemove.czr-customize-content_editor"),s(document.body).removeClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});r.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?c(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),s.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{font_size:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{line_height:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{font_picker:function(e){var a=this,o=a.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+a.id+'"]',a.container);l.isNull(a())||l.isEmpty(a())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,s,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==a()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.select2(i),c(".select2-selection__rendered",a.container).css(r(a()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=s(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},s=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};c.when(function(){var e,t=c.Deferred();l.isEmpty(i.sek_fontCollections)?(l.isUndefined(i.sek_fetchingFontCollection)||"pending"!=i.sek_fetchingFontCollection.state()?(e=i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:a.module.id}),i.sek_fetchingFontCollection=e):e=i.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");i.sek_fontCollections=JSON.parse(e),t.resolve(i.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(i.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.select2&&void 0!==c.fn.select2.amd&&"function"==typeof c.fn.select2.amd.require?c.fn.select2.amd.require(["select2/results","select2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{fa_icon_picker:function(){var t,n=this,o=n.input_parent,r=!1;a.when((t=a.Deferred(),c.isEmpty(n.sek_faIconCollection)?s.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection),t.promise())).done(function(e){!function(e){c.each(e,function(e){var t={value:e,html:s.CZR_Helpers.capitalize(e.substring(7))};t.value==o().icon&&(a.extend(t,{selected:"selected"}),r=!0),a("select[data-czrtype]",n.container).append(a("<option>",t))});var t,i=function(e){return e.id?a('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=r?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).select2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e)}).fail(function(e){s.errare("fa_icon_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,t=(n.input_parent(),!1),r=n.container.find("textarea"),o=n.container.find(".customize-control-title"),s=r.data("editor-params");wp.codeEditor&&(p.isUndefined(s)||!1!==s)&&(t=s),n.isReady.done(function(){var e=function(e){p.isEmpty(this.editor)&&(p.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(t)try{a(t)}catch(e){d.errare("error in sek_control => code_editor() input",e),c()}else c();o.click()},10))};e.call(n),n.module.control.container.on("sek-accordion-expanded",function(){e.call(n)})});var a=function(e){var t,i=!1;t=p.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:l}),n.editor=wp.codeEditor.initialize(r,t),u(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":o.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),o.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},c=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},l=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",o.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",o.html()),i.setting.notifications.add(n.id,new d.Notification(n.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+s(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(h,g,k){h.czrInputMap=h.czrInputMap||{},g.extend(h.czrInputMap,{borders:function(e){var a=this,c=g(".sek-borders",a.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(h.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=h.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.union(a.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=a(),i={},n=g.extend(!0,{},f);k.isObject(t)?i=g.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=g.extend(!0,{},f);if(!k.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=g.extend(n,i),e);if(k.isEmpty(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),g(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new h.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new h.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new h.Value("_all_"),l.val((i=a(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.isNumber(n)||n<0)&&(h.errare("Error in borders input type for module : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(a.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){g(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===g(this).data("border_type_switched")})},clear:function(e,t){g(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){h.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){l.val(g(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=g(this).val()+p(a.css_unit()),s=g.extend(!0,{},f);(i=g.extend(!0,{},k.isObject(a())?a():s))[n]=g.extend(!0,{},i[n]||s[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(i)),d.val(g(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),g(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",g(this).data("sek-unit")),a.css_unit(g(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),g(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=g(this).data("sek-border-type")}catch(e){h.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=g.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){h.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}g('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,h){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return h.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},u=function(e){return h.isEmpty(e)||!h.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return h.isEmpty(e)||!h.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),_=h.isEmpty(t)||h.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),t="px";return h.isObject(e)&&h.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!h.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=a(),i={},n=f.extend(!0,{},_);h.isObject(t)?i=f.extend(!0,{},t):h.isString(t)&&(i={_all_:"0px"});var o,r,s=function(e,t){var i,n=f.extend(!0,{},_);if(!h.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=h.isObject(e)&&h.has(e,"_all_")?e._all_:n._all_,h.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(h.isEmpty(s)||!h.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(s),r=u(s),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(h.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),n=0,h.isObject(i)&&h.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!h.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!h.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},h.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),h.isString(o)&&!h.isEmpty(o)&&(i[n]=o),(h.isEmpty(t)||h.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&h.each(a.cssRadiusTypes,function(e){i=h.omit(i,e)}),a(i)),s.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},h.isObject(a())?a():{});h.isEmpty(i[t])||(i=h.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(i,n,e){i.czrInputMap=i.czrInputMap||{},n.extend(i.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){if(e.stopPropagation(),"local"===n(this).data("sek-reset-scope"))try{i.czr_sektions.resetCollectionSetting()}catch(e){i.errare("reset_button => error when firing resetCollectionSetting() on click event",e)}})}})}(wp.customize,jQuery,_),function(t,o,r){t.czrModuleMap=t.czrModuleMap||{},o.extend(t.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),t.czrInputMap=t.czrInputMap||{},o.extend(t.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!t.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=t.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),o(this).addClass("is-selected").attr("aria-pressed",!0),n.contentType(o(this).data("sek-content-type"))}),n.contentType=new t.Value,n.contentType.bind(function(t){n.container.find('[data-sek-content-type="'+n.contentType()+'"]').trigger("click"),r.each(i.controls(),function(e){r.isUndefined(e.content_type)||e.active(t===e.content_type)})}),n.contentType(n()),i.container.first().bind("sek-content-type-refreshed",function(e,t){n.contentType(t.content_type||"section")})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},i.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_contact_sec_picker_module","sek_column_layouts_sec_picker_module"],function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";s.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",s.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"bg-apply-overlay":r.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return!r.isEmpty(n.czr_Input("bg-image")()+"")&&o.CZR_Helpers.isChecked(t())})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"height-type":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-height",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"width-type":t.call(e,"custom-width",function(){return"custom"===e()}),t.call(e,"h_alignment",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_template:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_performances:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=r.CZRItem.extend(i.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(i,e,t),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"img":o.call(i,"img-size",function(){return!s.isEmpty(i()+"")&&s.isNumber(i())});break;case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"===i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":e="url"===i();break;case"link-target":e="no-link"!==i()}return e})}catch(e){r.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":s.each(["borders"],function(e){try{o.call(i,e,function(){return"none"!==i()})}catch(e){r.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":s.each(["custom_width"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"tiny_mce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)},setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRFPItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRFPItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"img-type":s.each(["img-id","img-size"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":s.each(["content-custom-text"],function(e){try{o.call(i,e,function(){return"custom"===i()})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":s.each(["btn-custom-text"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:r.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(s,e,a){var t={initialize:function(e,t){var i=this;i.inputConstructor=s.CZRInput.extend({setupSelect:function(){s.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=s.CZRItem.extend(i.CZRIconItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),s.CZRDynModule.prototype.initialize.call(i,e,t)},CZRIconItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module,r=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){s.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":a.each(["color_hover"],function(e){try{r.call(i,e,function(){return i()})}catch(e){s.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};s.czrModuleMap=s.czrModuleMap||{},e.extend(s.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_spacing_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRDividerInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRDividerInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_divider_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRButtonItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(t){switch(t.id){case"quote_design":r.each(["border_width_css","border_color_css"],function(e){try{i.call(t,e,function(){return"border-before"==t()})}catch(e){o.errare("Quote module => error in setInputVisibilityDeps",e)}}),r.each(["icon_color_css","icon_size_css"],function(e){try{i.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){o.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_quote_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_cite_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRButtonItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,e=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{e.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":e.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":e.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRButtonItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":s.each(["borders"],function(e){try{o.call(t,e,function(){return"none"!==t()})}catch(e){r.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(t){switch(t.id){case"show_name_field":r.each(["name_field_label","name_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":r.each(["subject_field_label","subject_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":r.each(["message_field_label","message_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.call(t,"link-custom-url",function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":s.each(["borders"],function(e){try{o.call(t,e,function(){return"none"!==t()})}catch(e){r.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fonts_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRButtonItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_);
1
+ var CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{initialize:function(){var o=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");o.MAX_NUMBER_OF_COLUMNS=12,o.SETTING_UPDATE_BUFFER=50,o.defaultSektionSettingValue=sektionsLocalizedData.defaultSektionSettingValue,o.sekCollectionSettingId=new r.Value({}),o.registered=new r.Value([]),r.bind("ready",function(){o.registerAndSetupDefaultPanelSectionOptions(),o.sekCollectionSettingId.callbacks.add(function(e,t){try{o.setupSettingToBeSaved()}catch(e){r.errare("Error in self.sekCollectionSettingId.callbacks => self.setupSettingsToBeSaved()",e)}});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),o.generateUI({action:"sek-generate-local-skope-options-ui"}),o.generateUI({action:"sek-generate-global-options-ui"})};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){r.previewedDevice("desktop")}),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){o.resetCollectionSetting()}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("select2"))||s(this).select2("destroy")})})}),r.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=s.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI()})},registerAndSetupDefaultPanelSectionOptions:function(){var n=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg",'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__globalAndLocalOptionsSection",title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__globalAndLocalOptionsSection",function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__localOptionsSection",title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__localOptionsSection",function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:"__content_picker__",title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section("__content_picker__",function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.sekCollectionSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarVisible=new l.Value(!1),t.topBarVisible.bind(function(e){t.toggleTopBar(e)}),t.mouseMovedRecently=new l.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(d(window).data("_scroll_move_timer_")),d(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};d(window).on("mousemove scroll,",_.throttle(e,50)),l.previewer.bind("ready",function(){d(l.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.historyLog=new l.Value([]),t.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){d("body").addClass("nimble-top-bar-visible")},200)}):(t=d.Deferred(),d("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){if(0<d("#nimble-top-bar").length)return d("#nimble-top-bar");var t=this;try{_tmpl=wp.template("nimble-top-bar")({})}catch(e){return l.errare("Error when parsing the the top note template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("[data-nimble-history]","#nimble-top-bar").on("click",function(e){try{t.navigateHistory(d(this).data("nimble-history"))}catch(e){l.errare("Error when firing self.navigateHistory",e)}}),d(".sek-settings","#nimble-top-bar").on("click",function(e){l.panel(sektionsLocalizedData.sektionsPanelId,function(e){t.rootPanelFocus(),e.focus()})}),d(".sek-add-content","#nimble-top-bar").on("click",function(e){e.preventDefault(),l.previewer.trigger("sek-pick-content",{})}),d(".sek-nimble-doc","#nimble-top-bar").on("click",function(e){e.preventDefault(),window.open(d(this).data("doc-href"),"_blank")}),d("#nimble-top-bar")},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){l(e.sekCollectionSettingId())(e.validateSettingValue(r),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){a.errorLog("ajax sek_save_section => error",e),a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,c){c.extend(CZRSeksPrototype,{setupSettingToBeSaved:function(){var e,s=this;e=a.czr_skopeBase.getSkopeProperty("sektions","local").db_values;var t=s.sekCollectionSettingId();if(_.isEmpty(t))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!a.has(t)){a.CZR_Helpers.register({what:"setting",id:t,value:s.validateSettingValue(_.isObject(e)?e:s.defaultSektionSettingValue),transport:"postMessage",type:"option",track:!1,origin:"nimble"});a(t,function(e){s.historyLog([{status:"current",value:e(),action:"initial"}]),e.bind(_.debounce(function(e,t,i){if(i&&!0!==i.navigatingHistoryLogs){var n,o=[],r=c.extend(!0,[],s.historyLog());_.isEmpty(i.in_sektion)?_.isEmpty(i.to_sektion)||(n=i.to_sektion):n=i.in_sektion,_.each(r,function(e){"future"!=e.status&&(c.extend(e,{status:"previous"}),o.push(e))}),o.push({status:"current",value:e,action:_.isObject(i)&&i.action||"",sektionToRefresh:n}),s.historyLog(o)}},1e3))})}},validateSettingValue:function(i){if(!_.isObject(i))return a.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){a.errare(e,i),a.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),o=!0},s=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&a.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),s(e)})}};return s(),o?null:i},resetCollectionSetting:function(){if(_.isEmpty(this.sekCollectionSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");a(this.sekCollectionSettingId())(this.defaultSektionSettingValue),a.previewer.refresh(),a.notifications.remove("sek-notify"),a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){a.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts"}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"section",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s)},"sek-notify":function(t){return a=!1,n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-notify",{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-notify")},t.duration||5e3)}),this.resolve()})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},s={},e.resolve()})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve()})},"sek-toggle-save-section-ui":function(e){return a=!1,o.saveUIVisible(!0,e),n.Deferred(function(e){r={},s={},e.resolve()})}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){a?c.previewer.send(n,{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e)&&e}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => error when firing "+n,e),c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(k,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(n){if(!_.isEmpty(n.settingParams)&&_.has(n.settingParams,"to")){var o,r=this,e=n.settingParams.to,t=null,i=!1;if(!_.isEmpty(n.settingParams.args)&&_.has(n.settingParams.args,"moduleRegistrationParams")){var s=n.settingParams.args.moduleRegistrationParams.control,a=n.settingParams.args.moduleRegistrationParams.id,c=s.czr_Module(a);if(_.isEmpty(c)?k.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",n):(t=c.module_type,i=c.isMultiItem()),!i&&_.isObject(e)?o=r.normalizeAndSanitizeSingleItemInputValues(e,t):(o=[],_.each(e,function(e){o.push(r.normalizeAndSanitizeSingleItemInputValues(e,t))})),_.isEmpty(n.defaultPreviewAction))k.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",n);else{var l,d="refresh_stylesheet"===n.defaultPreviewAction,u="refresh_markup"===n.defaultPreviewAction,p="refresh_fonts"===n.defaultPreviewAction,m="refresh_preview"===n.defaultPreviewAction,f=n.settingParams.args.input_changed;_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==n.isGlobalOptions)return r.updateAPISetting({action:n.uiParams.action,id:n.uiParams.id,value:o,in_column:n.uiParams.in_column,in_sektion:n.uiParams.in_sektion,options_type:n.options_type,settingParams:n.settingParams}).done(function(){!0===d&&k.previewer.send("sek-refresh-stylesheet",{skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}}),!0===u&&k.previewer.send("sek-refresh-level",{apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")}),!0===m&&k.previewer.refresh()});if(_.isEmpty(n.options_type))k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var g=n.settingParams.args.input_value;if(!_.isString(g))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",g);-1<g.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:g}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts"})})}):h()}else h()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},s=null,a=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o))&&k.infoLog("::updateAPISettingAndExecutePreviewActions => missing default value for input "+t+" in module "+o),i=e,n=s,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(r[t]=e))}),_.each(r,function(e,t){switch(a.getInputType(t,o)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"tiny_mce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=k.control.has(t):(i=!0,1<e.length&&k.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(n,e){var o=this,t={};a.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:0,settingValue:{content_type:n.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!0,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&a.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],r=t[i].settingControlId;return o.isUIControlAlreadyRegistered(r)?s.control(r,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}),s.section(t.section()).container.first().trigger("sek-content-type-refreshed",{content_type:n.content_type})}):(_do_register_=function(){_.each(t,function(i,e){s.has(i.settingControlId)||(s(i.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:n.level,what:"setting",id:i.settingControlId,dirty:!1,value:i.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:n.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__content_picker__",priority:i.priority||10,settings:{default:i.settingControlId},track:!1}).done(function(){s.control(i.settingControlId,function(e){e.content_type=i.content_type,!0===n.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),"section"===e.content_type?(e.container.find(".czr-items-wrapper").hide(),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&(e.container.find(".czr-items-wrapper").show(),t.trigger("click"))):e.container.attr("data-sek-accordion","no")})})})},s.section("__content_picker__",function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e,{expand_first_module:!0}),o._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(o,e){var r=this;_.isEmpty(o.id)&&e.reject("generateUI => missing id");var t=r.getLevelProperty({property:"value",id:o.id}),i=r.getLevelProperty({property:"module_type",id:o.id}),n=r.getRegisteredModuleProperty(i,"name");_.isEmpty(i)&&e.reject("generateUI => module => invalid module_type");var s={};if(!0===r.getRegisteredModuleProperty(i,"is_father")){var a=r.getRegisteredModuleProperty(i,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+i+" is missing children modules ");_.each(a,function(e,t){s[t]={settingControlId:o.id+"__"+t,module_type:e,controlLabel:r.getRegisteredModuleProperty(e,"name")}})}else s.__no_option_group_to_be_updated_by_children_modules__={settingControlId:o.id,module_type:i,controlLabel:n};var c=_.keys(s)[0],l=s[c].settingControlId;return r.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(r.cleanRegistered(),_do_register_=function(){_.each(s,function(i,n){if(!d.has(i.settingControlId)){d(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{r.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(o,{action:"sek-set-module-value"}),options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},r.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},t);"__no_option_group_to_be_updated_by_children_modules__"!==n&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[n])?e[n]:{}),d.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:i.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:o.id,priority:10,settings:{default:i.settingControlId}}).done(function(){d.control(i.settingControlId).focus({completeCallback:function(){}}),d.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})})},d.section.when(o.id,function(){d.section(o.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:o.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){d.section(o.id,function(e){e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),r.scheduleModuleAccordion.call(e)})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(r,e){var s=this,a=s.getLevelProperty({property:"options",id:r.id});a=_.isObject(a)?a:{};var t={};l.extend(t,{bg:{settingControlId:r.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[r.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:r.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:r.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:r.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Set a custom anchor for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:r.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:r.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===r.level&&(l.extend(t,{width:{settingControlId:r.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),l.extend(t,{breakpoint:{settingControlId:r.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}})),"module"===r.level&&l.extend(t,{width:{settingControlId:r.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[r.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return s.isUIControlAlreadyRegistered(n)?c.control(n).focus({completeCallback:function(){var e=c.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(t,function(i,n){if(s.isUIControlAlreadyRegistered(i.settingControlId))c.section(c.control(i.settingControlId).section()).expanded(!0);else{if(!c.has(i.settingControlId)){c(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:r,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},s.SETTING_UPDATE_BUFFER))});var e=a[n]||{},t=s.getModuleStartingValue(i.module_type);if("no_starting_value"!==t&&_.isObject(t)){var o=l.extend(!0,{},t);e=l.extend(o,e)}c.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:i.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:r.level,level_id:r.id,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:r.id,priority:0,settings:{default:i.settingControlId}}).done(function(){!0===i.expandAndFocusOnInit&&c.control(i.settingControlId).focus({completeCallback:function(){}}),c.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})}})},c.section.has(r.id)||c.section(r.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_module:!0})}),c.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+r.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){c.section(r.id,function(e){_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>')})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(a,e){var c=this,t=c.getLocalSkopeOptionId();if(c.isUIControlAlreadyRegistered(t))return e;var i={};return d.extend(i,{template:{settingControlId:t+"__template",module_type:"sek_local_template",controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'},widths:{settingControlId:t+"__widths",module_type:"sek_local_widths",controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'},custom_css:{settingControlId:t+"__custom_css",module_type:"sek_local_custom_css",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'},local_performances:{settingControlId:t+"__local_performances",module_type:"sek_local_performances",controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'},local_reset:{settingControlId:t+"__local_reset",module_type:"sek_local_reset",controlLabel:sektionsLocalizedData.i18n["Remove the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'}}),_do_register_=function(){_.each(i,function(i,n){if(!l.has(i.settingControlId)){l(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{c.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},c.SETTING_UPDATE_BUFFER))});var e=c.getModuleStartingValue(i.module_type),t=l(c.sekCollectionSettingId())(),o=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{}),r=_.isObject(o[n])?o[n]:{};if("no_starting_value"!==e&&_.isObject(e)){var s=d.extend(!0,{},e);r=d.extend(s,r)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:i.settingControlId,dirty:!1,value:r,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__localOptionsSection",priority:10,settings:{default:i.settingControlId}}).done(function(){l.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},l.section("__localOptionsSection",function(e){l(c.sekCollectionSettingId(),function(){_do_register_(),e.container.on("click",".accordion-section-title",function(){c.generateUI({action:"sek-generate-local-skope-options-ui"})})})}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,t=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(t))return e;var i={};return l.extend(i,{breakpoint:{settingControlId:t+"__breakpoint",module_type:"sek_global_breakpoint",controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">devices</i>'},widths:{settingControlId:t+"__widths",module_type:"sek_global_widths",controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'},performances:{settingControlId:t+"__performances",module_type:"sek_global_performances",controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'}}),_do_register_=function(){_.each(i,function(i,n){if(!c.has(i.settingControlId)){c(i.settingControlId,function(e){e.bind(_.debounce(function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:s,options_type:n,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},a.SETTING_UPDATE_BUFFER))});var e=sektionsLocalizedData.globalOptionDBValues,t=a.getModuleStartingValue(i.module_type),o=_.isObject(e)&&!_.isEmpty(e[n])?e[n]:{};if("no_starting_value"!==t&&_.isObject(t)){var r=l.extend(!0,{},t);o=l.extend(r,o)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:i.settingControlId,dirty:!1,value:o,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:i.settingControlId,label:i.controlLabel,type:"czr_module",module_type:i.module_type,section:"__globalAndLocalOptionsSection",priority:20,settings:{default:i.settingControlId},track:!1}).done(function(){c.control(i.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title");_.isUndefined(i.icon)||t.addClass("sek-flex-vertical-center").prepend(i.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===i.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},c.section("__globalAndLocalOptionsSection",function(e){c(a.sekCollectionSettingId(),function(){_do_register_()})}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(Y,J){J.extend(CZRSeksPrototype,{updateAPISetting:function($){var q=this,G=J.Deferred();return Y(q.sekCollectionSettingId(),function(e){var n,t,o,i,r,s,a,c,l,d=e(),u=_.isObject(d)?J.extend(!0,{},d):q.defaultSektionSettingValue,p=!1;switch(u.collection=_.isArray(u.collection)?u.collection:q.defaultSektionSettingValue.collection,$.action){case"sek-add-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");if(!0===$.is_nested){if(o=q.getLevelModel($.in_column,u.collection),"no_match"==(l=q.getLevelModel($.in_sektion,u.collection))){G.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===l.is_nested){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(E,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");var m;try{m=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e);break}var f=q.getLevelPositionInCollection($.id,u.collection);if(!0===$.is_nested){if("no_match"==(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(f+1,10),0,m)}else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(f+1,10),0,m)}a=m.id;break;case"sek-remove-section":if(!0===$.is_nested)"no_match"!=(o=q.getLevelModel($.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):Y.errare("updateAPISetting => "+$.action+" => no parent column matched");else{if("no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=$.id})}break;case"sek-move-section":var h,g,k=q.getLevelModel($.to_location,u.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+$.action+" => missing target location");if($.from_location!=$.to_location){var v=q.getLevelModel($.from_location,u.collection);if(_.isEmpty(v)||"no_match"==v)throw new Error("updateAPISetting => "+$.action+" => missing source location");v.collection=_.isArray(v.collection)?v.collection:[],h=q.getLevelModel($.id,v.collection),g=J.extend(!0,{},h),v.collection=_.filter(v.collection,function(e){return e.id!=$.id})}k.collection=_.isArray(k.collection)?k.collection:[],r=J.extend(!0,[],k.collection),s=[],_.each($.newOrder,function(e){if($.from_location!=$.to_location&&e==g.id)s.push(g);else{if(t=q.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => move section => missing section candidate");s.push(t)}}),k.collection=s;break;case"sek-add-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(t.collection,function(e){e.width=""}),t.collection.push({id:$.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=q.getLevelModel($.in_sektion,u.collection))){if(1===_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=$.id}),_.each(t.collection,function(e){e.width=""})}else Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var y;try{y=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e);break}var b=q.getLevelPositionInCollection($.id,u.collection);a=y.id,t.collection.splice(parseInt(b+1,10),0,y),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if($.col_number<2)break;var z=q.getLevelModel($.resized_column,u.collection),I=q.getLevelModel($.sister_column,u.collection);if("no_match"==z){Y.errare("updateAPISetting => "+$.action+" => no resized column matched"),G.reject("updateAPISetting => "+$.action+" => no resized column matched");break}z.width=parseFloat($.resizedColumnWidthInPercent);var w=q.getLevelModel($.in_sektion,u.collection),M=_.filter(w.collection,function(e){return e.id!=z.id&&e.id!=I.id}),C=parseFloat(z.width.toFixed(3));_.isEmpty(M)||_.each(M,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/$.col_number).toFixed(3))),C=parseFloat((C+e.width).toFixed(3))}),I.width=parseFloat((100-C).toFixed(3));break;case"sek-move-column":var S,D,P=q.getLevelModel($.to_sektion,u.collection);if(_.isEmpty(P)||"no_match"==P)throw new Error("updateAPISetting => "+$.action+" => missing target sektion");if($.from_sektion!=$.to_sektion){var x=q.getLevelModel($.from_sektion,u.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+$.action+" => missing source column");x.collection=_.isArray(x.collection)?x.collection:[],S=q.getLevelModel($.id,x.collection),D=J.extend(!0,{},S),x.collection=_.filter(x.collection,function(e){return e.id!=$.id}),_.each(x.collection,function(e){e.width=""})}P.collection=_.isArray(P.collection)?P.collection:[],r=J.extend(!0,[],P.collection),s=[],_.each($.newOrder,function(e){if($.from_sektion!=$.to_sektion&&e==D.id)s.push(D);else{if(o=q.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");s.push(o)}}),P.collection=s,_.each(P.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.module_type))throw new Error("updateAPISetting => "+$.action+" => missing module_type");if("no_match"===(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var E=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_module===e.id&&(E=t),$.after_module===e.id&&(E=t+1)});var R={id:$.id,level:"module",module_type:$.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(c=q.getModuleStartingValue($.module_type))&&(R.value=c),o.collection.splice(E,0,R);break;case"sek-duplicate-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(o=q.getLevelModel($.in_column,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var L;o.collection=_.isArray(o.collection)?o.collection:[];try{L=q.cloneLevel($.id)}catch(e){Y.errare("updateAPISetting => "+$.action,e),G.reject("updateAPISetting => "+$.action+" => error when cloning the level");break}var A=q.getLevelPositionInCollection($.id,u.collection);a=L.id,o.collection.splice(parseInt(A+1,10),0,L);break;case"sek-remove-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");"no_match"!=(o=q.getLevelModel($.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):Y.errare("updateAPISetting => "+$.action+" => no parent column matched");break;case"sek-move-module":var Z,j,F;if(Z=q.getLevelModel($.to_column,u.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+$.action+" => missing target column");if($.from_column!=$.to_column){var V;if(V=q.getLevelModel($.from_column,u.collection),_.isEmpty(V)||"no_match"==V)throw new Error("updateAPISetting => "+$.action+" => missing source column");V.collection=_.isArray(V.collection)?V.collection:[],j=q.getLevelModel($.id,u.collection),F=J.extend(!0,{},j),V.collection=_.filter(V.collection,function(e){return e.id!=$.id})}if(Z.collection=_.isArray(Z.collection)?Z.collection:[],r=J.extend(!0,[],Z.collection),s=[],_.each($.newOrder,function(e){if($.from_column!=$.to_column&&e==F.id)s.push(F);else{if(i=q.getLevelModel(e,u.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+$.action+" => missing moduleCandidate");s.push(i)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+$.action+" => there are duplicated modules in column : "+Z.id);Z.collection=s;break;case"sek-set-module-value":i=q.getLevelModel($.id,u.collection);var O={};if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(O[t]=e)}),"no_match"==i){Y.errare("updateAPISetting => "+$.action+" => no module matched",$),G.reject("updateAPISetting => "+$.action+" => error no module matched");break}if(_.isEmpty($.options_type)){Y.errare("updateAPISetting => "+$.action+" => missing options_type"),G.reject("updateAPISetting => "+$.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===$.options_type?i.value=O:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[$.options_type]=O);break;case"sek-generate-level-options-ui":var T=q.getLevelModel($.id,u.collection),U={};if("no_match"===T){Y.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),G.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}T.options=T.options||{},_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(U[t]=e)}),_.isEmpty($.options_type)&&Y.errare("updateAPISetting => "+$.action+" => missing options_type"),T.options[$.options_type]=U;break;case"sek-generate-local-skope-options-ui":U={};var N=J.extend(!0,{},_.isObject(u.local_options)?u.local_options:{});if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(U[t]=e)}),_.isEmpty($.options_type)||!_.isString($.options_type))Y.errare("updateAPISetting => "+$.action+" => missing options_type");else{var B={};B[$.options_type]=U,u.local_options=J.extend(N,B)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(E=0,"no_match"==(n=q.getLevelModel($.location,u.collection))){Y.errare("updateAPISetting => "+$.action+" => no location matched"),G.reject("updateAPISetting => "+$.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),$.content_type){case"module":c=q.getModuleStartingValue($.content_id),n.collection.splice(E,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[{id:$.droppedModuleId,level:"module",module_type:$.content_id,value:"no_starting_value"!==c?c:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":p=J.Deferred();var Q=function(e){q.preparePresetSectionForInjection(e).fail(function(e){G.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),p.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty($.sektion_to_replace)){var i=q.getLevelModel($.sektion_to_replace,u.collection);"no_match"===i&&(Y.errare("updateAPISetting => "+$.action+" => no sektionToReplace matched"),G.reject("updateAPISetting => "+$.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=q.getLevelModel($.in_column,u.collection))&&(Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_section===e.id&&(E=t),$.after_section===e.id&&(E=t+1)}),o.collection.splice(E,0,{id:$.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(E,0,{id:$.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})};q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(e){Y.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",e),G.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(Y.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),G.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),Q(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(o=q.getLevelModel($.in_column,u.collection),"no_match"==(l=q.getLevelModel($.in_sektion,u.collection))){G.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===l.is_nested){G.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){Y.errare("updateAPISetting => "+$.action+" => no parent column matched"),G.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],p=J.Deferred(),Q=function(e){q.preparePresetSectionForInjection(e).fail(function(e){G.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),p.reject(e)}).done(function(e){o.collection.push({id:$.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})},q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(){Y.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",_er_),G.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(Y.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),G.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),Q(e)});break;case"sek-update-fonts":var W=q.sniffGFonts();if(!_.isEmpty($.font_family)&&_.isString($.font_family)&&!_.contains(W,$.font_family)){if($.font_family.indexOf("gfont")<0){Y.errare("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont"),G.reject("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont");break}W.push($.font_family)}u.fonts=W}if("pending"==G.state()){var H=function(){_.isEqual(d,u)?G.reject("updateAPISetting => the new setting value is unchanged when firing action : "+$.action):null!==q.validateSettingValue(u)?(e(u,$),G.resolve(a)):G.reject("updateAPISetting => the new setting value did not pass the validation checks for action "+$.action)};!1===p?H():p.done(function(){H()}).fail(function(e){Y.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}),G.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=J.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(Y.sek_userSavedSections)||_.isEmpty(Y.sek_userSavedSections[t.preset_section_id])?(Y.sek_userSavedSections=Y.sek_userSavedSections||{},_.isUndefined(Y.sek_fetchingUserSavedSections)||"pending"!=Y.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:Y.settings.nonce.save,preset_section_id:t.preset_section_id}),Y.sek_fetchingUserSavedSections=e):e=Y.sek_fetchingUserSavedSections,e.done(function(e){Y.sek_userSavedSections[t.preset_section_id]=e,i.resolve(Y.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(Y.sek_userSavedSections):_.isEmpty(Y.sek_presetSections)?(_.isUndefined(Y.sek_fetchingPresetSections)||"pending"!=Y.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:Y.settings.nonce.save}),Y.sek_fetchingPresetSections=e):e=Y.sek_fetchingPresetSections,e.done(function(e){Y.sek_presetSections=e,i.resolve(Y.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(Y.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=J.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=J.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+s.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.id=r.section_id,i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=J.Deferred(),s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("::img-path::")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("::img-path::",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("::img-path::")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return _.isEmpty(e.level)||"setting"!==e.what||n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"!==e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{rootPanelFocus:function(){s.section.has(s.czr_activeSectionId())?s.section(s.czr_activeSectionId()).expanded(!1):s.section.each(function(e){e.expanded(!1)}),s.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()},getLevelModel:function(t,e){var i=this,n="no_match";if(_.isUndefined(e)){var o=s(i.sekCollectionSettingId())(),r=_.isObject(o)?a.extend(!0,{},o):i.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==n&&(t===e.id?n=e:_.isArray(e.collection)&&(n=i.getLevelModel(t,e.collection)))}),n},getLevelPositionInCollection:function(i,e){var n=this,o="no_match";if(_.isUndefined(e)){var t=s(n.sekCollectionSettingId())(),r=_.isObject(t)?a.extend(!0,{},t):n.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e,t){"no_match"==o&&(i===e.id?o=t:_.isArray(e.collection)&&(o=n.getLevelPositionInCollection(i,e.collection)))}),o},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))s.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];s.errare("getLevelProperty => invalid model for id : "+e.id,t)}else s.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=a.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(!sektionsLocalizedData.registeredModules[e].is_father){var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i}s.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically")},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(i,e){var n=this;if(i=i||[],_.isUndefined(e)){var t=s(n.sekCollectionSettingId())();e=_.isObject(t)?a.extend(!0,{},t):n.defaultSektionSettingValue}return _.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===n.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n.sniffGFonts(i,e)}),i},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}s.errare("getInputDefaultValue => Father modules should be treated specifically")}},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}s.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))s.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))s.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}s.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}s.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return s.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return s.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t},selectNextTabbableOrFocusable:function(e){var t=a(e),i=a(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=a(e),i=a(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(){var n=this,e=(n.input_parent,n.module,s.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type).choices);_.isEmpty(e)?s.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in image module"):(_.each(e,function(e,t){var i={value:t,html:e};t==n()?a.extend(i,{selected:"selected"}):"px"===t&&a.extend(i,{selected:"selected"}),a("select[data-czrtype]",n.container).append(a("<option>",i))}),a("select[data-czrtype]",n.container).selecter())},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=a(".sek-font-size-line-height-wrapper",t.container),n=i.find("input[data-czrtype]").data("sek-unit"),o=function(e){return _.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(_.isEmpty(n)?"px":o(n)),t.css_unit.bind(function(e){e=_.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("change")}),i.find('input[type="number"]').on("input change",function(e){t(a(this).val()+o(t.css_unit()))}).stepper(),i.on("click","[data-sek-unit]",function(e){e.preventDefault(),i.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",a(this).data("sek-unit")),t.css_unit(a(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+n+'"]').addClass("is-selected").attr("aria-pressed",!0)},maybeSetupDeviceSwitcherForInput:function(){var i=this,e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");i.container.find(".customize-control-title").prepend(e),i.previewedDevice=new s.Value(s.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),a(this).addClass("active");var t="desktop";try{t=a(this).data("sek-device")}catch(e){s.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{s.previewedDevice(t)}catch(e){s.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}i.previewedDevice(t)},i.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=i.container.find('[data-sek-device="'+s.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_module:!0};var i=this;a(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=a(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){a(this).attr("data-sek-accordion")||(a(this).attr("data-sek-expanded","false"),a(this).find(".czr-items-wrapper").stop(!0,!0).slideUp("fast"))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:"fast",start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),"true"==t.attr("data-sek-expanded")?t.trigger("sek-accordion-expanded"):t.trigger("sek-accordion-collapsed")}}))}),e.expand_first_module&&i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")},isPromise:function(e){return e&&"function"==typeof e.then&&String(a.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=a.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(a.Deferred(function(t){(i.isPromise(e)?e:a.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),a.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||a.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:a.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{rel_path:t,nonce:s.settings.nonce.save}).fail(function(e){s.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,f){f.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){"draggable"in document.createElement("span")?t.setupNimbleDragZones(e.input_container):a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){a.notifications.remove("drag-drop-support")},1e4)})}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var t=this;e.find("[draggable]").each(function(){f(this).on("dragstart",function(e){(function(e){e.originalEvent.dataTransfer.setData("sek-content-type",f(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",f(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",f(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",f(this).data("sek-is-user-section"));try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){a.notifications.remove("drag-drop-support")},1e4)})}t.dnd_draggedType=f(this).data("sek-content-type"),f(this).addClass("sek-dragged"),f("body").addClass("sek-dragging"),a.previewer.send("sek-drag-start",{type:t.dnd_draggedType})}).call(f(this),e)}).on("dragend",function(e){(function(e){f("body").removeClass("sek-dragging"),f(this).removeClass("sek-dragged"),a.previewer.send("sek-drag-stop")}).call(f(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=f("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=f(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop(f(this))&&(e.stopPropagation(),t.dnd_OnEnterOver(f(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(f(this),e)||t.dnd_cleanOnLeaveDrop(f(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop(f(this)))return;e.preventDefault(),t.dnd_onDrop(f(this),e),t.dnd_cleanOnLeaveDrop(f(this),e),a.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_toggleDragApproachClassesToDropZones:function(m){this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.$dropZones.find(".sek-drop-zone").each(function(){var e=m.clientY,t=m.clientX,i=f(this)[0].getBoundingClientRect(),n=Math.abs(e-(i.bottom-(i.bottom-i.top)/2)),o=(Math.abs(i.top-e),Math.abs(t-(i.right-(i.right-i.left)/2))),r=(i.right,i.left,n<60),s=o<60,a=n<80,c=o<80,l=n<120,d=o<120,u=t<=i.right&&i.left<=t,p=e>=i.top&&i.bottom>=e;p&&u?(f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-very-close"),f(this).addClass("sek-drag-is-in")):((r||p)&&(s||u)?(f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close"),f(this).addClass("sek-drag-is-very-close")):((a||p)&&(c||u)?(f(this).removeClass("sek-drag-is-approaching"),f(this).addClass("sek-drag-is-close")):((l||p)&&(d||u)?f(this).addClass("sek-drag-is-approaching"):f(this).removeClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-close")),f(this).removeClass("sek-drag-is-very-close")),f(this).removeClass("sek-drag-is-in"))}),this.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=f(e.currentTarget);switch(this.dnd_draggedType){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return f(a.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=e&&0<e.length&&e.hasClass("sek-content-preset_section-drop-zone"),i=e&&0<e.length&&e.hasClass("sek-module-drop-zone-for-first-module");return e.hasClass("sek-drop-zone")&&("preset_section"===this.dnd_draggedType&&t||"module"===this.dnd_draggedType&&!t||"preset_section"===this.dnd_draggedType&&i)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){a.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),f(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(f(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"))},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");f.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");a.previewer.trigger("sek-add-module",{level:r,id:s,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;r.sekEditorExpanded=new r.Value(!1),r.sekEditorSynchronizedInput=new r.Value,n.editorEventsListenerSetup=!1;var o=function(){r.sekTinyMceEditor=r.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===n.editorEventsListenerSetup&&(n.attachEventsToEditor(),n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};n.bind("sek-edit-module_done",function(e){if("tiny_mce_editor"==e.clicked_input_type){var i=e.id;if(!0===n.getRegisteredModuleProperty(e.module_type,"is_father")){var t=n.getRegisteredModuleProperty(e.module_type,"children");if(_.isEmpty(t))throw new Error("::generateUIforFrontModules => a father module "+e.module_type+" is missing children modules ");_.each(t,function(e,t){"czr_tinymce_child"===e&&(i=i+"__"+t)})}r.sekEditorSynchronizedInput({control_id:i,input_id:e.clicked_input_id}),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))r.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},r.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});r.sekEditorSynchronizedInput(n),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),r.sekEditorSynchronizedInput.bind(function(n,e){o(),r(n.control_id,function(e){var t=e(),i=_.isObject(t)&&!_.isEmpty(t[n.input_id])?t[n.input_id]:"";try{r.sekTinyMceEditor.setContent(i)}catch(e){r.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}r.sekTinyMceEditor.focus()})}),r.sekEditorExpanded.bind(function(e,t,i){o(),e&&r.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){r.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?n.czrResizeEditor(window.innerHeight-n.$editorPane.height()):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){r.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&r.sekEditorExpanded(!1,{context:"clicked anywhere"})}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(r.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?r.previewer.bind(e,function(){r.sekEditorExpanded(!1)}):r.previewer.bind(e,function(e){r.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),r.sekTinyMceEditor.on("input change keyup",function(e){if(r.control.has(r.sekEditorSynchronizedInput().control_id))try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:r.sekTinyMceEditor.getContent(),modified_editor_element:r.sekTinyMceEditor})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),s("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===s(e.target).attr("id")||s(e.target).hasClass("czr-resize-handle"))&&r.sekEditorExpanded())switch(e.type){case"mousedown":s(document).on("mousemove.czr-customize-content_editor",function(e){e.preventDefault(),s(document.body).addClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":s(document).off("mousemove.czr-customize-content_editor"),s(document.body).removeClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});r.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?c(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),s.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{font_size:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{line_height:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{font_picker:function(e){var a=this,o=a.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+a.id+'"]',a.container);l.isNull(a())||l.isEmpty(a())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,s,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==a()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.select2(i),c(".select2-selection__rendered",a.container).css(r(a()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=s(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},s=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};c.when(function(){var e,t=c.Deferred();l.isEmpty(i.sek_fontCollections)?(l.isUndefined(i.sek_fetchingFontCollection)||"pending"!=i.sek_fetchingFontCollection.state()?(e=i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:a.module.id}),i.sek_fetchingFontCollection=e):e=i.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");i.sek_fontCollections=JSON.parse(e),t.resolve(i.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(i.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.select2&&void 0!==c.fn.select2.amd&&"function"==typeof c.fn.select2.amd.require?c.fn.select2.amd.require(["select2/results","select2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{fa_icon_picker:function(){var t,n=this,o=n.input_parent,r=!1;a.when((t=a.Deferred(),c.isEmpty(n.sek_faIconCollection)?s.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection),t.promise())).done(function(e){!function(e){c.each(e,function(e){var t={value:e,html:s.CZR_Helpers.capitalize(e.substring(7))};t.value==o().icon&&(a.extend(t,{selected:"selected"}),r=!0),a("select[data-czrtype]",n.container).append(a("<option>",t))});var t,i=function(e){return e.id?a('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=r?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).select2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e)}).fail(function(e){s.errare("fa_icon_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,t=(n.input_parent(),!1),r=n.container.find("textarea"),o=n.container.find(".customize-control-title"),s=r.data("editor-params");wp.codeEditor&&(p.isUndefined(s)||!1!==s)&&(t=s),n.isReady.done(function(){var e=function(e){p.isEmpty(this.editor)&&(p.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(t)try{a(t)}catch(e){d.errare("error in sek_control => code_editor() input",e),c()}else c();o.click()},10))};e.call(n),n.module.control.container.on("sek-accordion-expanded",function(){e.call(n)})});var a=function(e){var t,i=!1;t=p.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:l}),n.editor=wp.codeEditor.initialize(r,t),u(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":o.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),o.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},c=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},l=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",o.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",o.html()),i.setting.notifications.add(n.id,new d.Notification(n.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+s(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(h,g,k){h.czrInputMap=h.czrInputMap||{},g.extend(h.czrInputMap,{borders:function(e){var a=this,c=g(".sek-borders",a.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(h.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=h.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.union(a.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=a(),i={},n=g.extend(!0,{},f);k.isObject(t)?i=g.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=g.extend(!0,{},f);if(!k.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=g.extend(n,i),e);if(k.isEmpty(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),g(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new h.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new h.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new h.Value("_all_"),l.val((i=a(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.isNumber(n)||n<0)&&(h.errare("Error in borders input type for module : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(a.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){g(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===g(this).data("border_type_switched")})},clear:function(e,t){g(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){h.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){l.val(g(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=g(this).val()+p(a.css_unit()),s=g.extend(!0,{},f);(i=g.extend(!0,{},k.isObject(a())?a():s))[n]=g.extend(!0,{},i[n]||s[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(i)),d.val(g(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),g(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",g(this).data("sek-unit")),a.css_unit(g(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),g(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=g(this).data("sek-border-type")}catch(e){h.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=g.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){h.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}g('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,h){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return h.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},u=function(e){return h.isEmpty(e)||!h.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return h.isEmpty(e)||!h.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),_=h.isEmpty(t)||h.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),t="px";return h.isObject(e)&&h.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!h.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=a(),i={},n=f.extend(!0,{},_);h.isObject(t)?i=f.extend(!0,{},t):h.isString(t)&&(i={_all_:"0px"});var o,r,s=function(e,t){var i,n=f.extend(!0,{},_);if(!h.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=h.isObject(e)&&h.has(e,"_all_")?e._all_:n._all_,h.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(h.isEmpty(s)||!h.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(s),r=u(s),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(h.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),n=0,h.isObject(i)&&h.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!h.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!h.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},h.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),h.isString(o)&&!h.isEmpty(o)&&(i[n]=o),(h.isEmpty(t)||h.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&h.each(a.cssRadiusTypes,function(e){i=h.omit(i,e)}),a(i)),s.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},h.isObject(a())?a():{});h.isEmpty(i[t])||(i=h.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(i,n,e){i.czrInputMap=i.czrInputMap||{},n.extend(i.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){if(e.stopPropagation(),"local"===n(this).data("sek-reset-scope"))try{i.czr_sektions.resetCollectionSetting()}catch(e){i.errare("reset_button => error when firing resetCollectionSetting() on click event",e)}})}})}(wp.customize,jQuery,_),function(t,o,r){t.czrModuleMap=t.czrModuleMap||{},o.extend(t.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),t.czrInputMap=t.czrInputMap||{},o.extend(t.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!t.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=t.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),o(this).addClass("is-selected").attr("aria-pressed",!0),n.contentType(o(this).data("sek-content-type"))}),n.contentType=new t.Value,n.contentType.bind(function(t){n.container.find('[data-sek-content-type="'+n.contentType()+'"]').trigger("click"),r.each(i.controls(),function(e){r.isUndefined(e.content_type)||e.active(t===e.content_type)})}),n.contentType(n()),i.container.first().bind("sek-content-type-refreshed",function(e,t){n.contentType(t.content_type||"section")})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},i.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_contact_sec_picker_module","sek_column_layouts_sec_picker_module"],function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";s.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",s.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"bg-apply-overlay":r.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return!r.isEmpty(n.czr_Input("bg-image")()+"")&&o.CZR_Helpers.isChecked(t())})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"height-type":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-height",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"width-type":t.call(e,"custom-width",function(){return"custom"===e()}),t.call(e,"h_alignment",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_template:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_performances:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":t.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":t.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=r.CZRItem.extend(i.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(i,e,t),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"img":o.call(i,"img-size",function(){return!s.isEmpty(i()+"")&&s.isNumber(i())});break;case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"===i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":e="url"===i();break;case"link-target":e="no-link"!==i()}return e})}catch(e){r.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":s.each(["borders"],function(e){try{o.call(i,e,function(){return"none"!==i()})}catch(e){r.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":s.each(["custom_width"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"tiny_mce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)},setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRFPItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRFPItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"img-type":s.each(["img-id","img-size"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":s.each(["content-custom-text"],function(e){try{o.call(i,e,function(){return"custom"===i()})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":s.each(["btn-custom-text"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:r.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(s,e,a){var t={initialize:function(e,t){var i=this;i.inputConstructor=s.CZRInput.extend({setupSelect:function(){s.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=s.CZRItem.extend(i.CZRIconItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),s.CZRDynModule.prototype.initialize.call(i,e,t)},CZRIconItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module,r=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){s.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":a.each(["color_hover"],function(e){try{r.call(i,e,function(){return i()})}catch(e){s.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};s.czrModuleMap=s.czrModuleMap||{},e.extend(s.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_spacing_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRDividerInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRDividerInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_divider_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRButtonItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(t){switch(t.id){case"quote_design":r.each(["border_width_css","border_color_css"],function(e){try{i.call(t,e,function(){return"border-before"==t()})}catch(e){o.errare("Quote module => error in setInputVisibilityDeps",e)}}),r.each(["icon_color_css","icon_size_css"],function(e){try{i.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){o.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_quote_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_cite_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRButtonItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,e=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{e.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":e.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":e.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRButtonItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":s.each(["borders"],function(e){try{o.call(t,e,function(){return"none"!==t()})}catch(e){r.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(t){switch(t.id){case"show_name_field":r.each(["name_field_label","name_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":r.each(["subject_field_label","subject_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":r.each(["message_field_label","message_field_required"],function(e){try{i.call(t,e,function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.call(t,"link-custom-url",function(){return t()})}catch(e){o.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module;n.czr_Input.each(function(t){switch(t.id){case"border-type":r.each(["borders"],function(e){try{(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(t,e,function(){return"none"!==t()})}catch(e){o.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,i=n.module,o=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":s.each(["borders"],function(e){try{o.call(t,e,function(){return"none"!==t()})}catch(e){r.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(t,e,function(){return t()})}catch(e){r.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fonts_child:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=r.CZRItem.extend(this.CZRButtonItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":s.each(["bg_color_hover"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":s.each(["push_effect"],function(e){try{o.call(i,e,function(){return i()})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){r.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_);
assets/czr/sek/js/ccat-sek-preview.js CHANGED
@@ -1176,19 +1176,25 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
1176
  self.activeLevelUI( params.uiParams.id );
1177
  },
1178
  'sek-drag-start' : function( params ) {
1179
- var i = 1;
1180
- $('.sektion-wrapper').children('[data-sek-level="section"]').each( function() {
1181
- if ( $('[data-drop-zone-before-section="' + $(this).data('sek-id') +'"]').length < 1 ) {
 
 
 
 
 
1182
  $(this).before(
1183
- '<div class="sek-content-' + params.type + '-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="' + $(this).data('sek-id') +'"></div>'
1184
  );
1185
  }
1186
- if ( i == $('.sektion-wrapper').children('[data-sek-level="section"]').length ) {
1187
  $(this).after(
1188
- '<div class="sek-content-' + params.type + '-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="' + $(this).data('sek-id') +'"></div>'
1189
  );
1190
  }
1191
  i++;
 
1192
  });
1193
  $('.sek-empty-location-placeholder').each( function() {
1194
  $.when( $(this).append(
@@ -1634,7 +1640,25 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
1634
  return 'not_set';
1635
  }
1636
  return sekPreviewLocalized.registeredModules[ moduleType ][ property ];
1637
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1638
  });//$.extend()
1639
  })( wp.customize, jQuery, _ );//global sekPreviewLocalized
1640
  var SekPreviewPrototype = SekPreviewPrototype || {};
1176
  self.activeLevelUI( params.uiParams.id );
1177
  },
1178
  'sek-drag-start' : function( params ) {
1179
+ var i = 1, previousSectionIsEmpty = false;
1180
+ $('[data-sek-level="location"]').children('[data-sek-level="section"]').each( function() {
1181
+ var sectionId = $(this).data('sek-id'),
1182
+ columnNb = $(this).find('[data-sek-level="column"]').length,
1183
+ moduleNb = $(this).find('[data-sek-level="module"]').length,
1184
+ isEmptySection = columnNb < 2 && moduleNb < 1,
1185
+ canPrintBefore = ! previousSectionIsEmpty && ! isEmptySection;
1186
+ if ( canPrintBefore && $('[data-drop-zone-before-section="' + sectionId +'"]').length < 1 ) {
1187
  $(this).before(
1188
+ '<div class="sek-content-' + params.type + '-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="' + sectionId +'"></div>'
1189
  );
1190
  }
1191
+ if ( ! isEmptySection && i == $('.sektion-wrapper').children('[data-sek-level="section"]').length ) {
1192
  $(this).after(
1193
+ '<div class="sek-content-' + params.type + '-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="' + sectionId +'"></div>'
1194
  );
1195
  }
1196
  i++;
1197
+ previousSectionIsEmpty = isEmptySection;
1198
  });
1199
  $('.sek-empty-location-placeholder').each( function() {
1200
  $.when( $(this).append(
1640
  return 'not_set';
1641
  }
1642
  return sekPreviewLocalized.registeredModules[ moduleType ][ property ];
1643
+ },
1644
+ getLevelModel : function( id, collection ) {
1645
+ var self = this, _data_ = 'no_match';
1646
+ if ( _.isUndefined( collection ) ) {
1647
+ self.errare( 'getLevelModel => a collection must be provided' );
1648
+ }
1649
+ _.each( collection, function( levelData ) {
1650
+ if ( 'no_match' != _data_ )
1651
+ return;
1652
+ if ( id === levelData.id ) {
1653
+ _data_ = levelData;
1654
+ } else {
1655
+ if ( _.isArray( levelData.collection ) ) {
1656
+ _data_ = self.getLevelModel( id, levelData.collection );
1657
+ }
1658
+ }
1659
+ });
1660
+ return _data_;
1661
+ },
1662
  });//$.extend()
1663
  })( wp.customize, jQuery, _ );//global sekPreviewLocalized
1664
  var SekPreviewPrototype = SekPreviewPrototype || {};
assets/czr/sek/js/ccat-sek-preview.min.js CHANGED
@@ -1 +1 @@
1
- var SekPreviewPrototype=SekPreviewPrototype||{};!function(t,i,n){i.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=n.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),i(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),i("body").on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!n.isUndefined(t)&&!n.isUndefined(t.in_sektion)&&0<i('[data-sek-id="'+t.in_sektion+'"]').length){var a=i('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),i("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)})},deactivateLinks:function(e){e=e||{},i("body").find('[data-sek-level="module"]').each(function(){i(this).find("a").each(function(){"yes"!==i(this).data("sek-unlinked")&&(i(this).addClass("nimble-unclickable"),i(this).data("sek-unlinked","yes").attr("data-nimble-href",i(this).attr("href")).attr("href","#"),i(this).on("click",function(e){e.preventDefault()}))})})},scheduleHighlightActiveLevel:function(){var s=this;this.activeLevelUI=new t.Value(""),this.activeUIChangedRecently=new t.Value(!1),this.activeLevelUI.bind(function(e,t){var a=i('[data-sek-id="'+e+'"]'),n=i('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<n.length&&n.removeClass("sek-active-ui sek-highlight-active-ui"),s.activeUIChangedRecently(Date.now())}),n.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){t.preview.bind(e,function(e){s.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=i('[data-sek-id="'+s.activeLevelUI()+'"]');i(".sek-highlight-active-ui").length&&i(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(i.data(this,"_ui_change_timer_")),i.data(this,"_ui_change_timer_",setTimeout(function(){s.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},c('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(c(this).data("sek-id"))}),c("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(c(this).data("sek-id"))}),c('[data-sek-level="location"]').each(function(){c(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(c(this).data("sek-id"))})}),c("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(c(this).data("sek-id"))}),c("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){c(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(c(this).data("sek-id"))})}),c('[data-sek-level="location"]').each(function(){c(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),c("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))}),c("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){c(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),c("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){c(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,n,t,s=this,i=[],o=[];c('[data-sek-id="'+e+'"]').each(function(){t=c.extend(!0,{},s.sortableDefaultParams),c(this).sortable(k.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-level="location"]',placeholder:{element:function(e){return c('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){c("body").addClass("sek-moving-section"),$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),$sourceLocation.children('[data-sek-level="section"]').each(function(){i.push(c(this).data("sek-id"))})},stop:function(e,t){c("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),n=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(c(this).data("sek-id"))}),l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:n})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}}))})},makeColumnsSortableInSektion:function(e){var s=this,t=c.extend(!0,{},s.sortableDefaultParams),a=c('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),i=function(e){if(e=c.extend({forTarget:!0},e||{}),!k.isEmpty(c(this).data("_sortable_columns_css_classes_")))return c(this).data("_sortable_columns_css_classes_");var t,a=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,n=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var s={current:"sek-col-"+n,next:"sek-col-"+Math.floor(100/t)};return c(this).data("_sortable_columns_css_classes_",s),s};a.sortable(k.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=i.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)})):(a=i.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=i.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)})):(a=i.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){return $targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(l.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1)},start:function(e,t){startOrder=[],newOrder=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){startOrder.push(c(this).data("sek-id"))}),c(this).data("sek-is-sender",!0),k.isEmpty(startOrder)&&s.errare("column sortable => startOrder should not be empty")},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){newOrder.push(c(this).data("sek-id"))});var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=i.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)})):(a=i.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)})),c('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){c(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),k.isEmpty(newOrder)?s.errare("column sortable => newOrder should not be empty"):k.isEqual(newOrder,startOrder)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&s.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:newOrder,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,n,s,i,t,o=[],r=[],d=this;t=c.extend(!0,{},d.sortableDefaultParams),c('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(k.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){c('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){c(this).removeClass("sek-sortable-overing")}),c(e.target).addClass("sek-sortable-overing")},start:function(e,t){o=[],r=[],c("body").addClass("sek-dragging-element"),n=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){o.push(c(this).data("sek-id"))}),k.isEmpty(o)&&d.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){i=t.item.closest('[data-sek-level="column"]'),s=i.data("sek-id"),i.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){r.push(c(this).data("sek-id"))}),k.isEmpty(r)?d.errare("makeModulesSortableInColumn => newOrder should not be empty"):k.isEqual(r,o)&&s===n?d.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:r,from_column:n,to_column:s,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),c("body").removeClass("sek-dragging-element"))}}))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),c("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,n,s,i,o,r,d,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');e.length<2||e.each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),n=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((s=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");d=s.index()+1==o,r=d?s.prev():s.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(s.length<1)throw new Error("ERROR => resizable => No valid level dom element found");s.css({width:"",height:""}),i=(parseFloat(t.size.width)/parseFloat(n)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:s.data("sek-level"),in_sektion:a.data("sek-id"),id:s.data("sek-id"),resized_column:s.data("sek-id"),sister_column:r.data("sek-id"),resizedColumnWidthInPercent:i,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,m,h){m.extend(SekPreviewPrototype,{setupUiHoverVisibility:function(){var o,r,d,l,t,c=this,u=function(){(l=m(this)).children(".sek-dyn-ui-wrapper").length<1||(l.data("UIisFadingOut",!0),l.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){m(this).remove(),l.data("UIisFadingOut",!1)}}))},a=function(){var e=m(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=m(this),a=m(this).closest(".sek-dyn-ui-location-type"),n=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),n.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),n.removeClass("sek-is-expanded"),a.show())};m("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=m(this).find(".sek-dyn-ui-hamb-menu-wrapper");m(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(m(this))}),n.call(t,!0),a.call(t)}),m("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=m(this).find(".sek-dyn-ui-hamb-menu-wrapper");h.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),m("body").on("click",".sek-minimize-ui",function(e){m(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),m("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=m(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(o=c.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),m.when(t.prepend(o({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){m(this).data("UIisFadingOut",!0),t=m(this),m(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){m(this).remove(),t.data("UIisFadingOut",!1)}})});var p=function(s,e){var t,i;h.isUndefined(e)||e.length<1?(t=m("body").find("[data-sek-level]"),i="printOrScheduleRemoval"):(t=e,i="mayBeRemove"),t.each(function(){var e=m(this)[0].getBoundingClientRect(),t=s.x<=e.right&&e.left<=s.x,a=s.y>=e.top&&e.bottom>=s.y,n=m(this);switch(i){case"mayBeRemove":n.data("sek-ui-removal-scheduled",!1),t&&a||u.call(n);break;case"printOrScheduleRemoval":t&&a?(n.data("sek-ui-removal-scheduled",!1),function(){if("location"!=(r=m(this).data("sek-level"))&&!(0<(l=m(this)).children(".sek-dyn-ui-wrapper").length)){switch(d={id:l.data("sek-id"),level:l.data("sek-level")},r){case"section":d=h.extend(d,{is_nested:!0===m(this).data("sek-is-nested"),can_have_more_columns:m(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12});break;case"column":var e=m(this).closest('div[data-sek-level="section"]');d=h.extend(d,{parent_can_have_more_columns:e.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:e.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===e.data("sek-is-nested")});break;case"module":var t=c.getRegisteredModuleProperty(l.data("sek-module-type"),"name");d=h.extend(d,{module_name:"not_set"!=t?t:""})}!0===m(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],r)||(o=c.parseTemplate("#sek-dyn-ui-tmpl-"+r),m.when(m(this).prepend(o(d))).done(function(){l.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}}.call(n)):!0!==n.data("sek-ui-removal-scheduled")&&(n.data("sek-ui-removal-scheduled",!0),n.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?p(s,n):h.delay(function(){!0===n.data("sek-ui-removal-scheduled")&&p(c.mouseMovedRecently(),n)},3500))}})};c.mouseMovedRecently=new e.Value({}),c.mouseMovedRecently.bind(function(e){var k;h.isEmpty(e)?(m("body").stop(!0,!0).find(".sek-add-content-button").each(function(){m(this).fadeOut({duration:200,complete:function(){m(this).remove()}})}),m("body").stop(!0,!0).find("[data-sek-level]").each(function(){m(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&u.call(m(this))})):(m("body").find('div[data-sek-level="location"]').each(function(){$sectionCollection=m(this).children('div[data-sek-level="section"]'),o=c.parseTemplate("#sek-tmpl-add-content-button");var e,t=m(this).data("sek-id");$sectionCollection.each(function(){0<m(this).find(".sek-add-content-button").length||(m.when(m(this).prepend(o({location:t}))).done(function(){e=m(this).find(".sek-add-content-button"),m(this).data("sek-id")&&e.attr("data-sek-before-section",m(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==m(this).index()+1&&m.when(m(this).append(o({is_last:!0,location:t}))).done(function(){e=m(this).find(".sek-add-content-button").last(),m(this).data("sek-id")&&e.attr("data-sek-after-section",m(this).data("sek-id")),e.fadeIn(300)}))})}),m(".sek-empty-location-placeholder").each(function(){0<m(this).find(".sek-add-content-button").length||m.when(m(this).append(o({location:m(this).closest('div[data-sek-level="location"]').data("sek-id")}))).done(function(){$btn_el=m(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)})}),k=e,m("body").find(".sek-add-content-button").each(function(){var e=m(this)[0].getBoundingClientRect(),t=k.y,a=k.x,n=Math.abs(t-e.bottom),s=Math.abs(e.top-t),i=a-e.right,o=e.left-a,r=n<40||s<40,d=0<i&&i<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;m(this).toggleClass("sek-mouse-is-close",(r||c)&&(d||l))}),p(e))});var s=function(){clearTimeout(m(window).data("_scroll_move_timer_")),c.mouseMovedRecently.set({})};return m(window).on("mousemove scroll",h.throttle(function(e){c.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(m(window).data("_scroll_move_timer_")),m(window).data("_scroll_move_timer_",setTimeout(function(){c.mouseMovedRecently.set({})},4e3))},50)),e.preview.bind("sek-drag-start",function(){s()}),m("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,p,m){p.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;p("body").on("click",function(e){var t,a=p(e.target),n=a.closest('[data-sek-level="location"]'),s=a.closest("[data-sek-level]"),i=a.closest("[data-sek-click-on]"),o=n.data("sek-id"),r=s.data("sek-level"),d=s.data("sek-id");switch("add-content"==a.data("sek-click-on")||0<a.closest("[data-sek-click-on]").length&&"add-content"==a.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!m.isEmpty(a.data("sek-click-on"))||0<i.length?"UIIcon":"module"==s.data("sek-level")?"moduleWrapper":"column"==s.data("sek-level")&&!0===s.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==s.data("sek-level")?"columnOutsideModules":"section"==s.data("sek-level")?"sectionOutsideColumns":m.isEmpty(a.data("sek-add"))?a.hasClass("sek-wp-content-wrapper")||a.hasClass("sek-wp-content-dyn-ui")?"wpContent":a.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion"){case"addContentButton":var l=!0===a.closest("[data-sek-is-first-section]").data("sek-is-first-section");u.preview.send("sek-add-section",{location:o,level:"section",before_section:a.closest("[data-sek-before-section]").data("sek-before-section"),after_section:a.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:l,send_to_preview:!l});break;case"UIIcon":if(s.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=a.closest("[data-sek-click-on]").data("sek-click-on"),m.isEmpty(t))throw new Error("Invalid action");if(m.isEmpty(r)||m.isEmpty(d))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:r,id:d,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:r,id:d});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:r,id:d});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:r,id:d});break;case"addSektion":u.preview.send("sek-add-section",{location:o,level:a.data("sek-add")});break;case"sekToJson":u.preview.send("sek-to-json",{id:d});break;case"wpContent":u.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var c=a.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");m.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=p.extend(!0,{},t);u.preview.send("sek-"+t.action,m.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:"module"==t.level?e.closest('div[data-sek-level="module"]').data("sek-module-type"):"",in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,i,o){i.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',i("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var n=i('[data-sek-id="'+a+'"]');0<n.length&&i(".sek-level-clone ").length<1&&($levelClone=i("<div>",{class:"sek-level-clone"}),n.find("[data-sek-level]").each(function(){i(this).addClass("sek-refreshing")}),n.prepend($levelClone),$levelClone.css({width:n.outerWidth()+"px",height:n.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(i.data(this,"_nimble_loader_active_timer_")),i.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},4e3)))}if(!0===e.fullPageLoader){var s=i("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});i("body").append(s),s.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),i('[data-sek-level="location"]').each(function(){i(this).addClass("sek-blur")}),clearTimeout(i.data(this,"_nimble_full_page_loader_active_timer_")),i.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},6e3))}},cleanLoader:function(e){i(".sek-level-clone").remove(),i("[data-sek-level]").each(function(){i(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(i('[data-sek-level="location"]').each(function(){i(this).removeClass("sek-blur")}),i("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(i,r,d){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var o=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{o.mayBePrintLoader(e)}catch(e){i.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{o.cleanLoader(e)}catch(e){i.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,n=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":o.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=o.ajaxRefreshModulesAndNestedSections(e):((d.isEmpty(a)||n.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),r("body").find(n).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=o.ajaxRefreshColumns(e);break;case"sek-remove-module":t=o.ajaxRefreshModulesAndNestedSections(e)}return d.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=o.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=o.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=o.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(i){return o.mayBePrintLoader({loader_located_in_level_id:i.apiParams.id}),o.doAjax({skope_id:i.skope_id,action:"sek_get_content",id:i.apiParams.id,level:i.apiParams.level,sek_action:i.apiParams.action}).fail(function(e){o.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:o.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a='<span class="sek-placeholder" data-sek-placeholder-for="'+i.apiParams.id+'"></span>',n=r('div[data-sek-id="'+i.apiParams.id+'"]');if(n.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{n.before(a);var s=r('[data-sek-placeholder-for="'+i.apiParams.id+'"]');n.remove(),d.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):s.after(t),s.remove(),r('[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-level-refreshed",{level:i.apiParams.level,id:i.apiParams.id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?i.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=d.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=d.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(a)}break;case"sek-move-module":var n=r.extend(!0,{},e),s=r.extend(!0,{},e);n.apiParams.from_column!=n.apiParams.to_column&&(n.apiParams=d.extend(n.apiParams,{in_column:n.apiParams.from_column,in_sektion:n.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n)),e.apiParams=d.extend(s.apiParams,{in_column:s.apiParams.to_column,in_sektion:s.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(s),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){o.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){o.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(e){var t=1;r(".sektion-wrapper").children('[data-sek-level="section"]').each(function(){r('[data-drop-zone-before-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-'+e.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+r(this).data("sek-id")+'"></div>'),t==r(".sektion-wrapper").children('[data-sek-level="section"]').length&&r(this).after('<div class="sek-content-'+e.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+r(this).data("sek-id")+'"></div>'),t++}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+e.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==e.type&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),r("body").addClass("sek-dragging"),d.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){r("body").removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('div[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},"slow")}};d.each(e,function(e,n){i.preview.bind(n,function(a){a=d.extend({skope_id:"",apiParams:{},uiParams:{}},a||{});r("body").addClass(n);try{r.when(d.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,i.preview.send([n,"done"].join("_"),a),d.isUndefined(t)||t.data&&t.data.setting_validities&&i.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){i.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){r("body").removeClass(n)}).then(function(){i.preview.trigger("control-panel-requested-action-done",{action:n,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+n,e),r("body").removeClass(n)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(s){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:s.apiParams.location}),i.doAjax({action:"sek_get_content",id:s.apiParams.id,in_sektion:s.apiParams.in_sektion,in_column:s.apiParams.in_column,skope_id:s.skope_id,sek_action:s.apiParams.action,is_nested:s.apiParams.is_nested}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:i.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),s.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+s.apiParams.in_column+'"]')).length<1&&i.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",s.apiParams.in_column);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.in_column+'"></span>';t.before(n),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=s.apiParams.action||r.isEmpty(s.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+s.apiParams.location+'"]').find('div[data-sek-id="'+s.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+s.apiParams.location+'"]').find('div[data-sek-id="'+s.apiParams.after_section+'"]'),!r.isEmpty(s.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!r.isEmpty(s.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+s.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+s.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==s.apiParams.action&&o('div[data-sek-id="'+s.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),s.apiParams.is_nested&&(i.makeModulesSortableInColumn(s.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+s.apiParams.in_sektion+'"]').each(function(){i.maybeMakeColumnResizableInSektion.call(this)})),s.cloneId&&o('div[data-sek-id="'+s.cloneId+'"]').trigger("sek-section-added",s),o('div[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-section-added",s)}).fail(function(e){i.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,e){r.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(s){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:s.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",id:s.apiParams.id,in_sektion:s.apiParams.in_sektion,skope_id:s.skope_id,sek_action:s.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:i.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a=r('div[data-sek-id="'+s.apiParams.in_sektion+'"]');a.length<1&&i.errare("reactToPanelMsg => "+s.apiParams.action+" => no DOM node for parent sektion => ",s.apiParams.in_sektion);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.in_sektion+'"></span>';a.before(n),a.remove(),r(".sektion-wrapper").find(".sek-placeholder").after(t),r(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",s),r('div[data-sek-id="'+s.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:s.apiParams.in_sektion})}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-add-column => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var n=this;return n.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),n.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,skope_id:a.skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:n.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),r('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),n.appendDynStyleSheet(a.skope_id,t),r('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){n.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),r('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(s){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:s.apiParams.in_column}),i.doAjax({action:"sek_get_content",id:s.apiParams.id,in_sektion:s.apiParams.in_sektion,in_column:s.apiParams.in_column,skope_id:s.skope_id,sek_action:s.apiParams.action,is_nested:s.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:i.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a=o('[data-sek-id="'+s.apiParams.in_column+'"]');a.length<1&&i.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",s.apiParams.in_column);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.in_column+'"></span>';a.before(n),a.remove(),o('[data-sek-placeholder-for="'+s.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+s.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+s.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:s.apiParams.in_column,in_sektion:s.apiParams.in_sektion})}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,i){s.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var n=this;return n.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),n.doAjax({action:"sek_get_content",skope_id:a.skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:n.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),n.appendDynStyleSheet(a.skope_id,t),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){n.errare("sek-refresh-stylesheet fail !"),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,n="#sek-gfonts-"+e;0<s("head").find(a).length&&s("head").find(a).remove(),0<s("head").find(n).length&&s("head").find(n).remove(),s("head").append(t),!i.isEmpty(t)&&s("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a):s("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{parseTemplate:r.memoize(function(t){var a,n=this,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return n.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||r.template(o(t).html(),s)}catch(e){n.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=r.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=r.isEmpty(r.filter(a,function(e){return!r.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,r.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){r.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?r.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(r.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,n=sekPreviewLocalized.frontNonce,s=o.Deferred(),i=r.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),r.isEmpty(i.action)||!r.isString(i.action)?(t.errare("self.doAjax : unproper action provided"),s.resolve().promise()):(i[n.id]=n.handle,!r.isObject(n)||r.isUndefined(n.id)||r.isUndefined(n.handle)?(t.errare("self.doAjax : unproper nonce"),s.resolve().promise()):(o.post(a,i).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+i.action,e),s.reject(e)),s.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+i.action,e),s.reject(e)}),s.promise()))},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!r.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var n=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new n}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
1
+ var SekPreviewPrototype=SekPreviewPrototype||{};!function(t,s,n){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=n.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),s("body").on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!n.isUndefined(t)&&!n.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)})},deactivateLinks:function(e){e=e||{},s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){"yes"!==s(this).data("sek-unlinked")&&(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","#"),s(this).on("click",function(e){e.preventDefault()}))})})},scheduleHighlightActiveLevel:function(){var i=this;this.activeLevelUI=new t.Value(""),this.activeUIChangedRecently=new t.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),n=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<n.length&&n.removeClass("sek-active-ui sek-highlight-active-ui"),i.activeUIChangedRecently(Date.now())}),n.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){t.preview.bind(e,function(e){i.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+i.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){i.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},c('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(c(this).data("sek-id"))}),c("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(c(this).data("sek-id"))}),c('[data-sek-level="location"]').each(function(){c(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(c(this).data("sek-id"))})}),c("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(c(this).data("sek-id"))}),c("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){c(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(c(this).data("sek-id"))})}),c('[data-sek-level="location"]').each(function(){c(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),c("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))}),c("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){c(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),c("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){c(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(c(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,n,t,i=this,s=[],o=[];c('[data-sek-id="'+e+'"]').each(function(){t=c.extend(!0,{},i.sortableDefaultParams),c(this).sortable(k.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-level="location"]',placeholder:{element:function(e){return c('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){c("body").addClass("sek-moving-section"),$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),$sourceLocation.children('[data-sek-level="section"]').each(function(){s.push(c(this).data("sek-id"))})},stop:function(e,t){c("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),n=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(c(this).data("sek-id"))}),l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:n})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}}))})},makeColumnsSortableInSektion:function(e){var i=this,t=c.extend(!0,{},i.sortableDefaultParams),a=c('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),s=function(e){if(e=c.extend({forTarget:!0},e||{}),!k.isEmpty(c(this).data("_sortable_columns_css_classes_")))return c(this).data("_sortable_columns_css_classes_");var t,a=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,n=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var i={current:"sek-col-"+n,next:"sek-col-"+Math.floor(100/t)};return c(this).data("_sortable_columns_css_classes_",i),i};a.sortable(k.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=s.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)})):(a=s.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=s.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)})):(a=s.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){return $targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(l.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1)},start:function(e,t){startOrder=[],newOrder=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){startOrder.push(c(this).data("sek-id"))}),c(this).data("sek-is-sender",!0),k.isEmpty(startOrder)&&i.errare("column sortable => startOrder should not be empty")},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){newOrder.push(c(this).data("sek-id"))});var a,n=c(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==c(this).data("sek-is-sender")?(a=s.call(c(this)),k.isEmpty(a)||n.each(function(){c(this).removeClass(a.current).addClass(a.next)})):(a=s.call(c(this),{forTarget:!1}),k.isEmpty(a)||n.each(function(){c(this).addClass(a.current).removeClass(a.next)})),c('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){c(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),k.isEmpty(newOrder)?i.errare("column sortable => newOrder should not be empty"):k.isEqual(newOrder,startOrder)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&i.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:newOrder,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,n,i,s,t,o=[],r=[],d=this;t=c.extend(!0,{},d.sortableDefaultParams),c('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(k.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){c('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){c(this).removeClass("sek-sortable-overing")}),c(e.target).addClass("sek-sortable-overing")},start:function(e,t){o=[],r=[],c("body").addClass("sek-dragging-element"),n=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){o.push(c(this).data("sek-id"))}),k.isEmpty(o)&&d.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),i=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){r.push(c(this).data("sek-id"))}),k.isEmpty(r)?d.errare("makeModulesSortableInColumn => newOrder should not be empty"):k.isEqual(r,o)&&i===n?d.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(l.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:r,from_column:n,to_column:i,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),c("body").removeClass("sek-dragging-element"))}}))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),c("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,n,i,s,o,r,d,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');e.length<2||e.each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),n=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((i=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");d=i.index()+1==o,r=d?i.prev():i.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(i.length<1)throw new Error("ERROR => resizable => No valid level dom element found");i.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(n)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:i.data("sek-level"),in_sektion:a.data("sek-id"),id:i.data("sek-id"),resized_column:i.data("sek-id"),sister_column:r.data("sek-id"),resizedColumnWidthInPercent:s,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,p,h){p.extend(SekPreviewPrototype,{setupUiHoverVisibility:function(){var o,r,d,l,t,c=this,u=function(){(l=p(this)).children(".sek-dyn-ui-wrapper").length<1||(l.data("UIisFadingOut",!0),l.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),l.data("UIisFadingOut",!1)}}))},a=function(){var e=p(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=p(this),a=p(this).closest(".sek-dyn-ui-location-type"),n=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),n.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),n.removeClass("sek-is-expanded"),a.show())};p("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");p(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(p(this))}),n.call(t,!0),a.call(t)}),p("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");h.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),p("body").on("click",".sek-minimize-ui",function(e){p(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),p("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=p(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(o=c.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(o({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){p(this).data("UIisFadingOut",!0),t=p(this),p(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),t.data("UIisFadingOut",!1)}})});var m=function(i,e){var t,s;h.isUndefined(e)||e.length<1?(t=p("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=p(this)[0].getBoundingClientRect(),t=i.x<=e.right&&e.left<=i.x,a=i.y>=e.top&&e.bottom>=i.y,n=p(this);switch(s){case"mayBeRemove":n.data("sek-ui-removal-scheduled",!1),t&&a||u.call(n);break;case"printOrScheduleRemoval":t&&a?(n.data("sek-ui-removal-scheduled",!1),function(){if("location"!=(r=p(this).data("sek-level"))&&!(0<(l=p(this)).children(".sek-dyn-ui-wrapper").length)){switch(d={id:l.data("sek-id"),level:l.data("sek-level")},r){case"section":d=h.extend(d,{is_nested:!0===p(this).data("sek-is-nested"),can_have_more_columns:p(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12});break;case"column":var e=p(this).closest('div[data-sek-level="section"]');d=h.extend(d,{parent_can_have_more_columns:e.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:e.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===e.data("sek-is-nested")});break;case"module":var t=c.getRegisteredModuleProperty(l.data("sek-module-type"),"name");d=h.extend(d,{module_name:"not_set"!=t?t:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],r)||(o=c.parseTemplate("#sek-dyn-ui-tmpl-"+r),p.when(p(this).prepend(o(d))).done(function(){l.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}}.call(n)):!0!==n.data("sek-ui-removal-scheduled")&&(n.data("sek-ui-removal-scheduled",!0),n.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?m(i,n):h.delay(function(){!0===n.data("sek-ui-removal-scheduled")&&m(c.mouseMovedRecently(),n)},3500))}})};c.mouseMovedRecently=new e.Value({}),c.mouseMovedRecently.bind(function(e){var k;h.isEmpty(e)?(p("body").stop(!0,!0).find(".sek-add-content-button").each(function(){p(this).fadeOut({duration:200,complete:function(){p(this).remove()}})}),p("body").stop(!0,!0).find("[data-sek-level]").each(function(){p(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&u.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){$sectionCollection=p(this).children('div[data-sek-level="section"]'),o=c.parseTemplate("#sek-tmpl-add-content-button");var e,t=p(this).data("sek-id");$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(o({location:t}))).done(function(){e=p(this).find(".sek-add-content-button"),p(this).data("sek-id")&&e.attr("data-sek-before-section",p(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==p(this).index()+1&&p.when(p(this).append(o({is_last:!0,location:t}))).done(function(){e=p(this).find(".sek-add-content-button").last(),p(this).data("sek-id")&&e.attr("data-sek-after-section",p(this).data("sek-id")),e.fadeIn(300)}))})}),p(".sek-empty-location-placeholder").each(function(){0<p(this).find(".sek-add-content-button").length||p.when(p(this).append(o({location:p(this).closest('div[data-sek-level="location"]').data("sek-id")}))).done(function(){$btn_el=p(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)})}),k=e,p("body").find(".sek-add-content-button").each(function(){var e=p(this)[0].getBoundingClientRect(),t=k.y,a=k.x,n=Math.abs(t-e.bottom),i=Math.abs(e.top-t),s=a-e.right,o=e.left-a,r=n<40||i<40,d=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;p(this).toggleClass("sek-mouse-is-close",(r||c)&&(d||l))}),m(e))});var i=function(){clearTimeout(p(window).data("_scroll_move_timer_")),c.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){c.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){c.mouseMovedRecently.set({})},4e3))},50)),e.preview.bind("sek-drag-start",function(){i()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){i()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){var t,a=m(e.target),n=a.closest('[data-sek-level="location"]'),i=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=n.data("sek-id"),r=i.data("sek-level"),d=i.data("sek-id");switch("add-content"==a.data("sek-click-on")||0<a.closest("[data-sek-click-on]").length&&"add-content"==a.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!p.isEmpty(a.data("sek-click-on"))||0<s.length?"UIIcon":"module"==i.data("sek-level")?"moduleWrapper":"column"==i.data("sek-level")&&!0===i.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==i.data("sek-level")?"columnOutsideModules":"section"==i.data("sek-level")?"sectionOutsideColumns":p.isEmpty(a.data("sek-add"))?a.hasClass("sek-wp-content-wrapper")||a.hasClass("sek-wp-content-dyn-ui")?"wpContent":a.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion"){case"addContentButton":var l=!0===a.closest("[data-sek-is-first-section]").data("sek-is-first-section");u.preview.send("sek-add-section",{location:o,level:"section",before_section:a.closest("[data-sek-before-section]").data("sek-before-section"),after_section:a.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:l,send_to_preview:!l});break;case"UIIcon":if(i.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=a.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(r)||p.isEmpty(d))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:r,id:d,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:r,id:d});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:r,id:d});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:r,id:d});break;case"addSektion":u.preview.send("sek-add-section",{location:o,level:a.data("sek-add")});break;case"sekToJson":u.preview.send("sek-to-json",{id:d});break;case"wpContent":u.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var c=a.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");p.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=m.extend(!0,{},t);u.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:"module"==t.level?e.closest('div[data-sek-level="module"]').data("sek-module-type"):"",in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var n=s('[data-sek-id="'+a+'"]');0<n.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),n.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),n.prepend($levelClone),$levelClone.css({width:n.outerWidth()+"px",height:n.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},4e3)))}if(!0===e.fullPageLoader){var i=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(i),i.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(s,r,d){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var o=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{o.mayBePrintLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{o.cleanLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,n=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":o.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=o.ajaxRefreshModulesAndNestedSections(e):((d.isEmpty(a)||n.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),r("body").find(n).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=o.ajaxRefreshColumns(e);break;case"sek-remove-module":t=o.ajaxRefreshModulesAndNestedSections(e)}return d.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=o.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=o.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=o.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(s){return o.mayBePrintLoader({loader_located_in_level_id:s.apiParams.id}),o.doAjax({skope_id:s.skope_id,action:"sek_get_content",id:s.apiParams.id,level:s.apiParams.level,sek_action:s.apiParams.action}).fail(function(e){o.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:o.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',n=r('div[data-sek-id="'+s.apiParams.id+'"]');if(n.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{n.before(a);var i=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');n.remove(),d.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):i.after(t),i.remove(),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-level-refreshed",{level:s.apiParams.level,id:s.apiParams.id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?s.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=d.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=d.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(a)}break;case"sek-move-module":var n=r.extend(!0,{},e),i=r.extend(!0,{},e);n.apiParams.from_column!=n.apiParams.to_column&&(n.apiParams=d.extend(n.apiParams,{in_column:n.apiParams.from_column,in_sektion:n.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n)),e.apiParams=d.extend(i.apiParams,{in_column:i.apiParams.to_column,in_sektion:i.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(i),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){o.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){o.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(i){var s=1,o=!1;r('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=r(this).data("sek-id"),t=r(this).find('[data-sek-level="column"]').length,a=r(this).find('[data-sek-level="module"]').length,n=t<2&&a<1;!o&&!n&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+i.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),n||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+i.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=n}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+i.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==i.type&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),r("body").addClass("sek-dragging"),d.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){r("body").removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('div[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},"slow")}};d.each(e,function(e,n){s.preview.bind(n,function(a){a=d.extend({skope_id:"",apiParams:{},uiParams:{}},a||{});r("body").addClass(n);try{r.when(d.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([n,"done"].join("_"),a),d.isUndefined(t)||t.data&&t.data.setting_validities&&s.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){s.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){r("body").removeClass(n)}).then(function(){s.preview.trigger("control-panel-requested-action-done",{action:n,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+n,e),r("body").removeClass(n)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(i){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:i.apiParams.location}),s.doAjax({action:"sek_get_content",id:i.apiParams.id,in_sektion:i.apiParams.in_sektion,in_column:i.apiParams.in_column,skope_id:i.skope_id,sek_action:i.apiParams.action,is_nested:i.apiParams.is_nested}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:s.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),i.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+i.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",i.apiParams.in_column);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+i.apiParams.in_column+'"></span>';t.before(n),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=i.apiParams.action||r.isEmpty(i.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+i.apiParams.location+'"]').find('div[data-sek-id="'+i.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+i.apiParams.location+'"]').find('div[data-sek-id="'+i.apiParams.after_section+'"]'),!r.isEmpty(i.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!r.isEmpty(i.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+i.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+i.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==i.apiParams.action&&o('div[data-sek-id="'+i.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),i.apiParams.is_nested&&(s.makeModulesSortableInColumn(i.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+i.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),i.cloneId&&o('div[data-sek-id="'+i.cloneId+'"]').trigger("sek-section-added",i),o('div[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-section-added",i)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,e){r.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(i){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:i.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:i.apiParams.id,in_sektion:i.apiParams.in_sektion,skope_id:i.skope_id,sek_action:i.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:s.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a=r('div[data-sek-id="'+i.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+i.apiParams.action+" => no DOM node for parent sektion => ",i.apiParams.in_sektion);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+i.apiParams.in_sektion+'"></span>';a.before(n),a.remove(),r(".sektion-wrapper").find(".sek-placeholder").after(t),r(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",i),r('div[data-sek-id="'+i.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:i.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),r('[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var n=this;return n.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),n.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,skope_id:a.skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:n.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),r('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),n.appendDynStyleSheet(a.skope_id,t),r('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){n.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),r('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(i){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:i.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:i.apiParams.id,in_sektion:i.apiParams.in_sektion,in_column:i.apiParams.in_column,skope_id:i.skope_id,sek_action:i.apiParams.action,is_nested:i.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:s.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e);var a=o('[data-sek-id="'+i.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",i.apiParams.in_column);var n='<span class="sek-placeholder" data-sek-placeholder-for="'+i.apiParams.in_column+'"></span>';a.before(n),a.remove(),o('[data-sek-placeholder-for="'+i.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+i.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+i.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:i.apiParams.in_column,in_sektion:i.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+i.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,i,s){i.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var n=this;return n.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),n.doAjax({action:"sek_get_content",skope_id:a.skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:n.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),n.appendDynStyleSheet(a.skope_id,t),i('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){n.errare("sek-refresh-stylesheet fail !"),i('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,n="#sek-gfonts-"+e;0<i("head").find(a).length&&i("head").find(a).remove(),0<i("head").find(n).length&&i("head").find(n).remove(),i("head").append(t),!s.isEmpty(t)&&i("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a):i("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{parseTemplate:r.memoize(function(t){var a,n=this,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return n.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||r.template(o(t).html(),i)}catch(e){n.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=r.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=r.isEmpty(r.filter(a,function(e){return!r.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,r.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){r.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?r.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(r.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,n=sekPreviewLocalized.frontNonce,i=o.Deferred(),s=r.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),r.isEmpty(s.action)||!r.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),i.resolve().promise()):(s[n.id]=n.handle,!r.isObject(n)||r.isUndefined(n.id)||r.isUndefined(n.handle)?(t.errare("self.doAjax : unproper nonce"),i.resolve().promise()):(o.post(a,s).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+s.action,e),i.reject(e)),i.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),i.reject(e)}),i.promise()))},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!r.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"},getLevelModel:function(t,e){var a=this,n="no_match";return r.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),r.each(e,function(e){"no_match"==n&&(t===e.id?n=e:r.isArray(e.collection)&&(n=a.getLevelModel(t,e.collection)))}),n}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var n=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new n}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
inc/sektions/ccat-sektions.php CHANGED
@@ -1776,7 +1776,7 @@ function sek_register_modules() {
1776
  'czr_simple_form_submission_child',
1777
  'czr_font_child'
1778
  ] as $module_name ) {
1779
- $fn = "\Nimble\sek_get_module_params_for_{$module_name}";
1780
  if ( function_exists( $fn ) ) {
1781
  $params = $fn();
1782
  if ( is_array( $params ) ) {
@@ -8349,6 +8349,7 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
8349
  add_action( 'wp_enqueue_scripts', array( $this, 'sek_enqueue_the_printed_module_assets') );
8350
  add_filter( 'template_include', array( $this, 'sek_maybe_set_local_nimble_template') );
8351
  add_filter( 'nimble_parse_for_smart_load', array( $this, 'sek_maybe_process_img_for_js_smart_load') );
 
8352
  }
8353
  function sek_schedule_rendering_hooks() {
8354
  $locale_template = sek_get_locale_template();
@@ -8544,11 +8545,12 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
8544
  }
8545
  ?>
8546
  <?php
8547
- printf('<div data-sek-level="column" data-sek-id="%1$s" class="sek-column sek-col-base %2$s %3$s" %4$s>',
8548
  $id,
8549
  $grid_column_class,
8550
  $this->get_level_visibility_css_class( $model ),
8551
- empty( $collection ) ? 'data-sek-no-modules="true"' : ''
 
8552
  );
8553
  ?>
8554
  <?php
@@ -8595,11 +8597,12 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
8595
  $title_attribute = 'title="'.$title_attribute.'"';
8596
  }
8597
  ?>
8598
- <?php printf('<div data-sek-level="module" data-sek-id="%1$s" data-sek-module-type="%2$s" class="sek-module %3$s" %4$s>',
8599
  $id,
8600
  $module_type,
8601
  $this->get_level_visibility_css_class( $model ),
8602
- $title_attribute
 
8603
  );?>
8604
  <div class="sek-module-inner">
8605
  <?php $this -> sek_print_module_tmpl( $model ); ?>
@@ -8846,6 +8849,25 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
8846
 
8847
  return preg_replace_callback( $pattern, '\Nimble\nimble_regex_callback', $html);
8848
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8849
  }//class
8850
  endif;
8851
  ?><?php
1776
  'czr_simple_form_submission_child',
1777
  'czr_font_child'
1778
  ] as $module_name ) {
1779
+ $fn = "Nimble\sek_get_module_params_for_{$module_name}";
1780
  if ( function_exists( $fn ) ) {
1781
  $params = $fn();
1782
  if ( is_array( $params ) ) {
8349
  add_action( 'wp_enqueue_scripts', array( $this, 'sek_enqueue_the_printed_module_assets') );
8350
  add_filter( 'template_include', array( $this, 'sek_maybe_set_local_nimble_template') );
8351
  add_filter( 'nimble_parse_for_smart_load', array( $this, 'sek_maybe_process_img_for_js_smart_load') );
8352
+ $this -> sek_setup_tiny_mce_content_filters();
8353
  }
8354
  function sek_schedule_rendering_hooks() {
8355
  $locale_template = sek_get_locale_template();
8545
  }
8546
  ?>
8547
  <?php
8548
+ printf('<div data-sek-level="column" data-sek-id="%1$s" class="sek-column sek-col-base %2$s %3$s" %4$s %5$s>',
8549
  $id,
8550
  $grid_column_class,
8551
  $this->get_level_visibility_css_class( $model ),
8552
+ empty( $collection ) ? 'data-sek-no-modules="true"' : '',
8553
+ $this -> sek_maybe_add_bg_attributes( $model )
8554
  );
8555
  ?>
8556
  <?php
8597
  $title_attribute = 'title="'.$title_attribute.'"';
8598
  }
8599
  ?>
8600
+ <?php printf('<div data-sek-level="module" data-sek-id="%1$s" data-sek-module-type="%2$s" class="sek-module %3$s" %4$s %5$s>',
8601
  $id,
8602
  $module_type,
8603
  $this->get_level_visibility_css_class( $model ),
8604
+ $title_attribute,
8605
+ $this -> sek_maybe_add_bg_attributes( $model )
8606
  );?>
8607
  <div class="sek-module-inner">
8608
  <?php $this -> sek_print_module_tmpl( $model ); ?>
8849
 
8850
  return preg_replace_callback( $pattern, '\Nimble\nimble_regex_callback', $html);
8851
  }
8852
+ private function sek_setup_tiny_mce_content_filters() {
8853
+ add_filter( 'the_nimble_tinymce_module_content', 'do_blocks', 9 );
8854
+ add_filter( 'the_nimble_tinymce_module_content', 'wptexturize' );
8855
+ add_filter( 'the_nimble_tinymce_module_content', 'convert_smilies', 20 );
8856
+ add_filter( 'the_nimble_tinymce_module_content', 'wpautop' );
8857
+ add_filter( 'the_nimble_tinymce_module_content', 'shortcode_unautop' );
8858
+ add_filter( 'the_nimble_tinymce_module_content', 'prepend_attachment' );
8859
+ add_filter( 'the_nimble_tinymce_module_content', 'wp_make_content_images_responsive' );
8860
+ add_filter( 'the_nimble_tinymce_module_content', 'do_shortcode', 11 ); // AFTER wpautop()
8861
+ add_filter( 'the_nimble_tinymce_module_content', 'capital_P_dangit', 9 );
8862
+ add_filter( 'the_nimble_tinymce_module_content', array( $this, 'sek_parse_content_for_video_embed') , 8 );
8863
+ }
8864
+ function sek_parse_content_for_video_embed( $content ) {
8865
+ if ( array_key_exists( 'wp_embed', $GLOBALS ) && $GLOBALS['wp_embed'] instanceof \WP_Embed ) {
8866
+ return $GLOBALS['wp_embed']->autoembed( $content );
8867
+ } else {
8868
+ return $content;
8869
+ }
8870
+ }
8871
  }//class
8872
  endif;
8873
  ?><?php
nimble-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Nimble Builder
4
  * Description: Drag-and-drop section builder companion of the Customizr and Hueman themes.
5
- * Version: 1.2.0
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://presscustomizr.com
@@ -11,7 +11,7 @@
11
  /* ------------------------------------------------------------------------- *
12
  * CONSTANTS
13
  /* ------------------------------------------------------------------------- */
14
- $current_version = "1.2.0";
15
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
16
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
17
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
2
  /**
3
  * Plugin Name: Nimble Builder
4
  * Description: Drag-and-drop section builder companion of the Customizr and Hueman themes.
5
+ * Version: 1.2.1
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://presscustomizr.com
11
  /* ------------------------------------------------------------------------- *
12
  * CONSTANTS
13
  /* ------------------------------------------------------------------------- */
14
+ $current_version = "1.2.1";
15
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
16
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
17
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: customizer, editor, page builder, drag and drop
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.0.0
9
- Stable tag: 1.2.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -45,12 +45,21 @@ You'll find an online knowledge base for the Nimble builder here : [Nimble build
45
  The Nimble builder has been optimized to work with the Customizr and Hueman theme, but it works with any WordPress theme. If you experience any problem with a specific theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
46
 
47
  == Upgrade Notice ==
48
- = 1.2.0 =
49
- * fixed : added compatibility patch for WordPress 5.0. Waiting for core decision on : https://core.trac.wordpress.org/ticket/45292
50
- * fixed : parallax effect not being applied on preset section drop
51
- * improved : image module margins are not inherited from the theme
 
 
52
 
53
  == Changelog ==
 
 
 
 
 
 
 
54
  = 1.2.0 : November 8th, 2018 =
55
  * fixed : added compatibility patch for WordPress 5.0. Waiting for core decision on : https://core.trac.wordpress.org/ticket/45292
56
  * fixed : parallax effect not being applied on preset section drop
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.0.0
9
+ Stable tag: 1.2.1
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
45
  The Nimble builder has been optimized to work with the Customizr and Hueman theme, but it works with any WordPress theme. If you experience any problem with a specific theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
46
 
47
  == Upgrade Notice ==
48
+ = 1.2.1 =
49
+ * fixed : php function function_exists() can return false when the tested namespaced function starts with a backslash.
50
+ * fixed : parallax background only applied to section level
51
+ * fixed : background smart load only applied to section level
52
+ * improved : when dragging content, no need to print dropzones before or after empty sections
53
+ * improved : introduce a Nimble content filter for the TinyMce editor module, in order to prevent a content "corruption" by third party plugins
54
 
55
  == Changelog ==
56
+ = 1.2.1 : November 10th, 2018 =
57
+ * fixed : php function function_exists() can return false when the tested namespaced function starts with a backslash.
58
+ * fixed : parallax background only applied to section level
59
+ * fixed : background smart load only applied to section level
60
+ * improved : when dragging content, no need to print dropzones before or after empty sections
61
+ * improved : introduce a Nimble content filter for the TinyMce editor module, in order to prevent a content "corruption" by third party plugins
62
+
63
  = 1.2.0 : November 8th, 2018 =
64
  * fixed : added compatibility patch for WordPress 5.0. Waiting for core decision on : https://core.trac.wordpress.org/ticket/45292
65
  * fixed : parallax effect not being applied on preset section drop
tmpl/modules/tinymce_editor_module_tmpl.php CHANGED
@@ -19,7 +19,10 @@ if ( ! function_exists( '\Nimble\sek_print_tiny_mce_text_content') ) {
19
  if ( false === sek_booleanize_checkbox_val( $value['autop'] ) ) {
20
  remove_filter( 'the_content', 'wpautop');
21
  }
22
- $content = apply_filters( 'the_content', $tiny_mce_content );
 
 
 
23
  if ( false === sek_booleanize_checkbox_val( $value['autop'] ) ) {
24
  add_filter( 'the_content', 'wpautop');
25
  }
19
  if ( false === sek_booleanize_checkbox_val( $value['autop'] ) ) {
20
  remove_filter( 'the_content', 'wpautop');
21
  }
22
+
23
+ // Use our own content filter instead of $content = apply_filters( 'the_content', $tiny_mce_content );
24
+ // because of potential third party plugins corrupting 'the_content' filter. https://github.com/presscustomizr/nimble-builder/issues/233
25
+ $content = apply_filters( 'the_nimble_tinymce_module_content', $tiny_mce_content );
26
  if ( false === sek_booleanize_checkbox_val( $value['autop'] ) ) {
27
  add_filter( 'the_content', 'wpautop');
28
  }