Nimble Page Builder - Version 1.7.0

Version Description

Improved the way Nimble Builder loads assets for the pre-built sections.

=

Download this release

Release Info

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

Code changes from version 1.6.7 to 1.7.0

assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -393,7 +393,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
393
  // $topPanelTitleElInner.html( logoHtml );
394
  // }
395
 
396
- if ( sektionsLocalizedData.eligibleForReviewNotification ) {
397
  _mainPanel_.expanded.bind( function( expanded ) {
398
  if ( expanded && _.isUndefined( self.feedbackUIVisible ) ) {
399
  // FEEDBACK UI
@@ -2080,18 +2080,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2080
  if ( _.isEmpty( scope ) || !_.contains(['local', 'global'], scope ) ) {
2081
  throw new Error( 'resetCollectionSetting => invalid scope provided.', scope );
2082
  }
2083
- var _collectionSettingId_ = 'global' === scope ? self.getGlobalSectionsSettingId() : self.localSectionsSettingId();
2084
-
2085
- if ( _.isEmpty( _collectionSettingId_ ) ) {
2086
- throw new Error( 'resetCollectionSetting => the collectionSettingId is invalid' );
2087
- }
2088
- var clonedDefaultSetting = $.extend( true, {}, self.getDefaultSektionSettingValue( scope ) ),
2089
- currentSetting = api( _collectionSettingId_ )(),
2090
- clonedSetting;
2091
-
2092
- clonedSetting = _.isObject( currentSetting ) ? $.extend( true, {}, currentSetting ) : clonedDefaultSetting;
2093
- clonedSetting.collection = $.extend( true, [], clonedDefaultSetting.collection );
2094
- return clonedSetting;
2095
  }
2096
  });//$.extend()
2097
  })( wp.customize, jQuery );//global sektionsLocalizedData
@@ -3476,7 +3465,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3476
  module_type : 'sek_intro_sec_picker_module',
3477
  controlLabel : sektionsLocalizedData.i18n['Sections for an introduction'],
3478
  content_type : 'section',
3479
- expandAndFocusOnInit : true,
3480
  priority : 10,
3481
  icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3482
  },
@@ -5989,7 +5978,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5989
 
5990
 
5991
 
5992
- // Walk the column collection of a preset section, and replace '::img-path::*' pattern by image ids that we get from ajax calls
5993
  // Is designed to handle multiple ajax calls in parallel if the preset_section includes several images
5994
  // @return a promise()
5995
  preparePresetSectionForInjection : function( columnCollection ) {
@@ -6003,11 +5992,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
6003
  _.each( data, function( val, key ) {
6004
  if ( _.isObject( val ) || _.isArray( val ) ) {
6005
  _sniffImg( val );
6006
- } else if ( _.isString( val ) && -1 != val.indexOf( '::img-path::' ) ) {
6007
  // scenario when a section uses an image more than once.
6008
  // => we don't need to fire a new ajax request for an image already sniffed
6009
  if ( ! _.has( deferreds, val ) ) {
6010
- deferreds[ val ] = self.importAttachment( val.replace( '::img-path::', '' ) );
6011
  }
6012
  }
6013
  });
@@ -6016,14 +6005,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
6016
 
6017
  // walk the column collection and populates the deferreds object recursively
6018
  // imdList is formed this way :
6019
- // ::img-path::/assets/img/1.jpg : {id: 2547, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_1.jpg"}
6020
- // ::img-path::/assets/img/2.jpg : {id: 2548, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_2.jpg"}
6021
- // ::img-path::/assets/img/3.jpg : {id: 2549, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_3.jpg"}
6022
  var _replaceImgPlaceholderById = function( data, imgList) {
6023
  _.each( data, function( val, key ) {
6024
  if ( _.isObject( val ) || _.isArray( val ) ) {
6025
  _replaceImgPlaceholderById( val, imgList );
6026
- } else if ( _.isString( val ) && -1 != val.indexOf( '::img-path::' ) && _.has( imgList, val ) && _.isObject( imgList[ val ] ) ) {
6027
  data[ key ] = imgList[ val ].id;
6028
  }
6029
  });
@@ -6973,7 +6962,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
6973
  return fn && typeof fn.then === 'function' && String( $.Deferred().then ) === String( fn.then );
6974
  },
6975
 
6976
- // @param deferreds = { '::img-path::/assets/img/tests/1.jpg' : 'dfd1', '::img-path::/assets/img/tests/2.jpg' : dfd2, ..., '::img-path::/assets/img/tests/n.jpg' : dfdn }
6977
  whenAllPromisesInParallel : function ( deferreds ) {
6978
  var self = this,
6979
  mainDfd = $.Deferred(),
@@ -7030,16 +7019,16 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7030
  },
7031
 
7032
 
7033
- // @param relpath = string : '/assets/img/41883.jpg'
7034
  // @return a promise
7035
- importAttachment : function( relpath ) {
7036
  // @see php wp_ajax_sek_import_attachment
7037
  return wp.ajax.post( 'sek_import_attachment', {
7038
- rel_path : relpath,
7039
  nonce: api.settings.nonce.save//<= do we need to set a specific nonce to fetch the attachment
7040
  })
7041
  .fail( function( _er_ ) {
7042
- api.errare( 'sek_import_attachment ajax action failed for image ' + relpath, _er_ );
7043
  });
7044
  // .done( function( data) {
7045
  // api.infoLog('relpath and DATA ' + relpath , data );
@@ -10240,6 +10229,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
10240
  '<span>',
10241
  '<strong>',
10242
  sektionsLocalizedData.i18n['Reset failed'],
 
 
10243
  '</strong>',
10244
  '</span>'
10245
  ].join('')
@@ -11501,16 +11492,27 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11501
  // If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
11502
  //4) some DOM behaviour. For example, a multi item shall be sortable.
11503
  api.czrModuleMap = api.czrModuleMap || {};
11504
- var section_modules = [
11505
- 'sek_intro_sec_picker_module',
11506
- 'sek_features_sec_picker_module',
11507
- 'sek_contact_sec_picker_module',
11508
- 'sek_column_layouts_sec_picker_module'
11509
- ];
 
 
 
 
 
 
 
 
 
11510
  // Header and footer have been introduced in v1.4.0 but not enabled by default
11511
  // The header and footer preset sections are on hold until "header and footer" feature is released.
11512
- if ( sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
11513
- section_modules = _.union( section_modules, [ 'sek_header_sec_picker_module','sek_footer_sec_picker_module' ] );
 
 
11514
  }
11515
  _.each( section_modules, function( module_type ) {
11516
  api.czrModuleMap[ module_type ] = {
@@ -11518,7 +11520,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11518
  crud : false,
11519
  name : api.czr_sektions.getRegisteredModuleProperty( module_type, 'name' ),
11520
  has_mod_opt : false,
11521
- ready_on_section_expanded : true,
 
11522
  defaultItemModel : _.extend(
11523
  { id : '', title : '' },
11524
  api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( module_type )
@@ -11630,7 +11633,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11630
  crud : false,
11631
  name : api.czr_sektions.getRegisteredModuleProperty( 'sek_my_sections_sec_picker_module', 'name' ),
11632
  has_mod_opt : false,
11633
- ready_on_section_expanded : true,
 
11634
  defaultItemModel : api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'sek_my_sections_sec_picker_module' )
11635
  },
11636
  });
393
  // $topPanelTitleElInner.html( logoHtml );
394
  // }
395
 
396
+ if ( sektionsLocalizedData.eligibleForFeedbackNotification ) {
397
  _mainPanel_.expanded.bind( function( expanded ) {
398
  if ( expanded && _.isUndefined( self.feedbackUIVisible ) ) {
399
  // FEEDBACK UI
2080
  if ( _.isEmpty( scope ) || !_.contains(['local', 'global'], scope ) ) {
2081
  throw new Error( 'resetCollectionSetting => invalid scope provided.', scope );
2082
  }
2083
+ return $.extend( true, {}, self.getDefaultSektionSettingValue( scope ) );
 
 
 
 
 
 
 
 
 
 
 
2084
  }
2085
  });//$.extend()
2086
  })( wp.customize, jQuery );//global sektionsLocalizedData
3465
  module_type : 'sek_intro_sec_picker_module',
3466
  controlLabel : sektionsLocalizedData.i18n['Sections for an introduction'],
3467
  content_type : 'section',
3468
+ expandAndFocusOnInit : false,
3469
  priority : 10,
3470
  icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3471
  },
5978
 
5979
 
5980
 
5981
+ // Walk the column collection of a preset section, and replace '__img_url__*' pattern by image ids that we get from ajax calls
5982
  // Is designed to handle multiple ajax calls in parallel if the preset_section includes several images
5983
  // @return a promise()
5984
  preparePresetSectionForInjection : function( columnCollection ) {
5992
  _.each( data, function( val, key ) {
5993
  if ( _.isObject( val ) || _.isArray( val ) ) {
5994
  _sniffImg( val );
5995
+ } else if ( _.isString( val ) && -1 != val.indexOf( '__img_url__' ) ) {
5996
  // scenario when a section uses an image more than once.
5997
  // => we don't need to fire a new ajax request for an image already sniffed
5998
  if ( ! _.has( deferreds, val ) ) {
5999
+ deferreds[ val ] = self.importAttachment( val.replace( '__img_url__', '' ) );
6000
  }
6001
  }
6002
  });
6005
 
6006
  // walk the column collection and populates the deferreds object recursively
6007
  // imdList is formed this way :
6008
+ // __img_url__/assets/img/1.jpg : {id: 2547, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_1.jpg"}
6009
+ // __img_url__/assets/img/2.jpg : {id: 2548, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_2.jpg"}
6010
+ // __img_url__/assets/img/3.jpg : {id: 2549, url: "http://customizr-dev.test/wp-content/uploads/2018/09/nimble_asset_3.jpg"}
6011
  var _replaceImgPlaceholderById = function( data, imgList) {
6012
  _.each( data, function( val, key ) {
6013
  if ( _.isObject( val ) || _.isArray( val ) ) {
6014
  _replaceImgPlaceholderById( val, imgList );
6015
+ } else if ( _.isString( val ) && -1 != val.indexOf( '__img_url__' ) && _.has( imgList, val ) && _.isObject( imgList[ val ] ) ) {
6016
  data[ key ] = imgList[ val ].id;
6017
  }
6018
  });
6962
  return fn && typeof fn.then === 'function' && String( $.Deferred().then ) === String( fn.then );
6963
  },
6964
 
6965
+ // @param deferreds = { '__img_url__/assets/img/tests/1.jpg' : 'dfd1', '__img_url__/assets/img/tests/2.jpg' : dfd2, ..., '__img_url__/assets/img/tests/n.jpg' : dfdn }
6966
  whenAllPromisesInParallel : function ( deferreds ) {
6967
  var self = this,
6968
  mainDfd = $.Deferred(),
7019
  },
7020
 
7021
 
7022
+ // @param attachment_url = string : '/assets/img/41883.jpg'
7023
  // @return a promise
7024
+ importAttachment : function( attachment_url ) {
7025
  // @see php wp_ajax_sek_import_attachment
7026
  return wp.ajax.post( 'sek_import_attachment', {
7027
+ img_url : attachment_url,
7028
  nonce: api.settings.nonce.save//<= do we need to set a specific nonce to fetch the attachment
7029
  })
7030
  .fail( function( _er_ ) {
7031
+ api.errare( 'sek_import_attachment ajax action failed for image ' + attachment_url, _er_ );
7032
  });
7033
  // .done( function( data) {
7034
  // api.infoLog('relpath and DATA ' + relpath , data );
10229
  '<span>',
10230
  '<strong>',
10231
  sektionsLocalizedData.i18n['Reset failed'],
10232
+ '<br/>',
10233
+ '<i>' + response + '</i>',
10234
  '</strong>',
10235
  '</span>'
10236
  ].join('')
11492
  // If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
11493
  //4) some DOM behaviour. For example, a multi item shall be sortable.
11494
  api.czrModuleMap = api.czrModuleMap || {};
11495
+ // var section_modules = [
11496
+ // 'sek_intro_sec_picker_module',
11497
+ // 'sek_features_sec_picker_module',
11498
+ // 'sek_contact_sec_picker_module',
11499
+ // 'sek_column_layouts_sec_picker_module',
11500
+ // 'sek_header_sec_picker_module',
11501
+ // 'sek_footer_sec_picker_module'
11502
+ // ];
11503
+
11504
+ var section_modules = sektionsLocalizedData.presetSectionsModules;
11505
+ if ( ! _.isArray( section_modules ) || _.isEmpty( section_modules ) ) {
11506
+ api.errare( 'api.czrModuleMap => error when adding section modules');
11507
+ return;
11508
+ }
11509
+
11510
  // Header and footer have been introduced in v1.4.0 but not enabled by default
11511
  // The header and footer preset sections are on hold until "header and footer" feature is released.
11512
+ if ( !sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
11513
+ section_modules = _.filter( section_modules, function( mod ) {
11514
+ return !_.contains([ 'sek_header_sec_picker_module','sek_footer_sec_picker_module' ], mod );
11515
+ });
11516
  }
11517
  _.each( section_modules, function( module_type ) {
11518
  api.czrModuleMap[ module_type ] = {
11520
  crud : false,
11521
  name : api.czr_sektions.getRegisteredModuleProperty( module_type, 'name' ),
11522
  has_mod_opt : false,
11523
+ ready_on_section_expanded : false,
11524
+ ready_on_control_event : 'sek-accordion-expanded',// triggered in ::scheduleModuleAccordion()
11525
  defaultItemModel : _.extend(
11526
  { id : '', title : '' },
11527
  api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( module_type )
11633
  crud : false,
11634
  name : api.czr_sektions.getRegisteredModuleProperty( 'sek_my_sections_sec_picker_module', 'name' ),
11635
  has_mod_opt : false,
11636
+ ready_on_section_expanded : false,
11637
+ ready_on_control_event : 'sek-accordion-expanded',// triggered in ::scheduleModuleAccordion()
11638
  defaultItemModel : api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'sek_my_sections_sec_picker_module' )
11639
  },
11640
  });
assets/czr/sek/js/ccat-sek-control.min.js CHANGED
@@ -1 +1 @@
1
- var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})}),n.bind("sek-before-clean-registered",function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#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")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.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=r.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.activeLocations=new n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>","<strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3)},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.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?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForReviewNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,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>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,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>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(a(window).data("_scroll_move_timer_")),a(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};a(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){a(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){a("body").addClass("nimble-top-bar-visible")},200)}):(t=a.Deferred(),a("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){var t,i=this;if(0<a(i.topBarId).length)return a(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}a("#customize-preview").after(a(t)),a(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),a(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),a("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(a(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),a(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(a(this).data("doc-href"),"_blank")});var n=function(e){a(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?a(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):a(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),a(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.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")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],a=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(a,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,a=d.extend(!0,[],e.historyLog()),s=[];if(_.each(a,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)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(a,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(a,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":a.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}s.push(newLog)}),e.historyLog(s)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),z("body").on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:t.data("nimb-id")}),b.previewer.send("sek-display-level-ui",{id:t.data("nimb-id")})}),z("body").on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),a=this.localSectionsSettingId(),s=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,a,s],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(a)(),t=_.isObject(t)?t:{},n=z.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var l,d=_.union(i,n),u=!1,p=!1;o=b(s)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);var m,f,g=z.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};u?h("local"):p&&h("global");var k,y=this.activeLocations(),v=[];_.isEmpty(y)?v=g:_.each(y,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||v.push(k)}),this.levelTree(v)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the the nimble-level-tree template",e),!1}z("#customize-preview").after(z(e))}z("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,a=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var s='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(a=!_.contains(i.activeLocations(),e.id)),a||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),s="location"!==n?s:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",s].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new s.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 a=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return s.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,{},a.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=a.guid(),r=a.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void s.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:s.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){s.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){s.errorLog("ajax sek_save_section => error",e),s.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(),a.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(a(e.feedbackUIId).data("_feedback_user_action_timer_")),a(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){a("body").addClass("nimble-feedback-ui-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-feedback-ui-visible"),0<a(i.feedbackUIId).length?_.delay(function(){a(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<a(i.feedbackUIId).length)return a(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(a("#customize-preview").after(a(t)),!i.feedbackEventsScheduled){var n=a(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return a("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=a(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(a(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,a(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],a=function(e){c.errare(e,i),c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of 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("")}),r=!0},s=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void a("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):s(e)})}};return s(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);var t="global"===e?this.getGlobalSectionsSettingId():this.localSectionsSettingId();if(_.isEmpty(t))throw new Error("resetCollectionSetting => the collectionSettingId is invalid");var i,n=l.extend(!0,{},this.getDefaultSektionSettingValue(e)),o=c(t)();return(i=_.isObject(o)?l.extend(!0,{},o):n).collection=l.extend(!0,[],n.collection),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},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",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},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 s=!0,a={},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",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},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",is_global_location:o.isGlobalLocation(e.apiParams)}),"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(s=!0,a={},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-move-section-up":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-move-section-down":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},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,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(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",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),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 s=!1,a={},(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,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(a={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(a))},"sek-edit-module":function(e){return s=!0,r={},a={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(a)},"sek-notify":function(t){s=!1;var i=t.notif_id||"sek-notify";return n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return s=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return s=!0,t=t||{},n.Deferred(function(e){r={id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return s=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})}};_.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){e=e||{},s?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),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 Nimble Builder, you can try resetting the sections of 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(y,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){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.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){y.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){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.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 a=n.settingParams.args.moduleRegistrationParams.control,s=n.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?y.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))y.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,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup: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(e){!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}});var t=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&t(),g()){var i=n.settingParams.args.input_value;if(!_.isString(i))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");r.htmlIncludesShortcodesOrTmplTags(i)?t():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,html:i,id:n.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()});if(_.isEmpty(n.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(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,y(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var k=n.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},a=null,s=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,o))&&y.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o),i=e,n=a,(_.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)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e))}),_.each(r,function(e,t){switch(s.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"detached_tinymce_editor":case"nimble_tinymce_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=y.control.has(t):(i=!0,1<e.length&&y.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var a=t[r].replace(/^\[+/g,"");-1===n.indexOf(a)&&n.push(a)}if(i)for(var s=0;s<i.length;s++){var c=i[s].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};s.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:o.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+r.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+r.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+r.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+r.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.isNimbleHeaderFooterEnabled&&s.extend(t,{sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&s.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.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],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?a.control(n,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))}})}):(_do_register_=function(){_.each(t,function(n,e){a.has(n.settingControlId)||(a(n.settingControlId,function(e){e.bind(function(e,t){a.errare("generateUIforDraggableContent => the setting() should not changed")})}),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){a.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.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")})})})},a.section(r.SECTION_ID_FOR_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>'),r.scheduleModuleAccordion.call(e,{expand_first_control:!0}),r._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var a=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=a.getLevelProperty({property:"value",id:r.id}),t=a.getLevelProperty({property:"module_type",id:r.id}),n=a.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===a.getRegisteredModuleProperty(t,"is_father")){var s=a.getRegisteredModuleProperty(t,"children");if(_.isEmpty(s))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(s,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:a.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return a.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))}}):(a.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:10,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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(r.id,function(){d.section(r.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){}),d.section(r.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>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(a,e){var s=this,c=s.getLevelProperty({property:"options",id:a.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:a.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[a.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:a.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:a.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:a.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:a.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:a.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===a.level&&(d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:a.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"===a.level&&d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.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)?l.control(n).focus({completeCallback:function(){var e=l.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(n,o){if(s.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=s.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,level_id:a.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.id,priority:0,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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")})}})},l.section.has(a.id)||l.section(a.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:a.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+a.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(a.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 s=this,i=s.getLocalSkopeOptionId();if(s.isUIControlAlreadyRegistered(i))return e;if(s.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===a.clean_settings&&s.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":s.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"widths":s.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":s.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(s.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(s.localOptionsRegistrationParams,function(n,o){var e=s.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,s.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var s=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(s.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=s.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ae,se){se.extend(CZRSeksPrototype,{updateAPISetting:function(ie){var ne=this,oe=se.Deferred();(ie=ie||{}).is_global_location="global"===ie.scope||ne.isGlobalLocation(ie);var re=ie.is_global_location?ne.getGlobalSectionsSettingId():ne.localSectionsSettingId();return ae(re,function(e){!function(){var n,t,o,i,r,a,e,s,c,l=ae(re)(),d=_.isObject(l)?se.extend(!0,{},l):ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local").collection,ie.action){case"sek-add-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");if(!0===ie.is_nested){if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(R=t),ie.after_section===e.id&&(R=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(R,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");var p;try{p=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var m=ne.getLevelPositionInCollection(ie.id,d.collection);if(!0===ie.is_nested){if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}e=p.id;break;case"sek-remove-section":if(!0===ie.is_nested)"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=ie.id})}break;case"sek-move-section":var f,g,h=ne.getLevelModel(ie.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+ie.action+" => missing target location");if(ie.from_location!=ie.to_location){var k=ne.getLevelModel(ie.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+ie.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=ne.getLevelModel(ie.id,k.collection),g=se.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=ie.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=se.extend(!0,[],h.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_location!=ie.to_location&&e==g.id)a.push(g);else{if(t=ne.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+ie.action+" => missing section candidate");a.push(t)}}),h.collection=a;break;case"sek-move-section-up-down":if(parentCandidate=ne.getLevelModel(ie.is_nested?ie.in_column:ie.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+ie.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],r=se.extend(!0,[],parentCandidate.collection),a=se.extend(!0,[],parentCandidate.collection);var y=_.findIndex(r,function(e){return e.id===ie.id});if(-1===y)throw new Error("updateAPISetting => "+ie.action+" => invalid index");var v=ie.direction||"up";if("up"!==v&&r.length===y+1)throw new Error("updateAPISetting => "+ie.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+ie.action+" => top reached");a[y]=r["up"===v?y-1:y+1],a["up"===v?y-1:y+1]=r[y],parentCandidate.collection=a;break;case"sek-add-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.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:ie.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=ne.getLevelModel(ie.in_sektion,d.collection))){if(1===_.size(t.collection)){oe.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!=ie.id}),_.each(t.collection,function(e){e.width=""})}else ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var z=ne.getLevelPositionInCollection(ie.id,d.collection);e=b.id,t.collection.splice(parseInt(z+1,10),0,b),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if(ie.col_number<2)break;var I=ne.getLevelModel(ie.resized_column,d.collection),w=ne.getLevelModel(ie.sister_column,d.collection);if("no_match"==I){ae.errare("updateAPISetting => "+ie.action+" => no resized column matched"),oe.reject("updateAPISetting => "+ie.action+" => no resized column matched");break}I.width=parseFloat(ie.resizedColumnWidthInPercent);var M=ne.getLevelModel(ie.in_sektion,d.collection),D=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),S=parseFloat(I.width.toFixed(3));_.isEmpty(D)||_.each(D,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/ie.col_number).toFixed(3))),S=parseFloat((S+e.width).toFixed(3))}),w.width=parseFloat((100-S).toFixed(3));break;case"sek-move-column":var C,P,x=ne.getLevelModel(ie.to_sektion,d.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+ie.action+" => missing target sektion");if(ie.from_sektion!=ie.to_sektion){var E=ne.getLevelModel(ie.from_sektion,d.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+ie.action+" => missing source column");E.collection=_.isArray(E.collection)?E.collection:[],C=ne.getLevelModel(ie.id,E.collection),P=se.extend(!0,{},C),E.collection=_.filter(E.collection,function(e){return e.id!=ie.id}),_.each(E.collection,function(e){e.width=""})}x.collection=_.isArray(x.collection)?x.collection:[],r=se.extend(!0,[],x.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_sektion!=ie.to_sektion&&e==P.id)a.push(P);else{if(o=ne.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(o)}}),x.collection=a,_.each(x.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.module_type))throw new Error("updateAPISetting => "+ie.action+" => missing module_type");if("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var R=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_module===e.id&&(R=t),ie.after_module===e.id&&(R=t+1)});var L={id:ie.id,level:"module",module_type:ie.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(s=ne.getModuleStartingValue(ie.module_type))&&(L.value=s),o.collection.splice(R,0,L);break;case"sek-duplicate-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var O;o.collection=_.isArray(o.collection)?o.collection:[];try{O=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e),oe.reject("updateAPISetting => "+ie.action+" => error when cloning the level");break}var A=ne.getLevelPositionInCollection(ie.id,d.collection);e=O.id,o.collection.splice(parseInt(A+1,10),0,O);break;case"sek-remove-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");break;case"sek-move-module":var j,T,V;if(j=ne.getLevelModel(ie.to_column,d.collection),_.isEmpty(j)||"no_match"==j)throw new Error("updateAPISetting => "+ie.action+" => missing target column");if(ie.from_column!=ie.to_column){var Z;if(Z=ne.getLevelModel(ie.from_column,d.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+ie.action+" => missing source column");Z.collection=_.isArray(Z.collection)?Z.collection:[],T=ne.getLevelModel(ie.id,d.collection),V=se.extend(!0,{},T),Z.collection=_.filter(Z.collection,function(e){return e.id!=ie.id})}if(j.collection=_.isArray(j.collection)?j.collection:[],r=se.extend(!0,[],j.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_column!=ie.to_column&&e==V.id)a.push(V);else{if(i=ne.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+ie.action+" => missing moduleCandidate");a.push(i)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+ie.action+" => there are duplicated modules in column : "+j.id);j.collection=a;break;case"sek-set-module-value":i=ne.getLevelModel(ie.id,d.collection);var F={};if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),"no_match"==i){ae.errare("updateAPISetting => "+ie.action+" => no module matched",ie),oe.reject("updateAPISetting => "+ie.action+" => error no module matched");break}if(_.isEmpty(ie.options_type)){ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),oe.reject("updateAPISetting => "+ie.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===ie.options_type?i.value=F:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[ie.options_type]=F);break;case"sek-generate-level-options-ui":var U=ne.getLevelModel(ie.id,d.collection),N={};if("no_match"===U){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}U.options=U.options||{},_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)&&ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),U.options[ie.options_type]=N;break;case"sek-generate-local-skope-options-ui":N={};var B=se.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)||!_.isString(ie.options_type))ae.errare("updateAPISetting => "+ie.action+" => missing options_type");else{var Q={};Q[ie.options_type]=N,d.local_options=se.extend(B,Q)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(R=0,"no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(R=t),ie.after_section===e.id&&(R=t+1)}),ie.content_type){case"module":s=ne.getModuleStartingValue(ie.content_id),n.collection.splice(R,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[{id:ie.droppedModuleId,level:"module",module_type:ie.content_id,value:"no_starting_value"!==s?s:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":u=se.Deferred();var H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty(ie.sektion_to_replace)){var i=ne.getLevelModel(ie.sektion_to_replace,d.collection);"no_match"===i&&(ae.errare("updateAPISetting => "+ie.action+" => no sektionToReplace matched"),oe.reject("updateAPISetting => "+ie.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))&&(ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_section===e.id&&(R=t),ie.after_section===e.id&&(R=t+1)}),o.collection.splice(R,0,{id:ie.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(R,0,{id:ie.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})};ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(e){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",e),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],u=se.Deferred(),H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){o.collection.push({id:ie.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})},ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",_er_),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)});break;case"sek-update-fonts":var G=ne.sniffGFonts({is_global_location:ie&&!0===ie.is_global_location});if(!_.isEmpty(ie.font_family)&&_.isString(ie.font_family)&&!_.contains(G,ie.font_family)){if(ie.font_family.indexOf("gfont")<0){ae.errare("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont"),oe.reject("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont");break}G.push(ie.font_family)}d.fonts=G;break;case"sek-restore-revision":d=ie.revision_value;break;case"sek-import-from-file":if(ae.infoLog("sek-import-from-file",ie),_.isUndefined(ie.imported_content.data)||_.isUndefined(ie.imported_content.metas)){ae.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var W=_.isArray(ie.imported_content.data.collection)?se.extend(!0,[],ie.imported_content.data.collection):[];if(!0===ie.assign_missing_locations){var $=ie.imported_content.metas.active_locations,q=ae.czr_sektions.activeLocations(),Y=_.first(q);if(!_.isEmpty(Y)&&!_.isEmpty($)&&_.isArray($)){var J=se($).not(q).get(),K=ne.getLevelModel(Y,d.collection),X=ne.getLevelModel(Y,ie.imported_content.data.collection),ee=[];K.collection=_.isArray(K.collection)?K.collection:[],X.collection=_.isArray(X.collection)?X.collection:[],_.each($,function(e){var t=ne.getLevelModel(e,W);_.isEmpty(t.collection)||(ee=_.union(ee,t.collection))}),X.collection=ee,ie.imported_content.data.collection=_.filter(ie.imported_content.data.collection,function(e){return!_.contains(J,e.id)})}}!0===ie.keep_existing_sections&&(_.each(W,function(e){var t=ne.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=ne.getLevelModel(e.id,ie.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(ie.imported_content.data.fonts=_.isArray(ie.imported_content.data.fonts)?ie.imported_content.data.fonts:[],ie.imported_content.data.fonts=_.uniq(_.union(d.fonts,ie.imported_content.data.fonts)))),d=ie.imported_content.data;break;case"sek-reset-collection":try{d=ae.czr_sektions.resetCollectionSetting(ie.scope)}catch(e){ae.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==oe.state()){var te=function(){_.isEqual(l,d)?oe.reject("updateAPISetting => the new setting value is unchanged when firing action : "+ie.action):null!==ne.validateSettingValue(d,ie.is_global_location?"global":"local")?(ae(re)(d,ie),ie.cloneId=e,oe.resolve(ie)):oe.reject("Validation problem for action "+ie.action)};"_not_injection_scenario_"===u?(te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ae.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}()}),oe.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=se.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ae.sek_userSavedSections)||_.isEmpty(ae.sek_userSavedSections[t.preset_section_id])?(ae.sek_userSavedSections=ae.sek_userSavedSections||{},_.isUndefined(ae.sek_fetchingUserSavedSections)||"pending"!=ae.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ae.settings.nonce.save,preset_section_id:t.preset_section_id}),ae.sek_fetchingUserSavedSections=e):e=ae.sek_fetchingUserSavedSections,e.done(function(e){ae.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ae.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_userSavedSections):_.isEmpty(ae.sek_presetSections)?(_.isUndefined(ae.sek_fetchingPresetSections)||"pending"!=ae.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ae.settings.nonce.save}),ae.sek_fetchingPresetSections=e):e=ae.sek_fetchingPresetSections,e.done(function(e){ae.sek_presetSections=e,i.resolve(ae.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var a=this,s=se.Deferred();return a._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){s.reject(e)}).done(function(e){var t=se.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+a.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),s.resolve(i)}),s.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=se.Deferred(),a=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?a(e):_.isString(e)&&-1!=e.indexOf("::img-path::")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("::img-path::",""))))}),n},s=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?s(e,n):_.isString(e)&&-1!=e.indexOf("::img-path::")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(a(o)).done(function(e){var t=s(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()||[]);n.trigger("sek-before-clean-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)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.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(l,d){d.extend(CZRSeksPrototype,{rootPanelFocus:function(){l.section.has(l.czr_activeSectionId())?l.section(l.czr_activeSectionId()).expanded(!1):l.section.each(function(e){e.expanded(!1)}),l.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()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getLevelModel:function(i,n){var a=this,s="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=l(i)(),r=_.isObject(o)?d.extend(!0,{},o):d.extend(!0,{},a.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==s&&(t===e.id?s=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),s};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,n,e,t)}):c(i,n),s},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,a=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=l(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?d.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=a(t,e.collection)))}),i};return"no_match"!==a(e)},getLevelPositionInCollection:function(i,n){var a=this,s="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=l(n)(),r=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},a.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==s&&(i===e.id?s=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,e,t,n)}):c(i,n),s},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))l.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];l.errare("getLevelProperty => invalid model for id : "+e.id,t)}else l.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=d.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}l.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(e){var o=this,r=[],a=function(i,n,e){if(_.isUndefined(e)){var t=l(i)();e=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&a(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?a(o.getGlobalSectionsSettingId(),"global"):a(o.localSectionsSettingId(),"local"),r},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))l.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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))l.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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))l.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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}l.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return l.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return l.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=d(e),i=d(":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=d(e),i=d(":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(e){var n=this,t=(n.input_parent,n.module,l.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?d.extend(i,{selected:"selected"}):"px"===t&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),d("select[data-czrtype]",n.container).on("change",function(){0===d(this).find("option:selected").length&&n([])});break;default:l.errare("::setupSelectInput => invalid input type => "+n.type)}else l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=d(".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)||(l.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new l.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(d(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),d(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",d(this).data("sek-unit")),t.css_unit(d(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 l.Value(l.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),d(this).addClass("active");var t="desktop";try{t=d(this).data("sek-device")}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{l.previewedDevice(t)}catch(e){l.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="'+l.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(d(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=d(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){d(this).attr("data-sek-accordion")||(d(this).attr("data-sek-expanded","false"),d(this).find(".czr-items-wrapper").stop(!0,!0).slideUp(0))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:0,start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}}))}),e.expand_first_control){var t=_.first(i.controls());_.isObject(t)&&!_.isEmpty(t.id)&&l.control(t.id,function(e){e.container.trigger("sek-accordion-expanded"),i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(d.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=d.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(d.Deferred(function(t){(i.isPromise(e)?e:d.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),d.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||d.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:d.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:l.settings.nonce.save}).fail(function(e){l.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},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||l.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.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(){s.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),s.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){s.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 n=this,o=function(){s.notifications.add(new s.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){s.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.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(){s.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),s.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),s.previewer.send("sek-drag-stop")}).call(m(this),e)}).dblclick(function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),s.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(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({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),s.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(u){var p=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),a=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),s=(o.right,o.left,r<50),c=a<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=a,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(s||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){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:s.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(s.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),a=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),s="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||a)&&s?(c(r?sektionsLocalizedData.i18n["The header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["The footer location only accepts modules and pre-built footer sections"]),!1):a&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o)},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){s.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"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(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"),e.find(".sek-no-drop-possible-message").remove())},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");m.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,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();s.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"),a=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(a))throw new Error("No valid level id found");s.previewer.trigger("sek-add-module",{level:r,id:a,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":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":s.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:s.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){s.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.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?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),a=d("#wp-czr-customize-content_editor-tools"),s=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=a.outerHeight()+s.outerHeight()+c.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),r.css("height",o.height-o.components))}})}(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 a=o();o.initial_unit="px",u.isEmpty(a)||(o.initial_unit=u.isEmpty(a.unit)?"px":a.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,a=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),s=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,{},s);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",a).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)),a.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,a,s),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,a);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,s,c){n.czrInputMap=n.czrInputMap||{},s.extend(n.czrInputMap,{bg_position:function(e){var t=this;s(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(s(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 a=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?a(e,i[n+1]):{}},i=function(e){var t=s.extend(!0,{},c.isObject(o())?o():{}),i=s.extend(!0,{},r);t=c.isObject(t)?s.extend(i,t):i;var n=a(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};s(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=s(this).val();(t=s.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",a=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=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?s(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=s(t,e);a.find(".selected").removeClass("selected"),a.find('div[data-sek-align="'+n+'"]').addClass("selected")};a.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"),a.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 s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?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,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",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(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(i),c(".czrSelect2-selection__rendered",s.container).css(r(s()))},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=a(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"}},a=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:s.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.czrSelect2&&void 0!==c.fn.czrSelect2.amd&&"function"==typeof c.fn.czrSelect2.amd.require?c.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/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(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){s.isEmpty(n.sek_faIconCollection)?r.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)})).done(function(e){!function(e){s.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(a.extend(t,{selected:"selected"}),o=!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=o?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&s.delay(function(){try{a("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),s.delay(function(){e({open_on_init:!1})},1e3)}})}(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"),a=r.data("editor-params");wp.codeEditor&&(p.isUndefined(a)||!1!==a)&&(t=a),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{s(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 s=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(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var a=this,t=u(".sek-range-with-unit-picker-wrapper",a.container),s=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?l(e,i[n+1]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=a(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.isString(n)?"16":n.replace(/px|em|%/g,""));s.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(a),r.on("input",function(e){s.val(u(this).val()).trigger("input")}),s.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(a())?a():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&a(i),r.val(u(this).val())}),a.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}),r.val(s.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.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"),a=function(e){return l.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(l.isEmpty(r)?"px":a(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()+a(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(s,_,m){s.czrInputMap=s.czrInputMap||{},_.extend(s.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"]'),a=function(e){return m.contains(["px","em","%"],e)||(s.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=s.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),a=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),s=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+a+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+a+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(s).trigger("input",{previewed_device_switched:!0})};s.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new s.Value(m.isEmpty(i())?"px":a(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=s.previewedDevice()||"desktop",o=_(this).val()+a(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){s.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=s.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(s.previewedDevice()))}),r.val(d.val()||0);try{n(s.previewedDevice())}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var s=this,c=h(".sek-borders",s.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)||(g.errare("borders => error : invalid unit for input "+s.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=g.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;s.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=s(),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=s(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},a=function(e){if(!k.contains(k.union(s.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=s(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,a=function(e,t){var i,n=h.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=h.extend(n,i),e);if(k.isEmpty(a)||!k.isObject(a)||k.isEmpty(a.wght)||k.isEmpty(a.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(a.wght),r=_(a.wght),h(".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(a.col).trigger("change"),u.data("border_type_switched",!1)};s.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),s.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),s.borderType=new g.Value("_all_"),l.val((i=s(),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)&&(g.errare("Error in borders input type for module : "+s.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(s.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),s.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),s.borderColor("")}}),s.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),s.borderType.bind(function(e){try{a(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.borderType()||"_all_",o=s.borderColor(),r=h(this).val()+p(s.css_unit()),a=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(s())?s():a))[n]=h.extend(!0,{},i[n]||a[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(s.cssBorderTypes,function(e){i=k.omit(i,e)}),s(i)),d.val(h(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),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),s.css_unit(h(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),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}s.borderType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.borderType()||"_all_",i=h.extend(!0,{},k.isObject(s())?s():{});k.isEmpty(i[t])||(i=k.omit(i,t),s(i),a(t))}),d.val(l.val()||0);try{a(s.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}h('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var s=this,c=f(".sek-borders",s.container),l=c.find('input[type="number"]'),a=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+s.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;s.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=s(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!g.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=s(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,a=function(e,t){var i,n=f.extend(!0,{},_);if(!g.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=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(a)||!g.isString(a))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(a),r=u(a),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})};s.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),s.radiusType=new m.Value("_all_"),l.val((i=s(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+s.module.module_type+" the initial radius is invalid : "+n),n=0),n)),s.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}}),a.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.radiusType()||"_all_",o=f(this).val()+d(s.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(s())?s():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(s.cssRadiusTypes,function(e){i=g.omit(i,e)}),s(i)),a.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")),s.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)}s.radiusType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(s())?s():{});g.isEmpty(i[t])||(i=g.omit(i,t),s(i),r(t))}),a.val(l.val()||0);try{r(s.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}f('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=a(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);s.isEmpty(i)||s.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),a(this).addClass("is-selected").attr("aria-pressed",!0);try{i=a(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),a('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,a){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){a.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!a.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(a.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];a.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),a.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&a.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),a.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(m.isNull(i))throw new Error("setupTinyMceEditor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("setupTinyMceEditor => duplicate editor id.");var r,a,s=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),a=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(a=m.union(r.tinymce.content_css.split(","),a)),a.join(",")),min_height:40,height:n.editor_params&&m.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=s(),s()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,a=nimbleTinyMCEPreInit.mceInit[e];a.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var s=t.input_parent,c=function(){var e=s();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};a.wpautop=c(),c()||(a.forced_root_block=""),a.toolbar1=sektionsLocalizedData.defaultToolbarBtns,a.toolbar2="",window.tinymce.init(a),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=_.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s="local"===n.scope?_.czr_sektions.localSectionsSettingId():_.czr_sektions.getGlobalSectionsSettingId();i.on("change",function(e){r.toggleClass("disabled",f.isEmpty(m(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),m(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),f.isEmpty(t)||f.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=_(s)(),o=!0;if(f.each(n.collection,function(e){o&&(f.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}p();break;case"sek-pre-import":if(f.isEmpty(_.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}c({pre_import_check:!0}).done(a).fail(function(e){_.errare("sek_pre_import_checks failed",e),u(),c()});break;case"sek-import-as-is":c();break;case"sek-import-assign":c({assign_missing_locations:!0});break;case"sek-cancel-import":u()}});var a=function(e){var t=_.czr_sektions.activeLocations(),i=m.extend(!0,[],f.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=f.filter(i,function(e){return!f.contains(["nimble_local_header","nimble_local_footer"],e)}),f.isArray(i)&&f.isArray(t)){var n=m(i).not(t).get();f.isEmpty(n)?c():(r.hide(),o.container.find(".czr-import-dialog").slideToggle(),_.infoLog("sek-pre-import => imported locations missing in current page.",n))}else _.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),u()},c=function(t){if(t=t||{},i.length<1||f.isUndefined(i[0])||!i[0].files||f.isEmpty(i.val()))_.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{_.notifications.remove("missing-import-file"),_.notifications.remove("import-success"),_.notifications.remove("import-failed"),_.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",_.settings.nonce.save),f.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=m.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return m.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),l(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),_.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(f.isObject(i)||f.isArray(i))&&f.each(i,function(e,t){(f.isObject(e)||f.isArray(e))&&(i[t]=n(e)),"id"!==t||!f.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+_.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),d(e,t)}).fail(function(e){_.errare("sek-import input => ajax error",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(u)}else _.errare("sek-import input => invalid scope provided",n.scope)}},l=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),f.isNull(n)&&!f.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,a=i.img_errors;return f.isNull(n)&&!f.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&!f.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&f.isEqual(_(s)(),o)&&(_.infoLog("sek-import input => Setting unchanged"),t=!1),f.isNull(n)||(_.errare("sek-import input => invalid data sent from server",i),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),f.isEmpty(a)||_.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),t},d=function(e,t){t=t||{},l(e)?(_.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:"global"===n.scope,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&_.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),_.previewer.refresh(),_.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){_.errare("sek-import input => error when firing ::updateAPISetting",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),_.previewer.refresh()):u()},u=function(){_.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()},p=function(){var i=[],e={sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()};f.each(e,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:_.settings.nonce.save,sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()}).done(function(){m(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),m(window).on("beforeunload")}).fail(function(e){_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})}}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{simpleselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(s.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:s.settings.nonce.save}).done(function(e){l.isArray(e)||s.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),s.czr_sektions.post_categories=t,i.resolve(s.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(s.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){s.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},a={};l.each(r(),function(e){a[e]=(e+"").replace(/-/g," ")}),i(a),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,a,e){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=a(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),a(this).addClass("selected").attr("aria-pressed",!0);try{i=a(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),a('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(o,r,a){o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.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),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),t(o.czr_sektions.currentContentPickerType()),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(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||{};var n=["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_contact_sec_picker_module","sek_column_layouts_sec_picker_module"];sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n=i.union(n,["sek_header_sec_picker_module","sek_footer_sec_picker_module"])),i.each(n,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,a){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="";a.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>",a.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"bg-image":a.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!a.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!a.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":a.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":a.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),i.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.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(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.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.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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.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(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"enable":a.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":a.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.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;"detached_tinymce_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)}}};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:!1,ready_on_control_event:"sek-accordion-expanded",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.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;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.czr_sektions.scheduleVisibilityOfInputId.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(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.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.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;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{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.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:!1,ready_on_control_event:"sek-accordion-expanded",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.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(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;n.module;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{o.czr_sektions.scheduleVisibilityOfInputId.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":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){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.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":a.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":a.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(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(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){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;n.module;n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":r.each(["bg_color_hover"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":r.each(["push_effect"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_);
1
+ var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})}),n.bind("sek-before-clean-registered",function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#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")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.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=r.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.activeLocations=new n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>","<strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3)},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.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?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForFeedbackNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,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>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,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>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(a(window).data("_scroll_move_timer_")),a(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};a(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){a(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){a("body").addClass("nimble-top-bar-visible")},200)}):(t=a.Deferred(),a("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){var t,i=this;if(0<a(i.topBarId).length)return a(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}a("#customize-preview").after(a(t)),a(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),a(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),a("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(a(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),a(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(a(this).data("doc-href"),"_blank")});var n=function(e){a(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?a(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):a(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),a(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.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")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],a=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(a,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,a=d.extend(!0,[],e.historyLog()),s=[];if(_.each(a,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)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(a,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(a,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":a.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}s.push(newLog)}),e.historyLog(s)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),z("body").on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:t.data("nimb-id")}),b.previewer.send("sek-display-level-ui",{id:t.data("nimb-id")})}),z("body").on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),a=this.localSectionsSettingId(),s=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,a,s],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(a)(),t=_.isObject(t)?t:{},n=z.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var l,d=_.union(i,n),u=!1,p=!1;o=b(s)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);var m,f,g=z.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};u?h("local"):p&&h("global");var k,y=this.activeLocations(),v=[];_.isEmpty(y)?v=g:_.each(y,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||v.push(k)}),this.levelTree(v)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the the nimble-level-tree template",e),!1}z("#customize-preview").after(z(e))}z("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,a=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var s='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(a=!_.contains(i.activeLocations(),e.id)),a||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),s="location"!==n?s:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",s].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new s.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 a=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return s.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,{},a.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=a.guid(),r=a.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void s.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:s.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){s.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){s.errorLog("ajax sek_save_section => error",e),s.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(),a.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(a(e.feedbackUIId).data("_feedback_user_action_timer_")),a(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){a("body").addClass("nimble-feedback-ui-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-feedback-ui-visible"),0<a(i.feedbackUIId).length?_.delay(function(){a(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<a(i.feedbackUIId).length)return a(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(a("#customize-preview").after(a(t)),!i.feedbackEventsScheduled){var n=a(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return a("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=a(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(a(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,a(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],a=function(e){c.errare(e,i),c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of 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("")}),r=!0},s=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void a("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):s(e)})}};return s(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},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",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},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 s=!0,a={},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",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},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",is_global_location:o.isGlobalLocation(e.apiParams)}),"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(s=!0,a={},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-move-section-up":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-move-section-down":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},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,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(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",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),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 s=!1,a={},(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,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(a={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(a))},"sek-edit-module":function(e){return s=!0,r={},a={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(a)},"sek-notify":function(t){s=!1;var i=t.notif_id||"sek-notify";return n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return s=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return s=!0,t=t||{},n.Deferred(function(e){r={id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return s=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})}};_.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){e=e||{},s?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),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 Nimble Builder, you can try resetting the sections of 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(y,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){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.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){y.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){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.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 a=n.settingParams.args.moduleRegistrationParams.control,s=n.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?y.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))y.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,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup: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(e){!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}});var t=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&t(),g()){var i=n.settingParams.args.input_value;if(!_.isString(i))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");r.htmlIncludesShortcodesOrTmplTags(i)?t():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,html:i,id:n.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()});if(_.isEmpty(n.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(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,y(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var k=n.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},a=null,s=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,o))&&y.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o),i=e,n=a,(_.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)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e))}),_.each(r,function(e,t){switch(s.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"detached_tinymce_editor":case"nimble_tinymce_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=y.control.has(t):(i=!0,1<e.length&&y.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var a=t[r].replace(/^\[+/g,"");-1===n.indexOf(a)&&n.push(a)}if(i)for(var s=0;s<i.length;s++){var c=i[s].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};s.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:o.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+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.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+r.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+r.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.isNimbleHeaderFooterEnabled&&s.extend(t,{sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&s.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.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],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?a.control(n,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))}})}):(_do_register_=function(){_.each(t,function(n,e){a.has(n.settingControlId)||(a(n.settingControlId,function(e){e.bind(function(e,t){a.errare("generateUIforDraggableContent => the setting() should not changed")})}),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){a.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.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")})})})},a.section(r.SECTION_ID_FOR_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>'),r.scheduleModuleAccordion.call(e,{expand_first_control:!0}),r._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var a=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=a.getLevelProperty({property:"value",id:r.id}),t=a.getLevelProperty({property:"module_type",id:r.id}),n=a.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===a.getRegisteredModuleProperty(t,"is_father")){var s=a.getRegisteredModuleProperty(t,"children");if(_.isEmpty(s))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(s,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:a.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return a.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))}}):(a.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:10,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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(r.id,function(){d.section(r.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){}),d.section(r.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>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(a,e){var s=this,c=s.getLevelProperty({property:"options",id:a.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:a.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[a.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:a.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:a.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:a.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:a.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:a.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===a.level&&(d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:a.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"===a.level&&d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.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)?l.control(n).focus({completeCallback:function(){var e=l.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(n,o){if(s.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=s.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,level_id:a.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.id,priority:0,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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")})}})},l.section.has(a.id)||l.section(a.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:a.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+a.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(a.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 s=this,i=s.getLocalSkopeOptionId();if(s.isUIControlAlreadyRegistered(i))return e;if(s.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===a.clean_settings&&s.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":s.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"widths":s.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":s.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(s.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(s.localOptionsRegistrationParams,function(n,o){var e=s.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,s.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var s=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(s.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=s.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.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===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ae,se){se.extend(CZRSeksPrototype,{updateAPISetting:function(ie){var ne=this,oe=se.Deferred();(ie=ie||{}).is_global_location="global"===ie.scope||ne.isGlobalLocation(ie);var re=ie.is_global_location?ne.getGlobalSectionsSettingId():ne.localSectionsSettingId();return ae(re,function(e){!function(){var n,t,o,i,r,a,e,s,c,l=ae(re)(),d=_.isObject(l)?se.extend(!0,{},l):ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local").collection,ie.action){case"sek-add-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");if(!0===ie.is_nested){if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(L,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");var p;try{p=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var m=ne.getLevelPositionInCollection(ie.id,d.collection);if(!0===ie.is_nested){if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}e=p.id;break;case"sek-remove-section":if(!0===ie.is_nested)"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=ie.id})}break;case"sek-move-section":var f,g,h=ne.getLevelModel(ie.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+ie.action+" => missing target location");if(ie.from_location!=ie.to_location){var k=ne.getLevelModel(ie.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+ie.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=ne.getLevelModel(ie.id,k.collection),g=se.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=ie.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=se.extend(!0,[],h.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_location!=ie.to_location&&e==g.id)a.push(g);else{if(t=ne.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+ie.action+" => missing section candidate");a.push(t)}}),h.collection=a;break;case"sek-move-section-up-down":if(parentCandidate=ne.getLevelModel(ie.is_nested?ie.in_column:ie.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+ie.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],r=se.extend(!0,[],parentCandidate.collection),a=se.extend(!0,[],parentCandidate.collection);var y=_.findIndex(r,function(e){return e.id===ie.id});if(-1===y)throw new Error("updateAPISetting => "+ie.action+" => invalid index");var v=ie.direction||"up";if("up"!==v&&r.length===y+1)throw new Error("updateAPISetting => "+ie.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+ie.action+" => top reached");a[y]=r["up"===v?y-1:y+1],a["up"===v?y-1:y+1]=r[y],parentCandidate.collection=a;break;case"sek-add-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.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:ie.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=ne.getLevelModel(ie.in_sektion,d.collection))){if(1===_.size(t.collection)){oe.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!=ie.id}),_.each(t.collection,function(e){e.width=""})}else ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var z=ne.getLevelPositionInCollection(ie.id,d.collection);e=b.id,t.collection.splice(parseInt(z+1,10),0,b),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if(ie.col_number<2)break;var I=ne.getLevelModel(ie.resized_column,d.collection),w=ne.getLevelModel(ie.sister_column,d.collection);if("no_match"==I){ae.errare("updateAPISetting => "+ie.action+" => no resized column matched"),oe.reject("updateAPISetting => "+ie.action+" => no resized column matched");break}I.width=parseFloat(ie.resizedColumnWidthInPercent);var M=ne.getLevelModel(ie.in_sektion,d.collection),D=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),S=parseFloat(I.width.toFixed(3));_.isEmpty(D)||_.each(D,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/ie.col_number).toFixed(3))),S=parseFloat((S+e.width).toFixed(3))}),w.width=parseFloat((100-S).toFixed(3));break;case"sek-move-column":var C,P,x=ne.getLevelModel(ie.to_sektion,d.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+ie.action+" => missing target sektion");if(ie.from_sektion!=ie.to_sektion){var E=ne.getLevelModel(ie.from_sektion,d.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+ie.action+" => missing source column");E.collection=_.isArray(E.collection)?E.collection:[],C=ne.getLevelModel(ie.id,E.collection),P=se.extend(!0,{},C),E.collection=_.filter(E.collection,function(e){return e.id!=ie.id}),_.each(E.collection,function(e){e.width=""})}x.collection=_.isArray(x.collection)?x.collection:[],r=se.extend(!0,[],x.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_sektion!=ie.to_sektion&&e==P.id)a.push(P);else{if(o=ne.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(o)}}),x.collection=a,_.each(x.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.module_type))throw new Error("updateAPISetting => "+ie.action+" => missing module_type");if("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var L=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_module===e.id&&(L=t),ie.after_module===e.id&&(L=t+1)});var R={id:ie.id,level:"module",module_type:ie.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(s=ne.getModuleStartingValue(ie.module_type))&&(R.value=s),o.collection.splice(L,0,R);break;case"sek-duplicate-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var O;o.collection=_.isArray(o.collection)?o.collection:[];try{O=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e),oe.reject("updateAPISetting => "+ie.action+" => error when cloning the level");break}var A=ne.getLevelPositionInCollection(ie.id,d.collection);e=O.id,o.collection.splice(parseInt(A+1,10),0,O);break;case"sek-remove-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");break;case"sek-move-module":var j,T,V;if(j=ne.getLevelModel(ie.to_column,d.collection),_.isEmpty(j)||"no_match"==j)throw new Error("updateAPISetting => "+ie.action+" => missing target column");if(ie.from_column!=ie.to_column){var Z;if(Z=ne.getLevelModel(ie.from_column,d.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+ie.action+" => missing source column");Z.collection=_.isArray(Z.collection)?Z.collection:[],T=ne.getLevelModel(ie.id,d.collection),V=se.extend(!0,{},T),Z.collection=_.filter(Z.collection,function(e){return e.id!=ie.id})}if(j.collection=_.isArray(j.collection)?j.collection:[],r=se.extend(!0,[],j.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_column!=ie.to_column&&e==V.id)a.push(V);else{if(i=ne.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+ie.action+" => missing moduleCandidate");a.push(i)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+ie.action+" => there are duplicated modules in column : "+j.id);j.collection=a;break;case"sek-set-module-value":i=ne.getLevelModel(ie.id,d.collection);var F={};if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),"no_match"==i){ae.errare("updateAPISetting => "+ie.action+" => no module matched",ie),oe.reject("updateAPISetting => "+ie.action+" => error no module matched");break}if(_.isEmpty(ie.options_type)){ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),oe.reject("updateAPISetting => "+ie.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===ie.options_type?i.value=F:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[ie.options_type]=F);break;case"sek-generate-level-options-ui":var U=ne.getLevelModel(ie.id,d.collection),N={};if("no_match"===U){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}U.options=U.options||{},_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)&&ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),U.options[ie.options_type]=N;break;case"sek-generate-local-skope-options-ui":N={};var B=se.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)||!_.isString(ie.options_type))ae.errare("updateAPISetting => "+ie.action+" => missing options_type");else{var Q={};Q[ie.options_type]=N,d.local_options=se.extend(B,Q)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(L=0,"no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),ie.content_type){case"module":s=ne.getModuleStartingValue(ie.content_id),n.collection.splice(L,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[{id:ie.droppedModuleId,level:"module",module_type:ie.content_id,value:"no_starting_value"!==s?s:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":u=se.Deferred();var H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty(ie.sektion_to_replace)){var i=ne.getLevelModel(ie.sektion_to_replace,d.collection);"no_match"===i&&(ae.errare("updateAPISetting => "+ie.action+" => no sektionToReplace matched"),oe.reject("updateAPISetting => "+ie.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))&&(ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),o.collection.splice(L,0,{id:ie.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(L,0,{id:ie.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})};ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(e){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",e),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],u=se.Deferred(),H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){o.collection.push({id:ie.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})},ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",_er_),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)});break;case"sek-update-fonts":var G=ne.sniffGFonts({is_global_location:ie&&!0===ie.is_global_location});if(!_.isEmpty(ie.font_family)&&_.isString(ie.font_family)&&!_.contains(G,ie.font_family)){if(ie.font_family.indexOf("gfont")<0){ae.errare("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont"),oe.reject("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont");break}G.push(ie.font_family)}d.fonts=G;break;case"sek-restore-revision":d=ie.revision_value;break;case"sek-import-from-file":if(ae.infoLog("sek-import-from-file",ie),_.isUndefined(ie.imported_content.data)||_.isUndefined(ie.imported_content.metas)){ae.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var W=_.isArray(ie.imported_content.data.collection)?se.extend(!0,[],ie.imported_content.data.collection):[];if(!0===ie.assign_missing_locations){var $=ie.imported_content.metas.active_locations,q=ae.czr_sektions.activeLocations(),Y=_.first(q);if(!_.isEmpty(Y)&&!_.isEmpty($)&&_.isArray($)){var J=se($).not(q).get(),K=ne.getLevelModel(Y,d.collection),X=ne.getLevelModel(Y,ie.imported_content.data.collection),ee=[];K.collection=_.isArray(K.collection)?K.collection:[],X.collection=_.isArray(X.collection)?X.collection:[],_.each($,function(e){var t=ne.getLevelModel(e,W);_.isEmpty(t.collection)||(ee=_.union(ee,t.collection))}),X.collection=ee,ie.imported_content.data.collection=_.filter(ie.imported_content.data.collection,function(e){return!_.contains(J,e.id)})}}!0===ie.keep_existing_sections&&(_.each(W,function(e){var t=ne.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=ne.getLevelModel(e.id,ie.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(ie.imported_content.data.fonts=_.isArray(ie.imported_content.data.fonts)?ie.imported_content.data.fonts:[],ie.imported_content.data.fonts=_.uniq(_.union(d.fonts,ie.imported_content.data.fonts)))),d=ie.imported_content.data;break;case"sek-reset-collection":try{d=ae.czr_sektions.resetCollectionSetting(ie.scope)}catch(e){ae.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==oe.state()){var te=function(){_.isEqual(l,d)?oe.reject("updateAPISetting => the new setting value is unchanged when firing action : "+ie.action):null!==ne.validateSettingValue(d,ie.is_global_location?"global":"local")?(ae(re)(d,ie),ie.cloneId=e,oe.resolve(ie)):oe.reject("Validation problem for action "+ie.action)};"_not_injection_scenario_"===u?(te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ae.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}()}),oe.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=se.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ae.sek_userSavedSections)||_.isEmpty(ae.sek_userSavedSections[t.preset_section_id])?(ae.sek_userSavedSections=ae.sek_userSavedSections||{},_.isUndefined(ae.sek_fetchingUserSavedSections)||"pending"!=ae.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ae.settings.nonce.save,preset_section_id:t.preset_section_id}),ae.sek_fetchingUserSavedSections=e):e=ae.sek_fetchingUserSavedSections,e.done(function(e){ae.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ae.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_userSavedSections):_.isEmpty(ae.sek_presetSections)?(_.isUndefined(ae.sek_fetchingPresetSections)||"pending"!=ae.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ae.settings.nonce.save}),ae.sek_fetchingPresetSections=e):e=ae.sek_fetchingPresetSections,e.done(function(e){ae.sek_presetSections=e,i.resolve(ae.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var a=this,s=se.Deferred();return a._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){s.reject(e)}).done(function(e){var t=se.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+a.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),s.resolve(i)}),s.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=se.Deferred(),a=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?a(e):_.isString(e)&&-1!=e.indexOf("__img_url__")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("__img_url__",""))))}),n},s=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?s(e,n):_.isString(e)&&-1!=e.indexOf("__img_url__")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(a(o)).done(function(e){var t=s(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()||[]);n.trigger("sek-before-clean-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)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.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(l,d){d.extend(CZRSeksPrototype,{rootPanelFocus:function(){l.section.has(l.czr_activeSectionId())?l.section(l.czr_activeSectionId()).expanded(!1):l.section.each(function(e){e.expanded(!1)}),l.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()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getLevelModel:function(i,n){var a=this,s="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=l(i)(),r=_.isObject(o)?d.extend(!0,{},o):d.extend(!0,{},a.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==s&&(t===e.id?s=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),s};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,n,e,t)}):c(i,n),s},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,a=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=l(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?d.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=a(t,e.collection)))}),i};return"no_match"!==a(e)},getLevelPositionInCollection:function(i,n){var a=this,s="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=l(n)(),r=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},a.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==s&&(i===e.id?s=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,e,t,n)}):c(i,n),s},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))l.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];l.errare("getLevelProperty => invalid model for id : "+e.id,t)}else l.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=d.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}l.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(e){var o=this,r=[],a=function(i,n,e){if(_.isUndefined(e)){var t=l(i)();e=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&a(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?a(o.getGlobalSectionsSettingId(),"global"):a(o.localSectionsSettingId(),"local"),r},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))l.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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))l.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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))l.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.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}l.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}l.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return l.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return l.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=d(e),i=d(":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=d(e),i=d(":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(e){var n=this,t=(n.input_parent,n.module,l.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?d.extend(i,{selected:"selected"}):"px"===t&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),d("select[data-czrtype]",n.container).on("change",function(){0===d(this).find("option:selected").length&&n([])});break;default:l.errare("::setupSelectInput => invalid input type => "+n.type)}else l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=d(".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)||(l.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new l.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(d(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),d(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",d(this).data("sek-unit")),t.css_unit(d(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 l.Value(l.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),d(this).addClass("active");var t="desktop";try{t=d(this).data("sek-device")}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{l.previewedDevice(t)}catch(e){l.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="'+l.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(d(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=d(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){d(this).attr("data-sek-accordion")||(d(this).attr("data-sek-expanded","false"),d(this).find(".czr-items-wrapper").stop(!0,!0).slideUp(0))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:0,start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}}))}),e.expand_first_control){var t=_.first(i.controls());_.isObject(t)&&!_.isEmpty(t.id)&&l.control(t.id,function(e){e.container.trigger("sek-accordion-expanded"),i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(d.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=d.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(d.Deferred(function(t){(i.isPromise(e)?e:d.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),d.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||d.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:d.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",{img_url:t,nonce:l.settings.nonce.save}).fail(function(e){l.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},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||l.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.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(){s.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),s.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){s.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 n=this,o=function(){s.notifications.add(new s.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){s.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.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(){s.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),s.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),s.previewer.send("sek-drag-stop")}).call(m(this),e)}).dblclick(function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),s.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(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({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),s.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(u){var p=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),a=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),s=(o.right,o.left,r<50),c=a<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=a,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(s||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){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:s.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(s.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),a=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),s="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||a)&&s?(c(r?sektionsLocalizedData.i18n["The header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["The footer location only accepts modules and pre-built footer sections"]),!1):a&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o)},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){s.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"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(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"),e.find(".sek-no-drop-possible-message").remove())},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");m.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,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();s.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"),a=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(a))throw new Error("No valid level id found");s.previewer.trigger("sek-add-module",{level:r,id:a,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":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":s.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:s.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){s.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.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?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),a=d("#wp-czr-customize-content_editor-tools"),s=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=a.outerHeight()+s.outerHeight()+c.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),r.css("height",o.height-o.components))}})}(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 a=o();o.initial_unit="px",u.isEmpty(a)||(o.initial_unit=u.isEmpty(a.unit)?"px":a.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,a=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),s=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,{},s);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",a).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)),a.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,a,s),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,a);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,s,c){n.czrInputMap=n.czrInputMap||{},s.extend(n.czrInputMap,{bg_position:function(e){var t=this;s(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(s(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 a=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?a(e,i[n+1]):{}},i=function(e){var t=s.extend(!0,{},c.isObject(o())?o():{}),i=s.extend(!0,{},r);t=c.isObject(t)?s.extend(i,t):i;var n=a(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};s(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=s(this).val();(t=s.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",a=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=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?s(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=s(t,e);a.find(".selected").removeClass("selected"),a.find('div[data-sek-align="'+n+'"]').addClass("selected")};a.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"),a.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 s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?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,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",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(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(i),c(".czrSelect2-selection__rendered",s.container).css(r(s()))},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=a(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"}},a=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:s.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.czrSelect2&&void 0!==c.fn.czrSelect2.amd&&"function"==typeof c.fn.czrSelect2.amd.require?c.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/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(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){s.isEmpty(n.sek_faIconCollection)?r.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)})).done(function(e){!function(e){s.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(a.extend(t,{selected:"selected"}),o=!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=o?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&s.delay(function(){try{a("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),s.delay(function(){e({open_on_init:!1})},1e3)}})}(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"),a=r.data("editor-params");wp.codeEditor&&(p.isUndefined(a)||!1!==a)&&(t=a),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{s(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 s=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(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var a=this,t=u(".sek-range-with-unit-picker-wrapper",a.container),s=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?l(e,i[n+1]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=a(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.isString(n)?"16":n.replace(/px|em|%/g,""));s.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(a),r.on("input",function(e){s.val(u(this).val()).trigger("input")}),s.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(a())?a():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&a(i),r.val(u(this).val())}),a.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}),r.val(s.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.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"),a=function(e){return l.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(l.isEmpty(r)?"px":a(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()+a(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(s,_,m){s.czrInputMap=s.czrInputMap||{},_.extend(s.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"]'),a=function(e){return m.contains(["px","em","%"],e)||(s.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=s.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),a=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),s=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+a+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+a+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(s).trigger("input",{previewed_device_switched:!0})};s.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new s.Value(m.isEmpty(i())?"px":a(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=s.previewedDevice()||"desktop",o=_(this).val()+a(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){s.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=s.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(s.previewedDevice()))}),r.val(d.val()||0);try{n(s.previewedDevice())}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var s=this,c=h(".sek-borders",s.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)||(g.errare("borders => error : invalid unit for input "+s.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=g.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;s.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=s(),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=s(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},a=function(e){if(!k.contains(k.union(s.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=s(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,a=function(e,t){var i,n=h.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=h.extend(n,i),e);if(k.isEmpty(a)||!k.isObject(a)||k.isEmpty(a.wght)||k.isEmpty(a.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(a.wght),r=_(a.wght),h(".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(a.col).trigger("change"),u.data("border_type_switched",!1)};s.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),s.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),s.borderType=new g.Value("_all_"),l.val((i=s(),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)&&(g.errare("Error in borders input type for module : "+s.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(s.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),s.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),s.borderColor("")}}),s.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),s.borderType.bind(function(e){try{a(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.borderType()||"_all_",o=s.borderColor(),r=h(this).val()+p(s.css_unit()),a=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(s())?s():a))[n]=h.extend(!0,{},i[n]||a[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(s.cssBorderTypes,function(e){i=k.omit(i,e)}),s(i)),d.val(h(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),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),s.css_unit(h(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),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}s.borderType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.borderType()||"_all_",i=h.extend(!0,{},k.isObject(s())?s():{});k.isEmpty(i[t])||(i=k.omit(i,t),s(i),a(t))}),d.val(l.val()||0);try{a(s.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}h('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var s=this,c=f(".sek-borders",s.container),l=c.find('input[type="number"]'),a=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+s.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;s.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=s(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!g.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=s(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,a=function(e,t){var i,n=f.extend(!0,{},_);if(!g.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=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(a)||!g.isString(a))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(a),r=u(a),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})};s.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),s.radiusType=new m.Value("_all_"),l.val((i=s(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+s.module.module_type+" the initial radius is invalid : "+n),n=0),n)),s.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}}),a.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.radiusType()||"_all_",o=f(this).val()+d(s.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(s())?s():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(s.cssRadiusTypes,function(e){i=g.omit(i,e)}),s(i)),a.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")),s.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)}s.radiusType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(s())?s():{});g.isEmpty(i[t])||(i=g.omit(i,t),s(i),r(t))}),a.val(l.val()||0);try{r(s.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}f('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=a(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);s.isEmpty(i)||s.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),a(this).addClass("is-selected").attr("aria-pressed",!0);try{i=a(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),a('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,a){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){a.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!a.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(a.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];a.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),a.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&a.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),a.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(m.isNull(i))throw new Error("setupTinyMceEditor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("setupTinyMceEditor => duplicate editor id.");var r,a,s=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),a=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(a=m.union(r.tinymce.content_css.split(","),a)),a.join(",")),min_height:40,height:n.editor_params&&m.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=s(),s()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,a=nimbleTinyMCEPreInit.mceInit[e];a.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var s=t.input_parent,c=function(){var e=s();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};a.wpautop=c(),c()||(a.forced_root_block=""),a.toolbar1=sektionsLocalizedData.defaultToolbarBtns,a.toolbar2="",window.tinymce.init(a),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=_.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s="local"===n.scope?_.czr_sektions.localSectionsSettingId():_.czr_sektions.getGlobalSectionsSettingId();i.on("change",function(e){r.toggleClass("disabled",f.isEmpty(m(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),m(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),f.isEmpty(t)||f.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=_(s)(),o=!0;if(f.each(n.collection,function(e){o&&(f.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}p();break;case"sek-pre-import":if(f.isEmpty(_.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}c({pre_import_check:!0}).done(a).fail(function(e){_.errare("sek_pre_import_checks failed",e),u(),c()});break;case"sek-import-as-is":c();break;case"sek-import-assign":c({assign_missing_locations:!0});break;case"sek-cancel-import":u()}});var a=function(e){var t=_.czr_sektions.activeLocations(),i=m.extend(!0,[],f.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=f.filter(i,function(e){return!f.contains(["nimble_local_header","nimble_local_footer"],e)}),f.isArray(i)&&f.isArray(t)){var n=m(i).not(t).get();f.isEmpty(n)?c():(r.hide(),o.container.find(".czr-import-dialog").slideToggle(),_.infoLog("sek-pre-import => imported locations missing in current page.",n))}else _.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),u()},c=function(t){if(t=t||{},i.length<1||f.isUndefined(i[0])||!i[0].files||f.isEmpty(i.val()))_.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{_.notifications.remove("missing-import-file"),_.notifications.remove("import-success"),_.notifications.remove("import-failed"),_.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",_.settings.nonce.save),f.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=m.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return m.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),l(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),_.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(f.isObject(i)||f.isArray(i))&&f.each(i,function(e,t){(f.isObject(e)||f.isArray(e))&&(i[t]=n(e)),"id"!==t||!f.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+_.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),d(e,t)}).fail(function(e){_.errare("sek-import input => ajax error",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(u)}else _.errare("sek-import input => invalid scope provided",n.scope)}},l=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),f.isNull(n)&&!f.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,a=i.img_errors;return f.isNull(n)&&!f.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&!f.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&f.isEqual(_(s)(),o)&&(_.infoLog("sek-import input => Setting unchanged"),t=!1),f.isNull(n)||(_.errare("sek-import input => invalid data sent from server",i),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),f.isEmpty(a)||_.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),t},d=function(e,t){t=t||{},l(e)?(_.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:"global"===n.scope,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&_.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),_.previewer.refresh(),_.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){_.errare("sek-import input => error when firing ::updateAPISetting",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),_.previewer.refresh()):u()},u=function(){_.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()},p=function(){var i=[],e={sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()};f.each(e,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:_.settings.nonce.save,sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()}).done(function(){m(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),m(window).on("beforeunload")}).fail(function(e){_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})}}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{simpleselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(s.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:s.settings.nonce.save}).done(function(e){l.isArray(e)||s.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),s.czr_sektions.post_categories=t,i.resolve(s.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(s.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){s.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},a={};l.each(r(),function(e){a[e]=(e+"").replace(/-/g," ")}),i(a),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,a,e){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=a(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),a(this).addClass("selected").attr("aria-pressed",!0);try{i=a(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),a('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(o,r,a){o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.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),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),t(o.czr_sektions.currentContentPickerType()),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(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||{};var n=sektionsLocalizedData.presetSectionsModules;i.isArray(n)&&!i.isEmpty(n)?(sektionsLocalizedData.isNimbleHeaderFooterEnabled||(n=i.filter(n,function(e){return!i.contains(["sek_header_sec_picker_module","sek_footer_sec_picker_module"],e)})),i.each(n,function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})):t.errare("api.czrModuleMap => error when adding section modules")}(wp.customize,jQuery,_),function(r,e,a){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="";a.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>",a.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:!1,ready_on_control_event:"sek-accordion-expanded",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"bg-image":a.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!a.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!a.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":a.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":a.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),i.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.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(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.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.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(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.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(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"enable":a.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":a.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.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;"detached_tinymce_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)}}};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:!1,ready_on_control_event:"sek-accordion-expanded",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.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;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.czr_sektions.scheduleVisibilityOfInputId.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(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.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.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;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{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.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:!1,ready_on_control_event:"sek-accordion-expanded",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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.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(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;n.module;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{o.czr_sektions.scheduleVisibilityOfInputId.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":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){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.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){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(!a.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;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":a.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":a.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(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(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.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:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){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;n.module;n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":r.each(["bg_color_hover"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":r.each(["push_effect"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_);
assets/czr/sek/js/ccat-sek-preview.js CHANGED
@@ -1646,7 +1646,8 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
1646
  if ( _r_.data && _r_.data.contents ) {
1647
  html_content = _r_.data.contents;
1648
  } else {
1649
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
 
1650
  }
1651
  // _r_ is an array
1652
  // @see SEK_Front_Ajax::sek_get_level_content_for_injection
@@ -2055,7 +2056,8 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2055
  if ( _r_.data && _r_.data.contents ) {
2056
  html_content = _r_.data.contents;
2057
  } else {
2058
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
 
2059
  }
2060
 
2061
  // Embed
@@ -2154,7 +2156,8 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2154
  if ( _r_.data && _r_.data.contents ) {
2155
  html_content = _r_.data.contents;
2156
  } else {
2157
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
 
2158
  }
2159
 
2160
  var $parentSektion = $( 'div[data-sek-id="' + params.apiParams.in_sektion + '"]' );
@@ -2202,7 +2205,8 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2202
  if ( _r_.data && _r_.data.contents ) {
2203
  html_content = _r_.data.contents;
2204
  } else {
2205
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
 
2206
  }
2207
  //self.errare('sek-preview => resize-column ajax response => ', html_content );
2208
  // Reset the automatic default resizable inline styling
@@ -2253,7 +2257,8 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2253
  if ( _r_.data && _r_.data.contents ) {
2254
  html_content = _r_.data.contents;
2255
  } else {
2256
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
 
2257
  }
2258
 
2259
  var $parentColumn = $('[data-sek-id="' + params.apiParams.in_column + '"]' );
@@ -2299,8 +2304,6 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2299
  //@see php SEK_Front_Ajax::sek_get_level_content_for_injection
2300
  if ( _r_.data && _r_.data.contents ) {
2301
  html_content = _r_.data.contents;
2302
- } else {
2303
- self.errare( 'SekPreviewPrototype => ajax_response.data.contents is undefined ', _r_ );
2304
  }
2305
  self.appendDynStyleSheet( params.location_skope_id, html_content );
2306
  //=> 'sek-level-refreshed' is listened to clean the loader overlay in time
@@ -2324,7 +2327,9 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
2324
  if ( 0 < $('head').find( _gfonts_id_ ).length ) {
2325
  $('head').find( _gfonts_id_ ).remove();
2326
  }
2327
- $('head').append( styleMarkup );
 
 
2328
  // if we have something to print ( styleMarkup not empty ), there should be a dom element
2329
  if ( ! _.isEmpty( styleMarkup ) && 1 > $('head').find( _stylesheet_id_ ).length ) {
2330
  this.errare( 'sek-preview => problem when printing the dynamic inline style for : '+ _stylesheet_id_, styleMarkup );
1646
  if ( _r_.data && _r_.data.contents ) {
1647
  html_content = _r_.data.contents;
1648
  } else {
1649
+ self.errare( 'SekPreviewPrototype::sek-refresh-level => ajax_response.data.contents is undefined ', _r_ );
1650
+ self.errare( 'params ?', params );
1651
  }
1652
  // _r_ is an array
1653
  // @see SEK_Front_Ajax::sek_get_level_content_for_injection
2056
  if ( _r_.data && _r_.data.contents ) {
2057
  html_content = _r_.data.contents;
2058
  } else {
2059
+ self.errare( 'SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ', _r_ );
2060
+ self.errare( 'params ?', params );
2061
  }
2062
 
2063
  // Embed
2156
  if ( _r_.data && _r_.data.contents ) {
2157
  html_content = _r_.data.contents;
2158
  } else {
2159
+ self.errare( 'SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ', _r_ );
2160
+ self.errare( 'params ?', params );
2161
  }
2162
 
2163
  var $parentSektion = $( 'div[data-sek-id="' + params.apiParams.in_sektion + '"]' );
2205
  if ( _r_.data && _r_.data.contents ) {
2206
  html_content = _r_.data.contents;
2207
  } else {
2208
+ self.errare( 'SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ', _r_ );
2209
+ self.errare( 'params ?', params );
2210
  }
2211
  //self.errare('sek-preview => resize-column ajax response => ', html_content );
2212
  // Reset the automatic default resizable inline styling
2257
  if ( _r_.data && _r_.data.contents ) {
2258
  html_content = _r_.data.contents;
2259
  } else {
2260
+ self.errare( 'SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ', _r_ );
2261
+ self.errare( 'params ?', params );
2262
  }
2263
 
2264
  var $parentColumn = $('[data-sek-id="' + params.apiParams.in_column + '"]' );
2304
  //@see php SEK_Front_Ajax::sek_get_level_content_for_injection
2305
  if ( _r_.data && _r_.data.contents ) {
2306
  html_content = _r_.data.contents;
 
 
2307
  }
2308
  self.appendDynStyleSheet( params.location_skope_id, html_content );
2309
  //=> 'sek-level-refreshed' is listened to clean the loader overlay in time
2327
  if ( 0 < $('head').find( _gfonts_id_ ).length ) {
2328
  $('head').find( _gfonts_id_ ).remove();
2329
  }
2330
+ if ( !_.isEmpty( styleMarkup ) ) {
2331
+ $('head').append( styleMarkup );
2332
+ }
2333
  // if we have something to print ( styleMarkup not empty ), there should be a dom element
2334
  if ( ! _.isEmpty( styleMarkup ) && 1 > $('head').find( _stylesheet_id_ ).length ) {
2335
  this.errare( 'sek-preview => problem when printing the dynamic inline style for : '+ _stylesheet_id_, styleMarkup );
assets/czr/sek/js/ccat-sek-preview.min.js CHANGED
@@ -1 +1 @@
1
- var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=i.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(!i.isUndefined(t)&&!i.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)});var e=function(){var e=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id"))}),a.preview.send("sek-active-locations-in-preview",{active_locations:e})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.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(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,p,h){p.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},p('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(p(this).data("sek-id"))}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))}),p("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){p(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];p('[data-sek-id="'+e+'"]').each(function(){!0!==p(this).data("sek-is-global-location")&&(t=p.extend(!0,{},n.sortableDefaultParams),p(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return p('<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){p("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(p(this).data("sek-id"))})},stop:function(e,t){p("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(p(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:i})},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 a,i,n,s,o=this,t=p.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=p('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=p.extend({forTarget:!0},e||{}),!h.isEmpty(p(this).data("_sortable_columns_css_classes_")))return p(this).data("_sortable_columns_css_classes_");var t,a=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return p(this).data("_sortable_columns_css_classes_",n),n};l.sortable(h.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),d=[],r=[],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(){d.push(p(this).data("sek-id"))}),p(this).data("sek-is-sender",!0),h.isEmpty(d)&&o.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(){r.push(p(this).data("sek-id"))});var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})),p('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){p(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(r)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(r,d)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:r,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,d,r,l,c=[],k=[],u=this;t=p.extend(!0,{},u.sortableDefaultParams),p('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(h.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){p('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){p(this).removeClass("sek-sortable-overing")}),p(e.target).addClass("sek-sortable-overing")},remove:function(e,t){r=t.item.closest('[data-sek-level="location"]'),to_location=r.data("sek-id"),l=!0===r.data("sek-is-global-location");var a=to_location!=from_location;return!(d!==l||!0===d&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),d=!0===o.data("sek-is-global-location"),c=[],k=[],p("body").addClass("sek-dragging-element"),i=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(){c.push(p(this).data("sek-id"))}),h.isEmpty(c)&&u.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(p(this).data("sek-id"))}),h.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):h.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),p("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,i,n,s,o,d,r,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"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");r=n.index()+1==o,d=r?n.prev():n.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(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.data("sek-id"),sister_column:d.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(l,p,h){p.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((h.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var d,r,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(d=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,r=0===n.index()):0<l.length&&(d=l.children('div[data-sek-level="section"]').length==n.index()+1,r=0===n.index()),i=h.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:d,is_first_section_in_parent:r,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=h.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested")});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=m?m:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),p.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,t,o=this,d=function(){(e=p(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),e.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"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.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")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(i({}))).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 r=function(n,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=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=p(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||d.call(i);break;case"printOrScheduleRemoval":t&&a?(i.data("sek-ui-removal-scheduled",!1),o.printLevelUI(i)):!0!==i.data("sek-ui-removal-scheduled")&&(i.data("sek-ui-removal-scheduled",!0),i.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?r(n,i):h.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&r(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;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&&d.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=p(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=p(this).data("sek-id"),a=!0===p(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(i({location:t,is_global_location:a}))).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(i({is_last:!0,location:t,is_global_location:a}))).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||(t=p(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===p(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),p.when(p(this).append(i({location:t,is_global_location:a}))).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,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,d=i<40||n<40,r=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",(d||c)&&(r||l))}),r(e))});var s=function(){clearTimeout(p(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=m(e.target),i=a.closest('[data-sek-level="location"]'),n=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=i.data("sek-id"),d=n.data("sek-level"),r=n.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"==n.data("sek-level")?"moduleWrapper":"column"==n.data("sek-level")&&!0===n.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==n.data("sek-level")?"columnOutsideModules":"section"==n.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(n.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(d)||p.isEmpty(r))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:d,id:r,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:d,id:r});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:d,id:r});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:d,id:r});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:r});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),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),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:s,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,syncedTinyMceInputId:i},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 i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.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 n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(n),n.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,d,r){d.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,i=d('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):((r.isEmpty(a)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),d("body").find(i).remove(),d('[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 r.isEmpty(t)?d.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({location_skope_id:s.location_skope_id,local_skope_id:s.local_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),d('[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>',i=d('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=d('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),r.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),d('[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=d.extend(!0,{},e),a=d.extend(!0,{},e);d('[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=r.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=r.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(a)}break;case"sek-move-module":var i=d.extend(!0,{},e),n=d.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=r.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=r.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),d('[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(n){var s=1,o=!1;d('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=d(this).data("sek-id"),t=d(this).find('[data-sek-level="column"]').length,a=d(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&d('[data-drop-zone-before-section="'+e+'"]').length<1&&d(this).before('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=d(".sektion-wrapper").children('[data-sek-level="section"]').length||d(this).after('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),d(".sek-empty-location-placeholder").each(function(){d.when(d(this).append('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==n.type&&d('[data-sek-level="column"]').each(function(){var e=d(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=d(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){d('[data-drop-zone-before-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a==e.length&&d('[data-drop-zone-after-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a++})}),d("body").addClass("sek-dragging"),r.delay(function(){d(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){d("body").removeClass("sek-dragging"),d(".sortable-placeholder").remove(),d(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&d("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-display-level-ui":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),r.isObject(e)&&e.id){var t=d('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t=d('[data-sek-id="'+e.id+'"]'),a=d(e.selector,t);0<t.length&&0<a.length?a.html(e.html):o.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)}};r.each(e,function(e,i){s.preview.bind(i,function(a){a=r.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});d("body").addClass(i);try{d.when(r.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"done"].join("_"),a),r.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){d("body").removeClass(i)}).then(function(){s.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+i,e),d("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.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),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||d.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!d.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!d.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,d,e){d.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.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=d('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),d(".sektion-wrapper").find(".sek-placeholder").after(t),d(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),d('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),d('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:i.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),d('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),d('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),d('[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(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.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="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,n,s){n.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:i.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),i.appendDynStyleSheet(a.location_skope_id,t),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#sek-gfonts-"+e;0<n("head").find(a).length&&n("head").find(a).remove(),0<n("head").find(i).length&&n("head").find(i).remove(),n("head").append(t),!s.isEmpty(t)&&n("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):n("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){o.extend(SekPreviewPrototype,{parseTemplate:d.memoize(function(t){var a,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||d.template(o(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=d.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=d.isEmpty(d.filter(a,function(e){return!d.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,d.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){d.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?d.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||(d.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=o.Deferred(),s=d.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),d.isEmpty(s.action)||!d.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!d.isObject(i)||d.isUndefined(i.id)||d.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.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),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.promise()))},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!d.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,i="no_match";return d.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),d.each(e,function(e){"no_match"==i&&(t===e.id?i=e:d.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
1
+ var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=i.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(!i.isUndefined(t)&&!i.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)});var e=function(){var e=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id"))}),a.preview.send("sek-active-locations-in-preview",{active_locations:e})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.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(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,p,h){p.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},p('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(p(this).data("sek-id"))}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))}),p("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){p(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];p('[data-sek-id="'+e+'"]').each(function(){!0!==p(this).data("sek-is-global-location")&&(t=p.extend(!0,{},n.sortableDefaultParams),p(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return p('<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){p("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(p(this).data("sek-id"))})},stop:function(e,t){p("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(p(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:i})},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 a,i,n,s,o=this,t=p.extend(!0,{},o.sortableDefaultParams),r=[],d=[],l=p('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=p.extend({forTarget:!0},e||{}),!h.isEmpty(p(this).data("_sortable_columns_css_classes_")))return p(this).data("_sortable_columns_css_classes_");var t,a=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return p(this).data("_sortable_columns_css_classes_",n),n};l.sortable(h.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),r=[],d=[],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(){r.push(p(this).data("sek-id"))}),p(this).data("sek-is-sender",!0),h.isEmpty(r)&&o.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(){d.push(p(this).data("sek-id"))});var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})),p('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){p(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(d)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(d,r)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:d,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,r,d,l,c=[],k=[],u=this;t=p.extend(!0,{},u.sortableDefaultParams),p('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(h.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){p('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){p(this).removeClass("sek-sortable-overing")}),p(e.target).addClass("sek-sortable-overing")},remove:function(e,t){d=t.item.closest('[data-sek-level="location"]'),to_location=d.data("sek-id"),l=!0===d.data("sek-is-global-location");var a=to_location!=from_location;return!(r!==l||!0===r&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),r=!0===o.data("sek-is-global-location"),c=[],k=[],p("body").addClass("sek-dragging-element"),i=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(){c.push(p(this).data("sek-id"))}),h.isEmpty(c)&&u.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(p(this).data("sek-id"))}),h.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):h.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),p("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,i,n,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"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");d=n.index()+1==o,r=d?n.prev():n.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(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.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(l,p,h){p.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((h.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var r,d,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(r=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,d=0===n.index()):0<l.length&&(r=l.children('div[data-sek-level="section"]').length==n.index()+1,d=0===n.index()),i=h.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:r,is_first_section_in_parent:d,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=h.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested")});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=m?m:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),p.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,t,o=this,r=function(){(e=p(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),e.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"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.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")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(i({}))).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 d=function(n,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=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=p(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||r.call(i);break;case"printOrScheduleRemoval":t&&a?(i.data("sek-ui-removal-scheduled",!1),o.printLevelUI(i)):!0!==i.data("sek-ui-removal-scheduled")&&(i.data("sek-ui-removal-scheduled",!0),i.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?d(n,i):h.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&d(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;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&&r.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=p(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=p(this).data("sek-id"),a=!0===p(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(i({location:t,is_global_location:a}))).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(i({is_last:!0,location:t,is_global_location:a}))).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||(t=p(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===p(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),p.when(p(this).append(i({location:t,is_global_location:a}))).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,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,r=i<40||n<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))}),d(e))});var s=function(){clearTimeout(p(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=m(e.target),i=a.closest('[data-sek-level="location"]'),n=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=i.data("sek-id"),r=n.data("sek-level"),d=n.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"==n.data("sek-level")?"moduleWrapper":"column"==n.data("sek-level")&&!0===n.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==n.data("sek-level")?"columnOutsideModules":"section"==n.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(n.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),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),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:s,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,syncedTinyMceInputId:i},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 i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.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 n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(n),n.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,i=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)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),r("body").find(i).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({location_skope_id:s.location_skope_id,local_skope_id:s.local_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::sek-refresh-level => ajax_response.data.contents is undefined ",e),o.errare("params ?",s));var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=r('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),d.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.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 i=r.extend(!0,{},e),n=r.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=d.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=d.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),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(n){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,i=t<2&&a<1;!o&&!i&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==n.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('[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-display-level-ui":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),d.isObject(e)&&e.id){var t=r('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t=r('[data-sek-id="'+e.id+'"]'),a=r(e.selector,t);0<t.length&&0<a.length?a.html(e.html):o.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)}};d.each(e,function(e,i){s.preview.bind(i,function(a){a=d.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});r("body").addClass(i);try{r.when(d.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"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(i)}).then(function(){s.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+i,e),r("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:(s.errare("SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ",e),s.errare("params ?",n)),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||r.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!r.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!r.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,e){r.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=r('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),r(".sektion-wrapper").find(".sek-placeholder").after(t),r(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),r('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),r('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(i.errare("SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ",e),i.errare("params ?",a)),r('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),r('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.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(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=o('[data-sek-id="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,n,s){n.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents&&(t=e.data.contents),i.appendDynStyleSheet(a.location_skope_id,t),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#sek-gfonts-"+e;0<n("head").find(a).length&&n("head").find(a).remove(),0<n("head").find(i).length&&n("head").find(i).remove(),s.isEmpty(t)||n("head").append(t),!s.isEmpty(t)&&n("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):n("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,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||r.template(o(t).html(),n)}catch(e){i.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,i=sekPreviewLocalized.frontNonce,n=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"),n.resolve().promise()):(s[i.id]=i.handle,!r.isObject(i)||r.isUndefined(i.id)||r.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.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),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.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,i="no_match";return r.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),r.each(e,function(e){"no_match"==i&&(t===e.id?i=e:r.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
assets/front/js/ccat-nimble-front.js CHANGED
@@ -2198,16 +2198,23 @@ jQuery(function($){
2198
  $('[data-sek-bg-parallax="true"]').each( function() {
2199
  $(this).parallaxBg( { parallaxForce : $(this).data('sek-parallax-force') } );
2200
  });
 
 
 
 
 
 
 
2201
  // When previewing, react to level refresh
2202
  // This can occur to any level. We listen to the bubbling event on 'body' tag
2203
  // and salmon up to maybe instantiate any missing candidate
2204
  // Example : when a preset_section is injected
2205
  $('body').on('sek-level-refreshed sek-section-added', function( evt ){
2206
  if ( "true" === $(this).data('sek-bg-parallax') ) {
2207
- $(this).parallaxBg( { parallaxForce : $(this).data('sek-parallax-force') } );
2208
  } else {
2209
  $(this).find('[data-sek-bg-parallax="true"]').each( function() {
2210
- $(this).parallaxBg( { parallaxForce : $(this).data('sek-parallax-force') } );
2211
  });
2212
  }
2213
  });
2198
  $('[data-sek-bg-parallax="true"]').each( function() {
2199
  $(this).parallaxBg( { parallaxForce : $(this).data('sek-parallax-force') } );
2200
  });
2201
+ var _setParallaxWhenCustomizing = function() {
2202
+ $(this).parallaxBg( { parallaxForce : $(this).data('sek-parallax-force') } );
2203
+ // hack => always trigger a 'resize' event with a small delay to make sure bg positions are ok
2204
+ setTimeout( function() {
2205
+ $('body').trigger('resize');
2206
+ }, 500 );
2207
+ };
2208
  // When previewing, react to level refresh
2209
  // This can occur to any level. We listen to the bubbling event on 'body' tag
2210
  // and salmon up to maybe instantiate any missing candidate
2211
  // Example : when a preset_section is injected
2212
  $('body').on('sek-level-refreshed sek-section-added', function( evt ){
2213
  if ( "true" === $(this).data('sek-bg-parallax') ) {
2214
+ _setParallaxWhenCustomizing.call(this);
2215
  } else {
2216
  $(this).find('[data-sek-bg-parallax="true"]').each( function() {
2217
+ _setParallaxWhenCustomizing.call(this);
2218
  });
2219
  }
2220
  });
assets/front/js/ccat-nimble-front.min.js CHANGED
@@ -1 +1 @@
1
- !function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},t=n._,r=Array.prototype,o=Object.prototype,f="undefined"!=typeof Symbol?Symbol.prototype:null,i=r.push,s=r.slice,d=o.toString,a=o.hasOwnProperty,e=Array.isArray,u=Object.keys,l=Object.create,c=function(){},p=function(n){return n instanceof p?n:this instanceof p?void(this._wrapped=n):new p(n)};"undefined"==typeof exports||exports.nodeType?n._utils_=p:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=p),exports._utils_=p),p.VERSION="1.9.1";var h,v=function(i,a,n){if(void 0===a)return i;switch(null==n?3:n){case 1:return function(n){return i.call(a,n)};case 3:return function(n,t,e){return i.call(a,n,t,e)};case 4:return function(n,t,e,r){return i.call(a,n,t,e,r)}}return function(){return i.apply(a,arguments)}},m=function(n,t,e){return p.iteratee!==h?p.iteratee(n,t):null==n?p.identity:p.isFunction(n)?v(n,t,e):p.isObject(n)&&!p.isArray(n)?p.matcher(n):p.property(n)};p.iteratee=h=function(n,t){return m(n,t,1/0)};var g=function(i,a){return a=null==a?i.length-1:+a,function(){for(var n=Math.max(arguments.length-a,0),t=Array(n),e=0;e<n;e++)t[e]=arguments[e+a];switch(a){case 0:return i.call(this,t);case 1:return i.call(this,arguments[0],t);case 2:return i.call(this,arguments[0],arguments[1],t)}var r=Array(a+1);for(e=0;e<a;e++)r[e]=arguments[e];return r[a]=t,i.apply(this,r)}},y=function(n){if(!p.isObject(n))return{};if(l)return l(n);c.prototype=n;var t=new c;return c.prototype=null,t},_=function(t){return function(n){return null==n?void 0:n[t]}},b=function(n,t){return null!=n&&a.call(n,t)},k=function(n,t){for(var e=t.length,r=0;r<e;r++){if(null==n)return;n=n[t[r]]}return e?n:void 0},w=Math.pow(2,53)-1,x=_("length"),A=function(n){var t=x(n);return"number"==typeof t&&0<=t&&t<=w};p.each=p.forEach=function(n,t,e){var r,i;if(t=v(t,e),A(n))for(r=0,i=n.length;r<i;r++)t(n[r],r,n);else{var a=p.keys(n);for(r=0,i=a.length;r<i;r++)t(n[a[r]],a[r],n)}return n},p.map=p.collect=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,a=Array(i),o=0;o<i;o++){var u=r?r[o]:o;a[o]=t(n[u],u,n)}return a};var E=function(s){return function(n,t,e,r){var i=3<=arguments.length;return function(n,t,e,r){var i=!A(n)&&p.keys(n),a=(i||n).length,o=0<s?0:a-1;for(r||(e=n[i?i[o]:o],o+=s);0<=o&&o<a;o+=s){var u=i?i[o]:o;e=t(e,n[u],u,n)}return e}(n,v(t,r,4),e,i)}};p.reduce=p.foldl=p.inject=E(1),p.reduceRight=p.foldr=E(-1),p.find=p.detect=function(n,t,e){var r=(A(n)?p.findIndex:p.findKey)(n,t,e);if(void 0!==r&&-1!==r)return n[r]},p.filter=p.select=function(n,r,t){var i=[];return r=m(r,t),p.each(n,function(n,t,e){r(n,t,e)&&i.push(n)}),i},p.reject=function(n,t,e){return p.filter(n,p.negate(m(t)),e)},p.every=p.all=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,a=0;a<i;a++){var o=r?r[a]:a;if(!t(n[o],o,n))return!1}return!0},p.some=p.any=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,a=0;a<i;a++){var o=r?r[a]:a;if(t(n[o],o,n))return!0}return!1},p.contains=p.includes=p.include=function(n,t,e,r){return A(n)||(n=p.values(n)),("number"!=typeof e||r)&&(e=0),0<=p.indexOf(n,t,e)},p.invoke=g(function(n,e,r){var i,a;return p.isFunction(e)?a=e:p.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),p.map(n,function(n){var t=a;if(!t){if(i&&i.length&&(n=k(n,i)),null==n)return;t=n[e]}return null==t?t:t.apply(n,r)})}),p.pluck=function(n,t){return p.map(n,p.property(t))},p.where=function(n,t){return p.filter(n,p.matcher(t))},p.findWhere=function(n,t){return p.find(n,p.matcher(t))},p.max=function(n,r,t){var e,i,a=-1/0,o=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var u=0,s=(n=A(n)?n:p.values(n)).length;u<s;u++)null!=(e=n[u])&&a<e&&(a=e);else r=m(r,t),p.each(n,function(n,t,e){i=r(n,t,e),(o<i||i===-1/0&&a===-1/0)&&(a=n,o=i)});return a},p.min=function(n,r,t){var e,i,a=1/0,o=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var u=0,s=(n=A(n)?n:p.values(n)).length;u<s;u++)null!=(e=n[u])&&e<a&&(a=e);else r=m(r,t),p.each(n,function(n,t,e){((i=r(n,t,e))<o||i===1/0&&a===1/0)&&(a=n,o=i)});return a},p.shuffle=function(n){return p.sample(n,1/0)},p.sample=function(n,t,e){if(null==t||e)return A(n)||(n=p.values(n)),n[p.random(n.length-1)];var r=A(n)?p.clone(n):p.values(n),i=x(r);t=Math.max(Math.min(t,i),0);for(var a=i-1,o=0;o<t;o++){var u=p.random(o,a),s=r[o];r[o]=r[u],r[u]=s}return r.slice(0,t)},p.sortBy=function(n,r,t){var i=0;return r=m(r,t),p.pluck(p.map(n,function(n,t,e){return{value:n,index:i++,criteria:r(n,t,e)}}).sort(function(n,t){var e=n.criteria,r=t.criteria;if(e!==r){if(r<e||void 0===e)return 1;if(e<r||void 0===r)return-1}return n.index-t.index}),"value")};var I=function(o,t){return function(r,i,n){var a=t?[[],[]]:{};return i=m(i,n),p.each(r,function(n,t){var e=i(n,t,r);o(a,n,e)}),a}};p.groupBy=I(function(n,t,e){b(n,e)?n[e].push(t):n[e]=[t]}),p.indexBy=I(function(n,t,e){n[e]=t}),p.countBy=I(function(n,t,e){b(n,e)?n[e]++:n[e]=1});var O=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;p.toArray=function(n){return n?p.isArray(n)?s.call(n):p.isString(n)?n.match(O):A(n)?p.map(n,p.identity):p.values(n):[]},p.size=function(n){return null==n?0:A(n)?n.length:p.keys(n).length},p.partition=I(function(n,t,e){n[e?0:1].push(t)},!0),p.first=p.head=p.take=function(n,t,e){return null==n||n.length<1?null==t?void 0:[]:null==t||e?n[0]:p.initial(n,n.length-t)},p.initial=function(n,t,e){return s.call(n,0,Math.max(0,n.length-(null==t||e?1:t)))},p.last=function(n,t,e){return null==n||n.length<1?null==t?void 0:[]:null==t||e?n[n.length-1]:p.rest(n,Math.max(0,n.length-t))},p.rest=p.tail=p.drop=function(n,t,e){return s.call(n,null==t||e?1:t)},p.compact=function(n){return p.filter(n,Boolean)};var j=function(n,t,e,r){for(var i=(r=r||[]).length,a=0,o=x(n);a<o;a++){var u=n[a];if(A(u)&&(p.isArray(u)||p.isArguments(u)))if(t)for(var s=0,l=u.length;s<l;)r[i++]=u[s++];else j(u,t,e,r),i=r.length;else e||(r[i++]=u)}return r};p.flatten=function(n,t){return j(n,t,!1)},p.without=g(function(n,t){return p.difference(n,t)}),p.uniq=p.unique=function(n,t,e,r){p.isBoolean(t)||(r=e,e=t,t=!1),null!=e&&(e=m(e,r));for(var i=[],a=[],o=0,u=x(n);o<u;o++){var s=n[o],l=e?e(s,o,n):s;t&&!e?(o&&a===l||i.push(s),a=l):e?p.contains(a,l)||(a.push(l),i.push(s)):p.contains(i,s)||i.push(s)}return i},p.union=g(function(n){return p.uniq(j(n,!0,!0))}),p.intersection=function(n){for(var t=[],e=arguments.length,r=0,i=x(n);r<i;r++){var a=n[r];if(!p.contains(t,a)){var o;for(o=1;o<e&&p.contains(arguments[o],a);o++);o===e&&t.push(a)}}return t},p.difference=g(function(n,t){return t=j(t,!0,!0),p.filter(n,function(n){return!p.contains(t,n)})}),p.unzip=function(n){for(var t=n&&p.max(n,x).length||0,e=Array(t),r=0;r<t;r++)e[r]=p.pluck(n,r);return e},p.zip=g(p.unzip),p.object=function(n,t){for(var e={},r=0,i=x(n);r<i;r++)t?e[n[r]]=t[r]:e[n[r][0]]=n[r][1];return e};var C=function(a){return function(n,t,e){t=m(t,e);for(var r=x(n),i=0<a?0:r-1;0<=i&&i<r;i+=a)if(t(n[i],i,n))return i;return-1}};p.findIndex=C(1),p.findLastIndex=C(-1),p.sortedIndex=function(n,t,e,r){for(var i=(e=m(e,r,1))(t),a=0,o=x(n);a<o;){var u=Math.floor((a+o)/2);e(n[u])<i?a=u+1:o=u}return a};var F=function(a,o,u){return function(n,t,e){var r=0,i=x(n);if("number"==typeof e)0<a?r=0<=e?e:Math.max(e+i,r):i=0<=e?Math.min(e+1,i):e+i+1;else if(u&&e&&i)return n[e=u(n,t)]===t?e:-1;if(t!=t)return 0<=(e=o(s.call(n,r,i),p.isNaN))?e+r:-1;for(e=0<a?r:i-1;0<=e&&e<i;e+=a)if(n[e]===t)return e;return-1}};p.indexOf=F(1,p.findIndex,p.sortedIndex),p.lastIndexOf=F(-1,p.findLastIndex),p.range=function(n,t,e){null==t&&(t=n||0,n=0),e||(e=t<n?-1:1);for(var r=Math.max(Math.ceil((t-n)/e),0),i=Array(r),a=0;a<r;a++,n+=e)i[a]=n;return i},p.chunk=function(n,t){if(null==t||t<1)return[];for(var e=[],r=0,i=n.length;r<i;)e.push(s.call(n,r,r+=t));return e};var S=function(n,t,e,r,i){if(!(r instanceof t))return n.apply(e,i);var a=y(n.prototype),o=n.apply(a,i);return p.isObject(o)?o:a};p.bind=g(function(t,e,r){if(!p.isFunction(t))throw new TypeError("Bind must be called on a function");var i=g(function(n){return S(t,i,e,this,r.concat(n))});return i}),p.partial=g(function(i,a){var o=p.partial.placeholder,u=function(){for(var n=0,t=a.length,e=Array(t),r=0;r<t;r++)e[r]=a[r]===o?arguments[n++]:a[r];for(;n<arguments.length;)e.push(arguments[n++]);return S(i,u,this,this,e)};return u}),(p.partial.placeholder=p).bindAll=g(function(n,t){var e=(t=j(t,!1,!1)).length;if(e<1)throw new Error("bindAll must be passed function names");for(;e--;){var r=t[e];n[r]=p.bind(n[r],n)}}),p.memoize=function(r,i){var a=function(n){var t=a.cache,e=""+(i?i.apply(this,arguments):n);return b(t,e)||(t[e]=r.apply(this,arguments)),t[e]};return a.cache={},a},p.delay=g(function(n,t,e){return setTimeout(function(){return n.apply(null,e)},t)}),p.defer=p.partial(p.delay,p,1),p.throttle=function(e,r,i){var a,o,u,s,l=0;i||(i={});var c=function(){l=!1===i.leading?0:p.now(),a=null,s=e.apply(o,u),a||(o=u=null)},n=function(){var n=p.now();l||!1!==i.leading||(l=n);var t=r-(n-l);return o=this,u=arguments,t<=0||r<t?(a&&(clearTimeout(a),a=null),l=n,s=e.apply(o,u),a||(o=u=null)):a||!1===i.trailing||(a=setTimeout(c,t)),s};return n.cancel=function(){clearTimeout(a),l=0,a=o=u=null},n},p.debounce=function(e,r,i){var a,o,u=function(n,t){a=null,t&&(o=e.apply(n,t))},n=g(function(n){if(a&&clearTimeout(a),i){var t=!a;a=setTimeout(u,r),t&&(o=e.apply(this,n))}else a=p.delay(u,r,this,n);return o});return n.cancel=function(){clearTimeout(a),a=null},n},p.wrap=function(n,t){return p.partial(t,n)},p.negate=function(n){return function(){return!n.apply(this,arguments)}},p.compose=function(){var e=arguments,r=e.length-1;return function(){for(var n=r,t=e[r].apply(this,arguments);n--;)t=e[n].call(this,t);return t}},p.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},p.before=function(n,t){var e;return function(){return 0<--n&&(e=t.apply(this,arguments)),n<=1&&(t=null),e}},p.once=p.partial(p.before,2),p.restArguments=g;var P=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N=function(n,t){var e=T.length,r=n.constructor,i=p.isFunction(r)&&r.prototype||o,a="constructor";for(b(n,a)&&!p.contains(t,a)&&t.push(a);e--;)(a=T[e])in n&&n[a]!==i[a]&&!p.contains(t,a)&&t.push(a)};p.keys=function(n){if(!p.isObject(n))return[];if(u)return u(n);var t=[];for(var e in n)b(n,e)&&t.push(e);return P&&N(n,t),t},p.allKeys=function(n){if(!p.isObject(n))return[];var t=[];for(var e in n)t.push(e);return P&&N(n,t),t},p.values=function(n){for(var t=p.keys(n),e=t.length,r=Array(e),i=0;i<e;i++)r[i]=n[t[i]];return r},p.mapObject=function(n,t,e){t=m(t,e);for(var r=p.keys(n),i=r.length,a={},o=0;o<i;o++){var u=r[o];a[u]=t(n[u],u,n)}return a},p.pairs=function(n){for(var t=p.keys(n),e=t.length,r=Array(e),i=0;i<e;i++)r[i]=[t[i],n[t[i]]];return r},p.invert=function(n){for(var t={},e=p.keys(n),r=0,i=e.length;r<i;r++)t[n[e[r]]]=e[r];return t},p.functions=p.methods=function(n){var t=[];for(var e in n)p.isFunction(n[e])&&t.push(e);return t.sort()};var z=function(s,l){return function(n){var t=arguments.length;if(l&&(n=Object(n)),t<2||null==n)return n;for(var e=1;e<t;e++)for(var r=arguments[e],i=s(r),a=i.length,o=0;o<a;o++){var u=i[o];l&&void 0!==n[u]||(n[u]=r[u])}return n}};p.extend=z(p.allKeys),p.extendOwn=p.assign=z(p.keys),p.findKey=function(n,t,e){t=m(t,e);for(var r,i=p.keys(n),a=0,o=i.length;a<o;a++)if(t(n[r=i[a]],r,n))return r};var D,M,L=function(n,t,e){return t in e};p.pick=g(function(n,t){var e={},r=t[0];if(null==n)return e;p.isFunction(r)?(1<t.length&&(r=v(r,t[1])),t=p.allKeys(n)):(r=L,t=j(t,!1,!1),n=Object(n));for(var i=0,a=t.length;i<a;i++){var o=t[i],u=n[o];r(u,o,n)&&(e[o]=u)}return e}),p.omit=g(function(n,e){var t,r=e[0];return p.isFunction(r)?(r=p.negate(r),1<e.length&&(t=e[1])):(e=p.map(j(e,!1,!1),String),r=function(n,t){return!p.contains(e,t)}),p.pick(n,r,t)}),p.defaults=z(p.allKeys,!0),p.create=function(n,t){var e=y(n);return t&&p.extendOwn(e,t),e},p.clone=function(n){return p.isObject(n)?p.isArray(n)?n.slice():p.extend({},n):n},p.tap=function(n,t){return t(n),n},p.isMatch=function(n,t){var e=p.keys(t),r=e.length;if(null==n)return!r;for(var i=Object(n),a=0;a<r;a++){var o=e[a];if(t[o]!==i[o]||!(o in i))return!1}return!0},D=function(n,t,e,r){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return!1;if(n!=n)return t!=t;var i=typeof n;return("function"===i||"object"===i||"object"==typeof t)&&M(n,t,e,r)},M=function(n,t,e,r){n instanceof p&&(n=n._wrapped),t instanceof p&&(t=t._wrapped);var i=d.call(n);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!=+n?+t!=+t:0==+n?1/+n==1/t:+n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object Symbol]":return f.valueOf.call(n)===f.valueOf.call(t)}var a="[object Array]"===i;if(!a){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,u=t.constructor;if(o!==u&&!(p.isFunction(o)&&o instanceof o&&p.isFunction(u)&&u instanceof u)&&"constructor"in n&&"constructor"in t)return!1}r=r||[];for(var s=(e=e||[]).length;s--;)if(e[s]===n)return r[s]===t;if(e.push(n),r.push(t),a){if((s=n.length)!==t.length)return!1;for(;s--;)if(!D(n[s],t[s],e,r))return!1}else{var l,c=p.keys(n);if(s=c.length,p.keys(t).length!==s)return!1;for(;s--;)if(l=c[s],!b(t,l)||!D(n[l],t[l],e,r))return!1}return e.pop(),r.pop(),!0},p.isEqual=function(n,t){return D(n,t)},p.isEmpty=function(n){return null==n||(A(n)&&(p.isArray(n)||p.isString(n)||p.isArguments(n))?0===n.length:0===p.keys(n).length)},p.isElement=function(n){return!(!n||1!==n.nodeType)},p.isArray=e||function(n){return"[object Array]"===d.call(n)},p.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},p.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){p["is"+t]=function(n){return d.call(n)==="[object "+t+"]"}}),p.isArguments(arguments)||(p.isArguments=function(n){return b(n,"callee")});var B=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof B&&(p.isFunction=function(n){return"function"==typeof n||!1}),p.isFinite=function(n){return!p.isSymbol(n)&&isFinite(n)&&!isNaN(parseFloat(n))},p.isNaN=function(n){return p.isNumber(n)&&isNaN(n)},p.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"===d.call(n)},p.isNull=function(n){return null===n},p.isUndefined=function(n){return void 0===n},p.has=function(n,t){if(!p.isArray(t))return b(n,t);for(var e=t.length,r=0;r<e;r++){var i=t[r];if(null==n||!a.call(n,i))return!1;n=n[i]}return!!e},p.noConflict=function(){return n._=t,this},p.identity=function(n){return n},p.constant=function(n){return function(){return n}},p.noop=function(){},p.property=function(t){return p.isArray(t)?function(n){return k(n,t)}:_(t)},p.propertyOf=function(t){return null==t?function(){}:function(n){return p.isArray(n)?k(t,n):t[n]}},p.matcher=p.matches=function(t){return t=p.extendOwn({},t),function(n){return p.isMatch(n,t)}},p.times=function(n,t,e){var r=Array(Math.max(0,n));t=v(t,e,1);for(var i=0;i<n;i++)r[i]=t(i);return r},p.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},p.now=Date.now||function(){return(new Date).getTime()};var H={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},R=p.invert(H),W=function(t){var e=function(n){return t[n]},n="(?:"+p.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(n){return n=null==n?"":""+n,r.test(n)?n.replace(i,e):n}};p.escape=W(H),p.unescape=W(R),p.result=function(n,t,e){p.isArray(t)||(t=[t]);var r=t.length;if(!r)return p.isFunction(e)?e.call(n):e;for(var i=0;i<r;i++){var a=null==n?void 0:n[t[i]];void 0===a&&(a=e,i=r),n=p.isFunction(a)?a.call(n):a}return n};var $=0;p.uniqueId=function(n){var t=++$+"";return n?n+t:t},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,K=function(n){return"\\"+V[n]};p.template=function(a,n,t){!n&&t&&(n=t),n=p.defaults({},n,p.templateSettings);var e,r=RegExp([(n.escape||U).source,(n.interpolate||U).source,(n.evaluate||U).source].join("|")+"|$","g"),o=0,u="__p+='";a.replace(r,function(n,t,e,r,i){return u+=a.slice(o,i).replace(q,K),o=i+n.length,t?u+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?u+="'+\n((__t=("+e+"))==null?'':__t)+\n'":r&&(u+="';\n"+r+"\n__p+='"),n}),u+="';\n",n.variable||(u="with(obj||{}){\n"+u+"}\n"),u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{e=new Function(n.variable||"obj","_",u)}catch(n){throw n.source=u,n}var i=function(n){return e.call(this,n,p)},s=n.variable||"obj";return i.source="function("+s+"){\n"+u+"}",i},p.chain=function(n){var t=p(n);return t._chain=!0,t};var Q=function(n,t){return n._chain?p(t).chain():t};p.mixin=function(e){return p.each(p.functions(e),function(n){var t=p[n]=e[n];p.prototype[n]=function(){var n=[this._wrapped];return i.apply(n,arguments),Q(this,t.apply(p,n))}}),p},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=r[t];p.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Q(this,n)}}),p.each(["concat","join","slice"],function(n){var t=r[n];p.prototype[n]=function(){return Q(this,t.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},p.prototype.valueOf=p.prototype.toJSON=p.prototype.value,p.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}(),function(i){i.fn.fitText=function(n,t){var e=n||1,r=i.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},t);return this.each(function(){var n=i(this),t=function(){n.css("font-size",Math.max(Math.min(n.width()/(10*e),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize)))};t(),i(window).on("resize.fittext orientationchange.fittext",t)})}}(jQuery),function(l,c){var e="nimbleLazyLoad",r={load_all_images_on_first_scroll:!1,excludeImg:[],threshold:200,fadeIn_options:{duration:400},delaySmartLoadEvent:0},i="smartload-skip";function t(n,t){this.element=n,this.options=l.extend({},r,t),_utils_.isArray(this.options.excludeImg)?this.options.excludeImg.push("."+i):this.options.excludeImg=["."+i],this._defaults=r,this._name=e,this.init()}t.prototype.init=function(){var t=this,e=l("[data-sek-src]:not("+this.options.excludeImg.join()+"), [data-sek-iframe-src]",this.element);this.increment=1,this.timer=0,e.addClass(i).bind("sek_load_img",{},function(){t._load_img(this)}).bind("sek_load_iframe",{},function(){t._load_iframe(this)}),l(c).scroll(function(n){t._better_scroll_event_handler(e,n)}),l(c).resize(_utils_.debounce(function(n){t._maybe_trigger_load(e,n)},100)),this._maybe_trigger_load(e)},t.prototype._better_scroll_event_handler=function(n,t){var e=this;this.doingAnimation||(this.doingAnimation=!0,c.requestAnimationFrame(function(){e._maybe_trigger_load(n,t),e.doingAnimation=!1}))},t.prototype._maybe_trigger_load=function(n,e){var r=this;n.filter(function(n,t){return r._is_visible(t,e)}).map(function(n,t){"IFRAME"===l(t).prop("tagName")?l(t).trigger("sek_load_iframe"):l(t).trigger("sek_load_img")})},t.prototype._is_visible=function(n,t){var r=function(n){if(0<n.length&&n.is(":visible"))return n;var t=n.prev();if(0<t.length&&t.is(":visible"))return t;if(0<t.length&&!t.is(":visible"))return r(t);var e=n.parent();return 0<e.length?r(e):null},e=r(l(n));if(!e||e.length<1)return!1;var i=l(c).scrollTop(),a=i+l(c).height(),o=e.offset().top,u=o+e.height(),s=this.options.threshold;return!(!t||"scroll"!=t.type||!this.options.load_all_images_on_first_scroll)||i-s<=u&&o<=a+s},t.prototype._load_img=function(n){var t=l(n),e=t.attr("data-sek-src"),r=t.attr("data-sek-srcset"),i=t.attr("data-sek-sizes"),a=l("<img />",{src:e});t.addClass("lazy-loading"),t.unbind("sek_load_img"),a.load(function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+e+")"):(t.attr("src",e),r&&t.attr("srcset",r),i&&t.attr("sizes",i)),t.hasClass("sek-lazy-loaded")||t.addClass("sek-lazy-loaded"),t.trigger("smartload"),t.data("sek-lazy-loaded",!0)}),a[0].complete&&a.load(),t.removeClass("lazy-loading")},t.prototype._load_iframe=function(n){var t=l(n);t.unbind("sek_load_iframe"),t.attr("src",function(){var n=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),t.data("sek-lazy-loaded",!0),t.trigger("smartload"),t.hasClass("sek-lazy-loaded")||t.addClass("sek-lazy-loaded"),n})},l.fn[e]=function(n){return this.each(function(){l.data(this,"plugin_"+e)||l.data(this,"plugin_"+e,new t(this,n))})}}(jQuery,window),function(e,u){var r="parallaxBg",i={parallaxForce:40,oncustom:[],matchMedia:"only screen and (max-width: 800px)"};function t(n,t){this.element=e(n),this.options=e.extend({},i,t,this.parseElementDataOptions()),this._defaults=i,this._name=r,this.init()}t.prototype.parseElementDataOptions=function(){return this.element.data()},t.prototype.init=function(){var t=this;this.$_window=e(u),this.doingAnimation=!1,this.isVisible=!1,this.isBefore=!1,this.isAfter=!0,("number"!=typeof t.options.parallaxForce||t.options.parallaxForce<0)&&(sekFrontLocalized.isDevMode&&console.log("parallaxBg => the provided parallaxForce is invalid => "+t.options.parallaxForce),t.options.parallaxForce=this._defaults.parallaxForce),100<t.options.parallaxForce&&(t.options.parallaxForce=100),this.$_window.scroll(function(n){t.maybeParallaxMe(n)}),this.$_window.resize(_utils_.debounce(function(n){t.maybeParallaxMe(n)},100)),this.checkIfIsVisibleAndCacheProperties(),this.setTopPositionAndBackgroundSize()},t.prototype.setTopPositionAndBackgroundSize=function(){if(_utils_.isFunction(u.matchMedia)&&matchMedia(this.options.matchMedia).matches)this.element.css({"background-position-y":"","background-attachment":""});else{var n=this.element,t=(n.outerHeight(),this.$_window.height()),e=n.offset().top,r=this.$_window.scrollTop(),i=100;this.isVisible?i=(e-r)/t:this.isBefore?i=1:this.isAfter&&(i=-1);var a=0<this.options.parallaxForce?t*(100-this.options.parallaxForce)/100:t,o=Math.round(i*a);this.element.css({"background-position-y":["calc(50% ",0<o?"+ ":"- ",Math.abs(o)+"px)"].join("")})}},t.prototype.checkIfIsVisibleAndCacheProperties=function(n){var t=this.element;if(!t.is(":visible"))return!1;var e=this.$_window.scrollTop(),r=e+this.$_window.height(),i=t.offset().top,a=i+t.outerHeight();return this.isVisible=e<=a&&i<=r,this.isBefore=r<i,this.isAfter=a<e,this.isVisible},t.prototype.maybeParallaxMe=function(n){var t=this;this.checkIfIsVisibleAndCacheProperties()&&(this.doingAnimation||(this.doingAnimation=!0,u.requestAnimationFrame(function(){t.setTopPositionAndBackgroundSize(),t.doingAnimation=!1})))},e.fn[r]=function(n){return this.each(function(){e.data(this,"plugin_"+r)||e.data(this,"plugin_"+r,new t(this,n))})}}(jQuery,window),jQuery(function(n){n('[data-sek-module-type="czr_image_module"]').each(function(){if($linkCandidate=n(this).find(".sek-link-to-img-lightbox"),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript"))&&"function"==typeof n.fn.magnificPopup)try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(n){"function"==typeof window.console.log&&console.log(n)}})}),jQuery(function(n){n(".sektion-wrapper").each(function(){try{n(this).nimbleLazyLoad()}catch(n){"function"==typeof window.console.log&&console.log(n)}})}),jQuery(function(t){t('[data-sek-bg-parallax="true"]').each(function(){t(this).parallaxBg({parallaxForce:t(this).data("sek-parallax-force")})}),t("body").on("sek-level-refreshed sek-section-added",function(n){"true"===t(this).data("sek-bg-parallax")?t(this).parallaxBg({parallaxForce:t(this).data("sek-parallax-force")}):t(this).find('[data-sek-bg-parallax="true"]').each(function(){t(this).parallaxBg({parallaxForce:t(this).data("sek-parallax-force")})})})}),jQuery(function(a){var o=function(n){var t=document.createElement("a");t.href=n,t.href=t.href;for(var e=["host","hostname","hash","href","port","protocol","search"],r=0,i=e.length;r<i;r++)this[e[r]]=t[e[r]];this.pathname=("/"!==t.pathname.charAt(0)?"/":"")+t.pathname},u=a("html, body");a("body").find(".menu-item").on("click","a",function(n){var t=a(this).attr("href");if(""!==t&&null!==t&&"string"==typeof t&&-1!==t.indexOf("#")){var e=new o(t),r=new o(window.document.location.href);if(e.pathname===r.pathname&&"string"==typeof e.hash&&""!==e.hash){var i=a('[data-sek-level="location"]').find('[id="'+e.hash.replace("#","")+'"]');1===i.length&&(n.preventDefault(),u.animate({scrollTop:i.offset().top-150},400))}}})}),jQuery(function(p){var n,a,o,u,s,l;!function(){var l="sek.sekDropdown",n="."+l,e={PLACE_ME:"placeme"+n,PLACE_ALL:"placeall"+n,SHOWN:"shown"+n,SHOW:"show"+n,HIDDEN:"hidden"+n,HIDE:"hide"+n,CLICK:"click"+n,TAP:"tap"+n},c="sek-dropdown-menu",t="sek-dropdown-submenu",r="show",i="menu-item-has-children",a='[data-toggle="sek-dropdown"]',o=".sek-nav-wrap .menu-item-has-children",u=".sek-nav-wrap .menu-item-has-children";p(".sek-nav .children, .sek-nav .sub-menu").addClass(c),p(".sek-nav-wrap .page_item_has_children").addClass(i),p(".sek-nav ."+c+" ."+i).addClass(t);var s,f,d;s=o,p(document).on("mouseenter",s,function(){var t=p(this);_utils_.debounce(function(){if("static"==t.find("."+c).css("position"))return!1;if(!t.hasClass(r)){t.trigger(e.SHOW).addClass(r).trigger(e.SHOWN);var n=t.children(a);n.length&&n[0].setAttribute("aria-expanded","true")}},30)()}).on("mouseleave",s,function(){var t=p(this);_utils_.debounce(function(){if(t.find("ul li:hover").length<1&&!t.closest("ul").find("li:hover").is(t)){t.trigger(e.HIDE).removeClass(r).trigger(e.HIDDEN);var n=t.children(a);n.length&&n[0].setAttribute("aria-expanded","false")}},30)()}),f="rtl"===p("html").attr("dir"),d=!1,p(window).on("resize",function(){d||(d=!0,window.requestAnimationFrame(function(){p(u+"."+r).trigger(e.PLACE_ME),d=!1}))}),p(document).on(e.PLACE_ALL,function(){p(u).trigger(e.PLACE_ME)}).on(e.SHOWN+" "+e.PLACE_ME,u,function(n){n.stopPropagation(),function(n,t){if(t&&t.namespace&&l===t.namespace){var e,r,i,a,o,u,s=n.children("."+c);s.length&&(n.css("overflow","hidden"),s.css({zIndex:"-100",display:"block"}),r=n,i=f?{_DEFAULT:"left",_OPPOSITE:"right"}:{_DEFAULT:"right",_OPPOSITE:"left"},a={OPEN_PREFIX:"open-",DD_SUBMENU:"sek-dropdown-submenu",CARET_TITLE_FLIP:"sek-menu-link__row-reverse",DROPDOWN:"sek-dropdown-menu"},o=function(n,e,t){p.each(n,function(){var n=p(this),t=n.find("a").first();1==t.length&&t.toggleClass(a.CARET_TITLE_FLIP,e==i._OPPOSITE)})},u=function(n){var t=n==i._OPPOSITE?i._DEFAULT:i._OPPOSITE;e.removeClass(a.OPEN_PREFIX+t).addClass(a.OPEN_PREFIX+n),r.hasClass(a.DD_SUBMENU)&&(o(r,n,t),o(e.children("."+a.DD_SUBMENU),n,t))},(e=s).parent().closest("."+a.DROPDOWN).hasClass(a.OPEN_PREFIX+i._OPPOSITE)?u(i._OPPOSITE):u(i._DEFAULT),e.offset().left+e.width()>p(window).width()?u("left"):e.offset().left<0&&u("right"),s.css({zIndex:"",display:""}),n.css("overflow",""))}}(p(this),n)})}(),a={SHOW:"show"+(n=".sek.sekCollapse"),SHOWN:"shown"+n,HIDE:"hide"+n,HIDDEN:"hidden"+n,CLICK_DATA_API:"click"+n+".data-api"},o="show",u="sek-collapse",s="sek-collapsing",l="sek-collapsed",p(document).on(a.CLICK_DATA_API,'[data-sek-toggle="sek-collapse"]',function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var t=p(this),e=t.data("target");p(e).each(function(){var r=p(this),i=r.hasClass(o);r.stop()[i?"slideUp":"slideDown"]({duration:400,start:function(){r.addClass(s).trigger(i?a.HIDE:a.SHOW),i?t.addClass(l).attr("aria-expanded","false"):t.removeClass(l).attr("aria-expanded","true")},complete:function(){var n,t,e;i?(n=o,t=u,e=a.HIDDEN):(n=u,t=o,e=a.SHOWN),r.removeClass(s+" "+n).addClass(t).trigger(e),function(n){(n=n||p(this)).css({display:"",paddingTop:"",marginTop:"",paddingBottom:"",marginBottom:"",height:""})}(r)}})})}),p(document).on("mouseenter",".sek-nav-toggler",function(){p(this).addClass("hovering")}).on("mouseleave",".sek-nav-toggler",function(){p(this).removeClass("hovering")}).on("show.sek.sekCollapse hide.sek.sekCollapse",".sek-nav-collapse",function(){p("[data-target=#"+p(this).attr("id")+"]").removeClass("hovering"),p(window).trigger("scroll")}),p(document).on("ready",function(){var t=function(){p('[data-sek-module-type="czr_menu_module"]').find('[data-sek-expand-below="yes"]').each(function(){if(!0!==p(this).data("sek-setup-menu-mobile-expanded-below-done")){var n=p(this).closest('[data-sek-module-type="czr_menu_module"]').clone(!0),t=p(".sek-nav-collapse",this).attr("id")+"-mobile";n.appendTo(p(this).closest(".sek-sektion-inner")).wrap('<div class="sek-col-base sek-mobile-menu-expanded-below" id="'+t+'-wrapper"></div>'),p(".sek-nav-collapse","#"+t+"-wrapper").attr("id",t),p(".sek-nav-toggler","#"+t+"-wrapper").detach(),p(".sek-nav-toggler",this).data("target","#"+t).attr("aria-controls",t),p(this).data("sek-setup-menu-mobile-expanded-below-done",!0)}})};t(),p("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",function(n){p(".sek-mobile-menu-expanded-below").remove(),t()})})});
1
+ !function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},t=n._,r=Array.prototype,a=Object.prototype,f="undefined"!=typeof Symbol?Symbol.prototype:null,i=r.push,s=r.slice,d=a.toString,o=a.hasOwnProperty,e=Array.isArray,u=Object.keys,l=Object.create,c=function(){},p=function(n){return n instanceof p?n:this instanceof p?void(this._wrapped=n):new p(n)};"undefined"==typeof exports||exports.nodeType?n._utils_=p:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=p),exports._utils_=p),p.VERSION="1.9.1";var h,v=function(i,o,n){if(void 0===o)return i;switch(null==n?3:n){case 1:return function(n){return i.call(o,n)};case 3:return function(n,t,e){return i.call(o,n,t,e)};case 4:return function(n,t,e,r){return i.call(o,n,t,e,r)}}return function(){return i.apply(o,arguments)}},m=function(n,t,e){return p.iteratee!==h?p.iteratee(n,t):null==n?p.identity:p.isFunction(n)?v(n,t,e):p.isObject(n)&&!p.isArray(n)?p.matcher(n):p.property(n)};p.iteratee=h=function(n,t){return m(n,t,1/0)};var g=function(i,o){return o=null==o?i.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),e=0;e<n;e++)t[e]=arguments[e+o];switch(o){case 0:return i.call(this,t);case 1:return i.call(this,arguments[0],t);case 2:return i.call(this,arguments[0],arguments[1],t)}var r=Array(o+1);for(e=0;e<o;e++)r[e]=arguments[e];return r[o]=t,i.apply(this,r)}},y=function(n){if(!p.isObject(n))return{};if(l)return l(n);c.prototype=n;var t=new c;return c.prototype=null,t},_=function(t){return function(n){return null==n?void 0:n[t]}},b=function(n,t){return null!=n&&o.call(n,t)},k=function(n,t){for(var e=t.length,r=0;r<e;r++){if(null==n)return;n=n[t[r]]}return e?n:void 0},w=Math.pow(2,53)-1,x=_("length"),A=function(n){var t=x(n);return"number"==typeof t&&0<=t&&t<=w};p.each=p.forEach=function(n,t,e){var r,i;if(t=v(t,e),A(n))for(r=0,i=n.length;r<i;r++)t(n[r],r,n);else{var o=p.keys(n);for(r=0,i=o.length;r<i;r++)t(n[o[r]],o[r],n)}return n},p.map=p.collect=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,o=Array(i),a=0;a<i;a++){var u=r?r[a]:a;o[a]=t(n[u],u,n)}return o};var E=function(s){return function(n,t,e,r){var i=3<=arguments.length;return function(n,t,e,r){var i=!A(n)&&p.keys(n),o=(i||n).length,a=0<s?0:o-1;for(r||(e=n[i?i[a]:a],a+=s);0<=a&&a<o;a+=s){var u=i?i[a]:a;e=t(e,n[u],u,n)}return e}(n,v(t,r,4),e,i)}};p.reduce=p.foldl=p.inject=E(1),p.reduceRight=p.foldr=E(-1),p.find=p.detect=function(n,t,e){var r=(A(n)?p.findIndex:p.findKey)(n,t,e);if(void 0!==r&&-1!==r)return n[r]},p.filter=p.select=function(n,r,t){var i=[];return r=m(r,t),p.each(n,function(n,t,e){r(n,t,e)&&i.push(n)}),i},p.reject=function(n,t,e){return p.filter(n,p.negate(m(t)),e)},p.every=p.all=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(n[a],a,n))return!1}return!0},p.some=p.any=function(n,t,e){t=m(t,e);for(var r=!A(n)&&p.keys(n),i=(r||n).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(n[a],a,n))return!0}return!1},p.contains=p.includes=p.include=function(n,t,e,r){return A(n)||(n=p.values(n)),("number"!=typeof e||r)&&(e=0),0<=p.indexOf(n,t,e)},p.invoke=g(function(n,e,r){var i,o;return p.isFunction(e)?o=e:p.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),p.map(n,function(n){var t=o;if(!t){if(i&&i.length&&(n=k(n,i)),null==n)return;t=n[e]}return null==t?t:t.apply(n,r)})}),p.pluck=function(n,t){return p.map(n,p.property(t))},p.where=function(n,t){return p.filter(n,p.matcher(t))},p.findWhere=function(n,t){return p.find(n,p.matcher(t))},p.max=function(n,r,t){var e,i,o=-1/0,a=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var u=0,s=(n=A(n)?n:p.values(n)).length;u<s;u++)null!=(e=n[u])&&o<e&&(o=e);else r=m(r,t),p.each(n,function(n,t,e){i=r(n,t,e),(a<i||i===-1/0&&o===-1/0)&&(o=n,a=i)});return o},p.min=function(n,r,t){var e,i,o=1/0,a=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var u=0,s=(n=A(n)?n:p.values(n)).length;u<s;u++)null!=(e=n[u])&&e<o&&(o=e);else r=m(r,t),p.each(n,function(n,t,e){((i=r(n,t,e))<a||i===1/0&&o===1/0)&&(o=n,a=i)});return o},p.shuffle=function(n){return p.sample(n,1/0)},p.sample=function(n,t,e){if(null==t||e)return A(n)||(n=p.values(n)),n[p.random(n.length-1)];var r=A(n)?p.clone(n):p.values(n),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var u=p.random(a,o),s=r[a];r[a]=r[u],r[u]=s}return r.slice(0,t)},p.sortBy=function(n,r,t){var i=0;return r=m(r,t),p.pluck(p.map(n,function(n,t,e){return{value:n,index:i++,criteria:r(n,t,e)}}).sort(function(n,t){var e=n.criteria,r=t.criteria;if(e!==r){if(r<e||void 0===e)return 1;if(e<r||void 0===r)return-1}return n.index-t.index}),"value")};var I=function(a,t){return function(r,i,n){var o=t?[[],[]]:{};return i=m(i,n),p.each(r,function(n,t){var e=i(n,t,r);a(o,n,e)}),o}};p.groupBy=I(function(n,t,e){b(n,e)?n[e].push(t):n[e]=[t]}),p.indexBy=I(function(n,t,e){n[e]=t}),p.countBy=I(function(n,t,e){b(n,e)?n[e]++:n[e]=1});var O=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;p.toArray=function(n){return n?p.isArray(n)?s.call(n):p.isString(n)?n.match(O):A(n)?p.map(n,p.identity):p.values(n):[]},p.size=function(n){return null==n?0:A(n)?n.length:p.keys(n).length},p.partition=I(function(n,t,e){n[e?0:1].push(t)},!0),p.first=p.head=p.take=function(n,t,e){return null==n||n.length<1?null==t?void 0:[]:null==t||e?n[0]:p.initial(n,n.length-t)},p.initial=function(n,t,e){return s.call(n,0,Math.max(0,n.length-(null==t||e?1:t)))},p.last=function(n,t,e){return null==n||n.length<1?null==t?void 0:[]:null==t||e?n[n.length-1]:p.rest(n,Math.max(0,n.length-t))},p.rest=p.tail=p.drop=function(n,t,e){return s.call(n,null==t||e?1:t)},p.compact=function(n){return p.filter(n,Boolean)};var j=function(n,t,e,r){for(var i=(r=r||[]).length,o=0,a=x(n);o<a;o++){var u=n[o];if(A(u)&&(p.isArray(u)||p.isArguments(u)))if(t)for(var s=0,l=u.length;s<l;)r[i++]=u[s++];else j(u,t,e,r),i=r.length;else e||(r[i++]=u)}return r};p.flatten=function(n,t){return j(n,t,!1)},p.without=g(function(n,t){return p.difference(n,t)}),p.uniq=p.unique=function(n,t,e,r){p.isBoolean(t)||(r=e,e=t,t=!1),null!=e&&(e=m(e,r));for(var i=[],o=[],a=0,u=x(n);a<u;a++){var s=n[a],l=e?e(s,a,n):s;t&&!e?(a&&o===l||i.push(s),o=l):e?p.contains(o,l)||(o.push(l),i.push(s)):p.contains(i,s)||i.push(s)}return i},p.union=g(function(n){return p.uniq(j(n,!0,!0))}),p.intersection=function(n){for(var t=[],e=arguments.length,r=0,i=x(n);r<i;r++){var o=n[r];if(!p.contains(t,o)){var a;for(a=1;a<e&&p.contains(arguments[a],o);a++);a===e&&t.push(o)}}return t},p.difference=g(function(n,t){return t=j(t,!0,!0),p.filter(n,function(n){return!p.contains(t,n)})}),p.unzip=function(n){for(var t=n&&p.max(n,x).length||0,e=Array(t),r=0;r<t;r++)e[r]=p.pluck(n,r);return e},p.zip=g(p.unzip),p.object=function(n,t){for(var e={},r=0,i=x(n);r<i;r++)t?e[n[r]]=t[r]:e[n[r][0]]=n[r][1];return e};var C=function(o){return function(n,t,e){t=m(t,e);for(var r=x(n),i=0<o?0:r-1;0<=i&&i<r;i+=o)if(t(n[i],i,n))return i;return-1}};p.findIndex=C(1),p.findLastIndex=C(-1),p.sortedIndex=function(n,t,e,r){for(var i=(e=m(e,r,1))(t),o=0,a=x(n);o<a;){var u=Math.floor((o+a)/2);e(n[u])<i?o=u+1:a=u}return o};var F=function(o,a,u){return function(n,t,e){var r=0,i=x(n);if("number"==typeof e)0<o?r=0<=e?e:Math.max(e+i,r):i=0<=e?Math.min(e+1,i):e+i+1;else if(u&&e&&i)return n[e=u(n,t)]===t?e:-1;if(t!=t)return 0<=(e=a(s.call(n,r,i),p.isNaN))?e+r:-1;for(e=0<o?r:i-1;0<=e&&e<i;e+=o)if(n[e]===t)return e;return-1}};p.indexOf=F(1,p.findIndex,p.sortedIndex),p.lastIndexOf=F(-1,p.findLastIndex),p.range=function(n,t,e){null==t&&(t=n||0,n=0),e||(e=t<n?-1:1);for(var r=Math.max(Math.ceil((t-n)/e),0),i=Array(r),o=0;o<r;o++,n+=e)i[o]=n;return i},p.chunk=function(n,t){if(null==t||t<1)return[];for(var e=[],r=0,i=n.length;r<i;)e.push(s.call(n,r,r+=t));return e};var S=function(n,t,e,r,i){if(!(r instanceof t))return n.apply(e,i);var o=y(n.prototype),a=n.apply(o,i);return p.isObject(a)?a:o};p.bind=g(function(t,e,r){if(!p.isFunction(t))throw new TypeError("Bind must be called on a function");var i=g(function(n){return S(t,i,e,this,r.concat(n))});return i}),p.partial=g(function(i,o){var a=p.partial.placeholder,u=function(){for(var n=0,t=o.length,e=Array(t),r=0;r<t;r++)e[r]=o[r]===a?arguments[n++]:o[r];for(;n<arguments.length;)e.push(arguments[n++]);return S(i,u,this,this,e)};return u}),(p.partial.placeholder=p).bindAll=g(function(n,t){var e=(t=j(t,!1,!1)).length;if(e<1)throw new Error("bindAll must be passed function names");for(;e--;){var r=t[e];n[r]=p.bind(n[r],n)}}),p.memoize=function(r,i){var o=function(n){var t=o.cache,e=""+(i?i.apply(this,arguments):n);return b(t,e)||(t[e]=r.apply(this,arguments)),t[e]};return o.cache={},o},p.delay=g(function(n,t,e){return setTimeout(function(){return n.apply(null,e)},t)}),p.defer=p.partial(p.delay,p,1),p.throttle=function(e,r,i){var o,a,u,s,l=0;i||(i={});var c=function(){l=!1===i.leading?0:p.now(),o=null,s=e.apply(a,u),o||(a=u=null)},n=function(){var n=p.now();l||!1!==i.leading||(l=n);var t=r-(n-l);return a=this,u=arguments,t<=0||r<t?(o&&(clearTimeout(o),o=null),l=n,s=e.apply(a,u),o||(a=u=null)):o||!1===i.trailing||(o=setTimeout(c,t)),s};return n.cancel=function(){clearTimeout(o),l=0,o=a=u=null},n},p.debounce=function(e,r,i){var o,a,u=function(n,t){o=null,t&&(a=e.apply(n,t))},n=g(function(n){if(o&&clearTimeout(o),i){var t=!o;o=setTimeout(u,r),t&&(a=e.apply(this,n))}else o=p.delay(u,r,this,n);return a});return n.cancel=function(){clearTimeout(o),o=null},n},p.wrap=function(n,t){return p.partial(t,n)},p.negate=function(n){return function(){return!n.apply(this,arguments)}},p.compose=function(){var e=arguments,r=e.length-1;return function(){for(var n=r,t=e[r].apply(this,arguments);n--;)t=e[n].call(this,t);return t}},p.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},p.before=function(n,t){var e;return function(){return 0<--n&&(e=t.apply(this,arguments)),n<=1&&(t=null),e}},p.once=p.partial(p.before,2),p.restArguments=g;var P=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N=function(n,t){var e=T.length,r=n.constructor,i=p.isFunction(r)&&r.prototype||a,o="constructor";for(b(n,o)&&!p.contains(t,o)&&t.push(o);e--;)(o=T[e])in n&&n[o]!==i[o]&&!p.contains(t,o)&&t.push(o)};p.keys=function(n){if(!p.isObject(n))return[];if(u)return u(n);var t=[];for(var e in n)b(n,e)&&t.push(e);return P&&N(n,t),t},p.allKeys=function(n){if(!p.isObject(n))return[];var t=[];for(var e in n)t.push(e);return P&&N(n,t),t},p.values=function(n){for(var t=p.keys(n),e=t.length,r=Array(e),i=0;i<e;i++)r[i]=n[t[i]];return r},p.mapObject=function(n,t,e){t=m(t,e);for(var r=p.keys(n),i=r.length,o={},a=0;a<i;a++){var u=r[a];o[u]=t(n[u],u,n)}return o},p.pairs=function(n){for(var t=p.keys(n),e=t.length,r=Array(e),i=0;i<e;i++)r[i]=[t[i],n[t[i]]];return r},p.invert=function(n){for(var t={},e=p.keys(n),r=0,i=e.length;r<i;r++)t[n[e[r]]]=e[r];return t},p.functions=p.methods=function(n){var t=[];for(var e in n)p.isFunction(n[e])&&t.push(e);return t.sort()};var z=function(s,l){return function(n){var t=arguments.length;if(l&&(n=Object(n)),t<2||null==n)return n;for(var e=1;e<t;e++)for(var r=arguments[e],i=s(r),o=i.length,a=0;a<o;a++){var u=i[a];l&&void 0!==n[u]||(n[u]=r[u])}return n}};p.extend=z(p.allKeys),p.extendOwn=p.assign=z(p.keys),p.findKey=function(n,t,e){t=m(t,e);for(var r,i=p.keys(n),o=0,a=i.length;o<a;o++)if(t(n[r=i[o]],r,n))return r};var D,M,L=function(n,t,e){return t in e};p.pick=g(function(n,t){var e={},r=t[0];if(null==n)return e;p.isFunction(r)?(1<t.length&&(r=v(r,t[1])),t=p.allKeys(n)):(r=L,t=j(t,!1,!1),n=Object(n));for(var i=0,o=t.length;i<o;i++){var a=t[i],u=n[a];r(u,a,n)&&(e[a]=u)}return e}),p.omit=g(function(n,e){var t,r=e[0];return p.isFunction(r)?(r=p.negate(r),1<e.length&&(t=e[1])):(e=p.map(j(e,!1,!1),String),r=function(n,t){return!p.contains(e,t)}),p.pick(n,r,t)}),p.defaults=z(p.allKeys,!0),p.create=function(n,t){var e=y(n);return t&&p.extendOwn(e,t),e},p.clone=function(n){return p.isObject(n)?p.isArray(n)?n.slice():p.extend({},n):n},p.tap=function(n,t){return t(n),n},p.isMatch=function(n,t){var e=p.keys(t),r=e.length;if(null==n)return!r;for(var i=Object(n),o=0;o<r;o++){var a=e[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},D=function(n,t,e,r){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return!1;if(n!=n)return t!=t;var i=typeof n;return("function"===i||"object"===i||"object"==typeof t)&&M(n,t,e,r)},M=function(n,t,e,r){n instanceof p&&(n=n._wrapped),t instanceof p&&(t=t._wrapped);var i=d.call(n);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!=+n?+t!=+t:0==+n?1/+n==1/t:+n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object Symbol]":return f.valueOf.call(n)===f.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof n||"object"!=typeof t)return!1;var a=n.constructor,u=t.constructor;if(a!==u&&!(p.isFunction(a)&&a instanceof a&&p.isFunction(u)&&u instanceof u)&&"constructor"in n&&"constructor"in t)return!1}r=r||[];for(var s=(e=e||[]).length;s--;)if(e[s]===n)return r[s]===t;if(e.push(n),r.push(t),o){if((s=n.length)!==t.length)return!1;for(;s--;)if(!D(n[s],t[s],e,r))return!1}else{var l,c=p.keys(n);if(s=c.length,p.keys(t).length!==s)return!1;for(;s--;)if(l=c[s],!b(t,l)||!D(n[l],t[l],e,r))return!1}return e.pop(),r.pop(),!0},p.isEqual=function(n,t){return D(n,t)},p.isEmpty=function(n){return null==n||(A(n)&&(p.isArray(n)||p.isString(n)||p.isArguments(n))?0===n.length:0===p.keys(n).length)},p.isElement=function(n){return!(!n||1!==n.nodeType)},p.isArray=e||function(n){return"[object Array]"===d.call(n)},p.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},p.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){p["is"+t]=function(n){return d.call(n)==="[object "+t+"]"}}),p.isArguments(arguments)||(p.isArguments=function(n){return b(n,"callee")});var B=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof B&&(p.isFunction=function(n){return"function"==typeof n||!1}),p.isFinite=function(n){return!p.isSymbol(n)&&isFinite(n)&&!isNaN(parseFloat(n))},p.isNaN=function(n){return p.isNumber(n)&&isNaN(n)},p.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"===d.call(n)},p.isNull=function(n){return null===n},p.isUndefined=function(n){return void 0===n},p.has=function(n,t){if(!p.isArray(t))return b(n,t);for(var e=t.length,r=0;r<e;r++){var i=t[r];if(null==n||!o.call(n,i))return!1;n=n[i]}return!!e},p.noConflict=function(){return n._=t,this},p.identity=function(n){return n},p.constant=function(n){return function(){return n}},p.noop=function(){},p.property=function(t){return p.isArray(t)?function(n){return k(n,t)}:_(t)},p.propertyOf=function(t){return null==t?function(){}:function(n){return p.isArray(n)?k(t,n):t[n]}},p.matcher=p.matches=function(t){return t=p.extendOwn({},t),function(n){return p.isMatch(n,t)}},p.times=function(n,t,e){var r=Array(Math.max(0,n));t=v(t,e,1);for(var i=0;i<n;i++)r[i]=t(i);return r},p.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},p.now=Date.now||function(){return(new Date).getTime()};var H={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},R=p.invert(H),W=function(t){var e=function(n){return t[n]},n="(?:"+p.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(n){return n=null==n?"":""+n,r.test(n)?n.replace(i,e):n}};p.escape=W(H),p.unescape=W(R),p.result=function(n,t,e){p.isArray(t)||(t=[t]);var r=t.length;if(!r)return p.isFunction(e)?e.call(n):e;for(var i=0;i<r;i++){var o=null==n?void 0:n[t[i]];void 0===o&&(o=e,i=r),n=p.isFunction(o)?o.call(n):o}return n};var $=0;p.uniqueId=function(n){var t=++$+"";return n?n+t:t},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,K=function(n){return"\\"+V[n]};p.template=function(o,n,t){!n&&t&&(n=t),n=p.defaults({},n,p.templateSettings);var e,r=RegExp([(n.escape||U).source,(n.interpolate||U).source,(n.evaluate||U).source].join("|")+"|$","g"),a=0,u="__p+='";o.replace(r,function(n,t,e,r,i){return u+=o.slice(a,i).replace(q,K),a=i+n.length,t?u+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?u+="'+\n((__t=("+e+"))==null?'':__t)+\n'":r&&(u+="';\n"+r+"\n__p+='"),n}),u+="';\n",n.variable||(u="with(obj||{}){\n"+u+"}\n"),u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{e=new Function(n.variable||"obj","_",u)}catch(n){throw n.source=u,n}var i=function(n){return e.call(this,n,p)},s=n.variable||"obj";return i.source="function("+s+"){\n"+u+"}",i},p.chain=function(n){var t=p(n);return t._chain=!0,t};var Q=function(n,t){return n._chain?p(t).chain():t};p.mixin=function(e){return p.each(p.functions(e),function(n){var t=p[n]=e[n];p.prototype[n]=function(){var n=[this._wrapped];return i.apply(n,arguments),Q(this,t.apply(p,n))}}),p},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=r[t];p.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Q(this,n)}}),p.each(["concat","join","slice"],function(n){var t=r[n];p.prototype[n]=function(){return Q(this,t.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},p.prototype.valueOf=p.prototype.toJSON=p.prototype.value,p.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}(),function(i){i.fn.fitText=function(n,t){var e=n||1,r=i.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},t);return this.each(function(){var n=i(this),t=function(){n.css("font-size",Math.max(Math.min(n.width()/(10*e),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize)))};t(),i(window).on("resize.fittext orientationchange.fittext",t)})}}(jQuery),function(l,c){var e="nimbleLazyLoad",r={load_all_images_on_first_scroll:!1,excludeImg:[],threshold:200,fadeIn_options:{duration:400},delaySmartLoadEvent:0},i="smartload-skip";function t(n,t){this.element=n,this.options=l.extend({},r,t),_utils_.isArray(this.options.excludeImg)?this.options.excludeImg.push("."+i):this.options.excludeImg=["."+i],this._defaults=r,this._name=e,this.init()}t.prototype.init=function(){var t=this,e=l("[data-sek-src]:not("+this.options.excludeImg.join()+"), [data-sek-iframe-src]",this.element);this.increment=1,this.timer=0,e.addClass(i).bind("sek_load_img",{},function(){t._load_img(this)}).bind("sek_load_iframe",{},function(){t._load_iframe(this)}),l(c).scroll(function(n){t._better_scroll_event_handler(e,n)}),l(c).resize(_utils_.debounce(function(n){t._maybe_trigger_load(e,n)},100)),this._maybe_trigger_load(e)},t.prototype._better_scroll_event_handler=function(n,t){var e=this;this.doingAnimation||(this.doingAnimation=!0,c.requestAnimationFrame(function(){e._maybe_trigger_load(n,t),e.doingAnimation=!1}))},t.prototype._maybe_trigger_load=function(n,e){var r=this;n.filter(function(n,t){return r._is_visible(t,e)}).map(function(n,t){"IFRAME"===l(t).prop("tagName")?l(t).trigger("sek_load_iframe"):l(t).trigger("sek_load_img")})},t.prototype._is_visible=function(n,t){var r=function(n){if(0<n.length&&n.is(":visible"))return n;var t=n.prev();if(0<t.length&&t.is(":visible"))return t;if(0<t.length&&!t.is(":visible"))return r(t);var e=n.parent();return 0<e.length?r(e):null},e=r(l(n));if(!e||e.length<1)return!1;var i=l(c).scrollTop(),o=i+l(c).height(),a=e.offset().top,u=a+e.height(),s=this.options.threshold;return!(!t||"scroll"!=t.type||!this.options.load_all_images_on_first_scroll)||i-s<=u&&a<=o+s},t.prototype._load_img=function(n){var t=l(n),e=t.attr("data-sek-src"),r=t.attr("data-sek-srcset"),i=t.attr("data-sek-sizes"),o=l("<img />",{src:e});t.addClass("lazy-loading"),t.unbind("sek_load_img"),o.load(function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+e+")"):(t.attr("src",e),r&&t.attr("srcset",r),i&&t.attr("sizes",i)),t.hasClass("sek-lazy-loaded")||t.addClass("sek-lazy-loaded"),t.trigger("smartload"),t.data("sek-lazy-loaded",!0)}),o[0].complete&&o.load(),t.removeClass("lazy-loading")},t.prototype._load_iframe=function(n){var t=l(n);t.unbind("sek_load_iframe"),t.attr("src",function(){var n=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),t.data("sek-lazy-loaded",!0),t.trigger("smartload"),t.hasClass("sek-lazy-loaded")||t.addClass("sek-lazy-loaded"),n})},l.fn[e]=function(n){return this.each(function(){l.data(this,"plugin_"+e)||l.data(this,"plugin_"+e,new t(this,n))})}}(jQuery,window),function(e,u){var r="parallaxBg",i={parallaxForce:40,oncustom:[],matchMedia:"only screen and (max-width: 800px)"};function t(n,t){this.element=e(n),this.options=e.extend({},i,t,this.parseElementDataOptions()),this._defaults=i,this._name=r,this.init()}t.prototype.parseElementDataOptions=function(){return this.element.data()},t.prototype.init=function(){var t=this;this.$_window=e(u),this.doingAnimation=!1,this.isVisible=!1,this.isBefore=!1,this.isAfter=!0,("number"!=typeof t.options.parallaxForce||t.options.parallaxForce<0)&&(sekFrontLocalized.isDevMode&&console.log("parallaxBg => the provided parallaxForce is invalid => "+t.options.parallaxForce),t.options.parallaxForce=this._defaults.parallaxForce),100<t.options.parallaxForce&&(t.options.parallaxForce=100),this.$_window.scroll(function(n){t.maybeParallaxMe(n)}),this.$_window.resize(_utils_.debounce(function(n){t.maybeParallaxMe(n)},100)),this.checkIfIsVisibleAndCacheProperties(),this.setTopPositionAndBackgroundSize()},t.prototype.setTopPositionAndBackgroundSize=function(){if(_utils_.isFunction(u.matchMedia)&&matchMedia(this.options.matchMedia).matches)this.element.css({"background-position-y":"","background-attachment":""});else{var n=this.element,t=(n.outerHeight(),this.$_window.height()),e=n.offset().top,r=this.$_window.scrollTop(),i=100;this.isVisible?i=(e-r)/t:this.isBefore?i=1:this.isAfter&&(i=-1);var o=0<this.options.parallaxForce?t*(100-this.options.parallaxForce)/100:t,a=Math.round(i*o);this.element.css({"background-position-y":["calc(50% ",0<a?"+ ":"- ",Math.abs(a)+"px)"].join("")})}},t.prototype.checkIfIsVisibleAndCacheProperties=function(n){var t=this.element;if(!t.is(":visible"))return!1;var e=this.$_window.scrollTop(),r=e+this.$_window.height(),i=t.offset().top,o=i+t.outerHeight();return this.isVisible=e<=o&&i<=r,this.isBefore=r<i,this.isAfter=o<e,this.isVisible},t.prototype.maybeParallaxMe=function(n){var t=this;this.checkIfIsVisibleAndCacheProperties()&&(this.doingAnimation||(this.doingAnimation=!0,u.requestAnimationFrame(function(){t.setTopPositionAndBackgroundSize(),t.doingAnimation=!1})))},e.fn[r]=function(n){return this.each(function(){e.data(this,"plugin_"+r)||e.data(this,"plugin_"+r,new t(this,n))})}}(jQuery,window),jQuery(function(n){n('[data-sek-module-type="czr_image_module"]').each(function(){if($linkCandidate=n(this).find(".sek-link-to-img-lightbox"),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript"))&&"function"==typeof n.fn.magnificPopup)try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(n){"function"==typeof window.console.log&&console.log(n)}})}),jQuery(function(n){n(".sektion-wrapper").each(function(){try{n(this).nimbleLazyLoad()}catch(n){"function"==typeof window.console.log&&console.log(n)}})}),jQuery(function(t){t('[data-sek-bg-parallax="true"]').each(function(){t(this).parallaxBg({parallaxForce:t(this).data("sek-parallax-force")})});var e=function(){t(this).parallaxBg({parallaxForce:t(this).data("sek-parallax-force")}),setTimeout(function(){t("body").trigger("resize")},500)};t("body").on("sek-level-refreshed sek-section-added",function(n){"true"===t(this).data("sek-bg-parallax")?e.call(this):t(this).find('[data-sek-bg-parallax="true"]').each(function(){e.call(this)})})}),jQuery(function(o){var a=function(n){var t=document.createElement("a");t.href=n,t.href=t.href;for(var e=["host","hostname","hash","href","port","protocol","search"],r=0,i=e.length;r<i;r++)this[e[r]]=t[e[r]];this.pathname=("/"!==t.pathname.charAt(0)?"/":"")+t.pathname},u=o("html, body");o("body").find(".menu-item").on("click","a",function(n){var t=o(this).attr("href");if(""!==t&&null!==t&&"string"==typeof t&&-1!==t.indexOf("#")){var e=new a(t),r=new a(window.document.location.href);if(e.pathname===r.pathname&&"string"==typeof e.hash&&""!==e.hash){var i=o('[data-sek-level="location"]').find('[id="'+e.hash.replace("#","")+'"]');1===i.length&&(n.preventDefault(),u.animate({scrollTop:i.offset().top-150},400))}}})}),jQuery(function(p){var n,o,a,u,s,l;!function(){var l="sek.sekDropdown",n="."+l,e={PLACE_ME:"placeme"+n,PLACE_ALL:"placeall"+n,SHOWN:"shown"+n,SHOW:"show"+n,HIDDEN:"hidden"+n,HIDE:"hide"+n,CLICK:"click"+n,TAP:"tap"+n},c="sek-dropdown-menu",t="sek-dropdown-submenu",r="show",i="menu-item-has-children",o='[data-toggle="sek-dropdown"]',a=".sek-nav-wrap .menu-item-has-children",u=".sek-nav-wrap .menu-item-has-children";p(".sek-nav .children, .sek-nav .sub-menu").addClass(c),p(".sek-nav-wrap .page_item_has_children").addClass(i),p(".sek-nav ."+c+" ."+i).addClass(t);var s,f,d;s=a,p(document).on("mouseenter",s,function(){var t=p(this);_utils_.debounce(function(){if("static"==t.find("."+c).css("position"))return!1;if(!t.hasClass(r)){t.trigger(e.SHOW).addClass(r).trigger(e.SHOWN);var n=t.children(o);n.length&&n[0].setAttribute("aria-expanded","true")}},30)()}).on("mouseleave",s,function(){var t=p(this);_utils_.debounce(function(){if(t.find("ul li:hover").length<1&&!t.closest("ul").find("li:hover").is(t)){t.trigger(e.HIDE).removeClass(r).trigger(e.HIDDEN);var n=t.children(o);n.length&&n[0].setAttribute("aria-expanded","false")}},30)()}),f="rtl"===p("html").attr("dir"),d=!1,p(window).on("resize",function(){d||(d=!0,window.requestAnimationFrame(function(){p(u+"."+r).trigger(e.PLACE_ME),d=!1}))}),p(document).on(e.PLACE_ALL,function(){p(u).trigger(e.PLACE_ME)}).on(e.SHOWN+" "+e.PLACE_ME,u,function(n){n.stopPropagation(),function(n,t){if(t&&t.namespace&&l===t.namespace){var e,r,i,o,a,u,s=n.children("."+c);s.length&&(n.css("overflow","hidden"),s.css({zIndex:"-100",display:"block"}),r=n,i=f?{_DEFAULT:"left",_OPPOSITE:"right"}:{_DEFAULT:"right",_OPPOSITE:"left"},o={OPEN_PREFIX:"open-",DD_SUBMENU:"sek-dropdown-submenu",CARET_TITLE_FLIP:"sek-menu-link__row-reverse",DROPDOWN:"sek-dropdown-menu"},a=function(n,e,t){p.each(n,function(){var n=p(this),t=n.find("a").first();1==t.length&&t.toggleClass(o.CARET_TITLE_FLIP,e==i._OPPOSITE)})},u=function(n){var t=n==i._OPPOSITE?i._DEFAULT:i._OPPOSITE;e.removeClass(o.OPEN_PREFIX+t).addClass(o.OPEN_PREFIX+n),r.hasClass(o.DD_SUBMENU)&&(a(r,n,t),a(e.children("."+o.DD_SUBMENU),n,t))},(e=s).parent().closest("."+o.DROPDOWN).hasClass(o.OPEN_PREFIX+i._OPPOSITE)?u(i._OPPOSITE):u(i._DEFAULT),e.offset().left+e.width()>p(window).width()?u("left"):e.offset().left<0&&u("right"),s.css({zIndex:"",display:""}),n.css("overflow",""))}}(p(this),n)})}(),o={SHOW:"show"+(n=".sek.sekCollapse"),SHOWN:"shown"+n,HIDE:"hide"+n,HIDDEN:"hidden"+n,CLICK_DATA_API:"click"+n+".data-api"},a="show",u="sek-collapse",s="sek-collapsing",l="sek-collapsed",p(document).on(o.CLICK_DATA_API,'[data-sek-toggle="sek-collapse"]',function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var t=p(this),e=t.data("target");p(e).each(function(){var r=p(this),i=r.hasClass(a);r.stop()[i?"slideUp":"slideDown"]({duration:400,start:function(){r.addClass(s).trigger(i?o.HIDE:o.SHOW),i?t.addClass(l).attr("aria-expanded","false"):t.removeClass(l).attr("aria-expanded","true")},complete:function(){var n,t,e;i?(n=a,t=u,e=o.HIDDEN):(n=u,t=a,e=o.SHOWN),r.removeClass(s+" "+n).addClass(t).trigger(e),function(n){(n=n||p(this)).css({display:"",paddingTop:"",marginTop:"",paddingBottom:"",marginBottom:"",height:""})}(r)}})})}),p(document).on("mouseenter",".sek-nav-toggler",function(){p(this).addClass("hovering")}).on("mouseleave",".sek-nav-toggler",function(){p(this).removeClass("hovering")}).on("show.sek.sekCollapse hide.sek.sekCollapse",".sek-nav-collapse",function(){p("[data-target=#"+p(this).attr("id")+"]").removeClass("hovering"),p(window).trigger("scroll")}),p(document).on("ready",function(){var t=function(){p('[data-sek-module-type="czr_menu_module"]').find('[data-sek-expand-below="yes"]').each(function(){if(!0!==p(this).data("sek-setup-menu-mobile-expanded-below-done")){var n=p(this).closest('[data-sek-module-type="czr_menu_module"]').clone(!0),t=p(".sek-nav-collapse",this).attr("id")+"-mobile";n.appendTo(p(this).closest(".sek-sektion-inner")).wrap('<div class="sek-col-base sek-mobile-menu-expanded-below" id="'+t+'-wrapper"></div>'),p(".sek-nav-collapse","#"+t+"-wrapper").attr("id",t),p(".sek-nav-toggler","#"+t+"-wrapper").detach(),p(".sek-nav-toggler",this).data("target","#"+t).attr("aria-controls",t),p(this).data("sek-setup-menu-mobile-expanded-below-done",!0)}})};t(),p("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",function(n){p(".sek-mobile-menu-expanded-below").remove(),t()})})});
assets/img/section_assets/contact_two.jpg DELETED
Binary file
assets/img/section_assets/features_two.jpg DELETED
Binary file
assets/img/section_assets/intro_one.jpg DELETED
Binary file
assets/img/section_assets/intro_three.jpg DELETED
Binary file
assets/img/section_assets/intro_two.jpg DELETED
Binary file
assets/img/section_assets/logo_placeholder_190x80.jpg DELETED
Binary file
assets/img/section_assets/thumbs/contact_one.jpg DELETED
Binary file
assets/img/section_assets/thumbs/contact_two.jpg DELETED
Binary file
assets/img/section_assets/thumbs/features_one.jpg DELETED
Binary file
assets/img/section_assets/thumbs/features_two.jpg DELETED
Binary file
assets/img/section_assets/thumbs/footer_one.jpg DELETED
Binary file
assets/img/section_assets/thumbs/four_columns.jpg DELETED
Binary file
assets/img/section_assets/thumbs/header_one.jpg DELETED
Binary file
assets/img/section_assets/thumbs/intro_one.jpg DELETED
Binary file
assets/img/section_assets/thumbs/intro_three.jpg DELETED
Binary file
assets/img/section_assets/thumbs/intro_two.jpg DELETED
Binary file
assets/img/section_assets/thumbs/three_columns.jpg DELETED
Binary file
assets/img/section_assets/thumbs/two_columns.jpg DELETED
Binary file
assets/preset_sections.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "intro_one" : {"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_heading_module","value":{"main_settings":{"heading_text":"Our creative Lab","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:regular","font_size_css":{"desktop":"46px","tablet":"30px","mobile":"20px"},"color_css":"#000000","text_transform_css":"uppercase"},"spacing":{"spacing_css":{"desktop":{"margin-bottom":"10","unit":"px"}}}},"options":{"spacing":[]},"ver_ini":"1.1.0"},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","value":{"main_settings":{"content":"Helps you bring your ideas to life.","h_alignment_css":{"desktop":"center"},"autop":false},"font_settings":{"font_family_css":"[gfont]Roboto:italic","font_size_css":{"desktop":"20px","tablet":"18px","mobile":"16px"},"color_css":"#6d6d6d"}},"options":{"spacing":[]},"ver_ini":"1.1.0"}],"options":{"bg":{"bg-color":"rgba(255,255,255,0.75)","bg-color-overlay":"#000000","bg-opacity-overlay":"40"},"spacing":{"pad_marg":{"desktop":{"padding-right":"20","padding-left":"20","padding-top":"70","padding-bottom":"70"},"tablet":{"padding-top":"40","padding-bottom":"40","padding-right":"10","padding-left":"10"},"mobile":{"padding-top":"30","padding-bottom":"30"}}}},"ver_ini":"1.1.0"}],"options":{"bg":{"bg-image":"::img-path::/assets/img/section_assets/intro_one.jpg","bg-color-overlay":"#000000","bg-opacity-overlay":"40"},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"525px","tablet":"50%","mobile":"85%"}},"spacing":{"pad_marg":{"desktop":{"padding-top":"250","padding-bottom":"250"},"tablet":{"padding-bottom":"200","padding-top":"200"},"mobile":{"padding-top":"150","padding-bottom":"150"}}}},"ver_ini":"1.1.0"},
3
- "intro_two" : {"collection":[{"id":"","level":"column","collection":[],"ver_ini":"1.1.0","width":""},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Design your <strong>own space</strong>","h_alignment_css":{"desktop":"right","mobile":"center"},"autop":false},"font_settings":{"font_family_css":"[gfont]Montserrat:regular","font_size_css":{"desktop":"50px","tablet":"33px"},"color_css":"#ffffff"}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.","h_alignment_css":{"desktop":"right","mobile":"justify"}},"font_settings":{"font_family_css":"[gfont]Roboto:regular","color_css":"#ffffff"}}},{"id":"","level":"module","module_type":"czr_button_module","ver_ini":"1.1.0","value":{"content":{"button_text":"Start now"},"design":{"bg_color_css":"#c5a872","bg_color_hover":"#151515","border_radius_css":"2","h_alignment_css":{"desktop":"right","mobile":"center"}},"font":{"font_family_css":"[gfont]Roboto:regular","color_css":"#ffffff","font_style_css":"italic"}}}],"ver_ini":"1.1.0","options":{"spacing":{"pad_marg":{"desktop":{"padding-left":"63"},"mobile":{"padding-left":"0"}}}}}],"options":{"bg":{"bg-image":"::img-path::/assets/img/section_assets/intro_two.jpg","bg-position":{"desktop":"top","tablet":"top_left","mobile":"center"},"bg-apply-overlay":true},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"960px"}},"breakpoint":{"use-custom-breakpoint":true,"custom-breakpoint":"575"},"spacing":{"pad_marg":{"desktop":{"padding-top":"180","padding-bottom":"180"},"tablet":{"padding-right":"20","padding-left":"20"},"mobile":{"padding-right":"10","padding-left":"10","padding-top":"150","padding-bottom":"150"}}}},"ver_ini":"1.1.0"},
4
- "intro_three" : {"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"We can help you<br/><strong><i>grow</i></strong> your business !","heading_tag":"h2","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"50px","tablet":"40px","mobile":"30px"},"color_css":"#000000"},"spacing":{"spacing_css":{"desktop":{"margin-bottom":"14"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Roboto:regular","font_size_css":{"desktop":"18px","tablet":"17px","mobile":"16px"},"color_css":"#514f4f"}}},{"id":"","level":"module","module_type":"czr_button_module","ver_ini":"1.1.0","value":{"content":{"button_text":"Learn more","link-to":"url","link-pick-url":{"id":"_custom_","type_label":"","title":"<span style=\"font-weight:bold\">Set a custom url</span>","url":""},"link-custom-url":"mailto:contact@youremail.com","icon":"far fa-envelope-open"},"design":{"bg_color_css":"#ff595e","bg_color_hover":"#151515","border_radius_css":{"_all_":"10px"},"h_alignment_css":"center"},"font":{"font_family_css":"[gfont]Roboto:regular","font_size_css":{"desktop":"20px","mobile":"16px","tablet":"18px"},"color_css":"#ffffff"}}}],"ver_ini":"1.1.0","options":{"spacing":{"pad_marg":{"desktop":{"padding-left":"20","padding-right":"20"},"mobile":{"padding-left":"0","padding-right":"0"}}}}}],"ver_ini":"1.1.0","options":{"bg":{"bg-image":"::img-path::/assets/img/section_assets/intro_three.jpg","bg-position":{"desktop":"top","mobile":"center"},"bg-parallax":true,"bg-opacity-overlay":"22"},"spacing":{"pad_marg":{"desktop":{"padding-top":"200","padding-bottom":"200"},"mobile":{"padding-top":"150","padding-bottom":"150"}}},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"600px"}}}},
5
- "features_one" : {"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Our services","heading_tag":"h2","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"45px","tablet":"40px","mobile":"30px"},"color_css":"#000000"},"spacing":{"spacing_css":{"desktop":{"margin-bottom":"3","margin-top":"3"}}}}},{"id":"","is_nested":true,"level":"section","collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"fas fa-award","font_size_css":{"desktop":"34px"},"color_css":"#19b934"}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Award winning ","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Poppins:500","font_size_css":{"desktop":"25px","tablet":"18px"}},"spacing":{"spacing_css":{"desktop":{"margin-top":"10","margin-bottom":"10"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:500","font_size_css":{"desktop":"16px","tablet":"15px","mobile":"15px"},"color_css":"#727272"}}},{"id":"","level":"module","module_type":"czr_button_module","ver_ini":"1.1.0","value":{"content":{"button_text":"Learn more"},"design":{"bg_color_css":"#19b934","bg_color_hover":"#151515","border_radius_css":"2","h_alignment_css":"center"},"font":{"font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}},"options":{"spacing":{"pad_marg":{"desktop":{"margin-top":"1","unit":"em"}}}}}],"ver_ini":"1.1.0","options":{"border":{"shadow":true},"spacing":{"pad_marg":{"desktop":{"margin-right":"10","margin-left":"10","padding-top":"50","padding-bottom":"50","padding-left":"15","padding-right":"15","margin-bottom":"20"},"tablet":{"padding-top":"30","padding-bottom":"30"}}}},"width":""},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"fas fa-rocket","font_size_css":{"desktop":"34px"},"color_css":"#19b934"}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Performances ","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Poppins:500","font_size_css":{"desktop":"25px","tablet":"18px"}},"spacing":{"spacing_css":{"desktop":{"margin-top":"10","margin-bottom":"10"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:500","font_size_css":{"desktop":"16px","tablet":"15px","mobile":"15px"},"color_css":"#727272"}}},{"id":"","level":"module","module_type":"czr_button_module","ver_ini":"1.1.0","value":{"content":{"button_text":"Learn more"},"design":{"bg_color_css":"#19b934","bg_color_hover":"#151515","border_radius_css":"2","h_alignment_css":"center"},"font":{"font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}},"options":{"spacing":{"pad_marg":{"desktop":{"margin-top":"1","unit":"em"}}}}}],"ver_ini":"1.1.0","options":{"border":{"shadow":true},"spacing":{"pad_marg":{"desktop":{"margin-right":"10","margin-left":"10","padding-top":"50","padding-bottom":"50","padding-left":"15","padding-right":"15","margin-bottom":"20"},"tablet":{"padding-top":"30","padding-bottom":"30"}}}},"width":""},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"fas fa-hands-helping","font_size_css":{"desktop":"34px"},"color_css":"#19b934"}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Top support","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Poppins:500","font_size_css":{"desktop":"25px","tablet":"18px"}},"spacing":{"spacing_css":{"desktop":{"margin-top":"10","margin-bottom":"10"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:500","font_size_css":{"desktop":"16px","tablet":"15px","mobile":"15px"},"color_css":"#727272"}}},{"id":"","level":"module","module_type":"czr_button_module","ver_ini":"1.1.0","value":{"content":{"button_text":"Learn more"},"design":{"bg_color_css":"#19b934","bg_color_hover":"#151515","border_radius_css":"2","h_alignment_css":"center"},"font":{"font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}},"options":{"spacing":{"pad_marg":{"desktop":{"margin-top":"1","unit":"em"}}}}}],"ver_ini":"1.1.0","options":{"border":{"shadow":true},"spacing":{"pad_marg":{"desktop":{"margin-right":"10","margin-left":"10","padding-top":"50","padding-bottom":"50","padding-left":"15","padding-right":"15","margin-bottom":"20"},"tablet":{"padding-top":"30","padding-bottom":"30"}}}},"width":""}],"options":{"spacing":{"pad_marg":{"desktop":{"padding-bottom":"180","padding-top":"80"},"tablet":{"padding-top":"70","padding-bottom":"130"},"mobile":{"padding-top":"30","padding-bottom":"50"}}},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"960px"}},"breakpoint":{"use-custom-breakpoint":true,"custom-breakpoint":"720"}},"ver_ini":"1.1.0"}],"ver_ini":"1.1.0"}],"ver_ini":"1.1.0","options":{"spacing":{"pad_marg":{"desktop":{"padding-top":"100"},"tablet":{"padding-top":"80"},"mobile":{"padding-top":"30"}}}}},
6
- "features_two" : {"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"fas fa-chart-line","font_size_css":"40px","color_css":"#ffffff"},"spacing_border":{"spacing_css":{"desktop":{"padding-top":"30","padding-bottom":"30","padding-right":"30","padding-left":"30"}},"border-type":"solid","borders":{"_all_":{"wght":"3px","col":"#ffffff"}},"border_radius_css":{"_all_":"119px"},"use_box_shadow":true}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"High performances","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Lato:regular","font_size_css":{"desktop":"27px","mobile":"22px","tablet":"24px"},"color_css":"#ffffff"},"spacing":{"spacing_css":{"desktop":{"margin-top":"15","margin-bottom":"15"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:italic","font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}}}],"ver_ini":"1.1.0","width":"","options":{"spacing":{"pad_marg":{"desktop":[],"mobile":{},"tablet":{"margin-bottom":"20"}}}}},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"fas fa-award","font_size_css":"40px","color_css":"#ffffff"},"spacing_border":{"spacing_css":{"desktop":{"padding-top":"30","padding-bottom":"30","padding-right":"30","padding-left":"30"}},"border-type":"solid","borders":{"_all_":{"wght":"3px","col":"#ffffff"}},"border_radius_css":{"_all_":"231px"},"use_box_shadow":true}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Industry leader","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Lato:regular","font_size_css":{"desktop":"27px","mobile":"22px","tablet":"24px"},"color_css":"#ffffff"},"spacing":{"spacing_css":{"desktop":{"margin-top":"15","margin-bottom":"15"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:italic","font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}}}],"ver_ini":"1.1.0","width":"","options":{"spacing":{"pad_marg":{"desktop":[],"mobile":{},"tablet":{"margin-bottom":"20"}}}}},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_icon_module","ver_ini":"1.1.0","value":{"icon_settings":{"icon":"far fa-clock","font_size_css":"40px","color_css":"#ffffff"},"spacing_border":{"spacing_css":{"desktop":{"padding-top":"30","padding-bottom":"30","padding-right":"30","padding-left":"30"}},"border-type":"solid","borders":{"_all_":{"wght":"3px","col":"#ffffff"}},"border_radius_css":{"_all_":"119px"},"use_box_shadow":true}}},{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.0","value":{"main_settings":{"heading_text":"Delivers on time","heading_tag":"h3","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Lato:regular","font_size_css":{"desktop":"27px","mobile":"22px","tablet":"24px"},"color_css":"#ffffff"},"spacing":{"spacing_css":{"desktop":{"margin-top":"15","margin-bottom":"15"}}}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.0","value":{"main_settings":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Montserrat:italic","font_size_css":{"desktop":"17px","mobile":"15px"},"color_css":"#ffffff"}}}],"ver_ini":"1.1.0","width":"","options":{"spacing":{"pad_marg":{"desktop":[],"mobile":{},"tablet":{"margin-bottom":"20"}}}}}],"options":{"bg":{"bg-image":"::img-path::/assets/img/section_assets/features_two.jpg","bg-attachment":true,"bg-apply-overlay":true,"bg-opacity-overlay":"62"},"spacing":{"pad_marg":{"desktop":{"padding-top":"200","padding-bottom":"200"},"mobile":{"padding-top":"100","padding-bottom":"100","padding-left":"5","padding-right":"5"},"tablet":{"padding-top":"150","padding-bottom":"150","padding-left":"40","padding-right":"40"}}},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"960px"}},"breakpoint":{"use-custom-breakpoint":true,"custom-breakpoint":"660"}},"ver_ini":"1.1.0"},
7
- "contact_one":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_map_module","ver_ini":"1.1.6","value":{"address":"405 East 42nd Street, New York, NY, 10017, USA","zoom":"16","height_css":{"desktop":"588px","mobile":"336px"}}}],"ver_ini":"1.1.6","width":"","options":{"spacing":{"pad_marg":{"desktop":{"margin-right":"10","margin-left":"10"}}}}},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.6","value":{"main_settings":{"heading_text":"Drop us a line","heading_tag":"h2","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Roboto:regular","font_size_css":{"desktop":"32px","mobile":"23px"},"color_css":"#141414"}}},{"id":"","level":"module","module_type":"czr_tiny_mce_editor_module","ver_ini":"1.1.6","value":{"main_settings":{"content":"Contact us for anything you want to know! We are happy to answer any question you have as quickly as possible.","h_alignment_css":{"desktop":"justify"}},"font_settings":{"font_family_css":"[gfont]Montserrat:regular","color_css":"#333333"}}},{"id":"","level":"module","module_type":"czr_simple_form_module","ver_ini":"1.1.6","value":{"fields_design":{"borders":{"_all_":{"wght":"0px","col":"#cccccc"},"bottom":{"wght":"1px","col":"#cccccc"}},"use_inset_shadow":false,"border":{"_all_":{"wght":"1px","col":"#cccccc"}}},"form_button":{"bg_color_css":"#020202","bg_color_hover":"#151515","h_alignment_css":{"desktop":"center"},"spacing_css":{"margin-top":0.5,"padding-top":0.5,"padding-bottom":0.5,"padding-right":"2","padding-left":"2","unit":"em"}},"form_fonts":{"fl_font_family_css":"[gfont]Montserrat:regular","fl_font_weight_css":"700","btn_font_family_css":"[gfont]Montserrat:regular","btn_color_css":"#ffffff"},"form_submission":{"email_footer":""}},"options":{"spacing":{"pad_marg":{"desktop":[],"tablet":{"padding-left":"10","padding-right":"15"},"mobile":{"padding-right":"25"}}}}}],"width":"","ver_ini":"1.1.6","options":{"spacing":{"pad_marg":{"desktop":{"margin-right":"10","margin-left":"10"},"tablet":{"margin-left":"10","margin-right":"10","padding-right":"20","padding-left":"20"}}},"bg":[]}}],"options":{"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"1000px"}},"spacing":{"pad_marg":{"desktop":{"padding-top":"75","padding-bottom":"75"},"tablet":{"padding-top":"40","padding-bottom":"40"}}},"breakpoint":{"reverse-col-at-breakpoint":true}},"ver_ini":"1.1.6"},
8
- "contact_two":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_heading_module","ver_ini":"1.1.6","value":{"main_settings":{"heading_text":"CONTACT US","heading_tag":"h2","h_alignment_css":{"desktop":"center"}},"font_settings":{"font_family_css":"[gfont]Roboto:regular","font_size_css":{"desktop":"40px","tablet":"35px","mobile":"25px"},"color_css":"#ffffff"},"spacing":{"spacing_css":{"desktop":{"margin-bottom":"5"}}}}},{"id":"","level":"module","module_type":"czr_simple_form_module","ver_ini":"1.1.6","value":{"fields_design":{"border-type":"none","use_outset_shadow":true,"border":{"_all_":{"wght":"1px","col":"#cccccc"}}},"form_button":{"bg_color_hover":"#151515","border-type":"solid","borders":{"_all_":{"wght":"0px","col":""}},"border_radius_css":"2","h_alignment_css":{"desktop":"center"},"spacing_css":{"margin-top":0.5,"padding-top":0.5,"padding-bottom":0.5,"padding-right":"3","padding-left":"3","unit":"em"}},"form_fonts":{"fl_font_family_css":"[cfont]Lucida Console,Monaco,monospace","fl_color_css":"#ffffff","btn_color_css":"#ffffff"},"form_submission":{"email_footer":""}}}],"ver_ini":"1.1.6"}],"ver_ini":"1.1.6","options":{"bg":{"bg-image":"::img-path::/assets/img/section_assets/contact_two.jpg","bg-apply-overlay":true,"bg-color-overlay":"#752a2a"},"spacing":{"pad_marg":{"desktop":{"padding-top":"120","padding-bottom":"120"},"tablet":{"padding-top":"85","padding-bottom":"85"},"mobile":{"padding-top":"40","padding-bottom":"40"}}},"width":{"use-custom-inner-width":true,"inner-section-width":{"desktop":"600px"}}}},
9
- "two_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
10
- "three_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
11
- "four_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
12
- "header_one":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_image_module","ver_ini":"1.4.0","value":{"main_settings":{"img":"::img-path::/assets/img/section_assets/logo_placeholder_190x80.jpg","img-size":"original","link-to":"url","link-pick-url":{"id":"_custom_","type_label":"","title":"<span style=\"font-weight:bold\">Set a custom url</span>","url":""},"link-custom-url":"{{home_url}}"},"borders_corners":{"border_radius_css":{"_all_":"8px"}}},"options":{"spacing":{"pad_marg":{"desktop":{"padding-top":"8","padding-bottom":"8"}}}}}],"ver_ini":"1.4.0","width":25},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_menu_module","ver_ini":"1.4.0","value":{"content":{"h_alignment_css":{"desktop":"right"}},"font":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"18px"},"text_transform_css":"uppercase"}}}],"ver_ini":"1.4.0","width":75}],"ver_ini":"1.4.0"},
13
- "footer_one":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]}
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/admin/nimble-admin.php CHANGED
@@ -484,7 +484,7 @@ function sek_register_dashboard_widgets() {
484
  $wp_meta_boxes['dashboard']['normal']['core'] = array_merge( $nimble_widget, $dashboard );
485
  }
486
  function sek_nimble_dashboard_callback_fn() {
487
- $post_data = sek_get_latest_posts_data( false );
488
  $theme_name = sek_get_parent_theme_slug();
489
  ?>
490
  <div class="nimble-db-wrapper">
@@ -541,7 +541,7 @@ function sek_nimble_dashboard_callback_fn() {
541
  $theme_name = sek_get_parent_theme_slug();
542
 
543
  if ( sek_is_presscustomizr_theme( $theme_name ) ) {
544
- $cta = sek_get_cta_message( $theme_name, false );
545
  if ( !empty( $cta ) ) {
546
  $cta_link = array(
547
  'cta' => array(
@@ -567,95 +567,3 @@ function sek_nimble_dashboard_callback_fn() {
567
  </div>
568
  <?php
569
  }
570
- function sek_is_presscustomizr_theme( $theme_name ) {
571
- $bool = false;
572
- if ( is_string( $theme_name ) ) {
573
- foreach ( ['customizr', 'hueman'] as $pc_theme ) {
574
- if ( !$bool && $pc_theme === substr( $theme_name, 0, strlen($pc_theme) ) ) {
575
- $bool = true;
576
- }
577
- }
578
- }
579
- return $bool;
580
- }
581
- function sek_maybe_get_presscustomizr_theme_name( $theme_name ) {
582
- if ( is_string( $theme_name ) ) {
583
- foreach ( ['customizr', 'hueman'] as $pc_theme ) {
584
- if ( $pc_theme === substr( $theme_name, 0, strlen($pc_theme) ) ) {
585
- $theme_name = $pc_theme;
586
- }
587
- }
588
- }
589
- return $theme_name;
590
- }
591
- if ( !defined( "NIMBLE_LIBRARY_OPT_NAME" ) ) { define( "NIMBLE_LIBRARY_OPT_NAME", 'nimble_api_library_data' ); }
592
- if ( !defined( "NIMBLE_NEWS_OPT_NAME" ) ) { define( "NIMBLE_NEWS_OPT_NAME", 'nimble_api_news_data' ); }
593
- if ( !defined( "NIMBLE_DATA_API_URL" ) ) { define( "NIMBLE_DATA_API_URL", 'https://presscustomizr.com/wp-json/nimble/v1/cravan' ); }
594
- function sek_get_info_data( $force_update = false ) {
595
- $api_data_transient_name = 'nimble_api_data_' . NIMBLE_VERSION;
596
- $info_data = get_transient( $api_data_transient_name );
597
- if ( $force_update || false === $info_data ) {
598
- $timeout = ( $force_update ) ? 25 : 8;
599
- $response = wp_remote_get( NIMBLE_DATA_API_URL, array(
600
- 'timeout' => $timeout,
601
- 'body' => [
602
- 'api_version' => NIMBLE_VERSION,
603
- 'site_lang' => get_bloginfo( 'language' ),
604
- 'theme_name' => sek_maybe_get_presscustomizr_theme_name( sek_get_parent_theme_slug() )
605
- ],
606
- ) );
607
-
608
- if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
609
- set_transient( $api_data_transient_name, [], 2 * HOUR_IN_SECONDS );
610
- return false;
611
- }
612
-
613
- $info_data = json_decode( wp_remote_retrieve_body( $response ), true );
614
-
615
- if ( empty( $info_data ) || ! is_array( $info_data ) ) {
616
- set_transient( $api_data_transient_name, [], 2 * HOUR_IN_SECONDS );
617
- return false;
618
- }
619
-
620
- if ( !empty( $info_data['library'] ) ) {
621
- update_option( NIMBLE_LIBRARY_OPT_NAME, $info_data['library'], 'no' );
622
- unset( $info_data['library'] );
623
- }
624
-
625
- if ( isset( $info_data['latest_posts'] ) ) {
626
- update_option( NIMBLE_NEWS_OPT_NAME, $info_data['latest_posts'], 'no' );
627
- unset( $info_data['latest_posts'] );
628
- }
629
-
630
- set_transient( $api_data_transient_name, $info_data, 12 * HOUR_IN_SECONDS );
631
- }//if ( $force_update || false === $info_data ) {
632
-
633
- return $info_data;
634
- }
635
- function sek_get_latest_posts_data( $force_update = false ) {
636
- sek_get_info_data( $force_update );
637
- $latest_posts = get_option( NIMBLE_NEWS_OPT_NAME );
638
- if ( empty( $latest_posts ) ) {
639
- return array();
640
- }
641
- return $latest_posts;
642
- }
643
- function sek_get_cta_message( $theme_name, $force_update = false ) {
644
- $info_data = sek_get_info_data( $force_update );
645
- if ( !sek_is_presscustomizr_theme( $theme_name ) || ! is_array( $info_data ) ) {
646
- return '';
647
- }
648
- $message = '';
649
- $cta_data = isset( $info_data['cta'] ) ? $info_data['cta'] : null;
650
-
651
- $fn = 'customizr' === sek_maybe_get_presscustomizr_theme_name( $theme_name ) ? 'czr_fn_user_started_before_version' : 'hu_user_started_before_version';
652
- if ( function_exists($fn) && !is_null($cta_data) && isset( $cta_data['started_before'] ) && call_user_func_array( $fn, array( $cta_data['started_before'] ) ) ) {
653
- $message = !empty( $cta_data['html'] ) ? $cta_data['html'] : '';
654
- }
655
- return $message;
656
- }
657
-
658
- add_action( 'after_switch_theme', '\Nimble\sek_refresh_nimble_api_data');
659
- function sek_refresh_nimble_api_data() {
660
- sek_get_info_data(true);
661
- }
484
  $wp_meta_boxes['dashboard']['normal']['core'] = array_merge( $nimble_widget, $dashboard );
485
  }
486
  function sek_nimble_dashboard_callback_fn() {
487
+ $post_data = sek_get_latest_posts_api_data( false );
488
  $theme_name = sek_get_parent_theme_slug();
489
  ?>
490
  <div class="nimble-db-wrapper">
541
  $theme_name = sek_get_parent_theme_slug();
542
 
543
  if ( sek_is_presscustomizr_theme( $theme_name ) ) {
544
+ $cta = sek_get_cta_message_from_api( $theme_name, false );
545
  if ( !empty( $cta ) ) {
546
  $cta_link = array(
547
  'cta' => array(
567
  </div>
568
  <?php
569
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -87,7 +87,9 @@ function sek_enqueue_controls_js_css() {
87
  'basic_btns' => array('forecolor','bold','italic','underline','strikethrough','link','unlink'),
88
  'basic_btns_nolink' => array('forecolor','bold','italic','underline','strikethrough'),
89
 
90
- 'eligibleForReviewNotification' => sek_get_feedback_notif_status()
 
 
91
  )
92
  )
93
  );//wp_localize_script()
@@ -504,23 +506,7 @@ function add_sektion_values_to_skope_export( $skopes ) {
504
 
505
  return $new_skopes;
506
  }
507
- function sek_get_preset_sektions() {
508
- $transient_name = 'nimble_preset_sections_' . NIMBLE_VERSION;
509
- $transient_data = get_transient( $transient_name );
510
- if ( false == $transient_data || empty( $transient_data ) || sek_is_dev_mode() ) {
511
- $preset_raw = @file_get_contents( NIMBLE_BASE_PATH ."/assets/preset_sections.json" );
512
- if ( $preset_raw === false ) {
513
- $preset_raw = wp_remote_fopen( NIMBLE_BASE_PATH ."/assets/preset_sections.json" );
514
- }
515
 
516
- $presets_decoded = json_decode( $preset_raw, true );
517
- set_transient( $transient_name , $presets_decoded , 60*60*24*30 );
518
- }
519
- else {
520
- $presets_decoded = $transient_data;
521
- }
522
- return $presets_decoded;
523
- }
524
 
525
 
526
  add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_nimble_customizer_tmpl' );
@@ -598,7 +584,7 @@ function sek_print_nimble_customizer_tmpl() {
598
  <div class="sek-feedback-step-one">
599
  <div class="sek-main-feedback-heading">
600
  <img class="sek-feedback-nimble-icon big" src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php _e('Nimble Builder','nimble-builder'); ?>"/>
601
- <p>Congratulations! You have created sections on several pages of your website.</p>
602
  </div>
603
  <p>Are you enjoying Nimble Builder ?</p>
604
  <button class="button sek-feedback-btn sek-neg" data-sek-feedback-action="not_enjoying" type="button">
@@ -624,7 +610,7 @@ function sek_print_nimble_customizer_tmpl() {
624
  <div class="sek-feedback-step-two-enjoying">
625
  <span class="sek-stars" data-sek-feedback-action="go_review">&#9733;&#9733;&#9733;&#9733;&#9733;</span>
626
  <p>Awesome! Could you please leave a rating on WordPress.org ?<br/>
627
- That would help other users discover Nimble Builder and help me improve the plugin. A huge thanks in advance!</p>
628
  <p class="sek-signature">-Nicolas, Founder and Lead Developer of Nimble Builder</p>
629
  <button class="button sek-feedback-btn sek-neg" data-sek-feedback-action="maybe_later" type="button">
630
  <?php _e('No thanks, maybe later', 'nimble-builder'); ?>
@@ -2755,39 +2741,6 @@ function sek_is_img_url( $url = '' ) {
2755
  }
2756
  return false;
2757
  }
2758
- function sek_sideload_img_and_return_attachment_id( $img_url ) {
2759
- preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $img_url, $matches );
2760
- $filename = basename( $matches[0] );
2761
- if ( 'nimble_asset_' !== substr($filename, 0, strlen('nimble_asset_') ) ) {
2762
- $filename = 'nimble_asset_' . $filename;
2763
- }
2764
- $img_title = preg_replace( '/\.[^.]+$/', '', trim( $filename ) );
2765
- $args = array(
2766
- 'posts_per_page' => 1,
2767
- 'post_type' => 'attachment',
2768
- 'name' => $img_title
2769
- );
2770
- $get_attachment = new \WP_Query( $args );
2771
- if ( is_array( $get_attachment->posts ) && array_key_exists(0, $get_attachment->posts) ) {
2772
- $img_id_already_uploaded = $get_attachment->posts[0] -> ID;
2773
- }
2774
- if ( isset($img_id_already_uploaded) ) {
2775
- return $img_id_already_uploaded;
2776
- }
2777
- $file_array = array();
2778
- $file_array['name'] = $filename;
2779
- $file_array['tmp_name'] = download_url( $img_url );
2780
- if ( is_wp_error( $file_array['tmp_name'] ) ) {
2781
- return $file_array['tmp_name'];
2782
- }
2783
- $id = media_handle_sideload( $file_array, 0 );
2784
- if ( is_wp_error( $id ) ) {
2785
- @unlink( $file_array['tmp_name'] );
2786
- }
2787
- return $id;
2788
- }
2789
-
2790
-
2791
 
2792
  ?><?php
2793
  add_action( 'customize_save_validation_before', '\Nimble\sek_remove_callback_wp_targeted_link_rel' );
@@ -2963,119 +2916,24 @@ function sek_set_input_tmpl___section_picker( $input_id, $input_data ) {
2963
  <input data-czrtype="<?php echo $input_id; ?>" type="hidden"/>
2964
  <div class="sek-content-type-wrapper">
2965
  <?php
2966
- $content_collection = array();
2967
- switch( $input_id ) {
2968
- case 'intro_sections' :
2969
- $content_collection = array(
2970
- array(
2971
- 'content-type' => 'preset_section',
2972
- 'content-id' => 'intro_three',
2973
- 'title' => __('1 columns, call to action, full-width background', 'nimble-builder' ),
2974
- 'thumb' => 'intro_three.jpg'
2975
- ),
2976
- array(
2977
- 'content-type' => 'preset_section',
2978
- 'content-id' => 'intro_one',
2979
- 'title' => __('1 column, full-width background', 'nimble-builder' ),
2980
- 'thumb' => 'intro_one.jpg'
2981
- ),
2982
- array(
2983
- 'content-type' => 'preset_section',
2984
- 'content-id' => 'intro_two',
2985
- 'title' => __('2 columns, call to action, full-width background', 'nimble-builder' ),
2986
- 'thumb' => 'intro_two.jpg'
2987
- )
2988
- );
2989
- break;
2990
- case 'features_sections' :
2991
- $content_collection = array(
2992
- array(
2993
- 'content-type' => 'preset_section',
2994
- 'content-id' => 'features_one',
2995
- 'title' => __('3 columns with icon and call to action', 'nimble-builder' ),
2996
- 'thumb' => 'features_one.jpg',
2997
- ),
2998
- array(
2999
- 'content-type' => 'preset_section',
3000
- 'content-id' => 'features_two',
3001
- 'title' => __('3 columns with icon', 'nimble-builder' ),
3002
- 'thumb' => 'features_two.jpg',
3003
- )
3004
- );
3005
- break;
3006
- case 'contact_sections' :
3007
- $content_collection = array(
3008
- array(
3009
- 'content-type' => 'preset_section',
3010
- 'content-id' => 'contact_one',
3011
- 'title' => __('A contact form and a Google map', 'nimble-builder' ),
3012
- 'thumb' => 'contact_one.jpg',
3013
- ),
3014
- array(
3015
- 'content-type' => 'preset_section',
3016
- 'content-id' => 'contact_two',
3017
- 'title' => __('A contact form with an image background', 'nimble-builder' ),
3018
- 'thumb' => 'contact_two.jpg',
3019
- )
3020
- );
3021
- break;
3022
- case 'layout_sections' :
3023
- $content_collection = array(
3024
- array(
3025
- 'content-type' => 'preset_section',
3026
- 'content-id' => 'two_columns',
3027
- 'title' => __('two columns layout', 'nimble-builder' ),
3028
- 'thumb' => 'two_columns.jpg'
3029
- ),
3030
- array(
3031
- 'content-type' => 'preset_section',
3032
- 'content-id' => 'three_columns',
3033
- 'title' => __('three columns layout', 'nimble-builder' ),
3034
- 'thumb' => 'three_columns.jpg'
3035
- ),
3036
- array(
3037
- 'content-type' => 'preset_section',
3038
- 'content-id' => 'four_columns',
3039
- 'title' => __('four columns layout', 'nimble-builder' ),
3040
- 'thumb' => 'four_columns.jpg'
3041
- ),
3042
- );
3043
- break;
3044
- case 'header_sections' :
3045
- $content_collection = array(
3046
- array(
3047
- 'content-type' => 'preset_section',
3048
- 'content-id' => 'header_one',
3049
- 'title' => __('simple header with a logo on the right, menu on the left', 'nimble-builder' ),
3050
- 'thumb' => 'header_one.jpg',
3051
- 'height' => '33px'
3052
- )
3053
- );
3054
- break;
3055
- case 'footer_sections' :
3056
- $content_collection = array(
3057
- array(
3058
- 'content-type' => 'preset_section',
3059
- 'content-id' => 'footer_one',
3060
- 'title' => __('simple footer with 3 columns and large bottom zone', 'nimble-builder' ),
3061
- 'thumb' => 'footer_one.jpg'
3062
- )
3063
- );
3064
- break;
3065
  }
 
 
3066
  foreach( $content_collection as $_params) {
3067
  $section_type = 'content';
3068
- if ( false !== strpos($_params['content-id'], 'header_') ) {
3069
- $section_type = 'header';
3070
- } else if ( false !== strpos($_params['content-id'], 'footer_') ) {
3071
- $section_type = 'footer';
3072
  }
3073
 
3074
  printf('<div draggable="true" data-sek-content-type="%1$s" data-sek-content-id="%2$s" style="%3$s" title="%4$s" data-sek-section-type="%5$s"><div class="sek-overlay"></div></div>',
3075
- $_params['content-type'],
3076
  $_params['content-id'],
3077
  sprintf( 'background: url(%1$s) 50% 50% / cover no-repeat;%2$s',
3078
- NIMBLE_BASE_URL . '/assets/img/section_assets/thumbs/' . $_params['thumb'] . '?ver=' . NIMBLE_VERSION,
3079
  isset( $_params['height'] ) ? 'height:'.$_params['height'] : ''
3080
  ),
3081
  $_params['title'],
@@ -3083,7 +2941,7 @@ function sek_set_input_tmpl___section_picker( $input_id, $input_data ) {
3083
  );
3084
  }
3085
  ?>
3086
- </div>
3087
  <?php
3088
  }
3089
 
87
  'basic_btns' => array('forecolor','bold','italic','underline','strikethrough','link','unlink'),
88
  'basic_btns_nolink' => array('forecolor','bold','italic','underline','strikethrough'),
89
 
90
+ 'eligibleForFeedbackNotification' => sek_get_feedback_notif_status(),
91
+
92
+ 'presetSectionsModules' => array_keys( sek_get_sections_registration_params_api_data() )
93
  )
94
  )
95
  );//wp_localize_script()
506
 
507
  return $new_skopes;
508
  }
 
 
 
 
 
 
 
 
509
 
 
 
 
 
 
 
 
 
510
 
511
 
512
  add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_nimble_customizer_tmpl' );
584
  <div class="sek-feedback-step-one">
585
  <div class="sek-main-feedback-heading">
586
  <img class="sek-feedback-nimble-icon big" src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php _e('Nimble Builder','nimble-builder'); ?>"/>
587
+ <p>Congratulations! You have created several sections with Nimble Builder on your website.</p>
588
  </div>
589
  <p>Are you enjoying Nimble Builder ?</p>
590
  <button class="button sek-feedback-btn sek-neg" data-sek-feedback-action="not_enjoying" type="button">
610
  <div class="sek-feedback-step-two-enjoying">
611
  <span class="sek-stars" data-sek-feedback-action="go_review">&#9733;&#9733;&#9733;&#9733;&#9733;</span>
612
  <p>Awesome! Could you please leave a rating on WordPress.org ?<br/>
613
+ This would encourage other users to discover Nimble Builder and help me improve the plugin. A huge thanks in advance!</p>
614
  <p class="sek-signature">-Nicolas, Founder and Lead Developer of Nimble Builder</p>
615
  <button class="button sek-feedback-btn sek-neg" data-sek-feedback-action="maybe_later" type="button">
616
  <?php _e('No thanks, maybe later', 'nimble-builder'); ?>
2741
  }
2742
  return false;
2743
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2744
 
2745
  ?><?php
2746
  add_action( 'customize_save_validation_before', '\Nimble\sek_remove_callback_wp_targeted_link_rel' );
2916
  <input data-czrtype="<?php echo $input_id; ?>" type="hidden"/>
2917
  <div class="sek-content-type-wrapper">
2918
  <?php
2919
+ if ( !is_array( $input_data['section_collection'] ) || empty( $input_data['section_collection'] ) ) {
2920
+ $current_module = is_array( CZR_Fmk_Base()->current_module_params_when_ajaxing ) ? CZR_Fmk_Base()->current_module_params_when_ajaxing['module_type'] : 'undefined';
2921
+ sek_error_log( __FUNCTION__ . ' => missing section_collection param for module ' . $current_module );
2922
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2923
  }
2924
+ $content_collection = $input_data['section_collection'];
2925
+
2926
  foreach( $content_collection as $_params) {
2927
  $section_type = 'content';
2928
+ if ( !empty($input_data['section_type']) ) {
2929
+ $section_type = $input_data['section_type'];
 
 
2930
  }
2931
 
2932
  printf('<div draggable="true" data-sek-content-type="%1$s" data-sek-content-id="%2$s" style="%3$s" title="%4$s" data-sek-section-type="%5$s"><div class="sek-overlay"></div></div>',
2933
+ 'preset_section',
2934
  $_params['content-id'],
2935
  sprintf( 'background: url(%1$s) 50% 50% / cover no-repeat;%2$s',
2936
+ $_params['thumb'] . '?ver=' . NIMBLE_VERSION,
2937
  isset( $_params['height'] ) ? 'height:'.$_params['height'] : ''
2938
  ),
2939
  $_params['title'],
2941
  );
2942
  }
2943
  ?>
2944
+ </div><?php //class="sek-content-type-wrapper" ?>
2945
  <?php
2946
  }
2947
 
inc/sektions/ccat-sektions.php CHANGED
@@ -259,6 +259,10 @@ function sek_page_uses_nimble_header_footer() {
259
  * REGISTERED MODULES => GET PROPERTY
260
  /* ------------------------------------------------------------------------- */
261
  function sek_get_registered_module_type_property( $module_type, $property = '' ) {
 
 
 
 
262
  $registered_modules = CZR_Fmk_Base()->registered_modules;
263
  if ( ! array_key_exists( $module_type, $registered_modules ) ) {
264
  sek_error_log( __FUNCTION__ . ' => ' . $module_type . ' not registered.' );
@@ -312,6 +316,10 @@ function sek_get_default_module_model( $module_type = '' ) {
312
  $default = array();
313
  if ( empty( $module_type ) || is_null( $module_type ) )
314
  return $default;
 
 
 
 
315
  $default_models = Nimble_Manager()->default_models;
316
  if ( ! empty( $default_models[ $module_type ] ) ) {
317
  $default = $default_models[ $module_type ];
@@ -382,6 +390,10 @@ function sek_get_registered_module_input_list( $module_type = '' ) {
382
  $input_list = array();
383
  if ( empty( $module_type ) || is_null( $module_type ) )
384
  return $input_list;
 
 
 
 
385
  $cached_input_lists = Nimble_Manager()->cached_input_lists;
386
  if ( ! empty( $cached_input_lists[ $module_type ] ) ) {
387
  $input_list = $cached_input_lists[ $module_type ];
@@ -582,8 +594,10 @@ function sek_normalize_local_options_with_defaults( $option_name, $raw_module_va
582
  } else {
583
  $module_type = $local_option_map[$option_name];
584
  }
585
- if( CZR_Fmk_Base()->czr_is_module_registered($module_type) ) {
586
- $normalized_values = _sek_normalize_single_module_values( $normalized_values, $module_type );
 
 
587
  }
588
  return $normalized_values;
589
  }
@@ -625,8 +639,12 @@ function sek_normalize_global_options_with_defaults( $option_name, $raw_module_v
625
  } else {
626
  $module_type = $global_option_map[$option_name];
627
  }
628
- if( CZR_Fmk_Base()->czr_is_module_registered($module_type) ) {
629
- $normalized_values = _sek_normalize_single_module_values( $normalized_values, $module_type );
 
 
 
 
630
  }
631
  return $normalized_values;
632
  }
@@ -1358,7 +1376,7 @@ function sek_get_feedback_notif_status() {
1358
  return;
1359
 
1360
  $modules_used = array_unique($modules_used);
1361
- return $customized_pages > 1 && $nb_section_created > 3 && count($modules_used) > 3;
1362
  }
1363
  function sek_count_not_empty_sections_in_page( $seks_data, $count = 0 ) {
1364
  if ( ! is_array( $seks_data ) ) {
@@ -1403,6 +1421,164 @@ function sek_feedback_notice_is_dismissed() {
1403
  function sek_feedback_notice_is_postponed() {
1404
  return 'maybe_later' === get_transient( NIMBLE_FEEDBACK_NOTICE_ID );
1405
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1406
 
1407
  ?><?php
1408
  add_action( 'admin_bar_menu', '\Nimble\sek_add_customize_link', 1000 );
@@ -2679,17 +2855,49 @@ function sek_extract_numeric_value( $value ) {
2679
  ?><?php
2680
  add_action( 'after_setup_theme', '\Nimble\sek_schedule_module_registration', 50 );
2681
  function sek_schedule_module_registration() {
2682
- if ( skp_is_customizing() || ( defined('DOING_AJAX') && DOING_AJAX ) || isset( $_POST['nimble_simple_cf'] ) ) {
2683
- sek_register_modules();
 
 
 
2684
  } else {
2685
- add_action( 'wp', '\Nimble\sek_register_modules', PHP_INT_MAX );
2686
  }
2687
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2688
 
 
 
 
 
 
 
 
 
 
 
2689
 
2690
-
2691
- function sek_register_modules() {
2692
- $modules = apply_filters( 'nimble_pre_module_registration', array(), current_filter() );
 
 
 
 
 
2693
  $module_candidates = array();
2694
  foreach ($modules as $key => $value) {
2695
  if ( is_array( $value ) ) {
@@ -2699,7 +2907,6 @@ function sek_register_modules() {
2699
  }
2700
  }
2701
  $module_candidates = array_unique( $module_candidates );
2702
-
2703
  foreach ( $module_candidates as $module_name ) {
2704
  $fn = "Nimble\sek_get_module_params_for_{$module_name}";
2705
  if ( function_exists( $fn ) ) {
@@ -2713,44 +2920,6 @@ function sek_register_modules() {
2713
  error_log( __FUNCTION__ . ' missing params callback fn for module ' . $module_name );
2714
  }
2715
  }
2716
- }//sek_register_modules()
2717
-
2718
-
2719
- add_filter( 'nimble_pre_module_registration', '\Nimble\sek_filter_modules_to_register', 10, 2 );
2720
- function sek_filter_modules_to_register( $modules, $hook ) {
2721
- if ( 'wp' !== $hook ) {
2722
- $modules = array_merge(
2723
- $modules,
2724
- SEK_Front_Construct::$ui_picker_modules,
2725
- SEK_Front_Construct::$ui_level_modules,
2726
- SEK_Front_Construct::$ui_local_global_options_modules,
2727
- SEK_Front_Construct::$ui_front_modules
2728
- );
2729
- if ( sek_is_header_footer_enabled() ) {
2730
- $modules = array_merge( $modules, SEK_Front_Construct::$ui_front_beta_modules );
2731
- }
2732
- } else {
2733
- sek_populate_contextually_active_module_list();
2734
-
2735
- $contextually_actives = array();
2736
- $front_modules = array_merge( SEK_Front_Construct::$ui_front_modules, SEK_Front_Construct::$ui_front_beta_modules );
2737
- foreach ( Nimble_Manager()->contextually_active_modules as $module_name ) {
2738
- if ( array_key_exists( $module_name, $front_modules ) ) {
2739
- $contextually_actives[] = $front_modules[ $module_name ];
2740
- }
2741
- if ( in_array( $module_name, $front_modules ) ) {
2742
- $contextually_actives[] = $module_name;
2743
- }
2744
- }
2745
-
2746
- $modules = array_merge(
2747
- $modules,
2748
- $contextually_actives,
2749
- SEK_Front_Construct::$ui_level_modules,
2750
- SEK_Front_Construct::$ui_local_global_options_modules
2751
- );
2752
- }
2753
- return $modules;
2754
  }
2755
  function sek_populate_contextually_active_module_list( $recursive_data = null ) {
2756
  if ( is_null( $recursive_data ) ) {
@@ -2771,6 +2940,38 @@ function sek_populate_contextually_active_module_list( $recursive_data = null )
2771
  }
2772
  }
2773
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2774
  function sek_get_select_options_for_input_id( $input_id ) {
2775
  $options = array();
2776
  switch( $input_id ) {
@@ -2985,108 +3186,6 @@ function sek_get_module_params_for_sek_module_picker_module() {
2985
  /* ------------------------------------------------------------------------- *
2986
  * SEKTION PICKER MODULES
2987
  /* ------------------------------------------------------------------------- */
2988
- function sek_get_default_section_input_params() {
2989
- return array(
2990
- 'input_type' => 'section_picker',
2991
- 'title' => __('Drag-and-drop or double-click a section to insert it into a drop zone of the preview page.', 'nimble-builder'),
2992
- 'width-100' => true,
2993
- 'title_width' => 'width-100'
2994
- );
2995
-
2996
- }
2997
- function sek_get_module_params_for_sek_intro_sec_picker_module() {
2998
- return array(
2999
- 'dynamic_registration' => true,
3000
- 'module_type' => 'sek_intro_sec_picker_module',
3001
- 'name' => __('Sections for an introduction', 'nimble-builder'),
3002
- 'tmpl' => array(
3003
- 'item-inputs' => array(
3004
- 'intro_sections' => sek_get_default_section_input_params()
3005
- )
3006
- )
3007
- );
3008
- }
3009
- function sek_get_module_params_for_sek_features_sec_picker_module() {
3010
- return array(
3011
- 'dynamic_registration' => true,
3012
- 'module_type' => 'sek_features_sec_picker_module',
3013
- 'name' => __('Sections for services and features', 'nimble-builder'),
3014
- 'tmpl' => array(
3015
- 'item-inputs' => array(
3016
- 'features_sections' => sek_get_default_section_input_params()
3017
- )
3018
- )
3019
- );
3020
- }
3021
-
3022
- function sek_get_module_params_for_sek_contact_sec_picker_module() {
3023
- return array(
3024
- 'dynamic_registration' => true,
3025
- 'module_type' => 'sek_contact_sec_picker_module',
3026
- 'name' => __('Contact-us sections', 'nimble-builder'),
3027
- 'tmpl' => array(
3028
- 'item-inputs' => array(
3029
- 'contact_sections' => sek_get_default_section_input_params()
3030
- )
3031
- )
3032
- );
3033
- }
3034
-
3035
- function sek_get_module_params_for_sek_column_layouts_sec_picker_module() {
3036
- return array(
3037
- 'dynamic_registration' => true,
3038
- 'module_type' => 'sek_column_layouts_sec_picker_module',
3039
- 'name' => __('Empty sections with columns layout', 'nimble-builder'),
3040
- 'tmpl' => array(
3041
- 'item-inputs' => array(
3042
- 'layout_sections' => sek_get_default_section_input_params()
3043
- )
3044
- )
3045
- );
3046
- }
3047
-
3048
- function sek_get_module_params_for_sek_header_sec_picker_module() {
3049
- return array(
3050
- 'dynamic_registration' => true,
3051
- 'module_type' => 'sek_header_sec_picker_module',
3052
- 'name' => __('Header sections', 'nimble-builder'),
3053
- 'tmpl' => array(
3054
- 'item-inputs' => array(
3055
- 'header_sections' => sek_get_default_section_input_params()
3056
- )
3057
- )
3058
- );
3059
- }
3060
- function sek_get_module_params_for_sek_footer_sec_picker_module() {
3061
- return array(
3062
- 'dynamic_registration' => true,
3063
- 'module_type' => 'sek_footer_sec_picker_module',
3064
- 'name' => __('Footer sections', 'nimble-builder'),
3065
- 'tmpl' => array(
3066
- 'item-inputs' => array(
3067
- 'footer_sections' => sek_get_default_section_input_params()
3068
- )
3069
- )
3070
- );
3071
- }
3072
-
3073
-
3074
-
3075
-
3076
-
3077
-
3078
- function sek_get_module_params_for_sek_my_sections_sec_picker_module() {
3079
- return array(
3080
- 'dynamic_registration' => true,
3081
- 'module_type' => 'sek_my_sections_sec_picker_module',
3082
- 'name' => __('My sections', 'nimble-builder'),
3083
- 'tmpl' => array(
3084
- 'item-inputs' => array(
3085
- 'my_sections' => sek_get_default_section_input_params()
3086
- )
3087
- )
3088
- );
3089
- }
3090
  ?><?php
3091
  function sek_get_module_params_for_sek_level_bg_module() {
3092
  return array(
@@ -7699,7 +7798,7 @@ function sek_get_module_params_for_czr_post_grid_main_child() {
7699
 
7700
  'apply_shadow_on_hover' => array(
7701
  'input_type' => 'nimblecheck',
7702
- 'title' => __('Apply a shadow effect on hover', 'nimble-builder'),
7703
  'default' => false,
7704
  'title_width' => 'width-80',
7705
  'input_width' => 'width-20'
@@ -10233,13 +10332,7 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
10233
 
10234
  public static $ui_picker_modules = [
10235
  'sek_content_type_switcher_module',
10236
- 'sek_module_picker_module',
10237
-
10238
- 'sek_intro_sec_picker_module',
10239
- 'sek_features_sec_picker_module',
10240
- 'sek_contact_sec_picker_module',
10241
- 'sek_column_layouts_sec_picker_module',
10242
- 'sek_my_sections_sec_picker_module'
10243
  ];
10244
 
10245
  public static $ui_level_modules = [
@@ -10338,8 +10431,6 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
10338
  ];
10339
 
10340
  public static $ui_front_beta_modules = [
10341
- 'sek_header_sec_picker_module',
10342
- 'sek_footer_sec_picker_module',
10343
  'czr_menu_module' => array(
10344
  'czr_menu_module',
10345
  'czr_menu_content_child',
@@ -10454,9 +10545,9 @@ if ( ! class_exists( 'SEK_Front_Ajax' ) ) :
10454
  }
10455
  function sek_get_preset_sektions() {
10456
  $this->sek_do_ajax_pre_checks();
10457
- $preset_sections = sek_get_preset_sektions();
10458
  if ( empty( $preset_sections ) ) {
10459
- wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => no preset_sections when running sek_get_preset_sektions()' );
10460
  }
10461
  wp_send_json_success( $preset_sections );
10462
  }
@@ -10632,13 +10723,13 @@ if ( ! class_exists( 'SEK_Front_Ajax' ) ) :
10632
  function sek_ajax_import_attachment() {
10633
  $this->sek_do_ajax_pre_checks( array( 'check_nonce' => false ) );
10634
 
10635
- if ( !isset( $_POST['rel_path'] ) || !is_string($_POST['rel_path']) ) {
10636
- wp_send_json_error( 'missing_or_invalid_rel_path_when_importing_image');
10637
  }
10638
 
10639
- $id = sek_sideload_img_and_return_attachment_id( NIMBLE_BASE_URL . $_POST['rel_path'] );
10640
  if ( is_wp_error( $id ) ) {
10641
- wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => problem when trying to wp_insert_attachment() for img : ' . $_POST['rel_path'] );
10642
  } else {
10643
  wp_send_json_success([
10644
  'id' => $id,
259
  * REGISTERED MODULES => GET PROPERTY
260
  /* ------------------------------------------------------------------------- */
261
  function sek_get_registered_module_type_property( $module_type, $property = '' ) {
262
+ if ( !class_exists('\Nimble\CZR_Fmk_Base') ) {
263
+ sek_error_log( __FUNCTION__ . ' => error => CZR_Fmk_Base not loaded' );
264
+ return;
265
+ }
266
  $registered_modules = CZR_Fmk_Base()->registered_modules;
267
  if ( ! array_key_exists( $module_type, $registered_modules ) ) {
268
  sek_error_log( __FUNCTION__ . ' => ' . $module_type . ' not registered.' );
316
  $default = array();
317
  if ( empty( $module_type ) || is_null( $module_type ) )
318
  return $default;
319
+ if ( !class_exists('\Nimble\CZR_Fmk_Base') ) {
320
+ sek_error_log( __FUNCTION__ . ' => error => CZR_Fmk_Base not loaded' );
321
+ return $default;
322
+ }
323
  $default_models = Nimble_Manager()->default_models;
324
  if ( ! empty( $default_models[ $module_type ] ) ) {
325
  $default = $default_models[ $module_type ];
390
  $input_list = array();
391
  if ( empty( $module_type ) || is_null( $module_type ) )
392
  return $input_list;
393
+ if ( !class_exists('\Nimble\CZR_Fmk_Base') ) {
394
+ sek_error_log( __FUNCTION__ . ' => error => CZR_Fmk_Base not loaded' );
395
+ return $input_list;
396
+ }
397
  $cached_input_lists = Nimble_Manager()->cached_input_lists;
398
  if ( ! empty( $cached_input_lists[ $module_type ] ) ) {
399
  $input_list = $cached_input_lists[ $module_type ];
594
  } else {
595
  $module_type = $local_option_map[$option_name];
596
  }
597
+ if ( class_exists('\Nimble\CZR_Fmk_Base') ) {
598
+ if( CZR_Fmk_Base()->czr_is_module_registered($module_type) ) {
599
+ $normalized_values = _sek_normalize_single_module_values( $normalized_values, $module_type );
600
+ }
601
  }
602
  return $normalized_values;
603
  }
639
  } else {
640
  $module_type = $global_option_map[$option_name];
641
  }
642
+ if ( class_exists('\Nimble\CZR_Fmk_Base') ) {
643
+ if( CZR_Fmk_Base()->czr_is_module_registered($module_type) ) {
644
+ $normalized_values = _sek_normalize_single_module_values( $normalized_values, $module_type );
645
+ }
646
+ } else {
647
+ sek_error_log( __FUNCTION__ . ' => error => CZR_Fmk_Base not loaded' );
648
  }
649
  return $normalized_values;
650
  }
1376
  return;
1377
 
1378
  $modules_used = array_unique($modules_used);
1379
+ return $customized_pages > 0 && $nb_section_created > 3 && count($modules_used) > 3;
1380
  }
1381
  function sek_count_not_empty_sections_in_page( $seks_data, $count = 0 ) {
1382
  if ( ! is_array( $seks_data ) ) {
1421
  function sek_feedback_notice_is_postponed() {
1422
  return 'maybe_later' === get_transient( NIMBLE_FEEDBACK_NOTICE_ID );
1423
  }
1424
+ function sek_is_presscustomizr_theme( $theme_name ) {
1425
+ $bool = false;
1426
+ if ( is_string( $theme_name ) ) {
1427
+ foreach ( ['customizr', 'hueman'] as $pc_theme ) {
1428
+ if ( !$bool && $pc_theme === substr( $theme_name, 0, strlen($pc_theme) ) ) {
1429
+ $bool = true;
1430
+ }
1431
+ }
1432
+ }
1433
+ return $bool;
1434
+ }
1435
+ function sek_maybe_get_presscustomizr_theme_name( $theme_name ) {
1436
+ if ( is_string( $theme_name ) ) {
1437
+ foreach ( ['customizr', 'hueman'] as $pc_theme ) {
1438
+ if ( $pc_theme === substr( $theme_name, 0, strlen($pc_theme) ) ) {
1439
+ $theme_name = $pc_theme;
1440
+ }
1441
+ }
1442
+ }
1443
+ return $theme_name;
1444
+ }
1445
+ function sek_sideload_img_and_return_attachment_id( $img_url ) {
1446
+ preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $img_url, $matches );
1447
+ $filename = basename( $matches[0] );
1448
+ if ( 'nimble_asset_' !== substr($filename, 0, strlen('nimble_asset_') ) ) {
1449
+ $filename = 'nimble_asset_' . $filename;
1450
+ }
1451
+ $img_title = preg_replace( '/\.[^.]+$/', '', trim( $filename ) );
1452
+ $args = array(
1453
+ 'posts_per_page' => 1,
1454
+ 'post_type' => 'attachment',
1455
+ 'post_status' => 'inherit',
1456
+ 'meta_query' => array(
1457
+ array(
1458
+ 'key' => '_wp_attachment_image_alt',
1459
+ 'value' => $img_title,
1460
+ 'compare' => '='
1461
+ ),
1462
+ ),
1463
+ );
1464
+ $get_attachment = new \WP_Query( $args );
1465
+ if ( is_array( $get_attachment->posts ) && array_key_exists(0, $get_attachment->posts) ) {
1466
+ $img_id_already_uploaded = $get_attachment->posts[0] -> ID;
1467
+ }
1468
+ if ( isset($img_id_already_uploaded) ) {
1469
+ return $img_id_already_uploaded;
1470
+ }
1471
+ $file_array = array();
1472
+ $file_array['name'] = $filename;
1473
+ $file_array['tmp_name'] = download_url( $img_url );
1474
+ if ( is_wp_error( $file_array['tmp_name'] ) ) {
1475
+ return $file_array['tmp_name'];
1476
+ }
1477
+ $id = media_handle_sideload( $file_array, 0 );
1478
+ if ( is_wp_error( $id ) ) {
1479
+ @unlink( $file_array['tmp_name'] );
1480
+ } else {
1481
+ add_post_meta( $id, '_wp_attachment_image_alt', $img_title, true );
1482
+ }
1483
+
1484
+ return $id;
1485
+ }
1486
+ ?><?php
1487
+ namespace Nimble;
1488
+ if ( !defined( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME" ) ) { define( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME", 'nimble_api_prebuilt_sections_data' ); }
1489
+ if ( !defined( "NIMBLE_NEWS_OPT_NAME" ) ) { define( "NIMBLE_NEWS_OPT_NAME", 'nimble_api_news_data' ); }
1490
+ if ( !defined( "NIMBLE_DATA_API_URL" ) ) { define( "NIMBLE_DATA_API_URL", 'https://api.nimblebuilder.com/wp-json/nimble/v1/cravan' ); }
1491
+ function sek_get_nimble_api_data( $force_update = false ) {
1492
+ $api_data_transient_name = 'nimble_api_data_' . NIMBLE_VERSION;
1493
+ $info_data = get_transient( $api_data_transient_name );
1494
+ $force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
1495
+ if ( $force_update || false === $info_data ) {
1496
+ $timeout = ( $force_update ) ? 25 : 8;
1497
+ $response = wp_remote_get( NIMBLE_DATA_API_URL, array(
1498
+ 'timeout' => $timeout,
1499
+ 'body' => [
1500
+ 'api_version' => NIMBLE_VERSION,
1501
+ 'site_lang' => get_bloginfo( 'language' ),
1502
+ 'theme_name' => sek_maybe_get_presscustomizr_theme_name( sek_get_parent_theme_slug() )
1503
+ ],
1504
+ ) );
1505
+
1506
+ if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
1507
+ set_transient( $api_data_transient_name, [], 2 * HOUR_IN_SECONDS );
1508
+ return false;
1509
+ }
1510
+
1511
+ $info_data = json_decode( wp_remote_retrieve_body( $response ), true );
1512
+
1513
+ if ( empty( $info_data ) || ! is_array( $info_data ) ) {
1514
+ set_transient( $api_data_transient_name, [], 2 * HOUR_IN_SECONDS );
1515
+ return false;
1516
+ }
1517
+
1518
+ if ( !empty( $info_data['library'] ) ) {
1519
+ if ( !empty( $info_data['library']['sections'] ) ) {
1520
+ update_option( NIMBLE_SECTIONS_LIBRARY_OPT_NAME, $info_data['library']['sections'], 'no' );
1521
+ }
1522
+ unset( $info_data['library'] );
1523
+ }
1524
+
1525
+ if ( isset( $info_data['latest_posts'] ) ) {
1526
+ update_option( NIMBLE_NEWS_OPT_NAME, $info_data['latest_posts'], 'no' );
1527
+ unset( $info_data['latest_posts'] );
1528
+ }
1529
+
1530
+ set_transient( $api_data_transient_name, $info_data, 12 * HOUR_IN_SECONDS );
1531
+ }//if ( $force_update || false === $info_data ) {
1532
+
1533
+ return $info_data;
1534
+ }
1535
+ function sek_get_sections_registration_params_api_data( $force_update = false ) {
1536
+ sek_get_nimble_api_data( $force_update );
1537
+ $sections_data = get_option( NIMBLE_SECTIONS_LIBRARY_OPT_NAME );
1538
+ if ( empty( $sections_data ) || !is_array( $sections_data ) || empty( $sections_data['registration_params'] ) ) {
1539
+ sek_error_log( __FUNCTION__ . ' => error => no section registration params' );
1540
+ return array();
1541
+ }
1542
+ return $sections_data['registration_params'];
1543
+ }
1544
+
1545
+ function sek_get_preset_sections_api_data( $force_update = false ) {
1546
+ sek_get_nimble_api_data( $force_update );
1547
+ $sections_data = get_option( NIMBLE_SECTIONS_LIBRARY_OPT_NAME );
1548
+ if ( empty( $sections_data ) || !is_array( $sections_data ) || empty( $sections_data['json_collection'] ) ) {
1549
+ sek_error_log( __FUNCTION__ . ' => error => no json_collection' );
1550
+ return array();
1551
+ }
1552
+ return $sections_data['json_collection'];
1553
+ }
1554
+ function sek_get_latest_posts_api_data( $force_update = false ) {
1555
+ sek_get_nimble_api_data( $force_update );
1556
+ $latest_posts = get_option( NIMBLE_NEWS_OPT_NAME );
1557
+ if ( empty( $latest_posts ) ) {
1558
+ sek_error_log( __FUNCTION__ . ' => error => no latest_posts' );
1559
+ return array();
1560
+ }
1561
+ return $latest_posts;
1562
+ }
1563
+ function sek_get_cta_message_from_api( $theme_name, $force_update = false ) {
1564
+ $info_data = sek_get_nimble_api_data( $force_update );
1565
+ if ( !sek_is_presscustomizr_theme( $theme_name ) || ! is_array( $info_data ) ) {
1566
+ return '';
1567
+ }
1568
+ $message = '';
1569
+ $cta_data = isset( $info_data['cta'] ) ? $info_data['cta'] : null;
1570
+
1571
+ $fn = 'customizr' === sek_maybe_get_presscustomizr_theme_name( $theme_name ) ? 'czr_fn_user_started_before_version' : 'hu_user_started_before_version';
1572
+ if ( function_exists($fn) && !is_null($cta_data) && isset( $cta_data['started_before'] ) && call_user_func_array( $fn, array( $cta_data['started_before'] ) ) ) {
1573
+ $message = !empty( $cta_data['html'] ) ? $cta_data['html'] : '';
1574
+ }
1575
+ return $message;
1576
+ }
1577
+
1578
+ add_action( 'after_switch_theme', '\Nimble\sek_refresh_nimble_api_data');
1579
+ function sek_refresh_nimble_api_data() {
1580
+ sek_get_nimble_api_data(true);
1581
+ }
1582
 
1583
  ?><?php
1584
  add_action( 'admin_bar_menu', '\Nimble\sek_add_customize_link', 1000 );
2855
  ?><?php
2856
  add_action( 'after_setup_theme', '\Nimble\sek_schedule_module_registration', 50 );
2857
  function sek_schedule_module_registration() {
2858
+ if ( isset( $_POST['nimble_simple_cf'] ) ) {
2859
+ sek_register_modules_when_customizing_or_ajaxing();
2860
+ } else if ( skp_is_customizing() || ( defined('DOING_AJAX') && DOING_AJAX ) ) {
2861
+ sek_register_modules_when_customizing_or_ajaxing();
2862
+ sek_register_prebuilt_section_modules();
2863
  } else {
2864
+ add_action( 'wp', '\Nimble\sek_register_modules_when_not_customizing_and_not_ajaxing', PHP_INT_MAX );
2865
  }
2866
  }
2867
+ function sek_register_modules_when_customizing_or_ajaxing() {
2868
+ $modules = array_merge(
2869
+ SEK_Front_Construct::$ui_picker_modules,
2870
+ SEK_Front_Construct::$ui_level_modules,
2871
+ SEK_Front_Construct::$ui_local_global_options_modules,
2872
+ SEK_Front_Construct::$ui_front_modules
2873
+ );
2874
+ if ( sek_is_header_footer_enabled() ) {
2875
+ $modules = array_merge( $modules, SEK_Front_Construct::$ui_front_beta_modules );
2876
+ }
2877
+ sek_do_register_module_collection( $modules );
2878
+ }
2879
+ function sek_register_modules_when_not_customizing_and_not_ajaxing() {
2880
+ sek_populate_contextually_active_module_list();
2881
 
2882
+ $contextually_actives = array();
2883
+ $front_modules = array_merge( SEK_Front_Construct::$ui_front_modules, SEK_Front_Construct::$ui_front_beta_modules );
2884
+ foreach ( Nimble_Manager()->contextually_active_modules as $module_name ) {
2885
+ if ( array_key_exists( $module_name, $front_modules ) ) {
2886
+ $contextually_actives[] = $front_modules[ $module_name ];
2887
+ }
2888
+ if ( in_array( $module_name, $front_modules ) ) {
2889
+ $contextually_actives[] = $module_name;
2890
+ }
2891
+ }
2892
 
2893
+ $modules = array_merge(
2894
+ $contextually_actives,
2895
+ SEK_Front_Construct::$ui_level_modules,
2896
+ SEK_Front_Construct::$ui_local_global_options_modules
2897
+ );
2898
+ sek_do_register_module_collection( $modules );
2899
+ }
2900
+ function sek_do_register_module_collection( $modules ) {
2901
  $module_candidates = array();
2902
  foreach ($modules as $key => $value) {
2903
  if ( is_array( $value ) ) {
2907
  }
2908
  }
2909
  $module_candidates = array_unique( $module_candidates );
 
2910
  foreach ( $module_candidates as $module_name ) {
2911
  $fn = "Nimble\sek_get_module_params_for_{$module_name}";
2912
  if ( function_exists( $fn ) ) {
2920
  error_log( __FUNCTION__ . ' missing params callback fn for module ' . $module_name );
2921
  }
2922
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2923
  }
2924
  function sek_populate_contextually_active_module_list( $recursive_data = null ) {
2925
  if ( is_null( $recursive_data ) ) {
2940
  }
2941
  }
2942
  }
2943
+ function sek_register_prebuilt_section_modules() {
2944
+ $registration_params = sek_get_sections_registration_params_api_data();
2945
+ $default_module_params = array(
2946
+ 'dynamic_registration' => true,
2947
+ 'module_type' => '',
2948
+ 'name' => '',
2949
+ 'tmpl' => array(
2950
+ 'item-inputs' => array(
2951
+ 'sections' => array(
2952
+ 'input_type' => 'section_picker',
2953
+ 'title' => __('Drag-and-drop or double-click a section to insert it into a drop zone of the preview page.', 'nimble-builder'),
2954
+ 'width-100' => true,
2955
+ 'title_width' => 'width-100',
2956
+ 'section_collection' => array()
2957
+ )
2958
+ )
2959
+ )
2960
+ );
2961
+
2962
+ foreach ( $registration_params as $module_type => $module_params ) {
2963
+ $module_params = wp_parse_args( $module_params, array(
2964
+ 'module_title' => '',
2965
+ 'section_collection' => array()
2966
+ ));
2967
+ $normalized_params = $default_module_params;
2968
+ $normalized_params['module_type'] = $module_type;
2969
+ $normalized_params['name'] = $module_params['module_title'];
2970
+ $normalized_params['tmpl']['item-inputs']['sections']['section_collection'] = $module_params['section_collection'];
2971
+ CZR_Fmk_Base()->czr_pre_register_dynamic_module( $normalized_params );
2972
+ }
2973
+
2974
+ }
2975
  function sek_get_select_options_for_input_id( $input_id ) {
2976
  $options = array();
2977
  switch( $input_id ) {
3186
  /* ------------------------------------------------------------------------- *
3187
  * SEKTION PICKER MODULES
3188
  /* ------------------------------------------------------------------------- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3189
  ?><?php
3190
  function sek_get_module_params_for_sek_level_bg_module() {
3191
  return array(
7798
 
7799
  'apply_shadow_on_hover' => array(
7800
  'input_type' => 'nimblecheck',
7801
+ 'title' => __('Apply a shadow effect when hovering with the cursor', 'nimble-builder'),
7802
  'default' => false,
7803
  'title_width' => 'width-80',
7804
  'input_width' => 'width-20'
10332
 
10333
  public static $ui_picker_modules = [
10334
  'sek_content_type_switcher_module',
10335
+ 'sek_module_picker_module'
 
 
 
 
 
 
10336
  ];
10337
 
10338
  public static $ui_level_modules = [
10431
  ];
10432
 
10433
  public static $ui_front_beta_modules = [
 
 
10434
  'czr_menu_module' => array(
10435
  'czr_menu_module',
10436
  'czr_menu_content_child',
10545
  }
10546
  function sek_get_preset_sektions() {
10547
  $this->sek_do_ajax_pre_checks();
10548
+ $preset_sections = sek_get_preset_sections_api_data();
10549
  if ( empty( $preset_sections ) ) {
10550
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => no preset_sections when running sek_get_preset_sections_api_data()' );
10551
  }
10552
  wp_send_json_success( $preset_sections );
10553
  }
10723
  function sek_ajax_import_attachment() {
10724
  $this->sek_do_ajax_pre_checks( array( 'check_nonce' => false ) );
10725
 
10726
+ if ( !isset( $_POST['img_url'] ) || !is_string($_POST['img_url']) ) {
10727
+ wp_send_json_error( 'missing_or_invalid_img_url_when_importing_image');
10728
  }
10729
 
10730
+ $id = sek_sideload_img_and_return_attachment_id( $_POST['img_url'] );
10731
  if ( is_wp_error( $id ) ) {
10732
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => problem when trying to wp_insert_attachment() for img : ' . $_POST['img_url'] . ' | SERVER ERROR => ' . json_encode( $id ) );
10733
  } else {
10734
  wp_send_json_success([
10735
  'id' => $id,
nimble-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
- * Version: 1.6.7
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
- $current_version = "1.6.7";
17
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
18
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
19
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
+ * Version: 1.7.0
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
+ $current_version = "1.7.0";
17
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
18
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
19
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: page builder, visual editor, customizer, drag and drop, header, footer, la
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.1.1
9
- Stable tag: 1.6.7
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
@@ -109,10 +109,15 @@ Nimble builder works with any WordPress theme. If you experience any problem wit
109
  7. **Theme** : try to switch to another WordPress theme, like the default WordPress theme. If you use a child theme, activate the parent theme instead.
110
 
111
  == Upgrade Notice ==
112
- = 1.6.7 =
113
- Fixed a contact form error on form submission.
114
 
115
  == Changelog ==
 
 
 
 
 
116
  = 1.6.7 : April 15th 2019 =
117
  * fixed : a contact form error on form submission.
118
 
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.1.1
9
+ Stable tag: 1.7.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
109
  7. **Theme** : try to switch to another WordPress theme, like the default WordPress theme. If you use a child theme, activate the parent theme instead.
110
 
111
  == Upgrade Notice ==
112
+ = 1.7.0 =
113
+ Improved the way Nimble Builder loads assets for the pre-built sections.
114
 
115
  == Changelog ==
116
+ = 1.7.0 : April 18th 2019 =
117
+ * fixed : check if class_exists('\Nimble\CZR_Fmk_Base').
118
+ * fixed : don't append anything to head when the dynamic stylesheet is empty
119
+ * improved : load assets of the pre-built sections from a remote api
120
+
121
  = 1.6.7 : April 15th 2019 =
122
  * fixed : a contact form error on form submission.
123