window.etOrderModifiersAmountField=window.etOrderModifiersAmountField||{currencySymbol:"$",decimalSeparator:".",thousandsSeparator:",",percentMax:999999999,placement:"prefix",precision:2},function(e,r,o){const i=e(document);let t;const a="#order_modifier_amount",n="#order_modifier_sub_type",s=()=>e(n).val(),d=()=>"percent"===s()?"num %":"postfix"===o.placement?`num ${o.currencySymbol}`:`${o.currencySymbol} num`,c=()=>{const e=t.unmaskedValue;t.updateOptions({mask:d()}),t.unmaskedValue=e},m=()=>{const i=e(".tec-settings-order_modifier"),n=e(a),d=parseFloat(t.unmaskedValue);if(!isNaN(d)&&d>0&&("percent"!==s()||parseFloat(t.unmaskedValue)<=parseFloat(o.percentMax)))return n.removeClass(r.selectors.error.className()),void n.val(d);i.removeClass(r.selectors.valid.className()),n.addClass(r.selectors.error.className()),n.one("focusin",r.onChangeFieldRemoveError),n.trigger("displayErrors.tribe")};i.ready((()=>{document.querySelector(a),t=window.IMask(document.querySelector(a),{mask:d(),lazy:!1,blocks:{num:{mask:Number,max:999999999,min:0,normalizeZeros:!0,padFractionalZeros:!0,radix:o.decimalSeparator,scale:o.precision,thousandsSeparator:o.thousandsSeparator}}}),i.on("change",n,c),i.on("validation.tribe",m)}))}(jQuery,window.tribe.validation,window.etOrderModifiersAmountField||{}),window.tec=window.tec||{},window.tec.tickets=window.tec.tickets||{},window.tec.tickets.admin=window.tec.tickets.admin||{},window.tec.tickets.admin.orderModifiers=window.tec.tickets.admin.orderModifiers||{},window.tec.tickets.admin.orderModifiers.amountField={};