(()=>{function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}function o(t,o){for(var n=0;n<o.length;n++){var r=o[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,e(r.key),r)}}function e(o){var e=function(o,e){if("object"!=t(o)||!o)return o;var n=o[Symbol.toPrimitive];if(void 0!==n){var r=n.call(o,e||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(o)}(o,"string");return"symbol"==t(e)?e:e+""}var n=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"init",value:function(){$(document).on("click",'[data-bb-toggle="update-shipping-status"]',function(){$("#update-shipping-status-modal").modal("show")}),$(document).on("click",'[data-bb-toggle="update-shipping-cod-status"]',function(){$("#update-shipping-cod-status-modal").modal("show")}),$(document).on("click","#confirm-update-shipping-status-button",function(t){t.preventDefault();var o=$(t.currentTarget),e=o.closest(".modal-dialog").find("form");$httpClient.make().withButtonLoading(o).post(e.prop("action"),e.serialize()).then(function(t){var e=t.data;e.error?Botble.showError(e.message):($(".page-body").load("".concat(window.location.href," .page-body > *")),Botble.showSuccess(e.message),o.closest(".modal").modal("hide"))})}),this.handleShipmentInfoForm()}},{key:"handleShipmentInfoForm",value:function(){var t=$("#botble-ecommerce-forms-shipment-info-form");t.length&&t.on("submit",function(o){o.preventDefault();var e=t.find('button[type="submit"]');$httpClient.make().withButtonLoading(e).post(t.prop("action"),t.serialize()).then(function(t){var o=t.data;o.error?Botble.showError(o.message):Botble.showSuccess(o.message)})})}}])&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();$(function(){(new n).init()})})();