window.tec=window.tec||{},tec.eventSeriesMetabox=tec.eventSeriesMetabox||{},function(e,n){"use strict";n.selectors={eventSeriesSelect:"#_tec_relationship_event_to_series",editLinkContainer:".tec-events-pro-series__edit-link-container",editLink:".tec-events-pro-series__edit-link"},n.classes={hidden:"hidden"},n.el={$select:null,$linkContainer:null,$link:null},n.handleChange=function(){const e=n.el.$select.find(":selected");if(!e.length)return;if("-1"===e.val())return void n.el.$linkContainer.addClass(n.classes.hidden);const t=e.data("editLink");t?(n.el.$link.attr("href",t),n.el.$linkContainer.removeClass(n.classes.hidden)):n.el.$linkContainer.addClass(n.classes.hidden)},n.bindEvents=function(){n.el.$select.on("change",n.handleChange)},n.getElements=function(){n.el.$linkContainer=n.el.$select.parent().find(n.selectors.editLinkContainer),n.el.$link=n.el.$linkContainer.find(n.selectors.editLink)},n.ready=function(){n.el.$select=e(n.selectors.eventSeriesSelect),n.el.$select.length&&(n.getElements(),n.bindEvents())},e(n.ready)}(jQuery,tec.eventSeriesMetabox),window.tec=window.tec||{},window.tec.eventsPro=window.tec.eventsPro||{},window.tec.eventsPro.customTablesV1=window.tec.eventsPro.customTablesV1||{},window.tec.eventsPro.customTablesV1.eventSeriesMetabox={};