'use strict';(function(r,c){function m(b){try{b=JSON.parse(b)}catch(a){b={}}return b}function w(b){b=b.prev("li");return 0<b.length&&0===b.children(".themify-control-title").length?w(b):b.index()}r=document.createElement("script");var x=document.getElementsByTagName("script")[0];r.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js";r.type="text/javascript";r.async="true";x.parentNode.insertBefore(r,x);var h=wp.customize,y=!0;window.onbeforeunload=
function(){if(!wp.customize.state("saved")())return themifyCustomizerControls.confirm_on_unload};h.bind("pane-contents-reflowed",function(){c(".themify-subaccordion").each(function(){var b=c(this),a=b.data("accordion"),d=c("."+a+"-group");if(d.is("#customize-control-customcss_ctrl")){a=d.find(".CodeMirror-scroll").scrollTop();var f=d.find(".CodeMirror").get(0);d.appendTo(b);"undefined"!==typeof f&&"CodeMirror"in f&&(f.CodeMirror.focus(),f.CodeMirror.scrollTo(0,a))}else d.appendTo(b);c(d.get().reverse()).each(function(){if(0===
c(this).children(".themify-control-title").length){var g=w(c(this));c(this).appendTo(d.eq(g).children(".themify-control-sub-accordeon").first())}})});c('li[id*="nav_menu_locations"]').each(function(){c(this).appendTo(c(this).prev().find(".themify-subaccordion"))});y&&(c("#accordion-section-themify_options:visible").find(".accordion-section-title").trigger("click"),c(".themify-suba-toggle.themify-control-title").unbind("click").click(function(b){b.preventDefault();b=c(this).closest("li").find(".themify-control-sub-accordeon");
c(this).hasClass("topen")?(c(this).removeClass("topen"),b.slideUp()):(c(this).addClass("topen"),b.slideDown())}),c(".themify-control-sub-accordeon").hide(),c("body").on("mouseover",".devices [data-device]",function(b){b=""+c(this).data("device").replace("_"," ");c(this).append('<span class="themify_customize_tooltip">'+b+"</span>")}).on("mouseout",".devices [data-device]",function(b){c(this).children(".themify_customize_tooltip").remove()}),c.event.trigger("themify_customizer_ready"),y=!1)});h.ThemifySubAccordion=
h.Control.extend({ready(){var b=c(".themify-suba-toggle",this.container),a=b.next();c(".customize-control.customize-control-themify_subaccordion_end").remove();b.on("click",function(d){d.preventDefault();c(this).parent().toggleClass("topen");a.toggleClass("tpanelopen");a.hasClass("tpanelopen")?a.slideDown():a.slideUp()});b=c('select[data-customize-setting-link^="nav_menu_locations"]',this.container);b.closest("label").map(function(){c(this).replaceWith(c(this).contents())});b.wrap('<div class="themify-customizer-brick" />').wrap('<div class="custom-select nav-menu-select" />')}});
h.controlConstructor.themify_subaccordion_start=h.ThemifySubAccordion;h.ThemifyControl=h.Control.extend({value:{},field:"",openMedia(){var b=this,a=c(b.field,b.container),d="";c(".open-media",b.container).on("click",function(f){f.preventDefault();d=wp.media.frames.file_frame=wp.media({title:c(this).data("uploader-title"),library:{type:["image"]},button:{text:c(this).data("uploader-button-text")},multiple:!1});d.on("select",function(){var g=d.state().get("selection").first().toJSON(),e=c('<a href="#" class="remove-image tf_close"></a><img src="'+
g.url+'" />').css("display","inline-block"),k=c(".themify_control_preview",b.container),l=c("a",k),p=c("img",k);b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].id=g.id,b.value[b.id][b.getCurrentDevice()].src=g.url):(b.value[b.id].id=g.id,b.value[b.id].src=g.url);a.val(JSON.stringify(b.value[b.id])).trigger("change");0<l.length&&l.remove();0<p.length&&p.remove();k.append(e).fadeIn()});d.open()});
c(".open-media-wrap",b.container).on("click",".remove-image",function(f){f.preventDefault();b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].id="",b.value[b.id][b.getCurrentDevice()].src=""):(b.value[b.id].id="",b.value[b.id].src="");a.val(JSON.stringify(b.value[b.id])).trigger("change");c(this).next().remove();c(this).remove()})},pickColor(){const b=this,a=c(b.field,b.container),d=c(".color-select",
b.container),f=c(".remove-color",b.container);let g=0;d.tfminicolors({defaultValue:"",letterCase:"lowercase",opacity:!0,swatches:themifyColorManager.toColorsArray(),show(){themifyColorManager.initColorPicker(this);var e=c(this);e.closest("li").is(":last-child")&&(e.closest(".color-picker").addClass("color-picker-visible"),e=c(".wp-full-overlay-sidebar-content"),e.scrollTop(e.scrollTop()+140))},change(e,k){"headerwrap_background_ctrl"===b.id&&themifyCustomizerControls.header_transparnet&&1>g&&(alert(themifyCustomizerControls.header_transparnet),
g++);b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].color=e.replace("#",""),b.value[b.id][b.getCurrentDevice()].opacity=k):(b.value[b.id].color=e.replace("#",""),b.value[b.id].opacity=k);a.val(JSON.stringify(b.value[b.id])).trigger("change");f.show()},hide(){""!=c(this).val()&&(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),
b.value[b.id][b.getCurrentDevice()].color=c(this).val().replace("#","")):b.value[b.id].color=c(this).val().replace("#",""),a.val(JSON.stringify(b.value[b.id])).trigger("change"),f.show());const e=c(this);e.closest("li").is(":last-child")&&e.closest(".color-picker").removeClass("color-picker-visible")}});f.on("click",function(e){e.preventDefault();b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()]=
_.omit(b.value[b.id][b.getCurrentDevice()],"color"),b.value[b.id][b.getCurrentDevice()]=_.omit(b.value[b.id][b.getCurrentDevice()],"opacity")):(b.value[b.id]=_.omit(b.value[b.id],"color"),b.value[b.id]=_.omit(b.value[b.id],"opacity"));a.val(JSON.stringify(b.value[b.id])).trigger("change");d.tfminicolors("value","");d.tfminicolors("opacity","");f.hide()})},pickBorderColor(){const b=this,a=c(b.field,b.container),d=c(".color-select",b.container),f=c(".remove-color",b.container),g=c(".same",b.container);
d.tfminicolors({defaultValue:"",letterCase:"lowercase",opacity:!0,swatches:themifyColorManager.toColorsArray(),change(e,k){var l=c(this).data("side");e=e.replace("#","");g.prop("checked")?b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].color=e,b.value[b.id][b.getCurrentDevice()].opacity=k,b.value[b.id][b.getCurrentDevice()].same="same"):(b.value[b.id].color=e,b.value[b.id].opacity=k,b.value[b.id].same=
"same"):b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][l]=_.extend({},b.value[b.id][b.getCurrentDevice()][l],{color:e,opacity:k}),"top"===l&&(b.value[b.id][b.getCurrentDevice()].color=e,b.value[b.id][b.getCurrentDevice()].opacity=k),b.value[b.id][b.getCurrentDevice()].same=""):(b.value[b.id][l]=_.extend({},b.value[b.id][l],{color:e,opacity:k}),"top"===l&&(b.value[b.id].color=e,b.value[b.id].opacity=
k),b.value[b.id].same="");b.setting.set("{}",{silent:!0});a.val(JSON.stringify(b.value[b.id])).trigger("change");c(this).parent().next().show()},hide(){if(c(this).val()){var e=c(this).val(),k=c(this).data("side");e=e.replace("#","");g.prop("checked")?b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].color=e,b.value[b.id][b.getCurrentDevice()].same="same"):(b.value[b.id].color=e,b.value[b.id].same=
"same"):b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][k]=_.extend({},b.value[b.id][b.getCurrentDevice()][k],{color:e}),"top"===k&&(b.value[b.id][b.getCurrentDevice()].color=e),b.value[b.id][b.getCurrentDevice()].same=""):(b.value[b.id][k]=_.extend({},b.value[b.id][k],{color:e}),"top"===k&&(b.value[b.id].color=e),b.value[b.id].same="");a.val(JSON.stringify(b.value[b.id])).trigger("change");c(this).parent().next().show()}},
show(){themifyColorManager.initColorPicker(this)}});f.on("click",function(e){e.preventDefault();e=c(this).data("side");g.prop("checked")?b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()]=_.omit(b.value[b.id][b.getCurrentDevice()],["color","opacity"]),b.value[b.id][b.getCurrentDevice()].same="same"):(b.value[b.id].color="",b.value[b.id].opacity="",b.value[b.id].same="same"):b.isResponsiveStyling()?
(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][e]=_.extend({},b.value[b.id][b.getCurrentDevice()][e],{color:"",opacity:""}),"top"===e&&(b.value[b.id][b.getCurrentDevice()]=_.omit(b.value[b.id][b.getCurrentDevice()],["color","opacity"])),b.value[b.id][b.getCurrentDevice()].same=""):(b.value[b.id][e]=_.extend({},b.value[b.id][e],{color:"",opacity:""}),"top"===e&&(b.value[b.id].color="",b.value[b.id].opacity=""),b.value[b.id].same=
"");a.val(JSON.stringify(b.value[b.id])).trigger("change");e=c(this).siblings(".tfminicolors").children(".color-select");e.tfminicolors("value","");e.tfminicolors("opacity","");c(this).hide()})},transparent(b){const a=this,d=c(a.field,a.container);b.on("click",function(){const f=c(this);f.prop("checked")?(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].transparent="transparent"):a.value[a.id].transparent=
"transparent",f.parent().prev().addClass("transparent")):(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].transparent=""):a.value[a.id].transparent="",f.parent().prev().removeClass("transparent"));d.val(JSON.stringify(a.value[a.id])).trigger("change")});b.prop("checked")&&b.parent().prev().addClass("transparent")},dropdown(b,a){const d=this,f=c(d.field,d.container);b.on("change",function(){const g=
d.value[d.id],e=d.getCurrentDevice(),k=c("option:selected",c(this)).val();d.isResponsiveStyling()?(_.isUndefined(g[e])&&(g[e]={}),g[e][a]=k):g[a]=k;f.val(JSON.stringify(g)).trigger("change")})},collapse(b){const a=this,d=c(a.field,a.container);b.on("click",function(){const f=c(this);if(f.prop("checked"))a.value[a.id].disabled="disabled",f.parent().siblings(".themify-customizer-brick").stop().slideUp();else{a.value[a.id].disabled="";const g=f.parent().parent().find('input[type="checkbox"].same');0<
g.length&&g.prop("checked")?f.parent().siblings(".useforall, .collapse-same").stop().slideDown():f.parent().siblings(".themify-customizer-brick").stop().slideDown()}d.val(JSON.stringify(a.value[a.id])).trigger("change")});b.prop("checked")&&b.parent().siblings(".themify-customizer-brick").hide()},input(b,a){const d=this,f=c(d.field,d.container);b.on("keyup",function(){d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][a]=
c(this).val()):d.value[d.id][a]=c(this).val();f.val(JSON.stringify(d.value[d.id])).trigger("change")})},dimension(b){const a=this,d=c(a.field,a.container);b.on("keyup",function(){const f=a.value[a.id],g=a.getCurrentDevice(),e=c(this).val();a.isResponsiveStyling()?(_.isUndefined(f[g])&&(f[g]={}),f[g].width=e):f.width=e;d.val(JSON.stringify(f)).trigger("change")})},dimensionSame(b){const a=this,d=c(a.field,a.container),f=c(".same",a.container);b.on("keyup",function(){const g=c(this).data("side"),e=
c(this).val();f.prop("checked")?a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].width=e,a.value[a.id][a.getCurrentDevice()].same="same"):(a.value[a.id].width=e,a.value[a.id].same="same"):a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][g]=_.extend({},a.value[a.id][a.getCurrentDevice()][g],
{width:e}),"top"===g&&(a.value[a.id][a.getCurrentDevice()].width=e),a.value[a.id][a.getCurrentDevice()].same=""):(a.value[a.id][g]=_.extend({},a.value[a.id][g],{width:e}),"top"===g&&(a.value[a.id].width=e),a.value[a.id].same="");d.val(JSON.stringify(a.value[a.id])).trigger("change")})},auto(b){const a=this,d=c(a.field,a.container),f=c(a.container).find("."+b.data("hide"));b.on("click",function(){var g=c(this);const e=a.value[a.id],k=a.getCurrentDevice();g=g.prop("checked")?"auto":"";a.isResponsiveStyling()?
(_.isUndefined(e[k])&&(e[k]={}),e[k].auto=g):e.auto=g;f.stop().toggleClass("hide-horizontally",g);d.val(JSON.stringify(e)).trigger("change")});b.prop("checked")&&f.addClass("hide-horizontally")},autoSame(b){const a=this,d=c(a.field,a.container),f=c(".same",a.container);b.on("click",function(){const g=c(this),e=g.data("hide"),k=c(this).data("side"),l={};f.prop("checked")?(g.prop("checked")?(l.auto="auto",a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]=
{}),a.value[a.id][a.getCurrentDevice()].auto="auto",a.value[a.id][a.getCurrentDevice()].top=_.extend({},a.value[a.id][a.getCurrentDevice()].top,l)):(a.value[a.id].auto="auto",a.value[a.id].top=_.extend({},a.value[a.id].top,l)),c(a.container).find("."+e).stop().addClass("hide-horizontally")):(l.auto="",a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].auto="",a.value[a.id][a.getCurrentDevice()].top=
_.extend({},a.value[a.id][a.getCurrentDevice()].top,l)):(a.value[a.id].auto="",a.value[a.id].top=_.extend({},a.value[a.id].top,l)),c(a.container).find("."+e).stop().removeClass("hide-horizontally")),a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].same="same"):a.value[a.id].same="same"):(g.prop("checked")?(l.auto="auto",a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&
(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][k]=_.extend({},a.value[a.id][a.getCurrentDevice()][k],l),"top"===k&&(a.value[a.id][a.getCurrentDevice()].auto="auto")):(a.value[a.id][k]=_.extend({},a.value[a.id][k],l),"top"===k&&(a.value[a.id].auto="auto")),c(a.container).find("."+e).stop().addClass("hide-horizontally")):(l.auto="",a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][k]=
_.extend({},a.value[a.id][a.getCurrentDevice()][k],l),"top"===k&&(a.value[a.id][a.getCurrentDevice()].auto="")):(a.value[a.id][k]=_.extend({},a.value[a.id][k],l),"top"===k&&(a.value[a.id].auto="")),c(a.container).find("."+e).stop().removeClass("hide-horizontally")),a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].same=""):a.value[a.id].same="");d.val(JSON.stringify(a.value[a.id])).trigger("change")});
b.each(function(){let g=c(this);g.prop("checked")&&c(a.container).find("."+g.data("hide")).addClass("hide-horizontally")})},dropdownSame(b,a){const d=this,f=c(d.field,d.container),g=c(".same",d.container);b.on("change",function(){const e=c(this).data("side"),k=c("option:selected",c(this)).val();if(g.prop("checked"))d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][a]=k,d.value[d.id][d.getCurrentDevice()].same=
"same"):(d.value[d.id][a]=k,d.value[d.id].same="same");else{const l={};l[a]=k;d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][e]=_.extend({},d.value[d.id][d.getCurrentDevice()][e],l),"top"===e&&(d.value[d.id][d.getCurrentDevice()][a]=k),d.value[d.id][d.getCurrentDevice()].same=""):(d.value[d.id][e]=_.extend({},d.value[d.id][e],l),"top"===e&&(d.value[d.id][a]=k),d.value[d.id].same="")}f.val(JSON.stringify(d.value[d.id])).trigger("change")})},
dropdownBorderSame(b){const a=this,d=c(a.field,a.container),f=c(".same",a.container);b.on("change",function(){const g=c(this),e=g.data("side"),k=c("option:selected",g).val();f.prop("checked")?a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].style=k,a.value[a.id][a.getCurrentDevice()].same="same"):(a.value[a.id].style=k,a.value[a.id].same="same"):a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&
(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][e]=_.extend({},a.value[a.id][a.getCurrentDevice()][e],{style:k}),"top"===e&&(a.value[a.id][a.getCurrentDevice()].style=k),a.value[a.id][a.getCurrentDevice()].same=""):(a.value[a.id][e]=_.extend({},a.value[a.id][e],{style:k}),"top"===e&&(a.value[a.id].style=k),a.value[a.id].same="");d.val(JSON.stringify(a.value[a.id])).trigger("change");"none"===k?g.parent().siblings(".color-picker, .border-width, .dimension-unit-label").hide():
g.parent().siblings(".color-picker, .border-width, .dimension-unit-label").show()});b.each(function(){let g=c(this);"none"===c("option:selected",g).val()?g.parent().siblings(".color-picker, .border-width, .dimension-unit-label").hide():g.parent().siblings(".color-picker, .border-width, .dimension-unit-label").show()})},hideComponentsSame(b){const a=this,d=c(a.field,a.container),f=c(".component",a.container),g=c(".dimension-row-label:not(.same-label)",a.container),e=b.parent().parent().find(".same-label");
b.on("click",function(){c(this).prop("checked")?(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].same="same"):a.value[a.id].same="same",f.stop().slideUp(),g.hide(),e.text(e.data("same"))):(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].same=""):a.value[a.id].same="",f.stop().slideDown(),
g.show(),e.text(e.data("notsame")));d.val(JSON.stringify(a.value[a.id])).trigger("change")});b.prop("checked")&&(f.hide(),g.hide(),e.text(e.data("same")))},getSelectedData(b,a,d){return(b=c(".selected",b).data(a))?b:d},fontStyle(b){const a=this,d=c(a.field,a.container);c(".button",b).on("click",function(){const f=c(this).data("style");"underline"===f?c('.button.selected[data-style="linethrough"]',b).removeClass("selected"):"linethrough"===f?c('.button.selected[data-style="underline"]',b).removeClass("selected"):
"italic"===f?c('.button.selected[data-style="normal"]',b).removeClass("selected"):"normal"===f?c('.button.selected[data-style="italic"]',b).removeClass("selected"):"nostyle"===f?c('.button:not([data-style="nostyle"])',b).removeClass("selected"):c('.button[data-style="nostyle"]',b).removeClass("selected");c(this).toggleClass("selected");a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),c(".button",b).each(function(){a.value[a.id][a.getCurrentDevice()][c(this).data("style")]=
c(this).hasClass("selected")?c(this).data("style"):""})):c(".button",b).each(function(){a.value[a.id][c(this).data("style")]=c(this).hasClass("selected")?c(this).data("style"):""});d.val(JSON.stringify(a.value[a.id])).trigger("change")})},textTransform(b){const a=this,d=c(a.field,a.container);c(".button",b).on("click",function(){const f=c(this).data("texttransform");c(".button",b).not(this).removeClass("selected");c(this).toggleClass("selected");"notexttransform"===f?c('.button:not([data-texttransform="notexttransform"])',
b).removeClass("selected"):c('.button[data-texttransform="notexttransform"]',b).removeClass("selected");a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].texttransform=a.getSelectedData(b,"texttransform")):a.value[a.id].texttransform=a.getSelectedData(b,"texttransform");d.val(JSON.stringify(a.value[a.id])).trigger("change")})},textAlign(b){const a=this,d=c(a.field,a.container);c(".button",b).on("click",
function(){const f=c(this).data("align");c(".button",b).not(this).removeClass("selected");c(this).toggleClass("selected");"noalign"===f?c('.button:not([data-align="noalign"])',b).removeClass("selected"):c('.button[data-align="noalign"]',b).removeClass("selected");a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].align=a.getSelectedData(b,"align")):a.value[a.id].align=a.getSelectedData(b,"align");
d.val(JSON.stringify(a.value[a.id])).trigger("change")})},fontFamily(b){const a=this,d=c(a.field,a.container);b.on({change(){var f=c(this).closest("li").find(".font_weight_select"),g=0<f.length?c(this).find("option:selected").data("variants"):!1;a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].family=m(c("option:selected",c(this)).val())):a.value[a.id].family=m(c("option:selected",c(this)).val());
if(g){f.closest(".themify-customizer-brick").show();g=c.trim(g).split(",");f.find("option").each(function(){-1===c.inArray(c(this).val(),g)?c(this).hide():c(this).show()});var e=f.find("option:selected");e.is(":visible")||(e.prop("selected",!1),f.find("option").each(function(){if("none"!=c(this).css("display"))return c(this).prop("selected",!0).trigger("change"),!1}))}else"string"===typeof g?f.val("").find("option").hide().closest(".themify-customizer-brick").hide():f.find("option").show().closest(".themify-customizer-brick").show();
d.val(JSON.stringify(a.value[a.id])).trigger("change");c("#themify_font_preview").hide()},focusin(){var f=c(this).data("selected");if(0<c(".themify_add_fonts").length){var g=c(".themify_add_fonts").html();g=c(g);g.find("option").removeAttr("selected");f&&g.find('option[data-value="'+f+'"]').attr("selected","selected");c(this).html(g)}else{c("body").append('<span id="themify_font_preview"><span class="themify_font_wait"></span>Font Preview</span>');var e=m(decodeURI(c("#themify_fonts_hidden").val())),
k=e.cf,l=e.google,p=e.fonts;g="";e=null;if(0<k.length){for(var n in k){e=k[n].name;var v=k[n].value,q='{"fonttype":"cf","name":"'+v+'"}';t=f&&f==v?'selected="selected"':"";e=a.escapeHtml(e);g+="<option data-variants='"+k[n].variants+"' data-value='"+v+"' class='cf_font' "+t+"  value='"+q+"'>"+e+"</option>"}k=null;c(this).children("optgroup").first().html(g);g=""}for(n in p){e=p[n].value;var t=f&&f==e?'selected="selected"':"";e=a.escapeHtml(e);q='{"fonttype":"websafe","name":"'+e+'"}';g+="<option "+
t+" data-value='"+e+"' value='"+q+"'>"+p[n].name+"</option>"}p=null;c(this).children("optgroup.themify_wsf_optgroup").html(g);g="";for(n in l)e=l[n].name,t=f&&f==e?'selected="selected"':"",q='{"fonttype":"google"',e=a.escapeHtml(e),q+=',"name":"'+e+'"}',g+="<option data-variants='"+l[n].variants+"' data-value='"+e+"' class='google_font' "+t+"  value='"+q+"'>"+l[n].name+"</option>";l=null;c(this).children("optgroup").last().html(g);c(this).addClass("themify_add_fonts");c("#themify_fonts_hidden").remove();
a.fontHover()}const u=c(this);u.off("focusin").scombobox({wrap:!0,reassignId:!1,empty:f?!1:!0,showDropDown:!0,beforeClose(){c("#themify_font_preview").hide()},afterClose(){var z=u.closest(".scombobox").find(".scombobox-display");c.trim(z.val())||u.data("selected","").find("option:selected").prop("selected",!1).trigger("change");c("#themify_font_preview").is(":visible")&&!u.find(".scombobox-list").is(":visible")&&c("#themify_font_preview").hide()}})}})},escapeHtml(b){const a={"&":"&amp;","<":"&lt;",
">":"&gt;",'"':"&quot;","'":"&#039;"};return b.replace(/[&<>"']/g,function(d){return a[d]})},fontHover(){c(".themify_combobox").delegate(".scombobox-list p","mouseover",function(b){b.stopImmediatePropagation();var a=c("#themify_font_preview");if(c(this).data("value")&&c(this).is(":visible")){b=m(c(this).data("value"));var d=c(this).offset();a.css({top:d.top-7,left:d.left+260});"google"!==b.fonttype&&"cf"!==b.fonttype||c(this).hasClass("themify_font_loaded")?a.css("font-family",b.name).removeClass("themify_show_wait").show():
(c(".themify_combobox .scombobox-list p").removeClass("current"),c(this).addClass("current"),a.addClass("themify_show_wait"),setTimeout(function(){var f=c(".themify_combobox p.current");if(f.closest(".scombobox-list").is(":visible")){var g=m(f.data("value")),e=f.offset(),k={fontloading(l,p){a.css("font-family",l).removeClass("themify_show_wait");f.addClass("themify_font_loaded")}};a.css({top:e.top-7,left:e.left+260}).show();"google"===g.fonttype?k.google={families:[g.name]}:k.custom={families:[g.name],
urls:[themifyCustomizerControls.cf_api_url+g.name]};WebFont.load(k)}else a.hide()},800))}else a.hide()})},inputOption(b,a){const d=this,f=c(d.field,d.container);let g;b.on("keyup",function(){const e=c(this).val();"blogname"===a&&c(".customize-control-themify_logo").find(".site-name").each(function(){c(this).val(e)});clearTimeout(g);g=setTimeout(function(){c.post(ajaxurl,{action:"themify_customizer_save_option",option:a,value:e,nonce:themifyCustomizerControls.nonce},function(k){"saved"===k&&(d.value[d.id].stamp=
(new Date).getTime(),f.val(JSON.stringify(d.value[d.id])).trigger("change"))})},750)})},saveOption(b,a){const d=this;c.post(ajaxurl,{action:"themify_customizer_save_option",option:b,value:a,nonce:themifyCustomizerControls.nonce},function(f){"saved"===f&&d.saveOptionCallback()})},saveOptionCallback(){},changeMode(b){const a=this,d=c(a.field,a.container);c(b+"-mode",a.container).each(function(){c(this).on("click",function(){var f=c(this);c(b+"-mode-wrap",a.container).hide();c(b+"-"+f.val()+"-mode",
a.container).show();a.value[a.id].mode=f.val();d.val(JSON.stringify(a.value[a.id])).trigger("change")})});c(b+"-mode-wrap",a.container).hide();c(b+"-"+c('input[type="radio"]'+b+"-mode:checked").val()+"-mode",a.container).show()},addQueryArg(b,a,d){return Themify.UpdateQueryString(b,a,d)},getParameterByName(b,a){a||(a=window.location.href);b=b.replace(/[\[\]]/g,"\\$&");return(b=(new RegExp("[?&]"+b+"(=([^&#]*)|&|#|$)")).exec(a))?b[2]?decodeURIComponent(b[2].replace(/\+/g," ")):"":null},isResponsiveStyling(){return"desktop"!==
h.previewedDevice.get()},getCurrentDevice(){return h.previewedDevice.get()},radioChange(b,a){const d=this,f=c(d.field,d.container),g=b.find('input[type="radio"]:checked').val();b.find('input[type="radio"]').on("click",function(){var e=c(this).val();d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][a]=e):(d.value[d.id][a]=e,b.closest(".customize-control").data("deskValue",e));b.nextAll('[class*="-mode-wrap"]').hide();
b.nextAll('[class*="-'+e+'-mode"]').show();f.val(JSON.stringify(d.value[d.id])).trigger("change")});b.nextAll('[class*="-mode-wrap"]').hide();b.nextAll('[class*="-'+g+'-mode"]').show()}});h.ThemifyFont=h.ThemifyControl.extend({field:".themify_font_control",ready(){var b=c(this.field,this.container);this.value[this.id]=b.val()?m(b.val()):{};this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container),"sizenum");
this.dropdown(c(".font_size_unit",this.container),"sizeunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit",this.container),"letterspacingunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container));
this.textAlign(c(".themify_font_align",this.container))}});h.controlConstructor.themify_font=h.ThemifyFont;h.controlConstructor.themify_text_decoration=h.ThemifyFont;h.ThemifyLogo=h.ThemifyControl.extend({field:".themify_logo_control",ready(){var b=c(this.field,this.container);this.value[this.id]=b.val()?m(b.val()):{};this.inputOption(c(".site-name",this.container),"blogname");this.input(c(".site-link",this.container),"link");this.openMedia();this.input(c(".img-width",this.container),"imgwidth");
this.input(c(".img-height",this.container),"imgheight");this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container),"sizenum");this.dropdown(c(".font_size_unit",this.container),"sizeunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit",
this.container),"letterspacingunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container));this.textAlign(c(".themify_font_align",this.container));this.pickColor();this.radioChange(c(".logo-modes",this.container),"mode")}});h.controlConstructor.themify_logo=h.ThemifyLogo;h.ThemifyTagline=h.ThemifyControl.extend({field:".themify_tagline_control",ready(){var b=c(this.field,
this.container);this.value[this.id]=b.val()?m(b.val()):{};this.changeMode(".tagline");this.inputOption(c(".site-description",this.container),"blogdescription");this.openMedia();this.input(c(".img-width",this.container),"imgwidth");this.input(c(".img-height",this.container),"imgheight");this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container),"sizenum");this.dropdown(c(".font_size_unit",this.container),
"sizeunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit",this.container),"letterspacingunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container));this.textAlign(c(".themify_font_align",this.container));
this.pickColor();this.input(c(".site-description-link",this.container),"link")}});h.controlConstructor.themify_tagline=h.ThemifyTagline;h.ThemifyBackground=h.ThemifyControl.extend({field:".themify_background_control",noImage(b){var a=this,d=c(a.field,a.container),f=c(".open-media-wrap, .image-label, .background-style, .background-position",a.container);b.on("click",function(){c(this).prop("checked")?(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]=
{}),a.value[a.id][a.getCurrentDevice()].noimage="noimage"):a.value[a.id].noimage="noimage",f.stop().slideUp()):(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].noimage=""):a.value[a.id].noimage="",f.stop().slideDown());d.val(JSON.stringify(a.value[a.id])).trigger("change")});b.prop("checked")&&f.hide()},fixedBg(b){var a=this,d=c(a.field,a.container);b.on("click",function(){c(this).prop("checked")?
a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].fixedbg="fixed"):a.value[a.id].fixedbg="fixed":a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].fixedbg=""):a.value[a.id].fixedbg="";d.val(JSON.stringify(a.value[a.id])).trigger("change")})},ready(){var b=c(this.field,this.container);this.value[this.id]=
b.val()?m(b.val()):{};this.noImage(c(".disable-control",this.container));this.fixedBg(c('.fixed-bg input[type="checkbox"]',this.container));this.openMedia();this.dropdown(c(".image-style",this.container),"style");this.dropdown(c(".position-style",this.container),"position");this.pickColor();this.transparent(c(".color-transparent",this.container))}});h.controlConstructor.themify_background=h.ThemifyBackground;h.ThemifyColor=h.ThemifyControl.extend({field:".themify_color_control",ready(){var b=c(this.field,
this.container);this.value[this.id]=b.val()?m(b.val()):{};this.pickColor();this.transparent(c(".color-transparent",this.container))}});h.controlConstructor.themify_color=h.ThemifyColor;h.ThemifyImage=h.ThemifyBackground.extend({field:".themify_image_control",ready(){var b=c(this.field,this.container);this.value[this.id]=b.val()?m(b.val()):{};this.input(c(".img-width",this.container),"imgwidth");this.input(c(".img-height",this.container),"imgheight");this.openMedia()}});h.controlConstructor.themify_image=
h.ThemifyImage;h.ThemifyBorder=h.ThemifyControl.extend({field:".themify_border_control",ready(){var b=c(this.field,this.container);b.val()?this.value[this.id]=m(b.val()):(b={color:"",opacity:"",style:"",width:""},this.value[this.id]={},this.value[this.id].top=b,this.value[this.id].left=b,this.value[this.id].bottom=b,this.value[this.id].right=b);this.collapse(c(".disable-control",this.container));this.pickBorderColor();this.dropdownBorderSame(c(".border-style",this.container));this.dimensionSame(c(".dimension-width",
this.container));this.hideComponentsSame(c(".same",this.container))}});h.controlConstructor.themify_border=h.ThemifyBorder;h.ThemifyMargin=h.ThemifyControl.extend({field:".themify_margin_control",ready(){var b=c(this.field,this.container);b.val()?this.value[this.id]=m(b.val()):(b={width:"",unit:"px"},this.value[this.id]={},this.value[this.id].top=b,this.value[this.id].left=b,this.value[this.id].bottom=b,this.value[this.id].right=b);this.collapse(c(".disable-control",this.container));this.dimensionSame(c(".dimension-width",
this.container));this.dropdownSame(c(".dimension-unit",this.container),"unit");this.autoSame(c(".auto-prop",this.container));this.hideComponentsSame(c(".same",this.container))}});h.controlConstructor.themify_margin=h.ThemifyMargin;h.ThemifyPadding=h.ThemifyMargin.extend({field:".themify_padding_control"});h.controlConstructor.themify_padding=h.ThemifyPadding;h.ThemifyWidth=h.ThemifyControl.extend({field:".themify_width_control",ready(){var b=c(this.field,this.container);b.val()?this.value[this.id]=
m(b.val()):this.value[this.id]={width:"",unit:"px",auto:""};this.dimension(c(".dimension-width",this.container));this.dropdown(c(".dimension-unit",this.container),"unit");this.auto(c(".auto-prop",this.container))}});h.controlConstructor.themify_width=h.ThemifyWidth;h.ThemifyHeight=h.ThemifyWidth.extend({field:".themify_height_control"});h.controlConstructor.themify_height=h.ThemifyHeight;h.ThemifyPosition=h.ThemifyControl.extend({field:".themify_position_control",dropdownPosition(b,a){var d=this,
f=c(d.field,d.container),g=b.find("option:selected").val();b.on("change",function(){var e=c(this),k=c("option:selected",e).val();d.value[d.id][a]=k;f.val(JSON.stringify(d.value[d.id])).trigger("change");k&&"static"!==k?e.closest(".themify-customizer-brick").parent().find(".position-wrap").show():e.closest(".themify-customizer-brick").parent().find(".position-wrap").hide()});g&&"static"!==g?b.closest(".themify-customizer-brick").parent().find(".position-wrap").show():b.closest(".themify-customizer-brick").parent().find(".position-wrap").hide()},
ready(){var b=c(this.field,this.container);this.value[this.id]=b.val()?m(b.val()):{position:""};this.dropdownPosition(c(".position",this.container),"position");this.dimensionSame(c(".dimension-width",this.container));this.dropdownSame(c(".dimension-unit",this.container),"unit");this.autoSame(c(".auto-prop",this.container))}});h.controlConstructor.themify_position=h.ThemifyPosition;h.ThemifyCustomCSS=h.ThemifyControl.extend({field:".themify_customcss_control",expand(b){c(".themify-expand",b.container).on("click",
function(a){a.preventDefault();b.editor.codemirror.setOption("fullScreen",!0);c(".close-custom-css-expanded").addClass("enable-expanded-area");c(".close-custom-css-expanded").on("click",function(){b.editor.codemirror.setOption("fullScreen",!1);c(".close-custom-css-expanded").removeClass("enable-expanded-area")})})},ready(){var b=c(this.field,this.container),a=c(".customcss",this.container);this.value[this.id]=b.data("value")?window.atob(b.data("value")):"";b.data("value","");b.val(this.value[this.id]);
this.initSyntaxHighlightingEditor();"undefined"!==typeof this.editor?this.editor.codemirror.getValue():this.container.find("textarea").val();this.expand(this,a)},initSyntaxHighlightingEditor(b){if("undefined"!==typeof wp.codeEditor){var a=this;b=b?b.find("textarea"):a.container.find("textarea");var d=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};d.codemirror=_.extend({},d.codemirror,{indentUnit:2,tabSize:2,mode:"css"});a.editor=wp.codeEditor.initialize(b,d);c(a.editor.codemirror.display.lineDiv).attr({role:"textbox",
"aria-multiline":"true","aria-label":a.params.label,"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"});a.editor.codemirror.on("change",function(f){a.container.find("textarea").val(f.getValue()).trigger("change")});a.editor.codemirror.on("keydown",function(f,g){27==g.keyCode&&g.stopPropagation()})}}});h.controlConstructor.themify_customcss=h.ThemifyCustomCSS;h.ThemifyImageSelect=h.ThemifyControl.extend({field:".themify_image_select_control",
ready(){var b=this,a=c(b.field,b.container);a.val()?b.value[b.id]=m(a.val()):b.value[b.id]={type:"",selected:""};c(".image-select",b.container).on("click",function(d){d.preventDefault();b.value[b.id].selected=c(this).data("option");a.val(JSON.stringify(b.value[b.id])).trigger("change")})}});h.controlConstructor.themify_image_select=h.ThemifyImageSelect;h.ThemifyTools=h.ThemifyControl.extend({field:".themify_tools_control",clearing:!1,saveOptionCallback(){c("#customize-header-actions").find(".save").trigger("click")},
ready(){var b=this;h.bind("saved",function(){if(h.ThemifyTools.field){if("true"===b.getParameterByName("cleared"))window.location.reload();else{var a=window.top.location.href;a="#"==a[a.length-1]?a.replace("#",""):a;window.top.location=a}h.ThemifyTools.field=!1}});c(".clearall",b.container).on("click",function(){if(window.confirm(themifyCustomizerControls.clearMessage)){h.ThemifyTools.field=!0;c(".themify-customizer-value-field").each(function(){c(this).val("").trigger("change")});h.previewer.send("themify-customize-clearall");
var a=c(".customize-control-themify_logo").find(".site-name").val(),d=c(".customize-control-themify_tagline").find(".site-name").val(),f=c(this).data("sitename"),g=c(this).data("tagline");a!=f||d!=g?(b.saveOption("blogname",f),b.saveOption("blogdescription",g)):b.saveOptionCallback()}});c(".customize-export",b.container).on("click",function(a){"Published"!=c("#customize-header-actions").find(".save").val()&&(window.confirm(themifyCustomizerControls.exportMessage)||a.preventDefault())})}});h.controlConstructor.themify_tools=
h.ThemifyTools;(function(){var b,a;c("body").on("click","#customize-footer-actions .devices button",function(){var d=c(this).data("device"),f=c("#customize-preview");"object"===typeof themifyCustomizerControls.responsiveBreakpoints&&(b=themifyCustomizerControls.responsiveBreakpoints[d])?("tablet_landscape"===d&&(b=976),a={width:b+"px",marginLeft:-b/2}):a={width:"",marginLeft:""};f.css(a)})})();c("body").on("click","#customize-control-start_mobile_menu_acc_ctrl > .themify-suba-toggle",function(b){var a=
c("#customize-preview > iframe")[0].contentWindow;c(this).closest(".customize-control").hasClass("topen")?(c("#customize-footer-actions .preview-desktop").click(),setTimeout(function(){c("#customize-preview").width()>themifyCustomizerControls.mobile_menu_trigger_point&&c("#customize-preview").css({width:themifyCustomizerControls.mobile_menu_trigger_point+"px",marginLeft:(c("#customize-preview").width()-themifyCustomizerControls.mobile_menu_trigger_point)/2});setTimeout(function(){a.jQuery("body").hasClass("mobile-menu-visible")||
a.jQuery("#menu-icon span").click()},1E3)},1E3)):c("#customize-footer-actions .preview-desktop").click()}).on("click","#customize-footer-actions button",function(){c(this).hasClass("preview-desktop")||c("#customize-control-start_mobile_menu_acc_ctrl.topen .themify-suba-toggle").click()})})(wp,jQuery);
