// source --> https://boutiquerelieve.com/wp-content/plugins/yith-event-tickets-for-woocommerce-premium/assets/js/script-tickets-frontend.min.js?ver=1.42.0 
jQuery(function(a){var e;function t(e){var t=!0;return e.find(":input[required], select[required]").each(function(e){switch(a(this).prop("tagName").toLocaleLowerCase()){case"input":t=!!function(e){var t=!0,i=a(e).attr("type");switch(t=!!r(e)&&t,i){case"email":t?(c=RegExp(/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i),t=!!c.test(a(e).val())&&t,m(a(e),t?"good":"wrong_mail")):m(a(e),"empty");break;case"number":t?(t=!!a.isNumeric(a(e).val())&&t,m(a(e),t?"good":"wrong_number")):m(a(e),"empty");break;case"date":t?(c=Date.parse(a(e).val()),(t=!!c&&t)||(s=a(e).val().split("/"),s=s[2]+"-"+s[1]+"-"+s[0],c=Date.parse(s),t=!!c||t),m(a(e),t?"good":"wrong_date")):m(a(e),"empty");break;case"radio":var c,s;t&&(s=a(e).closest(".form-field"),c=s.find(".yes-no_option_yes"),s=s.find(".yes-no_option_no"),!c.is(":checked")&!s.is(":checked")?(t=!1,m(e,"empty")):m(e,"good"));break;default:m(e,t?"good":"empty")}return t}(this)&&t;break;case"select":t=!!function(e){var t=!0;t=a(e).is(":disabled")?(a(e).val(""),!1):!!r(e)&&t;m(a(e),t?"good":"empty");return t}(this)&&t}}),t}function r(e){var t=!0;return t=null!=a(e).val()?0!==a(e).val().length&&t:(a(e).val(""),!1)}function i(){var e=a(this).val(),t=(e=""===e?1:e)-a(".field_service_row").length;if(0<=t){if(yith_wcevti_tickets.sold_individually){var i=a(".field_service_row").length;if(a(".cart").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),yith_wcevti_tickets.ajax_enable){e={action:"load_fields_event_action",num_rows:t,current_index:i,product_id:yith_wcevti_tickets.product.id,event_title:a(".yith_evti_event_title").val()};a.post(event_tickets_frontend.ajaxurl,e).success(function(e){a(".fields_panel").append(e),a(".cart").unblock(),u(),a(".field_service_row .remove").show(),a(".field_service_row .remove").first().hide()})}else{for(var c=0;c<t;c++){var i=a(".field_service_row").length,s=_(s=a(".field_service_row").first().clone(),i,!0),s=(a(".fields_panel").append(s),s.find(".content_service_row"));s.toggle(!0),s.find(".service_panel select._select_item").select2({minimumResultsForSearch:Infinity}),s.find(".service_panel").each(function(e){a(this).find(".select2-container").last().remove(),a(this).attr("data-price_service",0),a(this).find('.service_item input[type="checkbox"]').prop("checked",!1),a(this).find(".service_item span").removeClass("checked")})}a(".cart").unblock(),u(),a(".field_service_row .remove").show(),a(".field_service_row .remove").first().hide()}a(".cart").find("._field_datepicker").removeClass("hasDatepicker"),a(".cart").find("._field_datepicker").datepicker({dateFormat:yith_wcevti_tickets.format_date,changeMonth:!0,changeYear:!0,yearRange:yith_wcevti_tickets.year_range})}n()}else 0!=t&&(undefined!=yith_wcevti_tickets.messages.ask_for_delete_ticket&&confirm(yith_wcevti_tickets.messages.ask_for_delete_ticket+" "+-1*t+" "+yith_wcevti_tickets.messages.tickets),void 0!==Cookies.get("quantity")&&u(),o(t))}function _(e,c,i){e.find("input, select, textarea").each(function(e){var t=a(this).attr("name");void 0!==t&&(t=t.replace(/customer\[\d+]/,"customer["+c+"]"),a(this).attr("name",t),void 0!==(t=a(this).attr("id"))&&(t=(t=t.replace(/customer_\d+/,"customer_"+c)).replace(/customer\[\d+]/,"customer["+c+"]"),a(this).attr("id",t)),"hidden"!==a(this).attr("type")&&"radio"!==a(this).attr("type")&&"checkbox"!==a(this).attr("type")&&i&&a(this).val(""),"_services_customer_reduced-price_0"==a(this).attr("id")&&(a(this).closest(".service_item").find('input[type="hidden"]').each(function(e){a(this).attr("name",a(this).attr("name").replace("0",c))}),a(this).attr("id","_services_customer_reduced-price_"+c),a(this).attr("name","_reduced_price["+c+"][_value]"),a(this).attr("checked",!1),a(this).attr("value","on"),n()))}),e.find("label").each(function(e){var t=a(this).attr("for"),i=/customer_\d+/;void 0!==t&&(t=(t=t.replace(i,"customer_"+c)).replace(/customer\[\d+]/,"customer["+c+"]"),a(this).attr("for",t))});var t=e.find(".header_service_row>h3").text();return-1!=t.search("#1")&&(t=t.search("#1")?t.slice(0,t.indexOf("#")+1):t,e.find(".header_service_row>h3").text(t+(c+1))),(t=e).find(".yith_wcevti_item_message").text(""),t.find(".yith_wcevti_item_message").removeClass("fa fa-check fa-close yith_wcevti_item_message_incomplete yith_wcevti_item_message_complete"),t.removeClass("yith_wcevti_item_panel_complete"),t.addClass("yith_wcevti_item_panel_unstyle"),e}function c(){var e=a(this).find(":selected"),t=a(this).closest(".service_panel"),e=t.find("._services_customer_"+e.attr("name")+"_field"),i=0==(i=a("option:selected",this).data("overcharge"))?parseFloat(0):Number.isInteger(i)?parseFloat(i):parseFloat(i.replace(",","."));t.find(".service_range>.select_range").prop("required",!1),t.find(".service_range").hide(),a(e).find(".yith_wcevti_item_message").remove(),a(e).find(".select_range").prop("required",!0),e.show(),e.hasClass("service_range")&&e.find(".select_range").trigger("change"),s(t,i)}function o(e){e*=-1;var i=a(".field_service_row").length-e;a(".field_service_row").each(function(e,t){0<e&i<=e&&(d(a(t)),t.remove())}),n()}function s(e,t){var i,c=parseFloat(a(e).attr("data-price_service")),c=isNaN(c)?0:c,t=parseFloat(t),c=(i=(i=parseFloat(a(".yith_evti_total_price").attr("data-current_price")))-c+t,a(".yith_evti_total_price").attr("data-current_price",i),a(e).attr("data-price_service",t),$last_price_content=a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().last(),l(i));($last_price_content.hasClass("woocommerce-Price-currencySymbol")?a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().first():a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().last()).replaceWith(c),a(document).trigger("yith_wcevti_price_refreshed",[i,c])}function n(){var e=yith_wcevti_tickets.product.price,t=parseFloat(a(".quantity input[type=number]").val()),i=(isNaN(t)&&(t=parseFloat(a(".quantity>input[type=text]").val()),isNaN(t)&&(t=1)),0),e=(a(".service_panel").each(function(e){var t=parseFloat(a(this).attr("data-price_service"));i+=t}),e*t+i),t=(a(".yith_evti_total_price").attr("data-current_price",e),a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().last()),c=l(e);(t.hasClass("woocommerce-Price-currencySymbol")?a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().first():a(".yith_evti_total_price>.price>.woocommerce-Price-amount").contents().last()).replaceWith(c),a(document).trigger("yith_wcevti_price_refreshed",[e,c])}function l(e){var t,i,c,s,a=yith_wcevti_tickets.product.currency_symbol,r=yith_wcevti_tickets.product.currency_position;return t=e,i=yith_wcevti_tickets.product.price_decimal_sep,c=yith_wcevti_tickets.product.price_thousand_sep,s=yith_wcevti_tickets.product.price_num_decimals,e=t=accounting.formatNumber(t,s,c,i),e="left"===r?a+" "+e:e+" "+a}function d(e){e.find("input, select, textarea").each(function(e){var t;t=this,Cookies.remove(a(t).attr("name"),{path:""})})}function u(){"on"!=yith_wcevti_tickets.disable_cookie&&(a(".field_service_row").each(function(e){a(this).find("input, select, textarea").each(function(e){if(void 0!==(t=Cookies.get(a(this).attr("name"))))switch(a(this).attr("type")){case"checkbox":var t="true"===t;a(this).prop("checked",t);break;case"radio":var i=t===a(this).val();a(this).prop("checked",i);break;default:a(this).val(t)}r(this)&"hidden"!==a(this).attr("type")&&a(this).closest(".form-field").show()})}),void 0!==Cookies.get("quantity")&&Cookies.set("quantity",a(".quantity input[type=number]").val(),{path:""}))}function h(e,t){var i=a(e).closest(".field_service_row").find(".service_message");switch(i.empty(),t){case"complete":var c=a("<span/>").addClass("fa fa-check yith_wcevti_item_message yith_wcevti_item_message_complete").text(" "+yith_wcevti_tickets.messages.complete_field_service);a(e).closest(".field_service_row").removeClass("yith_wcevti_item_panel_unstyle yith_wcevti_item_panel_incomplete"),a(e).closest(".field_service_row").addClass("yith_wcevti_item_panel_complete"),c.appendTo(i);break;case"incomplete":c=a("<span/>").addClass("fa fa-close yith_wcevti_item_message yith_wcevti_item_message_incomplete").text(" "+yith_wcevti_tickets.messages.incomplete_field_service);a(e).closest(".field_service_row").removeClass("yith_wcevti_item_panel_unstyle yith_wcevti_item_panel_complete"),a(e).closest(".field_service_row").addClass("yith_wcevti_item_panel_incomplete"),c.appendTo(i)}}function m(e,t){if(a(e).prev(".yith_wcevti_item_message").remove(),$row=a(e).closest(".field_service_row").find(".service_message"),!a(e).hasClass("yes-no_option_no"))switch(a(e).hasClass("yes-no_option_yes")&&a(e).closest(".form-field").find(".yes-no_option_no"),t){case"good":a("<span/>").addClass("fa fa-check yith_wcevti_item_message yith_wcevti_item_message_good").text(" "+yith_wcevti_tickets.messages.complete_required_item).insertBefore(e),h($row,"complete");break;case"empty":a("<span/>").addClass("fa fa-close yith_wcevti_item_message yith_wcevti_item_message_empty").text(" "+yith_wcevti_tickets.messages.incomplete_required_item).insertBefore(e),h($row,"incomplete");break;case"wrong_mail":a("<span/>").addClass("fa fa-close yith_wcevti_item_message yith_wcevti_item_message_empty").text(" "+yith_wcevti_tickets.messages.wrong_mail_field).insertBefore(e),h($row,"incomplete");break;case"wrong_number":a("<span/>").addClass("fa fa-close yith_wcevti_item_message yith_wcevti_item_message_empty").text(" "+yith_wcevti_tickets.messages.wrong_number_field).insertBefore(e),h($row,"incomplete");break;case"wrong_date":a("<span/>").addClass("fa fa-close yith_wcevti_item_message yith_wcevti_item_message_empty").text(" "+yith_wcevti_tickets.messages.wrong_date_field).insertBefore(e),h($row,"incomplete");break;default:a(e).prev(".yith_wcevti_item_message").remove()}}a(".fields_panel").on("click",".header_service_row",function(){a(this).next().toggle("fast")}),a(".fields_panel").on("click",".header_service_row .remove",function(e){e.preventDefault(),undefined!=yith_wcevti_tickets.messages.ask_for_delete_ticket&&!confirm(yith_wcevti_tickets.messages.ask_for_delete_ticket+" "+yith_wcevti_tickets.messages.ticket+"?")||((e=a(this).closest(".field_service_row")).remove(),d(e),a(".quantity input[type=number]").val(a(".field_service_row").length),void 0!==Cookies.get("quantity")&&Cookies.set("quantity",a(".quantity input[type=number]").val(),{path:""}),n(),a(".field_service_row").each(function(e){0!=e&&_(a(this),e,!1)}))}),a(".fields_panel").on("change","input, select",function(){var e=a(this).closest(".field_service_row");0==a(this).prev(".yith_wcevti_item_message_empty, .yith_wcevti_item_message_good").length||t(e)||h(e,"incomplete")}),a(".single_add_to_cart_button").on("click",function(){a(".field_service_row").each(function(e){if(!t(a(this)))return a(this).find(".content_service_row").toggle(!0),h(this,"incomplete"),!1}),"on"!=yith_wcevti_tickets.disable_cookie&&!1!==a(document.body).triggerHandler("yith_wcevti_save_form")&&(a(".field_service_row").each(function(e){a(this).find("input, select, textarea").each(function(e){var t=this;if("hidden"!==a(t).attr("type")){var i=a(t).attr("name");switch(a(t).attr("type")){case"checkbox":var c=a(t).prop("checked");break;case"radio":if(a(t).is(":checked")){c=a(t).val();break}return;default:c=a(t).val()}Cookies.set(i,c,{path:""})}})}),Cookies.set("quantity",a(".quantity input[type=number]").val(),{path:""}))}),a(".entry-summary").addClass("product-addtocart"),"on"!=yith_wcevti_tickets.disable_cookie&&(e=void 0!==Cookies.get("quantity")?Cookies.get("quantity"):1,a(".quantity input[type=number]").val(e)),a(".cart").on("focus","._field_datepicker",function(){a(this).datepicker({dateFormat:"mm/dd/yy",changeMonth:!0,changeYear:!0})}),a(".cart").on("change",".quantity input[type=number],.quantity>input[type=text]",i),a(".quantity input[type=number]").trigger("change"),a(".fields_panel").on("change","._select_item",c),a("._select_item").trigger("change"),a("._select_item").prev(".yith_wcevti_item_message").remove(),a(".fields_panel").on("change",".checkbox",function(e){s(a(this).closest(".service_panel"),$overchage=a(this).is(":checked")?parseFloat(a(this).attr("data-overcharge").replace(",",".")):parseFloat(0))}),a(".checkbox").trigger("change")});
// source --> https://boutiquerelieve.com/wp-content/plugins/order-delivery-date/assets/js/tyche.js?ver=12.9.0 
"use strict";

var tyche = {
	version: '1.2', // version of tyche constructor.
	constructor: tyche,
	extend: function() {
		let target = arguments[ 0 ] || {},
			length = arguments.length,
			self = this,
			option;

		for ( let i = 0; i < length; i++ ) {

			let args = [];

			// Use default target is none was supplied fpr the first iteration.
			if ( 0 === i ) {

				if ( 1 !== length ) {
					continue;
				}

				target = self;
				args = arguments[ 0 ];
			}

			if ( 0 === args.length ) {
				args = arguments[ i ];
			}

			for ( option in args ) {
				target[ option ] = args[ option ];
			}
		}

		return target;
	},
	init: function() {
		// Here we can run codes we want initialized after tyche object core.
		if ( typeof String.prototype.replaceAll == "undefined" ) {
			String.prototype.replaceAll = function( match, replace ) {
				return this.replace( new RegExp( match, 'g' ), () => replace );
			}
		}
	},
	wcap: {}, // Abandoned Cart Pro for WooCommerce.
	orddd: {}, // Order Delivery Date Pro for WooCommerce.
	bkap: {}, // Booking & Appointment Plugin for WooCommerce.
	ac: {}, // Abandoned Cart Pro for WooCommerce.
	pdd: {}, // Product Delivery Date Pro for WooCommerce.
	pif: {}, // Product Input Fields for WooCommerce.
	cos: {}, // Custom Order Status for WooCommerce.
	con: {}, // Custom Order Numbers for WooCommerce.
	dw: {}, // Deposits for WooCommerce.
	pur: {}, // Price by User Role for WooCommerce.
	pgf: {}, // Payment Gateway Based Fees and Discounts for WooCommerce.
	cfp: {}, // Call for Price for WooCommerce.
	cpp: {}, // Currency per Product for WooCommerce.

	// Putting some demo keys here, in case we release new plugins in future, we wouldn't need to update tyche.js file across the plugins.
	dm_1: {},
	dm_2: {},
	dm_3: {},
	dm_4: {},
	dm_5: {},
	dm_6: {},
	dm_7: {},
	dm_8: {},
	dm_9: {},
	dm_10: {},
	dm_11: {},
	dm_12: {},
	dm_13: {},
	dm_14: {},
	dm_15: {},

	// Plugin Deactivation.
	plugin_deactivation: {
		fn: {
			return: function( data, index, return_value = '' ) {
				return 'undefined' !== typeof data[ index ] && '' !== data[ index ] ? ( '' !== return_value ? return_value : data[ index ] ) : ''
			}
		},
		modal: function( $plugin, $data ) {

			if ( '' === tyche.plugin_deactivation.fn.return( $data, 'deactivation_data' ) || '' === tyche.plugin_deactivation.fn.return( $data, 'nonce' ) || '' === tyche.plugin_deactivation.fn.return( $data, 'deactivation_req_msg' ) ) {
				return '';
			}

			let data = $data.deactivation_data,
				nonce = $data.nonce,
				deactivation_req_msg = $data.deactivation_req_msg;

			if ( 'undefined' === typeof data.template || 'undefined' === typeof data.reasons ) {
				return '';
			}

			let template = data.template,
				reasons = data.reasons,
				html = '';

			if ( Array.isArray( reasons ) && reasons.length > 0 ) {
				reasons.forEach( function( item ) {
					html += `
						<li
							class="reason${tyche.plugin_deactivation.fn.return(item,'input_type',' has-input')}${tyche.plugin_deactivation.fn.return(item,'html',' has-html')}"
							data-input-type="${tyche.plugin_deactivation.fn.return(item,'input_type')}"
							data-input-placeholder="${tyche.plugin_deactivation.fn.return(item,'input_placeholder')}">
								<label>
									<span>
										<input type="radio" name="selected-reason" value="${tyche.plugin_deactivation.fn.return(item,'id')}" />
									</span>
									<span>
										${tyche.plugin_deactivation.fn.return(item,'text')}
									</span>
								</label>
							${'' !== tyche.plugin_deactivation.fn.return(item,'html') ? '<div class="reason_html">' + tyche.plugin_deactivation.fn.return(item,'html') + '</div>' : ''}
						</li>`;
				} );

				html += `<input type="hidden" name="nonce" value="${nonce}" />`;

				let modal = jQuery( template.replace( '{PLUGIN}', $plugin ).replace( '{HTML}', html ).replace( '{DEACTIVATION_REQ_MSG}', deactivation_req_msg ) );
				modal.appendTo( jQuery( 'body' ) );

				return modal;
			}
		},

		show_modal: function( modal ) {

			modal.find( '.button' ).removeClass( 'disabled' );

			let btn_deactivate = modal.find( '.button-deactivate' );

			if ( btn_deactivate.length > 0 && modal.hasClass( 'no-confirmation-message' ) && !btn_deactivate.hasClass( 'allow-deactivate' ) ) {
				btn_deactivate.addClass( 'allow-deactivate' );
				modal.find( '.button-skip-deactivate' ).addClass( 'allow-deactivate' );
				modal.find( '.ts-modal-panel' ).removeClass( 'active ' );
				modal.find( '[data-panel-id="reasons"]' ).addClass( 'active' );
			}

			modal.addClass( 'active' );
			jQuery( 'body' ).addClass( 'has-ts-modal' );
		},

		close_modal: function( modal ) {
			modal.removeClass( 'active' );
			jQuery( 'body' ).removeClass( 'has-ts-modal' );
		},

		events: {
			listeners: function( data, modal, plugin ) {
				if ( 0 !== jQuery( `.${plugin}.ts-slug` ).prev( 'a' ) ) {
					jQuery( `.${plugin}.ts-slug` ).prev( 'a' ).on( 'click', function( e ) {
						e.preventDefault();
						tyche.plugin_deactivation.show_modal( modal );
					} );
				}

				modal.on( 'click', '.button-skip-deactivate', function( e ) {
					e.preventDefault();
					jQuery( '.ts-modal-footer p' ).hide();
					tyche.plugin_deactivation.events.button_submit( this, data, plugin, true );
				} );

				modal.on( 'click', '.button-deactivate', function( e ) {
					e.preventDefault();
					jQuery( '.ts-modal-footer p' ).hide();
					tyche.plugin_deactivation.events.button_submit( this, data, plugin );
				} );

				modal.on( 'click', 'input[type="radio"]', function() {
					jQuery( '.ts-modal-footer p' ).hide();
					tyche.plugin_deactivation.events.button_option_selection( this, modal );
				} );

				// If the user has clicked outside the window, cancel it.
				modal.on( 'click', function( e ) {
					tyche.plugin_deactivation.events.button_click_outside_window( e, modal );
				} );
			},

			button_submit: function( $this, $data, plugin, skip = false ) {

				if ( jQuery( $this ).hasClass( 'disabled' ) || !jQuery( $this ).hasClass( 'allow-deactivate' ) ) {
					return;
				}

				let modal = jQuery( $this ).parents( `.${plugin}.ts-modal` ),
					option = jQuery( 'input[type="radio"]:checked' ),
					reason = option.parents( 'li:first' ),
					response = reason.find( 'textarea, input[type="text"]' ),
					reason_id = skip ? 0 : option.val(),
					reason_text = skip ? 'Deactivation Reason Skipped' : reason.text().trim();
					
				if ( 0 === option.length && ! skip ) {
					jQuery( '.ts-modal-footer p' ).css( 'display', 'inline-block' );
					return;
				}

				let	data = {
					'action': 'tyche_plugin_deactivation_submit_action',
					'reason_id': reason_id,
					'reason_text': reason_text,
					'reason_info': 0 !== response.length ? response.val().trim() : '',
					'plugin_short_name': plugin,
					'plugin_name': jQuery( `.${plugin}.ts-slug` ).attr( 'data-plugin' ),
					'nonce': jQuery( 'input[name="nonce"]' ).val()
				};

				let ajax_url = tyche.plugin_deactivation.fn.return( $data, 'ajax_url' ),
					href = jQuery( `.${plugin}.ts-slug` ).prev().prop( 'href' );

				if ( '' !== ajax_url && '' !== href ) {
					jQuery.ajax( {
						url: ajax_url,
						method: 'POST',
						data,
						beforeSend: function() {
							modal.find( '.button-deactivate' ).addClass( 'disabled' );
							modal.find( '.button-skip-deactivate' ).addClass( 'disabled' );
						},
						complete: function() {
							window.location.href = href;
						}
					} );
				}
			},

			button_click_outside_window: function( e, modal ) {

				let target = jQuery( e.target );

				// If the user has clicked anywhere in the modal dialog, just return.
				if ( target.hasClass( 'ts-modal-body' ) || target.hasClass( 'ts-modal-footer' ) ) {
					return;
				}

				// If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
				if ( !target.hasClass( 'button-close' ) && ( target.parents( '.ts-modal-body' ).length > 0 || target.parents( '.ts-modal-footer' ).length > 0 ) ) {
					return;
				}

				tyche.plugin_deactivation.close_modal( modal );
			},

			button_option_selection: function( $this, modal ) {

				modal.find( '.reason-input' ).remove();
				jQuery( $this ).parents( 'ul#reasons-list' ).children( "li.li-active" ).removeClass( "li-active" );
				let parent = jQuery( $this ).parents( 'li:first' );

				if ( parent.hasClass( 'has_html' ) ) {
					parent.addClass( 'li-active' );
				}

				if ( parent.hasClass( 'has-input' ) ) {
					parent.append( jQuery( `<div class="reason-input">${'textfield' === parent.data( 'input-type' ) ? '<input type="text" />' : '<textarea rows="5"></textarea>'}</div>` ) );
					parent.find( 'input, textarea' ).attr( 'placeholder', parent.data( 'input-placeholder' ) ).focus();
				}
			}
		}
	}
}

tyche.init();