tribe.tickets=tribe.tickets||{},tribe.tickets.utils={},function(t,e){const i=t(document);e.disable=function(t,e){e?t.prop("disabled",!0).attr({disabled:"true","aria-disabled":"true"}):t.prop("disabled",!1).removeProp("disabled").removeAttr("disabled aria-disabled")},e.getRestEndpoint=function(){return TribeCartEndpoint.url},e.getCurrencyFormatting=function(t){return JSON.parse(TribeCurrency.formatting)[t]},e.cleanNumber=function(t,i){let r=t;const n=e.getCurrencyFormatting(i);if(0===parseInt(n.number_of_decimals)&&""===n.thousands_sep)return r;if(n.thousands_sep===n.decimal_point){const t=r.length-(n.number_of_decimals+1);r=r.substr(0,t)+"_"+r.substr(t+1),""!==n.thousands_sep&&(r=r.split(n.thousands_sep).join("")),r=r.split("_").join(".")}else""!==n.thousands_sep&&(r=r.split(n.thousands_sep).join("")),""!==n.decimal_point&&(r=r.split(n.decimal_point).join("."));return r},e.numberFormat=function(t,i){const r=e.getCurrencyFormatting(i);if(!r)return!1;const n=r.number_of_decimals,o=r.decimal_point,s=r.thousands_sep,c=isFinite(+t)?+t:0,d=isFinite(+n)?Math.abs(n):0,a=void 0===s?",":s,u=void 0===o?".":o,l=(d?function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}(c,d):Math.round(c)).toString().split(".");return l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(l[1]||"").length<d&&(l[1]=l[1]||"",l[1]+=new Array(d-l[1].length+1).join("0")),l.join(u)},e.getTicketsFormFromPostId=function(t){return i.find(tribe.tickets.block.selectors.form+'[data-post-id="'+t+'"]')},e.getTicketsProviderFromPostId=function(t){return e.getTicketsFormFromPostId(t).data("provider")||!1},e.getTicketsProviderIdFromPostId=function(t){return e.getTicketsFormFromPostId(t).data("provider-id")||!1},e.getTicketsPostId=function(){return t(tribe.tickets.block.selectors.form)[0].getAttribute("data-post-id")||!1},e.getPrice=function(t,i){if(!t)return 0;const r=t.data("ticket-price"),n=t.find(".tribe-tickets__tickets-sale-price .tribe-amount").text(),o=isNaN(r)?e.cleanNumber(n,i):r;return parseFloat(o)},e.calculateSharedCap=function(t,e,i,r){const n=i-r;return t<=e&&t<=n?t:t>e?e<=n?e:0:n}}(jQuery,tribe.tickets.utils),window.tec=window.tec||{},window.tec.tickets=window.tec.tickets||{},window.tec.tickets.v2=window.tec.tickets.v2||{},window.tec.tickets.v2.ticketsUtils={};