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