%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/vmullen.hire-va.com/wp-content/themes/phlox-pro/auxin/js/
Upload File :
Create Path :
Current File : /home/eirtvhdf/vmullen.hire-va.com/wp-content/themes/phlox-pro/auxin/js/scripts.min.js

(function($,window,document,undefined){"use strict";var dependencyDefaultOptions={fieldContainer:".field-row",relation:"and",fieldMapper:function(target){return"#"+target},observerMapper:function(target){return"#"+target}};function DependencyManager($wrapper,options,dependencyGraph){this.options=$.extend(dependencyDefaultOptions,options);this.$wrapper=$wrapper;this.dependencyGraph=dependencyGraph;this.$observers=[]}var p=DependencyManager.prototype;p.setup=function(){for(var depField in this.dependencyGraph){for(var observeField in this.dependencyGraph[depField]){if(observeField==="relation"){continue}var $observer=this.$wrapper.find(this.options.observerMapper(observeField));if(!$observer.data("added-before")){this.$observers.push($observer.on("change",this._toggleDependecies.bind(this)));$observer.data("added-before",true)}}}this._toggleDependecies()};p._toggleDependecies=function(e){var $depField,$observerField,observerValue,isDepValueSelected,finalVisibleStatus,goalObserverValue,relation,ObserverCompareOperator;for(var depField in this.dependencyGraph){if(!depField){continue}var depFieldSelector=this.options.fieldMapper(depField);$depField=this.$wrapper.find(depFieldSelector);if(!$depField.length){$depField=this.$wrapper.find(depFieldSelector+"_font")}relation=(this.dependencyGraph[depField].relation||this.options.relation).toLowerCase();finalVisibleStatus="and"===relation?true:false;for(var observerField in this.dependencyGraph[depField]){if(observerField==="relation"){continue}$observerField=this.$wrapper.find(this.options.observerMapper(observerField));if(!$observerField.length){continue}observerValue=$observerField.val();goalObserverValue=this.dependencyGraph[depField][observerField].value;ObserverCompareOperator=this.dependencyGraph[depField][observerField].operator||"==";if(!goalObserverValue instanceof Array){goalObserverValue=goalObserverValue.split("^")}if($observerField[0].type==="checkbox"){observerValue=$observerField[0].checked?"1":"0"}else if($observerField[0].type==="hidden"){continue}isDepValueSelected=this._inArray(observerValue,goalObserverValue,ObserverCompareOperator);if("and"===relation){finalVisibleStatus=finalVisibleStatus&&isDepValueSelected}else{finalVisibleStatus=finalVisibleStatus||isDepValueSelected}}if(finalVisibleStatus){$depField.closest(this.options.fieldContainer).show()}else{$depField.closest(this.options.fieldContainer).hide()}}if(e){var $target=$(e.target);if($target[0].checked){$target.closest(".field-row").addClass("open")}else{$target.closest(".field-row").removeClass("open")}}};p._inArray=function(needle,haystack,operator){if(undefined===operator){operator="=="}var result;if(haystack.constructor!==Array){haystack=typeof haystack=="string"?haystack.split(","):[haystack]}for(var i=0,length=haystack.length;i<length;i++){switch(operator){case"==":result=needle==haystack[i];break;case"===":result=needle===haystack[i];break;case"!=":result=needle!=haystack[i];break;case"!==":result=needle!==haystack[i];break;case">=":result=needle>=haystack[i];break;case"<=":result=needle<=haystack[i];break;case">":result=needle>haystack[i];break;case"<":result=needle<haystack[i];break}if(result){return true}}return false};window.DependencyManager=DependencyManager;$(function(){var $metabox,opsDeps;if(auxin.metabox){for(var metaboxID in auxin.metabox){var metaboxDepData=auxin.metabox[metaboxID].dependencies;$metabox=$("#"+metaboxID);if($metabox.length){opsDeps=new DependencyManager($metabox,{},metaboxDepData);opsDeps.setup()}}}var $panel=$(".auxin_options_form");if($panel.length&&auxin.optionpanel){opsDeps=new DependencyManager($panel,{},auxin.optionpanel);opsDeps.setup()}})})(jQuery,window,document);(function($,window,document,undefined){"use strict";$(function(){var isWidgetsPage=$("body").hasClass("widgets-php");$(".av3_option_panel").avertaMultiTabs({enableHash:true,updateHash:true,hashSuffix:"-group",tabs:"ul.tabs > li:not(.auxin-logo)",subTabs:"> li:not(.not-tab)"}).find(".tabs li > a").on("click",function(){if(window.dispatchEvent){setTimeout(function(){window.dispatchEvent(new Event("resize"))},100)}});$(".axi-metabox-hub").avertaLiveTabs({enableHash:true,updateHash:true,hashSuffix:"-tab",tabs:"ul.tabs > li"}).css("display","block");$(".axi-metabox-loading").hide();$(".sortbox").sortable({connectWith:".draggable-area ul",helper:"clone",placeholder:"sort-item-heighlight",opacity:1,revert:true});if(wp.customize){var DependencyManager;DependencyManager=AuxinDependencyManager.setup();wp.customize.AuxinSection=wp.customize.Section.extend({ready:function(){var section=this;DependencyManager.add(section.id,{dependencies:section.params.dependencies,value:""},"sections")},_toggle:function(result){if(result){this.headContainer[0].style.display="list-item"}else{this.headContainer[0].style.display="none"}}});wp.customize.AuxinControl=wp.customize.Control.extend({ready:function(){this.picker;var control=this;DependencyManager.add(control.id,{dependencies:control.params.dependencies,value:control.setting.get()},"controls");wp.customize.bind("pane-contents-reflowed",function(){var dependControls=DependencyManager.getDependsStatus(control.id);control.dependencyCheck(dependControls)});control.setting.bind(function(value){DependencyManager.update(control.id,value);var dependControls=DependencyManager.getDependsStatus(control.id);control.dependencyCheck(dependControls)})},update:function(newValue,newData){if(this.picker){newData=newData||null;if(newValue!==this.setting()){this.setting.set(newValue);this.picker.val(newValue);this.picker.trigger("change",[newData])}}},dependencyCheck:function(dependControls){var dependsName=Object.keys(dependControls);if(!dependsName.length){return}dependsName.forEach(function(name){var sectionObject=wp.customize.section(name),controlObject=wp.customize.control(name),isSection=sectionObject?true:false,isControl=controlObject?true:false,result=dependControls[name].isShow;if(isControl){controlObject._toggle(result)}if(isSection){sectionObject._toggle(result)}})},_toggle:function(result){if(result){this.container.slideDown("fast",$.noop)}else{this.container.slideUp("fast",$.noop)}var initvalue=this.setting();this.setting.set(initvalue)}})}if(wp.customize){wp.customize.sectionConstructor["auxin_section"]=wp.customize.AuxinSection.extend({ready:function(){wp.customize.AuxinSection.prototype.ready.apply(this,arguments)}})}if(wp.customize){wp.customize.sectionConstructor["auxin_info_section"]=wp.customize.AuxinSection.extend({ready:function(){wp.customize.AuxinSection.prototype.ready.apply(this,arguments)}})}if(wp.customize){wp.customize.controlConstructor["auxin_info"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments)}})}if(wp.customize){wp.customize.controlConstructor["auxin_color_repeater"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;var $color_picker=this.container.find(spectrum_picker);this.container.find(".customize-control-notifications-container").hide();$color_picker.each(function(){$(this).spectrum(spectrum_args);$(this).on("dragstop.spectrum",function(e,color){if(color===null){$(this).val("")}else{$(this).val(color.toString())}updateControlValue(control.container)})});$(".aux-plus").on("click",function(){$(this).parents("li").find("label").first().clone().insertBefore(".aux-plus");var $color_picker=$(this).parents("li").find("label").last().show();var uniqueID=Math.floor(Math.random()*1e9).toString(16);$color_picker.find(".mini-color-wrapper input").data("id",uniqueID);$color_picker.find(".mini-color-wrapper input").attr("data-id",uniqueID);$("<hr>").insertAfter($color_picker);$color_picker.find(".sp-replacer").remove();$color_picker.find(spectrum_picker).spectrum(spectrum_args);removeColor();colorNameChange();updateControlValue(control.container);$color_picker=$color_picker.find(spectrum_picker);$color_picker.on("dragstop.spectrum",function(e,color){if(color===null){$color_picker.val("")}else{$color_picker.val(color.toString())}updateControlValue(control.container)})});var updateControlValue=function($container){var $color_pickers=$container.find(spectrum_picker);var colors=[];$color_pickers.each(function(index){colors[index]={_id:$(this).data("id")?$(this).data("id"):"",title:$(this).parents("label").find(".customize-control-title input").val(),color:$(this).val()}});control.setting.set(JSON.stringify(colors));$("input.aux-color-repeater").trigger("change")};var removeColor=function(){$(".aux-remove-color").on("click",function(){if($(".aux-remove-color").length==1){return}$(this).parent("label").next("hr").remove();$(this).parent("label").remove();updateControlValue(control.container)})};removeColor();var colorNameChange=function(){$(".customize-control-auxin_color_repeater .customize-control-title input").each(function(){$(this).on("input",function(){updateControlValue(control.container)})})};colorNameChange()}})}if(wp.customize){wp.customize.controlConstructor["auxin_textarea"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("textarea");control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var editor_picker="textarea[data-code-editor]";$(editor_picker).each(function(){var textarea=$(this);var mode=textarea.data("code-editor")||"javascript";var editDiv=$("<div>",{width:"100%",class:textarea.attr("class")}).insertBefore(textarea);textarea.css("display","none");var editor=ace.edit(editDiv[0]);editor.renderer.setShowGutter(auxin.admin.ace.showGutter);editor.getSession().setValue(textarea.val());editor.getSession().setMode("ace/mode/"+mode);editor.$blockScrolling=Infinity;editor.setTheme("ace/theme/"+auxin.admin.ace.theme);editor.getSession().setTabSize(auxin.admin.ace.tabSize);editor.getSession().setUseSoftTabs(auxin.admin.ace.useSoftTabs);editor.setOption("maxLines",auxin.admin.ace.maxLines);editor.setOption("minLines",auxin.admin.ace.minLines);editor.setOptions({});editor.getSession().on("change",function(){textarea.val(editor.getSession().getValue())})});if(wp.customize){wp.customize.controlConstructor["auxin_code"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(editor_picker);control.picker.each(function(){var textarea=$(this),execute_btn=textarea.siblings("button"),typingTimer,typingDelay;var mode=textarea.data("code-editor")||"javascript";typingDelay="css"===mode?500:1500;var editDiv=$("<div>",{width:"100%",class:textarea.attr("class")}).insertBefore(textarea);textarea.css("display","none");var editor=ace.edit(editDiv[0]);window.lasteditor=editor;editor.$blockScrolling=Infinity;editor.renderer.setShowGutter(auxin.admin.ace.showGutter);editor.getSession().setValue(textarea.val());editor.getSession().setMode("ace/mode/"+mode);editor.setTheme("ace/theme/"+auxin.admin.ace.theme);editor.getSession().setTabSize(auxin.admin.ace.tabSize);editor.getSession().setUseSoftTabs(auxin.admin.ace.useSoftTabs);editor.setOption("maxLines",auxin.admin.ace.maxLines);editor.setOption("minLines",auxin.admin.ace.minLines);editor.setOptions({});if("javascript"===mode&&execute_btn.length){execute_btn.on("click",function(e){e.preventDefault();textarea.val(editor.getSession().getValue());if(control.setting.get()==editor.getSession().getValue()){control.setting.set(control.setting.get()+" ")}else{control.setting.set(editor.getSession().getValue())}})}else{editor.getSession().on("change",function(){textarea.val(editor.getSession().getValue());clearTimeout(typingTimer);typingTimer=setTimeout(function(){control.setting.set(editor.getSession().getValue())},typingDelay)})}control.setting.bind(function(value){textarea.val(value)})})},update:function(value){}})}var spectrum_picker='.mini-color-wrapper input[type="text"], .aux-colorpicker-field',spectrum_args={allowEmpty:true,showInput:true,showAlpha:true,disabled:false,showSelectionPalette:true,showPalette:true,hideAfterPaletteSelect:true,palette:[["black","white"," "]],clickoutFiresChange:true,showInitial:true,chooseText:auxin.admin.colorpicker.chooseText,cancelText:auxin.admin.colorpicker.cancelText,containerClassName:"axi-sp-wrapper",localStorageKey:"auxin.spectrum",preferredFormat:"hex6",change:function(color){if(color===null){$(this).val("")}else{$(this).val(color.toString())}}};if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(spectrum_picker).spectrum(spectrum_args);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(spectrum_picker).spectrum(spectrum_args)})}else{$(spectrum_picker).spectrum(spectrum_args);$(document).on("panelsopen",function(){$(spectrum_picker).spectrum(spectrum_args)})}if(wp.customize){wp.customize.controlConstructor["auxin_color"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(spectrum_picker);control.picker.val(control.setting()).spectrum(spectrum_args);control.picker.on("dragstop.spectrum",function(e,color){if(color===null){control.picker.val("")}else{control.picker.val(color.toString())}control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var gradient_picker='.mini-gradient-wrapper input[type="text"]';if(wp.customize){wp.customize.controlConstructor["auxin_gradient"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(gradient_picker);var $typeControl=this.container.find(".aux-gradient-type"),$directionControl=this.container.find(".aux-gradient-direction");control.picker.val(control.setting());var grapickPicker=new Grapick({el:this.container.find(".aux-grapick-colors")[0],direction:"to right",min:1,max:99});if(control.setting()){grapickPicker.setValue(control.setting());$typeControl.val(grapickPicker.getType());$directionControl.val(grapickPicker.getDirection())}$typeControl.on("change",function(e){grapickPicker.setType(this.value)});$directionControl.on("change",function(e){grapickPicker.setDirection(this.value)});grapickPicker.on("change",function(complete){control.setting.set(grapickPicker.getSafeValue())});this.setting.bind(function(value){control.picker.val(value)})}})}function auxin_embed_controller_styles(prefix,controlID,cssValue){var optionName=prefix+controlID.split("_control")[0];if(!Object.hasOwnProperty.call(wp.customize.previewer,"preview")){return}var styleTag=wp.customize.previewer.preview.iframe[0].contentDocument.getElementById(optionName);if(cssValue){styleTag.innerHTML=cssValue}else{styleTag.innerHTML=""}}function auxin_embed_fonts_url(fontsList){if(fontsList.length){if(!Object.hasOwnProperty.call(wp.customize.previewer,"preview")){return}var iframeHead=wp.customize.previewer.preview.iframe[0].contentDocument.querySelector("head");fontsList.forEach(function(font){var fontLink=iframeHead.querySelector('link[href="'+font+'"]');if(!fontLink){var LinkTag=document.createElement("link");LinkTag.rel="stylesheet";LinkTag.href=font;iframeHead.appendChild(LinkTag)}})}else{return}}if(wp.customize){wp.customize.controlConstructor["auxin_group_typography"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this,input=this.container.eq(0).find(".aux-typo-controller-input")[0],container=this.container.eq(0).find(".aux-typo-controller-container")[0];OptionControls.inputAdapter(input,container,function(optionControl){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS());auxin_embed_fonts_url(optionControl.getFonts())},function(optionControl){wp.customize.previewer.bind("ready",function(){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS());auxin_embed_fonts_url(optionControl.getFonts())})})}})}if(wp.customize){wp.customize.controlConstructor["auxin_group_global_colors"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this,jsonInput=this.container.eq(0).find(".aux-global-colors-controller-json-input")[0],container=this.container.eq(0).find(".aux-global-colors-controller-container")[0],input=this.container.eq(0).find(".aux-global-colors-controller-input")[0];OptionControls.inputAdapter(jsonInput,container,function(optionControl){control.setting.set(optionControl.value.color);auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS())},function(optionControl){wp.customize.previewer.bind("ready",function(){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS())})})}})}if(wp.customize){wp.customize.controlConstructor["auxin_responsive_slider"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this,input=this.container.eq(0).find(".aux-slider-controller-input")[0],container=this.container.eq(0).find(".aux-slider-controller-container")[0];OptionControls.inputAdapter(input,container,function(optionControl){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.generateCSS())},function(optionControl){wp.customize.previewer.bind("ready",function(){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.generateCSS())})})}})}if(wp.customize){wp.customize.controlConstructor["auxin_responsive_dimensions"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this,input=this.container.eq(0).find(".aux-dimension-controller-input")[0],container=this.container.eq(0).find(".aux-dimension-controller-container")[0];OptionControls.inputAdapter(input,container,function(optionControl){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS())},function(optionControl){wp.customize.previewer.bind("ready",function(){auxin_embed_controller_styles("auxin-customizer-css-",control.id,optionControl.toCSS())})})}})}var pairRepeaterContainer=document.querySelector(".aux-pair-repeater-container"),pairRepeaterInput=document.querySelector(".aux-product-custom-fields");if(!wp.customize&&pairRepeaterContainer){OptionControls.inputAdapter(pairRepeaterInput,pairRepeaterContainer)}var visual_select_picker=".visual-select-wrapper",visual_select_args={insertCaption:false,item:"axi-select-item"};if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(visual_select_picker).avertaVisualSelect(visual_select_args);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(visual_select_picker).avertaVisualSelect(visual_select_args)})}else{$(visual_select_picker).avertaVisualSelect(visual_select_args);$(document).on("panelsopen",function(){$(visual_select_picker).avertaVisualSelect(visual_select_args)})}if(wp.customize){wp.customize.controlConstructor["auxin_radio_image"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(visual_select_picker);control.picker.val(control.setting()).avertaVisualSelect(visual_select_args);control.picker.on("change",function(){if(control.params.presets.constructor===Object&&Object.keys(control.params.presets).length){var presetID,presetValue,presetControl;for(presetID in control.params.presets[control.setting()]){presetValue=control.params.presets[control.setting()][presetID];wp.customize.control(presetID+"_control").update(presetValue)}}control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var selectPicker=$(".aux-meta-select");if(!isWidgetsPage){selectPicker.on("change",function(event){if(auxin.metabox){for(var metaboxID in auxin.metabox){var metaboxRelatedControls=auxin.metabox[metaboxID].relatedControls,relatedControls=metaboxRelatedControls[event.target.id];relatedControls.forEach(function(related){var control=$("#"+related);if(control[0].value!==event.target.value){control[0].value=event.target.value;control.trigger("change")}})}}})}if(wp.customize){wp.customize.controlConstructor["auxin_template_library"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(visual_select_picker);control.picker.val(control.setting()).avertaVisualSelect(visual_select_args);control.picker.on("change",function(event){if(control.params.presets.constructor===Object&&Object.keys(control.params.presets).length){var presetID,presetValue,presetControl;for(presetID in control.params.presets[control.setting()]){presetValue=control.params.presets[control.setting()][presetID];wp.customize.control(presetID+"_control").update(presetValue)}}control.setting.set(control.picker.val());var $selectedVisual=control.container.find(".axi-selected"),$loadingText=$("<span />").addClass("aux-fetching-text").html("Importing To Your Library");$selectedVisual.addClass("aux-fetching");$loadingText.insertAfter($selectedVisual);$.ajax({url:auxin.ajaxurl,type:"POST",dataType:"json",data:{action:"auxin_template_control_importer",id:control.picker.val(),template_type:control.picker.parents(".aux-template-type").data("template-type")},complete:function(data){$selectedVisual.removeClass("aux-fetching");$loadingText.remove()}}).done(function(response){if(response.success){var relatedControls=control.params.relatedControls;relatedControls.forEach(function(related){var relatedControl=wp.customize.control(related+"_control");if(!response.data.isImported){relatedControl.picker.trigger("change",[{title:response.data.postTitle,id:response.data.postId}])}else{var selectedTitle=$selectedVisual.attr("title");relatedControl.picker.find("option").each(function(index,option){var $option=$(option),optionTitle=$option.text();if(optionTitle===selectedTitle){var optionValue=$option.attr("value");relatedControl.update(optionValue)}})}});console.log("Successfully Done. "+response.data.message)}else{console.log("Failed. "+response.data.message)}}).fail(function(){console.log("error")})});this.setting.bind(function(value){control.picker.val(value)})}})}var selectiveListArgs={insertCaption:true,item:"axi-select-item",container:"aux-selective-list"};if(isWidgetsPage){}else{var selectiveList=$(".aux-meta-selective-list").avertaVisualSelect(selectiveListArgs);selectiveList.on("change",function(event){if(auxin.metabox){var controlValue=selectiveList.val(),controlTitle=$(event.target).find("option[selected]").text();for(var metaboxID in auxin.metabox){var metaboxRelatedControls=auxin.metabox[metaboxID].relatedControls,relatedControls=metaboxRelatedControls[event.target.id];relatedControls.forEach(function(related){$("#"+related).trigger("change",[{title:controlTitle,id:controlValue}])})}}})}if(wp.customize){wp.customize.controlConstructor["auxin_selective_list"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(".aux-control-selective-list");control.picker.val(control.setting()).avertaVisualSelect(selectiveListArgs);control.picker.on("change",function(event,data){var _link=$("option:selected",this).attr("data-link");if(typeof _link!="undefined"&&_link!=""){window.open(_link,"_blank")}if(data){control.picker.avertaVisualSelect("addItem",data.id,data.title);control.picker.val(data.id)}if(control.params.relatedControls){var relatedName=control.params.relatedControls,relatedControl=wp.customize.control(relatedName+"_control"),controlTitle=control.container.find(".axi-select-item.axi-selected .axi-select-caption").text(),controlValue=control.picker.val();relatedControl.update(controlValue,{title:controlTitle,id:controlValue})}control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}if(isWidgetsPage){}else{$(".aux-meta-edit-template input").on("change",function(event,data){var pageID=data.id.indexOf("-def")!==-1?data.id.replace("-def",""):data.id;var elementorEditPageUrl=auxin.adminurl+"post.php?post="+pageID+"&action=elementor";$(event.target).parent().find(".axi-select-caption").text(data.title);$(event.target).parent().find(".aux-edit-elementor-button").attr("href",elementorEditPageUrl);event.target.value=data.id})}if(wp.customize){wp.customize.controlConstructor["auxin_edit_template"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("input");control.picker.on("change",function(event,data){var elementorEditPageUrl=auxin.adminurl+"post.php?post="+data.id+"&action=elementor";control.container.find(".axi-select-caption").text(data.title);control.container.find(".aux-edit-elementor-button").attr("href",elementorEditPageUrl);control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var sortable_input_picker=".aux-sortable-input",sortable_input_args={addButtonText:"Add to List",addbuttonClass:"sortin-add-btn button button-primary button-large",sortable:true,fields:[],wrapperClass:"sortin-wrapper auxin-sortin",selectboxClass:"sortin-selectbox aux-select2-single"};if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(sortable_input_picker).sortableInput(sortable_input_args);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(sortable_input_picker).sortableInput(sortable_input_args)})}else{$(sortable_input_picker).sortableInput(sortable_input_args);$(document).on("panelsopen",function(){$(sortable_input_picker).sortableInput(sortable_input_args)})}if(wp.customize){wp.customize.controlConstructor["auxin_sortable_input"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(sortable_input_picker);control.picker.val(control.setting()).sortableInput(sortable_input_args);this.setting.bind(function(value){})}})}var switchery_picker='.av3_container input[type="checkbox"], .aux_switch[type="checkbox"]',switchery_args={color:"#0074A2",secondaryColor:"#C2C2C2",className:"axi-switch",speed:"0.3s"};function initSwitchary($target){$target.each(function(index,el){if(!el.getAttribute("data-switchery")){new Switchery(el,switchery_args)}})}function disableHiddenSwitch(){$(".aux_switch:checkbox:checked").each(function(index,el){$(this).prev().prop("disabled",false)})}if(isWidgetsPage){initSwitchary($(".inactive-sidebar, .widget-liquid-right").find(switchery_picker));$(document).on("widget-added widget-updated",function(){initSwitchary($(".inactive-sidebar, .widget-liquid-right").find(switchery_picker));disableHiddenSwitch()})}else{var switchery_inputs=$(switchery_picker);initSwitchary(switchery_inputs);switchery_inputs.on("change",function(e){if(auxin.metabox){for(var metaboxID in auxin.metabox){var metaboxRelatedControls=auxin.metabox[metaboxID].relatedControls,relatedControls=metaboxRelatedControls[event.target.id];relatedControls.forEach(function(related){var control=$("#"+related);if(control[0].checked!==e.target.checked){control.trigger("click")}})}}e.target.setAttribute("value",e.target.checked?"1":"0")});$(document).on("panelsopen",function(){initSwitchary($(switchery_picker));disableHiddenSwitch()})}if(wp.customize){wp.customize.controlConstructor["auxin_switch"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(switchery_picker);control.picker.val(control.setting());switchery_args.size="small";var switchery=new Switchery(control.picker[0],switchery_args);this.setting.bind(function(value){if(control.params.relatedControls){control.params.relatedControls.forEach(function(relatedName,index){var relatedControl=wp.customize.control(relatedName+"_control");relatedControl.update(value)})}switchery.setPosition(false);switchery.handleOnchange(false)})}})}var font_select_picker=".axi-font-field",font_select_args={insertPreviewText:true,googleFontsPrefix:"_gof_",systemFontsPrefix:"_sys_",geaFontsPrefix:"_gea_",customFontsPrefix:"_cus_",useGoogleFonts:true,systemFonts:auxin.admin.fonts.system.faces,geaFonts:auxin.admin.fonts.google_early.faces,customFonts:auxin.admin.fonts.custom.faces,l10n:{previewTextLabel:auxin.admin.fontSelector.previewTextLabel||"Preview text:",fontLabel:auxin.admin.fontSelector.fontLabel||"Font:",fontSizeLabel:auxin.admin.fontSelector.fontSizeLabel||"Size:",fontStyleLabel:auxin.admin.fontSelector.fontStyleLabel||"Style:",googleFonts:auxin.admin.fontSelector.googleFonts||"Google Fonts",systemFonts:auxin.admin.fontSelector.systemFonts||"System Fonts",geaFonts:auxin.admin.fontSelector.geaFonts||"Google Early Access",customFonts:auxin.admin.fontSelector.customFonts||"Custom Fonts"}};$(font_select_picker).avertaFontSelector(font_select_args);if(wp.customize){wp.customize.controlConstructor["auxin_typography"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(font_select_picker);control.picker.val(control.setting()).avertaFontSelector(font_select_args);control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var attach_media_picker='.axi-attachmedia-wrapper input[type="text"]',$attach_media_elem=$(".axi-attachmedia-wrapper").find('input[type="text"]'),attach_media_args={item:"am-item am-frame",thumbnail:"am-img-holder",removeItem:"am-remove",sortable:"axi-attach-items",addItem:"am-add-new am-frame",srcMap:auxin.attachmedia||null,sortableOptions:{placeholder:"am-placeholder",forcePlaceholderSize:true},autoHideElement:true,confirmOnRemove:true,multiple:true,limit:9999,type:null,insertCaption:false,l10n:{addToList:"Add image(s)",uploaderTitle:"Select Image",uploderSubmit:"Add image",removeConfirm:"Are you sure that you want to remove this attachment?"}};if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(attach_media_picker).avertaAttachMedia(attach_media_args);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(attach_media_picker).avertaAttachMedia(attach_media_args)})}else{$(attach_media_picker).avertaAttachMedia(attach_media_args);$(document).on("panelsopen",function(){$(attach_media_picker).avertaAttachMedia(attach_media_args)})}if(wp.customize){wp.customize.controlConstructor["auxin_media"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(attach_media_picker);if(control.params.attachments){attach_media_args.srcMap=control.params.attachments}control.picker.val(control.setting()).avertaAttachMedia(attach_media_args);control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}if(wp.customize){wp.customize.controlConstructor["auxin_text"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("input[type]");control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}if(wp.customize){wp.customize.controlConstructor["auxin_base"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("input[type]");control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var $palette_pickers=$('.auxin-color-palette input[type="text"]');var $palette_picker,colors,palette_picker_name;for(var i=0,l=$palette_pickers.length;i<l;i++){$palette_picker=$palette_pickers.eq(i);palette_picker_name=$palette_picker.prop("name");if(typeof window.auxin.admin.palette[palette_picker_name]!="undefined"){$palette_picker.spectrum({allowEmpty:true,showInput:false,showAlpha:true,disabled:false,showSelectionPalette:true,showPaletteOnly:false,showPalette:true,hideAfterPaletteSelect:true,palette:auxin.admin.palette[palette_picker_name],clickoutFiresChange:true,showInitial:true,chooseText:auxin.admin.colorpicker.chooseText,cancelText:auxin.admin.colorpicker.cancelText,containerClassName:"axi-sp-wrapper",localStorageKey:"auxin.spectrum",preferredFormat:"hex6"})}}var $dateFields=$("input#custom_news_date");if($dateFields.length){$dateFields.datepicker({dateFormat:"yy-mm-dd"})}if(wp.customize){wp.customize.controlConstructor["auxin_export"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("form");control.picker.on("submit",function(e){e.preventDefault();var $this=$(this),$button=$this.find("button").addClass("aux-button-loading");$.ajax({url:auxin.ajaxurl,type:"POST",dataType:"json",data:{nonce:$this.find("#auxin-export-nonce").val(),action:"auxin_customizer_export"},success:function(response){$button.removeClass("aux-button-loading");if(response.success){var element=document.createElement("a");element.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(response.data.content));element.setAttribute("download",response.data.fileName);element.style.display="none";document.body.appendChild(element);element.trigger("click");document.body.removeChild(element)}}})})}})}if(wp.customize){wp.customize.controlConstructor["auxin_import"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("form");control.picker.on("submit",function(e){e.preventDefault();var $this=$(this),$button=$this.find("button").addClass("aux-button-loading");var data=new FormData;data.append("file",$this.find("#auxin-select-import").prop("files")[0]);data.append("action","auxin_customizer_import");data.append("nonce",$this.find("#auxin-import-nonce").val());$.ajax({url:auxin.ajaxurl,type:"POST",dataType:"json",processData:false,contentType:false,data:data,success:function(response){$button.removeClass("aux-button-loading");if(response.success){setTimeout(function(){location.reload()},1e3)}}})})}})}if(wp.customize){wp.customize.controlConstructor["auxin_select"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find("select");control.picker.val(control.setting());control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}if($.fn.select2){var select2_picker=".aux-select2-single",select2_args={theme:"auxin"};if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(select2_picker).select2(select2_args);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(select2_picker).select2(select2_args)})}else{$(select2_picker).select2(select2_args);$(document).on("panelsopen",function(){select2_args.dropdownParent=$(".auxin-admin-widget-wrapper");$(select2_picker).select2(select2_args)})}if(wp.customize){wp.customize.controlConstructor["auxin_select2"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(select2_picker);control.picker.val(control.setting()).select2(select2_args);control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}var select2_picker_multi=".aux-select2-multiple",select2_args_multi={theme:"auxin",placeholder:"Select Options",allowClear:true,dropdownParent:$("#vc_ui-panel-edit-element")},old_name;if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(select2_picker_multi).each(function(){old_name=$(this).attr("name");if(!old_name.endsWith("[]")){$(this).attr("name",old_name+"[]")}});$(".inactive-sidebar, .widget-liquid-right").find(select2_picker_multi).select2(select2_args_multi);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(select2_picker_multi).each(function(){old_name=$(this).attr("name");if(!old_name.endsWith("[]")){$(this).attr("name",old_name+"[]")}});$(".inactive-sidebar, .widget-liquid-right").find(select2_picker_multi).select2(select2_args_multi)})}else{$(select2_picker_multi).select2(select2_args_multi);$(document).on("panelsopen",function(){select2_args_multi.dropdownParent=$(select2_picker_multi).closest(".aux-element-field.aux-multiple-selector");$(select2_picker_multi).select2(select2_args_multi)})}if(wp.customize){wp.customize.controlConstructor["auxin_select2_multiple"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;select2_args_multi.dropdownParent=this.container.find(select2_picker_multi).closest(".customize-control-auxin_select2_multiple");control.picker=this.container.find(select2_picker_multi);control.picker.val(control.setting()).select2(select2_args_multi);control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}}if($.fn.spinner){var $numerics=$(".auxin-admin-numeric");for(var i=0,l=$numerics.length;i<l;i++){var $this=$numerics.eq(i),params={};if(undefined!==(minVal=$this.data("min"))){params.min=parseInt(minVal)}if(undefined!==(maxVal=$this.data("max"))){params.max=parseInt(maxVal)}if(undefined!==(stepVal=$this.data("step"))){params.step=parseInt(stepVal)}$this.spinner(params)}}var auxIconPickerOptions={theme:"fip-grey",source:false,emptyIcon:true,emptyIconValue:"",iconsPerPage:36,hasSearch:true,searchSource:false,useAttribute:false,attributeName:"data-icon",convertToHex:true,allCategoryText:"From all categories",unCategorizedText:"Uncategorized"},auxIconPickerSelector=".aux-fonticonpicker";if(isWidgetsPage){$(".inactive-sidebar, .widget-liquid-right").find(auxIconPickerSelector).fontIconPicker(auxIconPickerOptions);$(document).on("widget-added widget-updated",function(){$(".inactive-sidebar, .widget-liquid-right").find(auxIconPickerSelector).fontIconPicker(auxIconPickerOptions)})}else{$(auxIconPickerSelector).fontIconPicker(auxIconPickerOptions);if(wp.customize){wp.customize.bind("ready",function(){$(auxIconPickerSelector).fontIconPicker(auxIconPickerOptions)})}$(document).on("panelsopen",function(){$(auxIconPickerSelector).fontIconPicker(auxIconPickerOptions)})}if(wp.customize){wp.customize.controlConstructor["auxin_icon"]=wp.customize.AuxinControl.extend({ready:function(){wp.customize.AuxinControl.prototype.ready.apply(this,arguments);var control=this;control.picker=this.container.find(auxIconPickerSelector);control.picker.val(control.setting());control.picker.on("change",function(){control.setting.set(control.picker.val())});this.setting.bind(function(value){control.picker.val(value)})}})}function onWPDataChange(){var format=wp.data.select("core/editor").getPostEdits().format||wp.data.select("core/editor").getCurrentPostAttribute("format");if(format!==lastFormat){lastFormat=format;if(typeof format==="undefined"){return}$(".aux-format-tab").hide();get_format_section(format).show()}}if(typeof wp.blocks!=="undefined"&&wp.data.select("core/editor")!=null){var lastFormat="";wp.data.subscribe(onWPDataChange);onWPDataChange()}var $format_select_buttons=$('#post-formats-select input[type="radio"]');function get_format_section(format){format=format.replace("post-format-","");return $(".axi-metabox-container .tabs .aux-tab-post-"+format)}if($format_select_buttons.length){var $format_tabs=$(".aux-format-tab"),$lastDisplayed=get_format_section($format_select_buttons.filter(":checked").prop("id")).show();if(!window.location.hash){$('.axi-metabox-container .tabs a[href="'+window.location.hash+'"]').parent("li").trigger("click")}$format_select_buttons.on("change",function(){$format_tabs.hide();$lastDisplayed=get_format_section($(this).prop("id"));if(!$lastDisplayed.length)$lastDisplayed=get_format_section("post-format-sidebar-layout");$lastDisplayed.show().trigger("click")})}if(isWidgetsPage){$(".widget-liquid-right .widget").each(function(index,element){auxInitWidgetDependencies($(this))});$(document).on("widget-added widget-updated",function(e,target){auxInitWidgetDependencies(target)})}else{jQuery(document).on("panelsopen",function(e){auxInitWidgetDependencies($(e.target))})}function auxInitWidgetDependencies($widget){var $wrapper=$widget.find(".auxin-admin-widget-wrapper"),id,deps;if($wrapper.length===0){return}id=$wrapper.attr("id");if(!window.auxin||!auxin.elements||!auxin.elements[id]){return}deps=auxin.elements[id].dependencies;var manager=new window.DependencyManager($wrapper,{fieldContainer:".aux-element-field",fieldMapper:auxDependencyFieldMapper,observerMapper:auxDependencyFieldMapper},deps);manager.setup()}function auxDependencyFieldMapper(target){return'[id$="-'+target+'"]'}(function($){var $rating=$(".aux-rating-section input");if(!$rating.length){return}var $feedback_form=$(".aux-feedback-form"),$feedback_section=$feedback_form.find(".aux-feedback-section"),$submit_btn=$feedback_section.find('input[type="submit"]'),$status_progress=$(".aux-sending-status .ajax-progress"),$status_response=$(".aux-sending-status .ajax-response"),$rate_us_notice=$feedback_section.find(".aux-rate-us-offer"),rate;$rating.on("change",function(){rate=$rating.filter(":checked").val();if(rate!==undefined){$feedback_section.removeClass("aux-hide");$rate_us_notice.toggleClass("aux-hide",rate<9)}}).trigger("change");$submit_btn.on("click",function(e){e.preventDefault();if($submit_btn.prop("disabled")){return}$status_progress.removeClass("aux-hide");$status_response.removeClass("aux-hide");$.ajax({url:auxin.ajaxurl,type:"POST",dataType:"json",data:{form:$feedback_form.serializeObject(),action:"send_feedback"},success:function(reposnse){if(reposnse.success){$status_response.html('<i class="_success">&#10003;</i>'+reposnse.data).removeClass("aux-hide");$status_progress.addClass("aux-hide")}else{$status_response.html('<i class="_fail">&#10008;</i>'+reposnse.data).removeClass("aux-hide");$status_progress.addClass("aux-hide");submit_btn.prop("disabled",false)}}});$submit_btn.prop("disabled",true).addClass("disabled")})})(jQuery);(function($){$("form#post").on("submit",function(event){localStorage.setPostMeta(auxin.post&&auxin.post.id,"edit_fragment",window.location.hash);return true})})(jQuery)})})(jQuery,window,document);(function($,window,document,undefined){"use strict";function AuxinPresetManager($wrapper,presetFields){this.$wrapper=$wrapper;this.presetFields=presetFields;this.$observers}var p=AuxinPresetManager.prototype;p.setup=function(){var self=this;for(var presetFieldId in self.presetFields){self.$wrapper.find("#"+presetFieldId).on("change",function(){var $this=$(this),observerId=$this.prop("id");if(typeof self.presetFields[observerId]!=="undefined"){self.applyPresets(self.presetFields[observerId],$this.val())}})}};p.applyPresets=function(presetDataStacks,selectedStack){var self=this;var presetTargets=presetDataStacks[selectedStack];if(typeof presetTargets==="undefined"){return}for(var presetTargetId in presetTargets){var presetTargetValue=presetTargets[presetTargetId];var $targetField=self.$wrapper.find("#"+presetTargetId);if(!$targetField.length){continue}switch($targetField[0].nodeName){case"INPUT":switch($targetField[0].type){case"text":if($targetField.hasClass("colorpickerField")){$targetField.spectrum("set",presetTargetValue).change();$targetField.val(presetTargetValue);continue}case"checkbox":if(presetTargetValue!=$targetField[0].checked){$targetField.trigger("click")}continue;case"radio":break}break;case"TEXTAREA":if($targetField.hasClass("wp-editor-area")){if(tinyMCE){tinyMCE.get(presetTargetId).setContent(presetTargetValue)}continue}break;case"SELECT":switch($targetField[0].type){case"select-one":break;case"select-multiple":break}break}$targetField.val(presetTargetValue)}};$(function(){var $metabox,opsPres;if(auxin.metabox){for(var metaboxID in auxin.metabox){var metaboxpresetData=auxin.metabox[metaboxID].presets;$metabox=$("#"+metaboxID);if($metabox.length){opsPres=new AuxinPresetManager($metabox,metaboxpresetData);if(undefined!==opsPres.setup){opsPres.setup()}}}}var $panel=$(".auxin_options_form");if($panel.length&&auxin.optionpanel.presets){opsPres=new AuxinPresetManager($panel,auxin.optionpanel.presets);opsPres.setup()}})})(jQuery,window,document);(function($){"use strict";var $container;$(function(){$container=$(".av3_container .uploader");if(!$container.length)return;$container.each(function(index){var $this=$(this);var $input=$this.find('input[type="text"]').eq(0);var $placeholder=$this.find(".img-placeholder").eq(0);var $upload=$this.find('input[type="button"]').eq(0);var $remove=$this.find('input[type="button"]').eq(1);var $imgHolder=$this.find("div.imgHolder").addClass("no-media");var $close=$this.find("strong.close").addClass("no-media");$close.on("click",function(){var $this=$(this);var $img=$this.next("img");$img.hide();$this.addClass("no-media");$imgHolder.addClass("no-media");$input.val("")});$remove.on("click",function(){$input.val("");$close.trigger("click")});$input.on("keyup change blur",function(e){if(e.type=="click"&&e.ctrlKey){$upload.trigger("click")}else{updateImage($(e.target))}});$upload.on("click",function(){var $this=$(this);var $input=$this.siblings('input[type="text"]');if(frame){frame.open();return}var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:false,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();$input.val(attachment.url).trigger("change")});frame.open()});$placeholder.on("click",function(){var $this=$(this);var $input=$this.closest(".uploader").find('input[type="text"]');if(frame){frame.open();return}var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:false,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();$input.val(attachment.url).trigger("change")});frame.open()});updateImage($input)});function updateImage($input){var $holder=$input.siblings(".imgHolder");var $close=$holder.children(".close");var $img=$close.next("img").load(function(e){$holder.removeClass("no-media");$close.removeClass("no-media");$img.show()}).error(function(e){$holder.addClass("no-media");$close.addClass("no-media");$img.hide()});var imgUrl=$input.val();if(imgUrl.indexOf("http://")===-1)imgUrl=auxin.uploadbaseurl+"/"+imgUrl;$img.attr("src",imgUrl)}})})(jQuery);
//# sourceMappingURL=scripts.min.js.map

Zerion Mini Shell 1.0