!function(){"use strict";const t=t=>{const n=t.parents("div.select-with-text-input").find(".custom-input");"_gla_custom_value"===t.val()?n.show():n.hide()};var n=n=>{const o=n("div.select-with-text-input select");o.each((function(o,e){t(n(e))})),o.on("change",(function(){t(n(this))}))};const o=t=>{const n=new RegExp("[^0-9]*","gi"),o=t.val(),e=o.replace(n,"");o!==e&&t.val(e)};var e=t=>{const n=t(".gla-input-integer[type=text]");n.on("change",(function(){o(t(this))})),n.on("keyup",(function(){o(t(this))}))};window.jQuery((function(t){const o=()=>{n(t),e(t)};t("#woocommerce-product-data").on("woocommerce_variations_loaded",o),t(document.body).on("woocommerce_variations_added",o),o()}))}();