HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/ielts-store/wp-content/plugins/automatewoo/admin/assets/js/min/workflows.min.js
!function(t,o){AW.Workflow=Backbone.Model.extend({getAction:function(t){var o=AW.workflow.get("actions");if(o[t])return o[t]}}),AW.WorkflowView=Backbone.View.extend({el:t("form#post"),$triggerSelect:t(".js-trigger-select"),$triggerDescription:t(".js-trigger-description"),initialize:function(){this.listenTo(this.model,"change:trigger",this.changeTrigger),this.model.set("prevTrigger",this.$triggerSelect.val()),this.insertMetaboxHelpTips()},changeTrigger:function(){AW.rules.resetAvailableRules(),t(document.body).trigger("wc-enhanced-select-init"),AW.initTooltips(),AW.Validate.validateAllFields(),AutomateWoo.Workflows.trigger_compatibility_warning()&&AW.workflowView.completeTriggerChange()},completeTriggerChange:function(){AW.rules.clearIncompatibleRules(),AutomateWoo.Workflows.clearIncompatibleActions(),AutomateWoo.Modal.close(),AutomateWoo.Workflows.refine_variables(),AutomateWoo.Workflows.refine_action_selects(),AutomateWoo.Workflows.maybe_disable_queueing(),this.updateTriggerDescription(),this.model.set("prevTrigger",this.$triggerSelect.val()),t(document.body).trigger("automatewoo_trigger_changed")},cancelTriggerChange:function(){this.$triggerSelect.val(this.model.get("prevTrigger")).trigger("change")},updateTriggerDescription:function(){var t=this.model.get("trigger");t&&t.description?this.$triggerDescription.html('<p class="aw-field-description">'+t.description+"</p>"):this.$triggerDescription.html("")},initAction:function(o,e){var i=this.model.getAction(o);i?(e.attr("data-automatewoo-action-name",o),e.attr("data-automatewoo-action-group",i.group),e.attr("data-automatewoo-action-can-be-previewed",i.can_be_previewed)):(e.removeAttr("data-automatewoo-action-name"),e.removeAttr("data-automatewoo-action-group"),e.removeAttr("data-automatewoo-action-can-be-previewed")),e.find("[data-automatewoo-dynamic-select]").each((function(o,i){AW.workflowView.initDynamicActionSelect(t(i),e)})),AW.initTooltips(),AutomateWoo.Workflows.action_dependent_fields(e)},initDynamicActionSelect:function(t,o){var e=t.attr("data-automatewoo-dynamic-select-reference"),i=o.find('.automatewoo-field[data-name="'+e+'"]');i.on("change",(function(){AW.workflowView.updateDynamicActionSelect(t,i,o)}))},updateDynamicActionSelect:function(o,e,i){if(!o.is(".automatewoo-field--loading")&&(o.find("option[value!='']").remove(),e.val())){var a=o.parents(".automatewoo-table__row");a.addClass("automatewoo-field-row--loading");var n={action:"aw_update_dynamic_action_select",action_name:i.data("automatewoo-action-name"),target_field_name:o.attr("data-name"),reference_field_value:e.val()};t.post(ajaxurl,n,(function(e){a.removeClass("automatewoo-field-row--loading"),e.success&&t.each(e.data,(function(e,i){o.append(t("<option/>",{value:e,text:i}))}))}))}},insertMetaboxHelpTips:function(){var o=this.model.get("metaBoxHelpTips");_.each(o,(function(o,e){$metabox=t("#aw_"+e),$metabox.find("h2.hndle").append(o)}))}}),AW.TriggerCompatibilityModalView=Backbone.View.extend({className:"aw-view-trigger-compatibility-modal",template:wp.template("aw-trigger-compatibility-modal"),data:null,initialize:function(t){this.data=t,this.$el.on("click",".js-confirm",(function(){AW.workflowView.completeTriggerChange()})),this.$el.on("click",".js-close-automatewoo-modal",(function(){AW.workflowView.cancelTriggerChange()}))},render:function(){return this.$el.html(this.template(this.data)),this}}),AW.TriggerPresetActivationModalView=Backbone.View.extend({className:"aw-view-trigger-preset-activation-modal",template:wp.template("aw-trigger-preset-activation-modal"),data:null,initialize:function(o){this.data=o;let e=this;this.$el.on("click",".js-confirm",(function(){e.disableButtons(),o.action="confirm",AutomateWoo.Modal.close(),t(AW.workflowView.el).data("aw-preset-workflow-confirmed",!0).trigger("submit")})),this.$el.on("click",".js-close-automatewoo-modal",(function(){o.action="cancel",e.disableButtons()}))},disableButtons:function(){this.$el.find(".automatewoo-modal__footer button").addClass("disabled")},render:function(){return this.$el.html(this.template(this.data)),this},open:function(){this.data.action="dismiss",AutomateWoo.Modal.open(),AutomateWoo.Modal.contents(this.render().el),AW.tracks.recordEvent("preset_activation_alert_rendered",{is_active:this.data.isActive}),document.body.addEventListener("awmodal-close",()=>AW.tracks.recordEvent("preset_activation_alert_closed",{is_active:this.data.isActive,action:this.data.action}),{once:!0})}}),AW.workflow=new AW.Workflow(o),AW.workflowView=new AW.WorkflowView({model:AW.workflow}),AW.Validate.init()}(jQuery,automatewooWorkflowLocalizeScript),jQuery((function(t){function o(){var o=t('input[name="aw_workflow_data[trigger_options][days_since_last_purchase]"]'),e=t('input[name="aw_workflow_data[trigger_options][days_since_last_purchase_max]"]');o.on("change keyup",(function(){var t=o.val()?parseInt(o.val()):0,i="";t&&(i=t+3),e.attr("min",t+1),e.attr("placeholder",i)})).trigger("change")}AutomateWoo.Workflows={$triggers_box:t("#aw_trigger_box"),$manual_workflow_box:t("#aw_manual_workflow_box"),$actions_box:t("#aw_actions_box"),$actions_container:t(".aw-actions-container"),$action_template:t(".aw-action-template"),$trigger_select:t(".js-trigger-select").first(),$manual_trigger_select:t(".js-manual-trigger-select").first(),init:function(){AutomateWoo.Workflows.init_triggers_box(),AutomateWoo.Workflows.init_actions_box(),AutomateWoo.Workflows.init_options_box()},init_triggers_box:function(){AutomateWoo.Workflows.$trigger_select.on("change",(function(){AutomateWoo.Workflows.fill_trigger_fields(t(this).val())})),AutomateWoo.Workflows.$manual_trigger_select.on("change",(function(){AutomateWoo.Workflows.fill_manual_workflow_trigger_fields(t(this).val())}))},init_actions_box:function(){t(".automatewoo-action.js-open").each((function(){AutomateWoo.Workflows.action_edit_open(t(this))})),t(".js-aw-add-action").on("click",(function(t){t.preventDefault(),AutomateWoo.Workflows.add_new_action()})),t(document).on("click",".js-edit-action",(function(o){o.preventDefault();var e=t(this).parents(".automatewoo-action").first();e.is(".js-open")?AutomateWoo.Workflows.action_edit_close(e):AutomateWoo.Workflows.action_edit_open(e)})),t(document).on("click",".js-delete-action",(function(o){o.preventDefault();var e=t(this).parents(".automatewoo-action").first();AutomateWoo.Workflows.action_delete(e)})),t(document).on("change",".js-action-select",(function(){var o=t(this).parents(".automatewoo-action").first();AutomateWoo.Workflows.fill_action_fields(o,t(this).val())})),t(document).on("click","[data-automatewoo-preview]",(function(o){o.preventDefault();var e=t(this).parents(".automatewoo-action").first();AutomateWoo.Workflows.preview_action(e)})),AW.workflow.get("isNew")||(AutomateWoo.Workflows.refine_action_selects(),AutomateWoo.Workflows.refine_variables(),AutomateWoo.Workflows.maybe_disable_queueing(),t(".automatewoo-action").each((function(o,e){AW.workflowView.initAction(t(e).find(".js-action-select").val(),t(e))})))},init_options_box:function(){var o=t(".aw-checkbox-enable-click-tracking");AutomateWoo.Workflows.maybe_hide_tracking_options(),o.on("click",(function(){AutomateWoo.Workflows.maybe_hide_tracking_options()}))},maybe_hide_tracking_options:function(){t(".aw-checkbox-enable-click-tracking").is(":checked")?t(".js-require-email-tracking").show():t(".js-require-email-tracking").hide()},fill_trigger_fields:function(t){AutomateWoo.Workflows.$triggers_box.find("tr.aw-trigger-option").remove(),t?(AutomateWoo.Workflows.$triggers_box.addClass("aw-loading"),this.fetch_trigger_data(t).done((function(t){t.success&&(AutomateWoo.Workflows.$triggers_box.find("tbody").append(t.data.fields),AutomateWoo.Workflows.$triggers_box.removeClass("aw-loading"),AW.workflow.set("trigger",t.data.trigger))}))):AW.workflow.set("trigger",!1)},fetch_trigger_data:function(o){return t.ajax({method:"GET",url:ajaxurl,data:{action:"aw_fill_trigger_fields",trigger_name:o,workflow_id:AW.workflow.get("id"),is_new_workflow:AW.workflow.get("isNew")}})},fill_manual_workflow_trigger_fields:function(t){var o=AutomateWoo.Workflows.$manual_workflow_box;o.find("tr.aw-trigger-option").remove(),t?(o.addClass("aw-loading"),this.fetch_trigger_data(t).done((function(t){t.success&&(o.find("tbody").append(t.data.fields),o.removeClass("aw-loading"),AW.workflow.set("trigger",t.data.trigger))}))):AW.workflow.set("trigger",!1)},add_new_action:function(){var o,e=AutomateWoo.Workflows.get_number_of_actions()+1;t(".js-aw-no-actions-message").hide(),(o=AutomateWoo.Workflows.$action_template.clone()).removeClass("aw-action-template"),o.addClass("automatewoo-action"),AutomateWoo.Workflows.$actions_container.append(o),o.attr("data-action-number",e),AutomateWoo.Workflows.action_edit_open(o)},get_editing_action_cookie_name:function(t){return`aw_editing_action_${AW.workflow.get("id")}_${t}`},action_edit_open:function(t){var o=t.data("action-number");t.addClass("js-open"),t.find(".automatewoo-action__fields").slideDown(150),AW.initTooltips(),Cookies.set(this.get_editing_action_cookie_name(o),1,{sameSite:"strict"})},action_dependent_fields:function(o){o.find("[data-hide-when-checked]").each((function(){var o=t(this),e=o.data("hideWhenChecked"),i=o.closest("tr.automatewoo-table__row"),a=t(`[data-name="${e}"]`).find('input[type="checkbox"]');a&&a.on("change",(function(){this.checked?i.hide():i.show()})).trigger("change")}))},action_edit_close:function(t){var o=t.data("action-number");t.removeClass("js-open"),t.find(".automatewoo-action__fields").slideUp(150),Cookies.remove(this.get_editing_action_cookie_name(o))},action_delete:function(t){t.remove()},fill_action_fields:function(o,e){var i=o.data("action-number"),a=o.find(".js-action-select");AutomateWoo.Workflows.$actions_box.addClass("aw-loading"),o.find('tr.automatewoo-table__row:not([data-name="action_name"])').remove(),t.ajax({method:"GET",url:ajaxurl,data:{action:"aw_fill_action_fields",action_name:e,action_number:i,workflow_id:AW.workflow.get("id")}}).done((function(t){o.find(".automatewoo-table tbody").append(t.data.fields),AutomateWoo.Workflows.$actions_box.removeClass("aw-loading"),a.attr("name","aw_workflow_data[actions]["+i+"][action_name]"),o.find(".action-title").text(t.data.title),o.find(".js-action-description").html(t.data.description),AW.workflowView.initAction(e,o)}))},get_number_of_actions:function(){return t(".automatewoo-action").length},refine_variables:function(){var o=AW.workflow.get("trigger");t(".aw-variables-group").each((function(e,i){var a=t(i).data("automatewoo-variable-group");-1==t.inArray(a,o.supplied_data_items)?t(i).hide():t(i).show()}))},refine_action_selects:function(){t(".js-action-select").each((function(){t(this).find("option").each((function(){t(this).prop("disabled",!AutomateWoo.Workflows.is_action_compatible_with_current_trigger(t(this).val()))}))}))},maybe_disable_queueing:function(){var o=AW.workflow.get("trigger");o&&o.allow_queueing?t("#aw_timing_box").show():t("#aw_timing_box").hide()},trigger_compatibility_warning:function(){var o=[],e=[];if(_.each(AW.rules.get("ruleOptions"),(function(t){_.each(t.get("rules"),(function(t){if(t.get("name")&&!AW.rules.isRuleAvailable(t.get("name"))){var e=t.get("object");o.push(e.title)}}))})),t(".js-action-select").each((function(){AutomateWoo.Workflows.is_action_compatible_with_current_trigger(t(this).val())||e.push(t(this).find("option:selected").text())})),o.length||e.length){e=_.uniq(e),o=_.uniq(o);var i=new AW.TriggerCompatibilityModalView({incompatibleRules:o,incompatibleActions:e});return AutomateWoo.Modal.open(),AutomateWoo.Modal.contents(i.render().el),!1}return!0},clearIncompatibleActions:function(){t(".js-action-select").each((function(){if(!AutomateWoo.Workflows.is_action_compatible_with_current_trigger(t(this).val())){var o=t(this).parents(".automatewoo-action").first();AutomateWoo.Workflows.action_delete(o)}}))},is_action_compatible_with_current_trigger:function(o){var e=!0,i=AW.workflow.get("trigger"),a=AW.workflow.getAction(o);return!a||(!a.required_data_items.length||(t.each(a.required_data_items,(function(o,a){-1==t.inArray(a,i.supplied_data_items)&&(e=!1)})),e))},preview_action:function(o){var e,i=o.data("action-number"),a=AW.workflow.get("trigger"),n={};AutomateWoo.isEmailPreviewOpen()&&AutomateWoo.Workflows.$actions_box.addClass("aw-loading"),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),e="aw_workflow_data[actions]["+i+"]",o.find('[name*="'+e+'"]').each((function(o,i){var a,r,c,l;r=t(i).attr("name"),(l=/\[]$/.test(r))&&(r=r.replace("[]","")),a=r.replace(e,"").replace("[","").replace("]",""),c="checkbox"===t(i).attr("type")?i.checked?"1":"":t(i).val(),l?(n.hasOwnProperty(a)||(n[a]=[]),n[a].push(c)):n[a]=c})),AutomateWoo.openLoadingEmailPreview(),t.ajax({method:"POST",url:ajaxurl,data:{action:"aw_save_preview_data",workflow_id:AW.workflow.get("id"),trigger_name:a?a.name:"",action_fields:n},success:function(t){AutomateWoo.open_email_preview("workflow_action",{workflow_id:AW.workflow.get("id"),action_number:i})},complete:function(){AutomateWoo.Workflows.$actions_box.removeClass("aw-loading")}})},init_ajax_wysiwyg:function(o){if("undefined"!=typeof tinymce&&void 0!==tinyMCEPreInit.mceInit.automatewoo_editor){var e,i,a;if(e=t.extend({},tinyMCEPreInit.mceInit.automatewoo_editor),i=t.extend({},tinyMCEPreInit.qtInit.automatewoo_editor),e.selector="#"+o,e.id=o,e.wp_autoresize_on=!1,tinyMCEPreInit.mceInit[e.id]=e,i.id=o,tinymce.$("#wp-"+o+"-wrap").hasClass("tmce-active")||!tinyMCEPreInit.qtInit.hasOwnProperty(o))try{tinymce.init(e)}catch(t){}try{a=quicktags(i),this.init_wysiwyg_buttons(a)}catch(t){}}},init_wysiwyg_buttons:function(t){for(i in canvas=t.canvas,name=t.name,settings=t.settings,html="",theButtons={},use="",settings.buttons&&(use=","+settings.buttons+","),edButtons)edButtons[i]&&(id=edButtons[i].id,use&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+id+",")&&-1===use.indexOf(","+id+",")||edButtons[i].instance&&edButtons[i].instance!==inst||(theButtons[id]=edButtons[i],edButtons[i].html&&(html+=edButtons[i].html(name+"_"))));use&&-1!==use.indexOf(",fullscreen,")&&(theButtons.fullscreen=new qt.FullscreenButton,html+=theButtons.fullscreen.html(name+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(theButtons.textdirection=new qt.TextDirectionButton,html+=theButtons.textdirection.html(name+"_")),t.toolbar.innerHTML=html,t.theButtons=theButtons}},AutomateWoo.Workflows.init(),t(document.body).on("automatewoo_trigger_changed",(function(){o()})),t("#automatewoo-workflow-run-btn").on("click",(function(){return t('input[name="automatewoo_redirect_to_runner"]').val(1),t("#publish").trigger("click"),!1})),t("form#post").on("submit",(function(){let o=t(this),e="active"===t("select[name=workflow_status]",o).val(),i=o.data("aw-preset-workflow-confirmed");if(/workflow-origin=preset/.test(window.location.href)&&!i){return new AW.TriggerPresetActivationModalView({isActive:e}).open(),!1}return!0})),o(),function(){var o=t(".automatewoo-workflow-type-field");function e(o,e){"manual"===o?(t("#aw_trigger_box, #automatewoo-workflow-status-field-row").hide(),t("#aw_manual_workflow_box").show(),t("#automatewoo-workflow-run-btn").show().css("display","inline-block")):(t("#automatewoo-workflow-run-btn, #aw_manual_workflow_box").hide(),t("#aw_trigger_box, #automatewoo-workflow-status-field-row").show()),e&&(AutomateWoo.Workflows.$manual_trigger_select[0].selectedIndex=0,AutomateWoo.Workflows.$trigger_select[0].selectedIndex=0,AW.workflow.set("trigger",!1))}o.on("change",(function(){e(o.val(),!0)})),e(o.val(),!1)}()}));
//# sourceMappingURL=workflows.min.js.map