"+a.data.msg+"
"})),e(".dokan-ajax-response").append(a.data.progress),dokan&&dokan.storeProgressBar&&dokan.storeProgressBar.init(),o=o.replaceAll("input","button"),n?t.find(o).addClass("dokan-hide"):t.find(o).removeClass("dokan-hide")):e(".dokan-ajax-response").html(e("",{class:"dokan-alert dokan-alert-danger",html:""+a.data+"
"}))}))},validateForm:function(n){e("form#settings-form, form#profile-form, form#store-form, form#payment-form").validate({submitHandler:function(e){n.submitSettings(e.getAttribute("id"))},errorElement:"span",errorClass:"error",errorPlacement:t,success:a,ignore:".select2-search__field, :hidden, .mapboxgl-ctrl-geocoder--input"})},removeBanner:function(t){t.preventDefault();var a=e(this).closest(".image-wrap"),n=a.siblings(".button-area");a.find("input.dokan-file-field").val("0"),a.addClass("dokan-hide"),n.removeClass("dokan-hide")},removeGravatar:function(t){t.preventDefault();var a=e(this).closest(".gravatar-wrap"),n=a.siblings(".gravatar-button-area");a.find("input.dokan-file-field").val("0"),a.addClass("dokan-hide"),n.removeClass("dokan-hide")}},r={init:function(){this.withdrawValidate(this)},withdrawValidate:function(n){e("form.withdraw").validate({errorElement:"span",errorClass:"error",errorPlacement:t,success:a})}},d={init:function(){this.validate(this)},validate:function(a){e("form#dokan-form-contact-seller").validate({errorPlacement:t,errorElement:"span",success:function(e,t){e.removeClass("error"),e.remove()},submitHandler:async function(t,a){a.preventDefault(),e(t).block({message:null,overlayCSS:{background:"#fff url("+dokan.ajax_loader+") no-repeat center",opacity:.6}}),await dokan_execute_recaptcha("form#dokan-form-contact-seller .dokan_recaptcha_token","dokan_contact_seller_recaptcha");var n=e(t).serialize();e.post(dokan.ajaxurl,n,(function(a){e(t).unblock(),void 0!==a.data&&e(t).find(".ajax-response").html(a.data),e(t).find("input[type=text], input[type=email], textarea, input[name=dokan_recaptcha_token]").val("").removeClass("valid")}))}})}};e((function(){i.init(),r.init(),d.init(),e(".dokan-form-horizontal").on("change","input[type=checkbox]#lbl_setting_minimum_quantity",(function(){var t=e(".show_if_needs_sw_discount");e(this).is(":checked")?(t.find('input[type="number"]').val(""),t.slideDown("slow")):t.slideUp("slow")}))}))}(jQuery),function(e){var t=DokanValidateMsg;t.maxlength=e.validator.format(t.maxlength_msg),t.minlength=e.validator.format(t.minlength_msg),t.rangelength=e.validator.format(t.rangelength_msg),t.range=e.validator.format(t.range_msg),t.max=e.validator.format(t.max_msg),t.min=e.validator.format(t.min_msg),e.validator.messages=t,e(document).on("click","#dokan_store_tnc_enable",(function(t){e(this).is(":checked")?e("#dokan_tnc_text").show():e("#dokan_tnc_text").hide()})).ready((function(t){e("#dokan_store_tnc_enable").is(":checked")?e("#dokan_tnc_text").show():e("#dokan_tnc_text").hide()}))}(jQuery),function(e){var t="undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh;function a(){dokan.store_banner_dimension.width;var t=dokan.store_banner_dimension.height/dokan.store_banner_dimension.width*e("#dokan-content").width();e(".dokan-profile-frame-wrapper .profile-info-img.dummy-image").css({height:t})}a(),e(window).on("resize",(function(e){a()})),t&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(e){console.log("placement",e),"store_header_template"===e.partial.id&&a()})),e(":input.dokan-product-search").filter(":not(.enhanced)").each((function(){var t={allowClear:!!e(this).data("allow_clear"),placeholder:e(this).data("placeholder"),minimumInputLength:e(this).data("minimum_input_length")?e(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},language:{errorLoading:function(){return dokan.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?dokan.i18n_input_too_long_1:dokan.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?dokan.i18n_input_too_short_1:dokan.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return dokan.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?dokan.i18n_selection_too_long_1:dokan.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return dokan.i18n_no_matches},searching:function(){return dokan.i18n_searching}},ajax:{url:dokan.ajaxurl,dataType:"json",delay:250,data:function(t){return{term:t.term,action:e(this).data("action")||"dokan_json_search_products_and_variations",security:dokan.search_products_nonce,exclude:e(this).data("exclude"),user_ids:e(this).data("user_ids"),include:e(this).data("include"),limit:e(this).data("limit")}},processResults:function(t){var a=[];return t&&e.each(t,(function(e,t){a.push({id:e,text:t})})),{results:a}},cache:!0}};if(e(this).select2(t).addClass("enhanced"),e(this).data("sortable")){var a=e(this),n=e(this).next(".select2-container").find("ul.select2-selection__rendered");n.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){e(n.find(".select2-selection__choice").get().reverse()).each((function(){var t=e(this).data("data").id,n=a.find('option[value="'+t+'"]')[0];a.prepend(n)}))}})}})),selected_items=[],e("#cb-select-all").on("change",(function(t){var a=e(this),n=e(".cb-select-items");a.is(":checked")?n.each((function(t,a){e(a).prop("checked","checked")})):n.each((function(t,a){e(a).prop("checked",""),selected_items.pop()}))}))}(jQuery),function(e){function t(t,a){const n=e(t.target).closest("li.has-submenu");n.find(".navigation-submenu").each(((t,o)=>{if(a)n.removeClass("submenu-hovered"),e(".dokan-dashboard-wrap").css("height",""),e(o).css("bottom",0),e(o).removeAttr("style");else{n.addClass("submenu-hovered");let t=n[0].getBoundingClientRect(),a=o.getBoundingClientRect(),i=e(".dokan-dashboard-wrap"),r=i[0].getBoundingClientRect(),d=Math.min(r.bottom,r.height);if(d"+a.data.msg+"
"})),e(".dokan-ajax-response").append(a.data.progress),dokan&&dokan.storeProgressBar&&dokan.storeProgressBar.init(),o=o.replaceAll("input","button"),n?t.find(o).addClass("dokan-hide"):t.find(o).removeClass("dokan-hide")):e(".dokan-ajax-response").html(e("",{class:"dokan-alert dokan-alert-danger",html:""+a.data+"
"}))}))},validateForm:function(n){e("form#settings-form, form#profile-form, form#store-form, form#payment-form").validate({submitHandler:function(e){n.submitSettings(e.getAttribute("id"))},errorElement:"span",errorClass:"error",errorPlacement:t,success:a,ignore:".select2-search__field, :hidden, .mapboxgl-ctrl-geocoder--input"})},removeBanner:function(t){t.preventDefault();var a=e(this).closest(".image-wrap"),n=a.siblings(".button-area");a.find("input.dokan-file-field").val("0"),a.addClass("dokan-hide"),n.removeClass("dokan-hide")},removeGravatar:function(t){t.preventDefault();var a=e(this).closest(".gravatar-wrap"),n=a.siblings(".gravatar-button-area");a.find("input.dokan-file-field").val("0"),a.addClass("dokan-hide"),n.removeClass("dokan-hide")}},r={init:function(){this.withdrawValidate(this)},withdrawValidate:function(n){e("form.withdraw").validate({errorElement:"span",errorClass:"error",errorPlacement:t,success:a})}},d={init:function(){this.validate(this)},validate:function(a){e("form#dokan-form-contact-seller").validate({errorPlacement:t,errorElement:"span",success:function(e,t){e.removeClass("error"),e.remove()},submitHandler:async function(t,a){a.preventDefault(),e(t).block({message:null,overlayCSS:{background:"#fff url("+dokan.ajax_loader+") no-repeat center",opacity:.6}}),await dokan_execute_recaptcha("form#dokan-form-contact-seller .dokan_recaptcha_token","dokan_contact_seller_recaptcha");var n=e(t).serialize();e.post(dokan.ajaxurl,n,(function(a){e(t).unblock(),void 0!==a.data&&e(t).find(".ajax-response").html(a.data),e(t).find("input[type=text], input[type=email], textarea, input[name=dokan_recaptcha_token]").val("").removeClass("valid")}))}})}};e((function(){i.init(),r.init(),d.init(),e(".dokan-form-horizontal").on("change","input[type=checkbox]#lbl_setting_minimum_quantity",(function(){var t=e(".show_if_needs_sw_discount");e(this).is(":checked")?(t.find('input[type="number"]').val(""),t.slideDown("slow")):t.slideUp("slow")}))}))}(jQuery),function(e){var t=DokanValidateMsg;t.maxlength=e.validator.format(t.maxlength_msg),t.minlength=e.validator.format(t.minlength_msg),t.rangelength=e.validator.format(t.rangelength_msg),t.range=e.validator.format(t.range_msg),t.max=e.validator.format(t.max_msg),t.min=e.validator.format(t.min_msg),e.validator.messages=t,e(document).on("click","#dokan_store_tnc_enable",(function(t){e(this).is(":checked")?e("#dokan_tnc_text").show():e("#dokan_tnc_text").hide()})).ready((function(t){e("#dokan_store_tnc_enable").is(":checked")?e("#dokan_tnc_text").show():e("#dokan_tnc_text").hide()}))}(jQuery),function(e){var t="undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh;function a(){dokan.store_banner_dimension.width;var t=dokan.store_banner_dimension.height/dokan.store_banner_dimension.width*e("#dokan-content").width();e(".dokan-profile-frame-wrapper .profile-info-img.dummy-image").css({height:t})}a(),e(window).on("resize",(function(e){a()})),t&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(e){console.log("placement",e),"store_header_template"===e.partial.id&&a()})),e(":input.dokan-product-search").filter(":not(.enhanced)").each((function(){var t={allowClear:!!e(this).data("allow_clear"),placeholder:e(this).data("placeholder"),minimumInputLength:e(this).data("minimum_input_length")?e(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},language:{errorLoading:function(){return dokan.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?dokan.i18n_input_too_long_1:dokan.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?dokan.i18n_input_too_short_1:dokan.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return dokan.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?dokan.i18n_selection_too_long_1:dokan.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return dokan.i18n_no_matches},searching:function(){return dokan.i18n_searching}},ajax:{url:dokan.ajaxurl,dataType:"json",delay:250,data:function(t){return{term:t.term,action:e(this).data("action")||"dokan_json_search_products_and_variations",security:dokan.search_products_nonce,exclude:e(this).data("exclude"),user_ids:e(this).data("user_ids"),include:e(this).data("include"),limit:e(this).data("limit")}},processResults:function(t){var a=[];return t&&e.each(t,(function(e,t){a.push({id:e,text:t})})),{results:a}},cache:!0}};if(e(this).select2(t).addClass("enhanced"),e(this).data("sortable")){var a=e(this),n=e(this).next(".select2-container").find("ul.select2-selection__rendered");n.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){e(n.find(".select2-selection__choice").get().reverse()).each((function(){var t=e(this).data("data").id,n=a.find('option[value="'+t+'"]')[0];a.prepend(n)}))}})}})),selected_items=[],e("#cb-select-all").on("change",(function(t){var a=e(this),n=e(".cb-select-items");a.is(":checked")?n.each((function(t,a){e(a).prop("checked","checked")})):n.each((function(t,a){e(a).prop("checked",""),selected_items.pop()}))}))}(jQuery),function(e){function t(t,a){const n=e(t.target).closest("li.has-submenu");n.find(".navigation-submenu").each(((t,o)=>{if(a)n.removeClass("submenu-hovered"),e(".dokan-dashboard-wrap").css("height",""),e(o).css("bottom",0),e(o).removeAttr("style");else{n.addClass("submenu-hovered");let t=n[0].getBoundingClientRect(),a=o.getBoundingClientRect(),i=e(".dokan-dashboard-wrap"),r=i[0].getBoundingClientRect(),d=Math.min(r.bottom,r.height);if(d