").addClass("shipping-title").append($("").addClass("shipping-price-title").text("Delivery Charges:")).append($("").addClass("shipping-loading"));$("#open-estimate-shipping-popup-439516").html(n)}},success:function(){var i=n.getActiveShippingOption(),t;n.selectShippingOption(i);t=parseInt($("#price-value-439516").text().replace("₹","").replace(",","").trim());t=t+parseInt(i.price.replace("₹","").replace(",","").trim());const r={key:"rzp_live_EYd9liybgxZLQR",amount:t*100},f=new RazorpayAffordabilitySuite(r);f.render();u=!0;n.settings.handlers.success=undefined},error:function(){n.selectShippingOption()},selectedOption:function(t){var r,f,u,i;if(t&&t.provider&&t.price&&n.validateAddress(t.address)){r=$("#open-estimate-shipping-popup-439516");f=$("
").addClass("shipping-title").append($("").addClass("shipping-price-title").text("Delivery Charges:")).append($("").addClass("shipping-price").text(t.price)).append($("").addClass("shipping-price-customs").text("Customs Duty/Import Duty is Payable Extra As COD."));r.html(f);u=$("").addClass("estimated-delivery").append($("").addClass("shipping-address").append($("").text(`to ${t.address.countryName}, ${t.address.stateProvinceName?t.address.stateProvinceName+",":""} ${t.address.zipPostalCode} via ${t.provider}`)).append($("").addClass("arrow-down")));t.deliveryDate&&t.deliveryDate!=="-"&&u.append($("").addClass("shipping-date").css("color","red").text(`Estimated Delivery on ${t.deliveryDate}`));r.append(u);i=parseInt($("#price-value-439516").text().replace("₹","").replace(",","").trim());i=i+parseInt(t.price.replace("₹","").replace(",","").trim());const n={key:"rzp_live_EYd9liybgxZLQR",amount:i*100},e=new RazorpayAffordabilitySuite(n);e.render()}else $("#open-estimate-shipping-popup-439516").html($("").text("Please select the address you want to ship from")).append($("").addClass("arrow-down"))}}},i,r;n=createEstimateShippingPopUp(f);n.init();i=function(){var t=n.getShippingAddress();n.validateAddress(t)?n.getShippingOptions(t):n.selectShippingOption()};i();r=function(r){var o=r.changedData.productId,f,e;o===439516&&(n.params.selectedShippingOption?(f=n.params.selectedShippingOption.address,e=n.getShippingAddress(),n.addressesAreEqual(f,e)||(t=!0),n.getShippingOptions(f)):u?t=!0:i())};setTimeout(function(){$(document).on("product_attributes_changed",r)},500);$(document).on("product_quantity_changed",r)})