tribe.tickets=tribe.tickets||{},tribe.tickets.admin=tribe.tickets.admin||{},function(t){const e=tribe.tickets.admin.qrConnector={};e.selectors={trigger:"[data-tickets-qr-connector]",message:"[data-tickets-qr-connector-message]",image:"[data-tickets-qr-connector-image]",input:"[data-tickets-qr-connector-input]"},e.ready=()=>{e.bind()},e.bind=()=>{t(document).on("click",e.selectors.trigger,e.onTriggerClick)},e.onTriggerClick=c=>{c.preventDefault();const i=t(c.currentTarget),s=i.data("tickets-qr-connector-container"),n=i.parents(s).eq(0);confirm(n.find(e.selectors.message).text().trim())&&e.doAjaxRequest(i)},e.doAjaxRequest=c=>{const i=c.data("tickets-qr-connector-action"),s=c.data("tickets-qr-connector-nonce"),n=c.data("tickets-qr-connector-container"),r=c.parents(n).eq(0),a=r.find(e.selectors.message),o=r.find(e.selectors.image),d=r.find(e.selectors.input),k={action:i,confirm:s};c.prop("disabled",!0),o.css("opacity",.1),d.val("--------"),t.post(ajaxurl,k,(t=>{t.success?(a.html('<p class="optin-success">'+t.data.msg+"</p>"),d.val(t.data.key),o.attr("src",t.data.qr_src)):a.html('<p class="optin-fail">'+t.data+"</p>"),c.prop("disabled",!1),o.css("opacity",1)}))},t(e.ready)}(jQuery),window.tec=window.tec||{},window.tec.tickets=window.tec.tickets||{},window.tec.tickets.qrConnector={};