jQuery(document).ready(function(p){initColorpicker=function(){var l={color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,target:!1,width:180,palettes:!1,change:function(e,t){let a=p(this).closest(".wp-picker-container"),o=a.find(".wp-picker-input-wrap"),i=a.find(".wp-picker-custom-placeholder"),n=a.find(".wp-picker-default-custom");var d=a.find(".wp-color-picker").data("addon-colorpicker-show"),r=a.find(".wp-color-picker").data("default-color"),c=o.find("input.wp-color-picker"),c=p(c[0]);"placeholder"===d&&(""===t.color.toString()&&"undefined"===t.color.toString()||(o.find(".wp-color-picker").show(),i.hide(),n.show(),i.css("line-height","3.0"))),n.removeClass("default_color"),r!==t.color.toString()&&n.addClass("default_color"),p(document).trigger("wapo-colorpicker-change",c)},clear:function(e,t){let a=p(this).closest(".wp-picker-container"),o=a.find(".wp-picker-input-wrap"),i=a.find(".wp-picker-custom-placeholder"),n=a.find(".wp-picker-default-custom");var d=a.find(".wp-color-picker").data("addon-colorpicker-show"),r=o.find("input.wp-color-picker"),r=p(r[0]);"placeholder"===d&&(o.find(".wp-color-picker").hide(),i.show(),n.hide(),i.css("line-height","0")),p(document).trigger("wapo-colorpicker-clear",r[0])}};function e(){p(".yith-wapo-block .yith-wapo-addon-type-colorpicker .wp-color-picker").each(function(){p(this).wpColorPicker(l);let a=p(this).closest(".wp-picker-container"),e=a.find("button .wp-color-result-text"),t=a.find(".wp-picker-default"),o=a.find(".wp-picker-input-wrap");var i,n=p(this).data("addon-colorpicker-show"),d=p(this).data("addon-placeholder");e.html("");let r=p(this).parents(".wp-picker-container"),c=r.find(".wp-picker-input-wrap");if(r.hasClass("yith-wapo-colorpicker-initialized")||r.addClass("yith-wapo-colorpicker-initialized"),c.find(".wp-picker-default-custom").length||(i=p("").attr({"class":"wp-picker-default-custom"}),c.find(".wp-picker-default, .wp-picker-clear").wrap(i)),"placeholder"===n){o.find(".wp-color-picker").hide(),o.find(".wp-picker-custom-placeholder").length||((i=p("").attr({"class":"wp-picker-custom-placeholder"})).html(d),o.find(".screen-reader-text").before(i));let e=a.find(".wp-picker-default-custom"),t=a.find(".wp-picker-custom-placeholder");e.hide(),t.css("line-height","0")}t.trigger("click")})}p(document).on("yith-wapo-after-reload-addons",e),p(document).on("yith-wapo-after-reload-addons",initDatePickers),checkColorPickerOnInput=function(){p(document).on("click",function(e){if(!p(e.target).is(".yith-wapo-colorpicker-container .iris-picker, .yith-wapo-colorpicker-container .iris-picker-inner")){let e=p(".yith-wapo-colorpicker-container .yith-wapo-colorpicker-initialized .wp-color-picker");0"+t+"":""}),e='",p(e).appendTo("#ui-datepicker-div"))},10)},initDatePicker=function(l){var e=l.data("params"),t="",a="",o=e.start_year||"",i=e.end_year||"",n=e.default_date||"",d=e.date_format||"",r=e.additional_opts||"",o={minDate:t=o?new Date(e.start_year,"00","01"):t,maxDate:a=i?new Date(e.end_year,"11","31"):a,defaultDate:n,dateFormat:d,beforeShowDay:function(o){let e=l.data("params"),t=e.selectable_days_opt||"",a=e.selectable_days||"",i=e.selected_items||"",d=e.enable_disable_date_rules||"",r=!0;if((d="enable"===d?1:0)&&(r=!1),"days"===t||"date"===t){var n=o.getDate()+"-"+(o.getMonth()+1)+"-"+o.getFullYear();if(-1===p.inArray(n,a))return r=!1}else if("before"===t){n=o.getTime();let e=new Date;var c=(new Date).getHours();if(e.setHours(0,0,0,0),n<(e=e.getTime())||yith_wapo.disableCurrentDayBasedOnTime&&n<=e&&c>=yith_wapo.datepickerHourToCheck)return!1}0[\d]+)-(?[\d]+)\]$/).groups;return(r=wp.hooks.applyFilters("yith_wapo_addon_datepicker_before_show_day",r,o,n,c))?[!0]:[!1]},beforeShow:function(e){initTimePicker(l)},onSelect:function(a,o){if(0=t&&e.find(".yith-wapo-ajax-uploader-container").hide()},checkAddonsRequirements=function(){var e=checkNumbersTotalValues(),t=checkRequiredMinMax();return!!e&&(t||yith_wapo.disable_scroll_on_required_mix_max||_("html, body, .yith-wapo-content").animate({scrollTop:_(p).offset().top-20},500),t)},checkRequiredFields=function(n){var d=!1;yith_wapo.dom.single_add_to_cart_button;return _("form.cart .yith-wapo-addon:not(.hidden):visible input, form.cart .yith-wapo-addon:not(.hidden):visible select, form.cart .yith-wapo-addon:not(.hidden):visible textarea").each(function(){let e=_(this);e.closest(".yith-wapo-option");let t=e.closest(".yith-wapo-addon"),a=e.closest("div.yith-wapo-addon.wapo-toggle"),o=a.find(".wapo-addon-title.toggle-closed"),i=t.find(".wapo-addon-title");"file"===e.attr("type")||e.hasClass("wapo-product-qty")||(e.attr("required")&&("checkbox"===e.attr("type")||"radio"===e.attr("type"))&&!e.closest(".yith-wapo-option").hasClass("selected")||e.attr("required")&&"checkbox"!==e.attr("type")&&"radio"!==e.attr("type")&&(""==e.val()||"Required"==e.val())?("highlight"===n&&(showRequiredMessage(e),i.addClass("wapo-error"),o&&o.click()),d=!0):restartRequiredElement(e))}),!d},showRequiredMessage=function(e){let t=e.closest(".yith-wapo-option");t.find(".required-error").length<1&&(t.append('
'+yith_wapo.messages.requiredMessage+"
"),t.addClass("required-color"))},restartRequiredElement=function(e){let t=e.closest(".yith-wapo-option");e.closest(".yith-wapo-option").find(".required-error").remove(),t.removeClass("required-color")},conditionalLogicCheck=function(e={}){var r={};_("form.cart .yith-wapo-addon.conditional_logic").each(function(){var e=!1,t=!1,a=_(this).data("conditional_logic_display"),o=_(this).data("conditional_logic_display_if"),i=String(_(this).data("conditional_rule_addon")),n=String(_(this).data("conditional_rule_addon_is")),d=String(_(this).data("conditional_rule_variations")),i=void 0!==i&&"0"!==i&&""!==i&&i.split("|"),n=void 0!==n&&""!==n&&n.split("|");if((d=void 0!==d&&""!==d&&d.split("|"))||i&&n){if(i&&n)switch(o){case"all":e=conditionalLogicAllRules(i,n);break;case"any":e=conditionalLogicAnyRules(i,n)}else e=!0;e&&d?(o=_(".variation_id").val(),-1!==_.inArray(String(o),d)&&(t=!0)):t=!0}else t=e=!0,a="show";switch(a){case"show":r[_(this).attr("id")]=t&&e?"not-hidden":"hidden";break;case"hide":r[_(this).attr("id")]=t&&e?"hidden":"not-hidden"}}),_.each(r,function(e,t){let a=_("#"+e);a.hasClass("hidden");"not-hidden"===t?(("slide"===yith_wapo.conditionalDisplayEffect?a.slideDown():a.fadeIn()).removeClass("hidden").find(".yith-wapo-option:not(.out-of-stock) .yith-wapo-option-value").attr("disabled",!1),a.hasClass("yith-wapo-addon-type-select")&&a.find(".yith-wapo-option-value").attr("disabled",!1),checkMinMax(a)):("slide"===yith_wapo.conditionalDisplayEffect?a.slideUp():a.hide()).addClass("hidden").find(".yith-wapo-option-value").attr("disabled",!0)}),JSON.stringify(r)!==JSON.stringify(e)&&conditionalLogicCheck(r),_(document).trigger("wapo_after_conditional_logic_check")},conditionalLogicAllRules=function(e,t){for(var a=!0,o=0;o'+t+""))},calculateProductPrice=function(n){_(document).trigger("wapo-before-calculate-product-price");var e={action:"update_totals_with_suffix",data:n,security:yith_wapo.addons_nonce};_.ajax({url:yith_wapo.ajaxurl,type:"post",data:e,success:function(e){var t,a,o,i;e&&(t=e.price_html,a=e.options_price_suffix,o=e.order_price_suffix,i=n.total_order_price,_(u.productPrice).html(t),_(u.optionsPrice).html(a),_(u.orderPrice).html(o),_(p).attr("data-order-price",i),replaceProductPrice(i,o),_(document).trigger("wapo-after-calculate-product-price",e))}})},calculateTotalAddonsPrice=function(e=!0){conditionalLogicCheck(),"yes"===yith_wapo.hide_button_required&&(i=yith_wapo.dom.single_add_to_cart_button,_(i).hide(),t=checkRequiredFields("hide"),a=checkRequiredMinMax("hide"),t&&a&&_(i).fadeIn()),_(r).css("opacity","0.5");var t=parseFloat(_(p).attr("data-product-price")),a=yith_wapo.total_price_box_option;let o=_("button.ywgc-amount-buttons.selected_button");0'+t.currency_symbol+"":t.currency_symbol;return"left"===t.currency_position?a=e+a:"right"===t.currency_position?a+=e:"left_space"===t.currency_position?a=e+" "+a:"right_space"===t.currency_position&&(a=a+" "+e),a=t.html?''+a+"":a},wcPriceToFloat=function(e){e=e.replace(/(?![\.\,])\D/g,"").replace(yith_wapo.total_thousand_sep,"").replace(yith_wapo.decimal_sep,".");return parseFloat(e)},getDefaultProductPrice=function(){if(yith_wapo.enableGetDefaultVariationPrice){let o=_(".variations_form.cart").data("product_id");var e={action:"get_default_variation_price",product_id:parseInt(o),security:yith_wapo.addons_nonce};_.ajax({url:yith_wapo.ajaxurl,type:"post",data:e,success:function(t){if(t){var a=t.price_html;let e=_(p);e.attr("data-product-price",t.current_price),e.attr("data-product-id",o),"yes"===yith_wapo.replace_product_price&&e.find(".yith-wapo-block").length&&_(yith_wapo.replace_product_price_class).html(a)}},complete:function(){}})}},checkDefaultOptionsOnLoad=function(){var e=_(".yith-wapo-addon:not(.conditional_logic):not(.hidden) .yith-wapo-option.selected");_(e).each(function(){var e=_(this);replaceImageAction(e)})},resetAddons=function(e,t){"yith_wccl"!==t&&(a?(getDefaultProductPrice(),_(document).trigger("yith-wapo-reset-addons")):a=!0)},foundVariation=function(e,t){"variations_form cart in_loop initialized"===e.target.classList.value||_("form.cart.ywcp").length||(updateContainerProductPrice(t),_(document).trigger("yith-wapo-reload-addons"))},reloadAddons=function(e,t=""){var a={action:"live_print_blocks",addons:_(w).serializeArray(),currency:yith_wapo.woocommerce_currency,current_language:yith_wapo.currentLanguage,security:yith_wapo.addons_nonce};""!=t&&(a.price=t),_.ajax({url:yith_wapo.ajaxurl,type:"post",data:a,beforeSend:function(){_(p).css("opacity","0.5")},error:function(e,t,a){console.error("AJAX request failed: ",t,a)},success:function(e){var t=e.html??"",a=e.quantities??"",t=(""!==t&&_(p).html(t),e.addons??"");""!==t&&addonsSelection(t),a&&addonsQuantity(a),_("form.cart #yith-wapo-container select").trigger("change"),_("form.cart").trigger("yith-wapo-after-reload-addons")},complete:function(e){_(p).attr("data-order-price",0),calculateTotalAddonsPrice(),_(p).css("opacity","1")}})},addonsQuantity=function(a){_.each(_(p).find(".qty.wapo-product-qty"),function(){let e=_(this).attr("id");var t=e.replace("yith_wapo_product_qty","").replace("[","").replace("]","");t in a&&(t=a[t],_(this).val(t))})},setQuantity=function(e){_("div.quantity input.input-text.qty ").val(e)},removeUploadedFile=function(e){let t=e.target,a=_(t).closest(".yith-wapo-uploaded-file-element"),o=_(t).closest(".yith-wapo-option").data("max-multiple"),i=_(t).closest(".yith-wapo-ajax-uploader").find(".yith-wapo-uploaded-file-element").length,n=_(t).closest(".yith-wapo-ajax-uploader").find(".yith-wapo-ajax-uploader-container"),d=_(t).closest(".yith-wapo-option").find('input[type="hidden"].upload-parent'),r=_(t).closest(".yith-wapo-option").find('input[type="file"]');a.remove(),r.val(""),(void 0===o||i-1o&&(n=!0,d=yith_wapo.messages.maxErrorMessage+" "+o),n&&(r.addClass("error-message"),t.append(_(''+d+"")),c=!0,_("html, body").animate({scrollTop:t.offset().top-50},500))}),_(document).trigger("yith_wapo_check_number_total_values"),!c},replaceImageAction=function(e,t=!1){var o,a=yith_wapo.replace_image_path,i=".yith_magnifier_zoom_magnifier, .zoomWindowContainer .zoomWindow",n=e.data("replace-image");null===n||!t&&_(a).attr("src")===n||(void 0!==e.data("replace-image")&&""!=e.data("replace-image")&&(void 0===_(a).attr("wapo-original-img")&&(_(a).attr("wapo-original-img",_(a).attr("src")),_(i).length&&_(i).attr("wapo-original-img",_(i).css("background-image").slice(4,-1).replace(/"/g,""))),_(d).val(n),_(i).css("background-image","url("+n+")"),replaceAddonImage(n)),t&&void 0!==_(a).attr("wapo-original-img")&&(o=_(a).attr("wapo-original-img"),e=_(i).attr("wapo-original-img"),n=_(d).val(),_(d).val(""),_(p).find(".yith-wapo-addon:not(.yith-wapo-addon-type-select):not(.conditional_logic.hidden) .yith-wapo-option.selected, .yith-wapo-addon-type-select:not(.conditional_logic.hidden) .yith-wapo-option-value").each(function(e,t){let a=_(t);(a=a.is("select")?a.find(":selected"):a).data("replace-image")&&(a.hasClass("selected")||a.is("option"))&&(o=a.data("replace-image"),_(d).val(o))}),n!==o&&(_(i).css("background-image","url("+e+")"),replaceAddonImage(o))))},checkMaxSelected=function(e){var t=e.closest(".yith-wapo-option"),e=e.closest(".yith-wapo-addon"),a=e.data("max"),e=e.find(".yith-wapo-option.selected").length;return""===a||0===a||(t.hasClass("selected")?e--:e++,!(a',a.html(i)),"default"===t.val()||""===i?a.hide():a.fadeIn(),void 0===n?d.empty():d.html(n),t.data("replace-image")||(o=!0),replaceImageAction(t,o)},fileOnChange=function(e){_(this).closest(".yith-wapo-ajax-uploader").css("opacity","1");var t=_(this),a=t.closest(".yith-wapo-option").find(".yith-wapo-ajax-uploader"),t=t[0].files;checkBeforeUploadFiles(a,t)&&uploadFiles(t,a)},toggleElement=function(e){e.preventDefault();let t=_(this).find(".wapo-addon-title"),a=t.closest(".yith-wapo-addon");a.hasClass("toggle-open")?a.removeClass("toggle-open").addClass("toggle-closed"):a.removeClass("toggle-closed").addClass("toggle-open"),t.hasClass("toggle-open")?t.removeClass("toggle-open").addClass("toggle-closed"):t.removeClass("toggle-closed").addClass("toggle-open"),a.find(".options-container").toggle("fast"),_(document).trigger("yith_proteo_inizialize_html_elements")},updateContainerProductPrice=function(a){if(!_(".cart.yith-wcpb-bundle-form").length&&a.variation_id===parseInt(_(".variation_id").val())){let e=_(p),t=0;var o;"undefined"!=typeof a.display_price&&(t=a.display_price,"yes"===yith_wapo.use_price_html_on_variations&&"undefined"!=typeof a.price_html&&(o=_(a.price_html).find("> .amount bdi").text(),o=wcPriceToFloat(o),isNaN(o)||t===o||(t=o))),e.attr("data-product-price",t),e.attr("data-default-product-price",a.default_variation_price),e.attr("data-product-id",a.variation_id)}},yithWcMeasurementPC_Compatibility=function(){var t=_("#price_calculator.wc-measurement-price-calculator-price-table .product_price .amount").text(),t=wcPriceToFloat(t);if(!isNaN(t)){let e=_(p);e.attr("data-product-price",t),_(document).trigger("yith-wapo-reload-addons",[t])}},ajaxUploaderOnDrop=function(e){e.stopPropagation(),e.preventDefault(),_(this).css("opacity","1");_(this).closest(".yith-wapo-option").find("input.file");var t=_(this),e=e.originalEvent.dataTransfer.files;checkBeforeUploadFiles(t,e)&&uploadFiles(e,t)},checkBeforeUploadFiles=function(e,o){var i,t=_(e).find(".yith-wapo-uploaded-file-element").length+o.length,a=_(e).closest(".yith-wapo-option").data("max-multiple");if(!_(e).closest(".yith-wapo-option").hasClass("allow-multiple")&&1=parseFloat(1024*yith_wapo.upload_max_file_size*1024)&&(t=wapoSprintf(yith_wapo.messages.maxFileSize,e.name,yith_wapo.upload_max_file_size),a=!0),a)return alert(t),!1}return!0},wapoSprintf=function(e,...o){return e.replace(/%([sd])/g,function(e,t){if("s"===t)return o.shift();if("d"!==t)return e;{const a=o.shift();return Number.isInteger(a)?a.toString():""}})},uploadFiles=function(a,o){for(var i=0;i'+i+'
')},uploadSingleFile=function(i,n,d,r=!1,c=0){0===parseInt(c)&&_(d).find(".yith-wapo-uploaded-file-element.completed").length&&(c=_(d).find(".yith-wapo-uploaded-file-element.completed").last().data("index")+1);var l=i.length-1,t=i[n],e=new FormData,s=_(d).closest(".yith-wapo-option"),a=s.data("max-multiple"),u=_(d).find(".yith-wapo-uploaded-file"),h=_(d).find(".yith-wapo-ajax-uploader-container"),p=_(d).find('.yith-wapo-uploaded-file-element[data-index="'+c+'"]'),f=_(d).find(".yith-wapo-uploaded-file-info .remove"),y=_(p).find(".yith-wapo-loader-container .yith-wapo-loader-label"),o=_(p).find(".yith-wapo-loader-container .yith-wapo-loader");e.append("action","yith_wapo_upload_file"),e.append("security",yith_wapo.addons_nonce),e.append("currentFile",t),_.ajax({url:yith_wapo.ajaxurl,type:"POST",contentType:!1,processData:!1,"async":!0,dataType:"json",data:e,xhr:function(){var e=_.ajaxSettings.xhr();return e.upload&&(e.upload.addEventListener("progress",function(e){var t=0;e.lengthComputable&&(t=Math.ceil(e.loaded/e.total*100)),o.progressbar({value:t})},!1),e.addEventListener("progress",function(e){if(1==i.length||r){var t;s.hasClass("allow-multiple")&&(t=_(d).find(".yith-wapo-uploaded-file-element").length,(void 0===a||void 0!==a&&t').fadeIn(),n'+yith_wapo.i18n.maxOptionsSelectedMessage+"
"),r.addClass("wapo-error")),1}}else c=("file"===t?_(a).find(".yith-wapo-uploaded-file").has(".yith-wapo-uploaded-file-element"):a.find("input:checkbox:checked, input:radio:checked")).length;if(0'+yith_wapo.i18n.maxOptionsSelectedMessage+""),r.addClass("wapo-error"))}return 1}a.removeClass("required-min").find(".max-selected-error").hide()}},checkRequiredSelect=function(t=""){let a=!0;return _(".yith-wapo-addon.yith-wapo-addon-type-select select").each(function(){let d=_(this);if(d.is(":required")){let o=d.closest(".yith-wapo-addon"),i=o.find(".min-error-message"),n=o.find(".wapo-addon-title");var e=d.val();if(i.text(""),n.removeClass("wapo-error"),o.removeClass("required-min"),"default"===e&&!o.hasClass("hidden")&&!(a=!1)&&"hide"!==t){let e=o.find(".min-error"),t=d.closest("div.yith-wapo-addon.wapo-toggle"),a=t.find(".wapo-addon-title.toggle-closed");o.addClass("required-min"),a&&a.click(),n.addClass("wapo-error"),i.text(yith_wapo.i18n.selectAnOption.replace("%d",1)),e.show()}}}),a},checkTextInputLimit=function(){let d=!0;return _("form.cart .yith-wapo-addon.yith-wapo-addon-type-text:not(.hidden) input").each((e,t)=>{let a=_(t),o=a.val(),i=a.attr("minlength"),n=a.attr("maxlength");""!==i&&o.lengthn?(a.addClass("length-error"),a.siblings(".length-error-message").show(),d=!1):(a.siblings(".length-error-message").hide(),a.removeClass("length-error"))}),d},numberOnChange=function(){var e=_(this).val(),t=_(this).closest(".yith-wapo-option");replaceImageAction(t,""==e?!0:!1),checkMultipliedPrice(_(this))},checkMultipliedPrice=function(e){let t=e.attr("data-price");var a=e.attr("data-price-sale"),o=e.attr("data-default-price"),i=e.data("price-type"),n=e.data("price-method");let d="price",r=0;var c=e.val();0 div.quantity input.qty").val()),a=a?t/a:t;let o=_(p);o.attr("data-product-price",a),calculateTotalAddonsPrice()},setError=function(e,t){e.find(".yith-wapo-error").remove();let a=e.find(".yith-wapo-addon-label");a.addClass("wapo-error"),e.append(''+t+"")},cleanError=function(e){let t=e.find(".yith-wapo-addon-label");e.find(".yith-wapo-error").remove(),t.removeClass("wapo-error")},_(document).on("ywgc-amount-changed",function(e,t){t=t.data("price");let a=_(p);a.attr("data-product-price",t),calculateTotalAddonsPrice()}),_(document).on("yith-wapo-product-price-updated",function(e,t){void 0!==t&&_(p).attr("data-product-price",t),calculateTotalAddonsPrice()}),_(document).on("change",".gift-cards-list .ywgc-manual-amount-container input.ywgc-manual-amount",function(e){let t=_(this),a=t.val(),o=_(p);o.attr("data-product-price",a),calculateTotalAddonsPrice()}),_(document).on("woocommerce-product-bundle-updated-totals",function(e,t){var a=t.price_data.subtotals.price;let o=_(t.$bundle_price);o.find(".amount").html();let i=_(p);i.attr("data-product-price",a),calculateTotalAddonsPrice()}),_(document).on("ywdpd_price_html_updated",function(e,t){t=_(t).children(".amount bdi").text(),t=wcPriceToFloat(t);if(!isNaN(t)){let e=_(p);e.attr("data-product-price",t),calculateTotalAddonsPrice()}}),_(document).on("yith_wcpb_ajax_update_price_request",function(e,t){t=t.price;isNaN(t)||(_(p).attr("data-product-price",t),_(document).trigger("yith-wapo-reload-addons",t))}),_(document).on("change","form.cart div.yith-wapo-addon, form.cart .quantity input[type=number]",function(e){if(_(e.delegateTarget.activeElement).hasClass("yith-wapo-edit-product-cart"))return!1;e=_(e.target);maybeCalculateTotals(e)}),_(document).on("keyup",'form.cart .yith-wapo-addon-type-number input[type="number"], form.cart .yith-wapo-addon-type-text input[type="text"], form.cart .yith-wapo-addon-type-textarea textarea',function(e){if(_(e.delegateTarget.activeElement).hasClass("yith-wapo-edit-product-cart"))return!1;e=_(this);maybeCalculateTotals(e)}),_(document).on("wapo-colorpicker-change wapo-colorpicker-clear",function(e,t){if(_(e.delegateTarget.activeElement).hasClass("yith-wapo-edit-product-cart"))return!1;maybeCalculateTotals(_(t))}),_(document).on("change keyup",".yith-wapo-option .wapo-product-qty",productQuantityChange),_(document).on("reset_data",resetAddons),_(document).on("found_variation",foundVariation),_(document).on("yith-wapo-reload-addons",reloadAddons),_(document).on("click",".yith-wapo-uploaded-file .remove",removeUploadedFile),_("form.cart").on("click","span.checkboxbutton",function(){_(this).find("input").is(":checked")?_(this).addClass("checked"):_(this).removeClass("checked")}),_(document).on("change",".yith-wapo-addon-type-checkbox input",checkboxOnChange),_(document).on("click",".yith-wapo-addon-type-label .yith-wapo-option div.label",function(){_(this).closest(".yith-wapo-option").find(".yith-proteo-standard-checkbox").click()}),_(document).on("change",".yith-wapo-addon-type-label input",labelsOnChange),_(document).on("change keyup",".yith-wapo-addon-type-text input",inputOnChange),_(document).on("change keyup",".yith-wapo-addon-type-textarea textarea",textareaOnChange),_(document).on("click",".yith-wapo-addon-type-color .yith-wapo-option div.label",function(){_(this).closest(".yith-wapo-option").find(".yith-proteo-standard-checkbox").click()}),_(document).on("change",".yith-wapo-addon-type-color input",colorOnChange),_(document).on("click change",".yith-wapo-addon-type-product .quantity input",function(e){e.stopPropagation()}),_(document).on("click",".yith-wapo-addon-type-product .yith-wapo-option .product-container",function(){_(this).closest(".yith-wapo-option").find(".yith-proteo-standard-checkbox").click()}),_(document).on("change",".yith-wapo-addon-type-product .yith-wapo-option input.yith-proteo-standard-checkbox",productOnChange),_(document).on("click",".yith-wapo-option .image-container",addonImageClicked),_("form.cart").on("click","span.radiobutton",function(){_(this).find("input").is(":checked")&&(_(this).closest(".yith-wapo-addon.yith-wapo-addon-type-radio").find("span.radiobutton.checked").removeClass("checked"),_(this).addClass("checked"))}),_(document).on("click",".yith-wapo-addon-type-radio input",radioOnChange),_(document).on("change",".yith-wapo-addon-type-select select",selectOnChange),_(document).on("change",".yith-wapo-addon-type-file input.file",fileOnChange),_(document).on("click",".yith-wapo-ajax-uploader .button, .yith-wapo-ajax-uploader .link",function(){_(this).closest(".yith-wapo-option").find("input.file").click()}),_(document).on("change keyup",".yith-wapo-addon-type-number input",numberOnChange),_(document).on("click","#wapo-datepicker-save button",datepickerSaveButton),_(document).on("change","#wapo-datepicker-time-select",datepickertimeOnChange),_(document).on("click",".yith-wapo-addon.wapo-toggle .addon-header",toggleElement),_(document).on("keyup",".wapo-product-qty",productQtyOnKeyUp),_("form.cart").on("change","#price_calculator.wc-measurement-price-calculator-price-table",yithWcMeasurementPC_Compatibility),_(document).on("yith_wcp_price_updated",function(e,t){_(document).trigger("yith-wapo-reload-addons",t)}),_("html").on("dragover, drop",function(e){e.preventDefault(),e.stopPropagation()}),_(document).on("dragenter",".yith-wapo-ajax-uploader",function(e){e.stopPropagation(),e.preventDefault(),_(this).css("opacity","0.5")}),_(document).on("dragover",".yith-wapo-ajax-uploader",function(e){e.stopPropagation(),e.preventDefault()}),_(document).on("dragleave",".yith-wapo-ajax-uploader",function(e){e.stopPropagation(),e.preventDefault(),_(e.target).hasClass("yith-wapo-ajax-uploader")&&_(this).css("opacity","1")}),_("body").on("drop",".yith-wapo-ajax-uploader",ajaxUploaderOnDrop),_(document).on("change",".yith-wapo-addon-type-checkbox, .yith-wapo-addon-type-color, .yith-wapo-addon-type-label, .yith-wapo-addon-type-product",function(){checkMinMax(_(this))}),_(document).on("click","form.cart button",function(){return checkAddonsRequirements()}),_(document).on("yith_wcp_price_updated",compositePriceUpdated),_(document).on("click",".add-request-quote-button",requestAQuoteButton),initJS()});