jQuery((function(n){let i=n(".shopengine-partial-payment-fields"),e=!1;if(i.length){function a(){let i=n("#shopengine-pay-deposit"),a=n(".shopengine-partial-payment-info");i.is(":checked")&&e?a.show():a.hide()}a(),n(".shopengine-custom-checkbox input[type='radio']").on("change",(function(){a()})),n(".single_variation_wrap").on("show_variation",(function(i,t){n(".shopengine-partial-payment-info").prop("disabled",!0);let o={variation_id:t.variation_id,_wpnonce:shopEngineApiSettings.rest_nonce},p=shopEngineApiSettings.resturl+"shopengine-builder/v1/partial-payment/partial_data";n.post(p,o,(function(i){n(".shopengine-partial-payment-info").prop("disabled",!1),n(".shopengine-partial-payment-amount").remove();let t="";i.map((n=>{t+=n})),n(".shopengine-partial-payment-info").prepend(t),e=!0,a()}))})),n(".single_variation_wrap").on("hide_variation",(function(){e=!1,a()}))}}));