From 6579972fd39533011a04b48297383b0fa8a1f7fd Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 16 Apr 2019 14:36:37 +0100 Subject: [PATCH] Minify --- CHANGELOG.txt | 5 ++ .../admin/meta-boxes-product-variation.min.js | 2 +- assets/js/admin/meta-boxes-product.min.js | 2 +- assets/js/admin/wc-enhanced-select.min.js | 2 +- assets/js/flexslider/jquery.flexslider.min.js | 2 +- assets/js/frontend/country-select.min.js | 2 +- assets/js/frontend/geolocation.min.js | 2 +- assets/js/frontend/single-product.js | 2 +- assets/js/frontend/single-product.min.js | 2 +- package-lock.json | 62 +++++++++---------- readme.txt | 2 +- 11 files changed, 45 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 194055c2e04..8812ed22b4c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,10 @@ == Changelog == += 3.5.8 - 2019-04-16 = +* Security - Added escaping for states on the user profile screen. +* Security - Added escaping for PhotoSwipe captions. +* Security - Added escaping for SelectWoo selected options. + = 3.5.7 - 2019-03-19 = * Security - Improved the way in which state fields are regenerated by JavaScript to ensure values are properly escaped. diff --git a/assets/js/admin/meta-boxes-product-variation.min.js b/assets/js/admin/meta-boxes-product-variation.min.js index 306bc1f3483..1296bcb5737 100644 --- a/assets/js/admin/meta-boxes-product-variation.min.js +++ b/assets/js/admin/meta-boxes-product-variation.min.js @@ -1 +1 @@ -jQuery(function(d){"use strict";var o={init:function(){d("#variable_product_options").on("change","input.variable_is_downloadable",this.variable_is_downloadable).on("change","input.variable_is_virtual",this.variable_is_virtual).on("change","input.variable_manage_stock",this.variable_manage_stock).on("click","button.notice-dismiss",this.notice_dismiss).on("click","h3 .sort",this.set_menu_order).on("reload",this.reload),d("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock").change(),d("#woocommerce-product-data").on("woocommerce_variations_loaded",this.variations_loaded),d(document.body).on("woocommerce_variations_added",this.variation_added)},reload:function(){n.load_variations(1),m.set_paginav(0)},variable_is_downloadable:function(){d(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").hide(),d(this).is(":checked")&&d(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").show()},variable_is_virtual:function(){d(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").show(),d(this).is(":checked")&&d(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").hide()},variable_manage_stock:function(){d(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").hide(),d(this).closest(".woocommerce_variation").find(".hide_if_variation_manage_stock").show(),d(this).is(":checked")&&(d(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").show(),d(this).closest(".woocommerce_variation").find(".hide_if_variation_manage_stock").hide())},notice_dismiss:function(){d(this).closest("div.notice").remove()},variations_loaded:function(a,e){e=e||!1;var i=d("#woocommerce-product-data");e||(d("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock",i).change(),d(".woocommerce_variation",i).each(function(a,e){var i=d(e),o=d(".sale_price_dates_from",i).val(),t=d(".sale_price_dates_to",i).val();""===o&&""===t||d("a.sale_schedule",i).click()}),d(".woocommerce_variations .variation-needs-update",i).removeClass("variation-needs-update"),d("button.cancel-variation-changes, button.save-variation-changes",i).attr("disabled","disabled")),d("#tiptip_holder").removeAttr("style"),d("#tiptip_arrow").removeAttr("style"),d(".woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip",i).tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),d(".sale_price_dates_fields",i).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){var a=d(this).is(".sale_price_dates_from")?"minDate":"maxDate",e=d(this).closest(".sale_price_dates_fields").find("input"),i=d(this).datepicker("getDate");e.not(this).datepicker("option",a,i),d(this).change()}}),d(".woocommerce_variations",i).sortable({items:".woocommerce_variation",cursor:"move",axis:"y",handle:".sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,stop:function(){o.variation_row_indexes()}}),d(document.body).trigger("wc-enhanced-select-init")},variation_added:function(a,e){1===e&&o.variations_loaded(null,!0)},set_menu_order:function(a){a.preventDefault();var e=d(this).closest(".woocommerce_variation").find(".variation_menu_order"),i=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_enter_menu_order,e.val());null!=i&&(e.val(parseInt(i,10)).change(),n.save_variations())},variation_row_indexes:function(){var a=d("#variable_product_options").find(".woocommerce_variations"),e=parseInt(a.attr("data-page"),10),i=parseInt((e-1)*woocommerce_admin_meta_boxes_variations.variations_per_page,10);d(".woocommerce_variations .woocommerce_variation").each(function(a,e){d(".variation_menu_order",e).val(parseInt(d(e).index(".woocommerce_variations .woocommerce_variation"),10)+1+i).change()})}},t={variable_image_frame:null,setting_variation_image_id:null,setting_variation_image:null,wp_media_post_id:wp.media.model.settings.post.id,init:function(){d("#variable_product_options").on("click",".upload_image_button",this.add_image),d("a.add_media").on("click",this.restore_wp_media_post_id)},add_image:function(a){var e=d(this),i=e.attr("rel"),o=e.closest(".upload_image");if(t.setting_variation_image=o,t.setting_variation_image_id=i,a.preventDefault(),e.is(".remove"))d(".upload_image_id",t.setting_variation_image).val("").change(),t.setting_variation_image.find("img").eq(0).attr("src",woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src),t.setting_variation_image.find(".upload_image_button").removeClass("remove");else{if(t.variable_image_frame)return t.variable_image_frame.uploader.uploader.param("post_id",t.setting_variation_image_id),void t.variable_image_frame.open();wp.media.model.settings.post.id=t.setting_variation_image_id,t.variable_image_frame=wp.media.frames.variable_image=wp.media({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,button:{text:woocommerce_admin_meta_boxes_variations.i18n_set_image},states:[new wp.media.controller.Library({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,filterable:"all"})]}),t.variable_image_frame.on("select",function(){var a=t.variable_image_frame.state().get("selection").first().toJSON(),e=a.sizes&&a.sizes.thumbnail?a.sizes.thumbnail.url:a.url;d(".upload_image_id",t.setting_variation_image).val(a.id).change(),t.setting_variation_image.find(".upload_image_button").addClass("remove"),t.setting_variation_image.find("img").eq(0).attr("src",e),wp.media.model.settings.post.id=t.wp_media_post_id}),t.variable_image_frame.open()}},restore_wp_media_post_id:function(){wp.media.model.settings.post.id=t.wp_media_post_id}},n={init:function(){d("li.variations_tab a").on("click",this.initial_load),d("#variable_product_options").on("click","button.save-variation-changes",this.save_variations).on("click","button.cancel-variation-changes",this.cancel_variations).on("click",".remove_variation",this.remove_variation),d(document.body).on("change","#variable_product_options .woocommerce_variations :input",this.input_changed).on("change",".variations-defaults select",this.defaults_changed);var a=d("form#post");a.on("submit",this.save_on_submit),d("input:submit",a).bind("click keypress",function(){a.data("callerid",this.id)}),d(".wc-metaboxes-wrapper").on("click","a.do_variation_action",this.do_variation_action)},check_for_changes:function(){var a=d("#variable_product_options").find(".woocommerce_variations .variation-needs-update");if(0').submit():a.append('').submit()},cancel_variations:function(){var a=parseInt(d("#variable_product_options").find(".woocommerce_variations").attr("data-page"),10);return d("#variable_product_options").find(".woocommerce_variations .variation-needs-update").removeClass("variation-needs-update"),d(".variations-defaults select").each(function(){d(this).val(d(this).attr("data-current"))}),m.go_to_page(a),!1},add_variation:function(){n.block();var a={action:"woocommerce_add_variation",post_id:woocommerce_admin_meta_boxes_variations.post_id,loop:d(".woocommerce_variation").length,security:woocommerce_admin_meta_boxes_variations.add_variation_nonce};return d.post(woocommerce_admin_meta_boxes_variations.ajax_url,a,function(a){var e=d(a);e.addClass("variation-needs-update"),d("#variable_product_options").find(".woocommerce_variations").prepend(e),d("button.cancel-variation-changes, button.save-variation-changes").removeAttr("disabled"),d("#variable_product_options").trigger("woocommerce_variations_added",1),n.unblock()}),!1},remove_variation:function(){if(n.check_for_changes(),window.confirm(woocommerce_admin_meta_boxes_variations.i18n_remove_variation)){var a=d(this).attr("rel"),e=[],i={action:"woocommerce_remove_variations"};n.block(),0'+c+"";d(".page-selector",n).empty().html(s),0===i?(o.not(".toolbar-top, .toolbar-buttons").hide(),n.hide(),d("option, optgroup",t).hide(),d(".variation_actions").val("add_variation"),d('option[data-global="true"]',t).show()):(o.show(),n.show(),d("option, optgroup",t).show(),d(".variation_actions").val("add_variation"),1===_?r.hide():r.show())},check_is_enabled:function(a){return!d(a).hasClass("disabled")},change_classes:function(a,e){var i=d(".variations-pagenav .first-page"),o=d(".variations-pagenav .prev-page"),t=d(".variations-pagenav .next-page"),n=d(".variations-pagenav .last-page");1===a?(i.addClass("disabled"),o.addClass("disabled")):(i.removeClass("disabled"),o.removeClass("disabled")),e===a?(t.addClass("disabled"),n.addClass("disabled")):(t.removeClass("disabled"),n.removeClass("disabled"))},set_page:function(a){d(".variations-pagenav .page-selector").val(a).first().change()},go_to_page:function(a,e){a=a||1,e=e||0,m.set_paginav(e),m.set_page(a)},page_selector:function(){var a=parseInt(d(this).val(),10),e=d("#variable_product_options").find(".woocommerce_variations");d(".variations-pagenav .page-selector").val(a),n.check_for_changes(),m.change_classes(a,parseInt(e.attr("data-total_pages"),10)),n.load_variations(a)},first_page:function(){return m.check_is_enabled(this)&&m.set_page(1),!1},prev_page:function(){if(m.check_is_enabled(this)){var a=d("#variable_product_options").find(".woocommerce_variations"),e=parseInt(a.attr("data-page"),10)-1,i=0').submit():a.append('').submit()},cancel_variations:function(){var a=parseInt(d("#variable_product_options").find(".woocommerce_variations").attr("data-page"),10);return d("#variable_product_options").find(".woocommerce_variations .variation-needs-update").removeClass("variation-needs-update"),d(".variations-defaults select").each(function(){d(this).val(d(this).attr("data-current"))}),m.go_to_page(a),!1},add_variation:function(){n.block();var a={action:"woocommerce_add_variation",post_id:woocommerce_admin_meta_boxes_variations.post_id,loop:d(".woocommerce_variation").length,security:woocommerce_admin_meta_boxes_variations.add_variation_nonce};return d.post(woocommerce_admin_meta_boxes_variations.ajax_url,a,function(a){var e=d(a);e.addClass("variation-needs-update"),d("#variable_product_options").find(".woocommerce_variations").prepend(e),d("button.cancel-variation-changes, button.save-variation-changes").removeAttr("disabled"),d("#variable_product_options").trigger("woocommerce_variations_added",1),n.unblock()}),!1},remove_variation:function(){if(n.check_for_changes(),window.confirm(woocommerce_admin_meta_boxes_variations.i18n_remove_variation)){var a=d(this).attr("rel"),e=[],i={action:"woocommerce_remove_variations"};n.block(),0'+c+"";d(".page-selector",n).empty().html(s),0===i?(o.not(".toolbar-top, .toolbar-buttons").hide(),n.hide(),d("option, optgroup",t).hide(),d(".variation_actions").val("add_variation"),d('option[data-global="true"]',t).show()):(o.show(),n.show(),d("option, optgroup",t).show(),d(".variation_actions").val("add_variation"),1===_?r.hide():r.show())},check_is_enabled:function(a){return!d(a).hasClass("disabled")},change_classes:function(a,e){var i=d(".variations-pagenav .first-page"),o=d(".variations-pagenav .prev-page"),t=d(".variations-pagenav .next-page"),n=d(".variations-pagenav .last-page");1===a?(i.addClass("disabled"),o.addClass("disabled")):(i.removeClass("disabled"),o.removeClass("disabled")),e===a?(t.addClass("disabled"),n.addClass("disabled")):(t.removeClass("disabled"),n.removeClass("disabled"))},set_page:function(a){d(".variations-pagenav .page-selector").val(a).first().change()},go_to_page:function(a,e){a=a||1,e=e||0,m.set_paginav(e),m.set_page(a)},page_selector:function(){var a=parseInt(d(this).val(),10),e=d("#variable_product_options").find(".woocommerce_variations");d(".variations-pagenav .page-selector").val(a),n.check_for_changes(),m.change_classes(a,parseInt(e.attr("data-total_pages"),10)),n.load_variations(a)},first_page:function(){return m.check_is_enabled(this)&&m.set_page(1),!1},prev_page:function(){if(m.check_is_enabled(this)){var a=d("#variable_product_options").find(".woocommerce_variations"),e=parseInt(a.attr("data-page"),10)-1,i=0 ul.categorychecklist').each(function(){var t=n(this),e=t.find(":checked").first();if(e.length){var i=t.find("input").position().top,o=e.position().top;t.closest(".tabs-panel").scrollTop(o-i+5)}})}),n("#upsell_product_data").bind("keypress",function(t){if(13===t.keyCode)return!1}),n(".type_box").appendTo("#woocommerce-product-data .hndle span"),n(function(){n("#woocommerce-product-data").find(".hndle").unbind("click.postboxes"),n("#woocommerce-product-data").on("click",".hndle",function(t){n(t.target).filter("input, option, label, select").length||n("#woocommerce-product-data").toggleClass("closed")})}),n("#catalog-visibility").find(".edit-catalog-visibility").click(function(){return n("#catalog-visibility-select").is(":hidden")&&(n("#catalog-visibility-select").slideDown("fast"),n(this).hide()),!1}),n("#catalog-visibility").find(".save-post-visibility").click(function(){n("#catalog-visibility-select").slideUp("fast"),n("#catalog-visibility").find(".edit-catalog-visibility").show();var t=n("input[name=_visibility]:checked").attr("data-label");return n("input[name=_featured]").is(":checked")&&(t=t+", "+woocommerce_admin_meta_boxes.featured_label,n("input[name=_featured]").attr("checked","checked")),n("#catalog-visibility-display").text(t),!1}),n("#catalog-visibility").find(".cancel-post-visibility").click(function(){n("#catalog-visibility-select").slideUp("fast"),n("#catalog-visibility").find(".edit-catalog-visibility").show();var t=n("#current_visibility").val(),e=n("#current_featured").val();n("input[name=_visibility]").removeAttr("checked"),n("input[name=_visibility][value="+t+"]").attr("checked","checked");var i=n("input[name=_visibility]:checked").attr("data-label");return"yes"===e?(i=i+", "+woocommerce_admin_meta_boxes.featured_label,n("input[name=_featured]").attr("checked","checked")):n("input[name=_featured]").removeAttr("checked"),n("#catalog-visibility-display").text(i),!1}),n("select#product-type").change(function(){var t=n(this).val();"variable"===t?(n("input#_manage_stock").change(),n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")):"grouped"===t?(n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")):"external"===t&&(n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")),i(),n("ul.wc-tabs li:visible").eq(0).find("a").click(),n(document.body).trigger("woocommerce-product-type-change",t,n(this))}).change(),n("input#_downloadable, input#_virtual").change(function(){i()}),n(".sale_price_dates_fields").each(function(){var t=n(this),e=!1,i=t.closest("div, table");t.find("input").each(function(){""!==n(this).val()&&(e=!0)}),e?(i.find(".sale_schedule").hide(),i.find(".sale_price_dates_fields").show()):(i.find(".sale_schedule").show(),i.find(".sale_price_dates_fields").hide())}),n("#woocommerce-product-data").on("click",".sale_schedule",function(){var t=n(this).closest("div, table");return n(this).hide(),t.find(".cancel_sale_schedule").show(),t.find(".sale_price_dates_fields").show(),!1}),n("#woocommerce-product-data").on("click",".cancel_sale_schedule",function(){var t=n(this).closest("div, table");return n(this).hide(),t.find(".sale_schedule").show(),t.find(".sale_price_dates_fields").hide(),t.find(".sale_price_dates_fields").find("input").val(""),!1}),n("#woocommerce-product-data").on("click",".downloadable_files a.insert",function(){return n(this).closest(".downloadable_files").find("tbody").append(n(this).data("row")),!1}),n("#woocommerce-product-data").on("click",".downloadable_files a.delete",function(){return n(this).closest("tr").remove(),!1}),n("input#_manage_stock").change(function(){if(n(this).is(":checked"))n("div.stock_fields").show(),n("p.stock_status_field").hide();else{var t=n("select#product-type").val();n("div.stock_fields").hide(),n("p.stock_status_field:not( .hide_if_"+t+" )").show()}}).change(),n(".sale_price_dates_fields").each(function(){n(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){t(n(this))}}),n(this).find("input").each(function(){t(n(this))})});var o,a,e,c=n(".product_attributes").find(".woocommerce_attribute").get();function r(){n(".product_attributes .woocommerce_attribute").each(function(t,e){n(".attribute_position",e).val(parseInt(n(e).index(".product_attributes .woocommerce_attribute"),10))})}c.sort(function(t,e){var i=parseInt(n(t).attr("rel"),10),o=parseInt(n(e).attr("rel"),10);return i'+t.name+""),e.find("select.attribute_values").change()),n(".product_attributes").unblock()})}else n(".product_attributes").unblock();return!1}),n(".save_attributes").on("click",function(){n(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var t=n(".product_attributes").find("input, select, textarea"),e={post_id:woocommerce_admin_meta_boxes.post_id,product_type:n("#product-type").val(),data:t.serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};n.post(woocommerce_admin_meta_boxes.ajax_url,e,function(t){if(t.error)window.alert(t.error);else if(t.data){n(".product_attributes").html(t.data.html),n(".product_attributes").unblock(),i(),n("select.attribute_taxonomy").find("option").prop("disabled",!1),n(".product_attributes .woocommerce_attribute").each(function(t,e){"none"!==n(e).css("display")&&n(e).is(".taxonomy")&&n("select.attribute_taxonomy").find('option[value="'+n(e).data("taxonomy")+'"]').prop("disabled",!0)});var e=window.location.toString();e=e.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),n("#variable_product_options").load(e+" #variable_product_options_inner",function(){n("#variable_product_options").trigger("reload")})}})}),n(document.body).on("click",".upload_file_button",function(t){var e=n(this);if(a=e.closest("tr").find("td.file_url input"),t.preventDefault(),o)o.open();else{var i=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:e.data("choose"),priority:20,filterable:"uploaded"})];(o=wp.media.frames.downloadable_file=wp.media({title:e.data("choose"),library:{type:""},button:{text:e.data("update")},multiple:!0,states:i})).on("select",function(){var e="";o.state().get("selection").map(function(t){(t=t.toJSON()).url&&(e=t.url)}),a.val(e).change()}),o.on("ready",function(){o.uploader.options.uploader.params={type:"downloadable_product"}}),o.open()}}),n(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var l=n("#product_image_gallery"),s=n("#product_images_container").find("ul.product_images");n(".add_product_images").on("click","a",function(t){var o=n(this);t.preventDefault(),e||(e=wp.media.frames.product_gallery=wp.media({title:o.data("choose"),button:{text:o.data("update")},states:[new wp.media.controller.Library({title:o.data("choose"),filterable:"all",multiple:!0})]})).on("select",function(){var t=e.state().get("selection"),i=l.val();t.map(function(t){if((t=t.toJSON()).id){i=i?i+","+t.id:t.id;var e=t.sizes&&t.sizes.thumbnail?t.sizes.thumbnail.url:t.url;s.append('
  • ")}}),l.val(i)}),e.open()}),s.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style")},update:function(){var e="";n("#product_images_container").find("ul li.image").css("cursor","default").each(function(){var t=n(this).attr("data-attachment_id");e=e+t+","}),l.val(e)}}),n("#product_images_container").on("click","a.delete",function(){n(this).closest("li.image").remove();var e="";return n("#product_images_container").find("ul li.image").css("cursor","default").each(function(){var t=n(this).attr("data-attachment_id");e=e+t+","}),l.val(e),n("#tiptip_holder").removeAttr("style"),n("#tiptip_arrow").removeAttr("style"),!1})}); \ No newline at end of file +jQuery(function(n){function i(){var t=n("select#product-type").val(),e=n("input#_virtual:checked").length,i=n("input#_downloadable:checked").length,o=".hide_if_downloadable, .hide_if_virtual",a=".show_if_downloadable, .show_if_virtual";n.each(woocommerce_admin_meta_boxes.product_types,function(t,e){o=o+", .hide_if_"+e,a=a+", .show_if_"+e}),n(o).show(),n(a).hide(),i&&n(".show_if_downloadable").show(),e&&n(".show_if_virtual").show(),n(".show_if_"+t).show(),i&&n(".hide_if_downloadable").hide(),e&&n(".hide_if_virtual").hide(),n(".hide_if_"+t).hide(),n("input#_manage_stock").change(),n(".woocommerce_options_panel").each(function(){var t=n(this).children(".options_group");if(0!==t.length&&t.filter(function(){return"none"===n(this).css("display")}).length===t.length){var e=n(this).prop("id");n(".product_data_tabs").find('li a[href="#'+e+'"]').parent().hide()}})}function t(t){var e=n(t).next().is(".hasDatepicker")?"minDate":"maxDate",i="minDate"==e?n(t).next():n(t).prev(),o=n(t).datepicker("getDate");n(i).datepicker("option",e,o),n(t).change()}n(function(){n('[id$="-all"] > ul.categorychecklist').each(function(){var t=n(this),e=t.find(":checked").first();if(e.length){var i=t.find("input").position().top,o=e.position().top;t.closest(".tabs-panel").scrollTop(o-i+5)}})}),n("#upsell_product_data").bind("keypress",function(t){if(13===t.keyCode)return!1}),n(".type_box").appendTo("#woocommerce-product-data .hndle span"),n(function(){n("#woocommerce-product-data").find(".hndle").unbind("click.postboxes"),n("#woocommerce-product-data").on("click",".hndle",function(t){n(t.target).filter("input, option, label, select").length||n("#woocommerce-product-data").toggleClass("closed")})}),n("#catalog-visibility").find(".edit-catalog-visibility").click(function(){return n("#catalog-visibility-select").is(":hidden")&&(n("#catalog-visibility-select").slideDown("fast"),n(this).hide()),!1}),n("#catalog-visibility").find(".save-post-visibility").click(function(){n("#catalog-visibility-select").slideUp("fast"),n("#catalog-visibility").find(".edit-catalog-visibility").show();var t=n("input[name=_visibility]:checked").attr("data-label");return n("input[name=_featured]").is(":checked")&&(t=t+", "+woocommerce_admin_meta_boxes.featured_label,n("input[name=_featured]").attr("checked","checked")),n("#catalog-visibility-display").text(t),!1}),n("#catalog-visibility").find(".cancel-post-visibility").click(function(){n("#catalog-visibility-select").slideUp("fast"),n("#catalog-visibility").find(".edit-catalog-visibility").show();var t=n("#current_visibility").val(),e=n("#current_featured").val();n("input[name=_visibility]").removeAttr("checked"),n("input[name=_visibility][value="+t+"]").attr("checked","checked");var i=n("input[name=_visibility]:checked").attr("data-label");return"yes"===e?(i=i+", "+woocommerce_admin_meta_boxes.featured_label,n("input[name=_featured]").attr("checked","checked")):n("input[name=_featured]").removeAttr("checked"),n("#catalog-visibility-display").text(i),!1}),n("select#product-type").change(function(){var t=n(this).val();"variable"===t?(n("input#_manage_stock").change(),n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")):"grouped"===t?(n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")):"external"===t&&(n("input#_downloadable").prop("checked",!1),n("input#_virtual").removeAttr("checked")),i(),n("ul.wc-tabs li:visible").eq(0).find("a").click(),n(document.body).trigger("woocommerce-product-type-change",t,n(this))}).change(),n("input#_downloadable, input#_virtual").change(function(){i()}),n(".sale_price_dates_fields").each(function(){var t=n(this),e=!1,i=t.closest("div, table");t.find("input").each(function(){""!==n(this).val()&&(e=!0)}),e?(i.find(".sale_schedule").hide(),i.find(".sale_price_dates_fields").show()):(i.find(".sale_schedule").show(),i.find(".sale_price_dates_fields").hide())}),n("#woocommerce-product-data").on("click",".sale_schedule",function(){var t=n(this).closest("div, table");return n(this).hide(),t.find(".cancel_sale_schedule").show(),t.find(".sale_price_dates_fields").show(),!1}),n("#woocommerce-product-data").on("click",".cancel_sale_schedule",function(){var t=n(this).closest("div, table");return n(this).hide(),t.find(".sale_schedule").show(),t.find(".sale_price_dates_fields").hide(),t.find(".sale_price_dates_fields").find("input").val(""),!1}),n("#woocommerce-product-data").on("click",".downloadable_files a.insert",function(){return n(this).closest(".downloadable_files").find("tbody").append(n(this).data("row")),!1}),n("#woocommerce-product-data").on("click",".downloadable_files a.delete",function(){return n(this).closest("tr").remove(),!1}),n("input#_manage_stock").change(function(){if(n(this).is(":checked"))n("div.stock_fields").show(),n("p.stock_status_field").hide();else{var t=n("select#product-type").val();n("div.stock_fields").hide(),n("p.stock_status_field:not( .hide_if_"+t+" )").show()}n("input.variable_manage_stock").change()}).change(),n(".sale_price_dates_fields").each(function(){n(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){t(n(this))}}),n(this).find("input").each(function(){t(n(this))})});var o,a,e,c=n(".product_attributes").find(".woocommerce_attribute").get();function r(){n(".product_attributes .woocommerce_attribute").each(function(t,e){n(".attribute_position",e).val(parseInt(n(e).index(".product_attributes .woocommerce_attribute"),10))})}c.sort(function(t,e){var i=parseInt(n(t).attr("rel"),10),o=parseInt(n(e).attr("rel"),10);return i'+t.name+""),e.find("select.attribute_values").change()),n(".product_attributes").unblock()})}else n(".product_attributes").unblock();return!1}),n(".save_attributes").on("click",function(){n(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var t=n(".product_attributes").find("input, select, textarea"),e={post_id:woocommerce_admin_meta_boxes.post_id,product_type:n("#product-type").val(),data:t.serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};n.post(woocommerce_admin_meta_boxes.ajax_url,e,function(t){if(t.error)window.alert(t.error);else if(t.data){n(".product_attributes").html(t.data.html),n(".product_attributes").unblock(),i(),n("select.attribute_taxonomy").find("option").prop("disabled",!1),n(".product_attributes .woocommerce_attribute").each(function(t,e){"none"!==n(e).css("display")&&n(e).is(".taxonomy")&&n("select.attribute_taxonomy").find('option[value="'+n(e).data("taxonomy")+'"]').prop("disabled",!0)});var e=window.location.toString();e=e.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),n("#variable_product_options").load(e+" #variable_product_options_inner",function(){n("#variable_product_options").trigger("reload")})}})}),n(document.body).on("click",".upload_file_button",function(t){var e=n(this);if(a=e.closest("tr").find("td.file_url input"),t.preventDefault(),o)o.open();else{var i=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:e.data("choose"),priority:20,filterable:"uploaded"})];(o=wp.media.frames.downloadable_file=wp.media({title:e.data("choose"),library:{type:""},button:{text:e.data("update")},multiple:!0,states:i})).on("select",function(){var e="";o.state().get("selection").map(function(t){(t=t.toJSON()).url&&(e=t.url)}),a.val(e).change()}),o.on("ready",function(){o.uploader.options.uploader.params={type:"downloadable_product"}}),o.open()}}),n(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var l=n("#product_image_gallery"),s=n("#product_images_container").find("ul.product_images");n(".add_product_images").on("click","a",function(t){var o=n(this);t.preventDefault(),e||(e=wp.media.frames.product_gallery=wp.media({title:o.data("choose"),button:{text:o.data("update")},states:[new wp.media.controller.Library({title:o.data("choose"),filterable:"all",multiple:!0})]})).on("select",function(){var t=e.state().get("selection"),i=l.val();t.map(function(t){if((t=t.toJSON()).id){i=i?i+","+t.id:t.id;var e=t.sizes&&t.sizes.thumbnail?t.sizes.thumbnail.url:t.url;s.append('
  • ")}}),l.val(i)}),e.open()}),s.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style")},update:function(){var e="";n("#product_images_container").find("ul li.image").css("cursor","default").each(function(){var t=n(this).attr("data-attachment_id");e=e+t+","}),l.val(e)}}),n("#product_images_container").on("click","a.delete",function(){n(this).closest("li.image").remove();var e="";return n("#product_images_container").find("ul li.image").css("cursor","default").each(function(){var t=n(this).attr("data-attachment_id");e=e+t+","}),l.val(e),n("#tiptip_holder").removeAttr("style"),n("#tiptip_arrow").removeAttr("style"),!1})}); \ No newline at end of file diff --git a/assets/js/admin/wc-enhanced-select.min.js b/assets/js/admin/wc-enhanced-select.min.js index f4ec43e0b6d..de6c0515fe5 100644 --- a/assets/js/admin/wc-enhanced-select.min.js +++ b/assets/js/admin/wc-enhanced-select.min.js @@ -1 +1 @@ -jQuery(function(a){function c(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}try{a(document.body).on("wc-enhanced-select-init",function(){a(":input.wc-enhanced-select, :input.chosen_select").filter(":not(.enhanced)").each(function(){var e=a.extend({minimumResultsForSearch:10,allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder")},c());a(this).selectWoo(e).addClass("enhanced")}),a(":input.wc-enhanced-select-nostd, :input.chosen_select_nostd").filter(":not(.enhanced)").each(function(){var e=a.extend({minimumResultsForSearch:10,allowClear:!0,placeholder:a(this).data("placeholder")},c());a(this).selectWoo(e).addClass("enhanced")}),a(":input.wc-product-search").filter(":not(.enhanced)").each(function(){var e={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(e){return{term:e.term,action:a(this).data("action")||"woocommerce_json_search_products_and_variations",security:wc_enhanced_select_params.search_products_nonce,exclude:a(this).data("exclude"),include:a(this).data("include"),limit:a(this).data("limit"),display_stock:a(this).data("display_stock")}},processResults:function(e){var n=[];return e&&a.each(e,function(e,t){n.push({id:e,text:t})}),{results:n}},cache:!0}};if(e=a.extend(e,c()),a(this).selectWoo(e).addClass("enhanced"),a(this).data("sortable")){var n=a(this),t=a(this).next(".select2-container").find("ul.select2-selection__rendered");t.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(t.find(".select2-selection__choice").get().reverse()).each(function(){var e=a(this).data("data").id,t=n.find('option[value="'+e+'"]')[0];n.prepend(t)})}})}else a(this).prop("multiple")&&a(this).on("change",function(){var e=a(this).children();e.sort(function(e,t){var n=e.text.toLowerCase(),a=t.text.toLowerCase();return a'),1").attr("href","#").text(n),"thumbnails"===h.vars.controlNav&&(e=m("").attr("src",t.attr("data-thumb"))),""!==t.attr("data-thumb-alt")&&e.attr("alt",t.attr("data-thumb-alt")),"thumbnails"===h.vars.controlNav&&!0===h.vars.thumbCaptions){var r=t.attr("data-thumbcaption");if(""!==r&&undefined!==r){var s=m("").addClass(c+"caption").text(r);e.append(s)}}var o=m("
  • ");e.appendTo(o),o.append("
  • "),h.controlNavScaffold.append(o),n++}h.controlsContainer?m(h.controlsContainer).append(h.controlNavScaffold):h.append(h.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),h.controlNavScaffold.delegate("a, img",l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(h.direction=a>h.currentSlide?"next":"prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},setupManual:function(){h.controlNav=h.manualControls,p.controlNav.active(),h.controlNav.bind(l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(a>h.currentSlide?h.direction="next":h.direction="prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===h.vars.controlNav?"img":"a";h.controlNav=m("."+c+"control-nav li "+e,h.controlsContainer?h.controlsContainer:h)},active:function(){h.controlNav.removeClass(c+"active").eq(h.animatingTo).addClass(c+"active")},update:function(e,t){1'+h.count+"")):1===h.pagingCount?h.controlNavScaffold.find("li").remove():h.controlNav.eq(t).closest("li").remove(),p.controlNav.set(),1
  • '+h.vars.prevText+'
  • '+h.vars.nextText+"
  • ");h.customDirectionNav?h.directionNav=h.customDirectionNav:h.controlsContainer?(m(h.controlsContainer).append(e),h.directionNav=m("."+c+"direction-nav li a",h.controlsContainer)):(h.append(e),h.directionNav=m("."+c+"direction-nav li a",h)),p.directionNav.update(),h.directionNav.bind(l,function(e){var t;e.preventDefault(),""!==d&&d!==e.type||(t=m(this).hasClass(c+"next")?h.getTarget("next"):h.getTarget("prev"),h.flexAnimate(t,h.vars.pauseOnAction)),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(){var e=c+"disabled";1===h.pagingCount?h.directionNav.addClass(e).attr("tabindex","-1"):h.vars.animationLoop?h.directionNav.removeClass(e).removeAttr("tabindex"):0===h.animatingTo?h.directionNav.removeClass(e).filter("."+c+"prev").addClass(e).attr("tabindex","-1"):h.animatingTo===h.last?h.directionNav.removeClass(e).filter("."+c+"next").addClass(e).attr("tabindex","-1"):h.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=m('
    ');h.controlsContainer?(h.controlsContainer.append(e),h.pausePlay=m("."+c+"pauseplay a",h.controlsContainer)):(h.append(e),h.pausePlay=m("."+c+"pauseplay a",h)),p.pausePlay.update(h.vars.slideshow?c+"pause":c+"play"),h.pausePlay.bind(l,function(e){e.preventDefault(),""!==d&&d!==e.type||(m(this).hasClass(c+"pause")?(h.manualPause=!0,h.manualPlay=!1,h.pause()):(h.manualPause=!1,h.manualPlay=!0,h.play())),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(e){"play"===e?h.pausePlay.removeClass(c+"pause").addClass(c+"play").html(h.vars.playText):h.pausePlay.removeClass(c+"play").addClass(c+"pause").html(h.vars.pauseText)}},touch:function(){var i,r,s,o,l,d,e,n,c,u=!1,t=0,a=0,v=0;if(S){g.style.msTouchAction="none",g._gesture=new MSGesture,(g._gesture.target=g).addEventListener("MSPointerDown",function p(e){e.stopPropagation(),h.animating?e.preventDefault():(h.pause(),g._gesture.addPointer(e.pointerId),v=0,o=x?h.h:h.w,d=Number(new Date),s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o)},!1),g._slider=h,g.addEventListener("MSGestureChange",function m(e){e.stopPropagation();var t=e.target._slider;if(!t)return;var a=-e.translationX,n=-e.translationY;if(v+=x?n:a,l=(t.vars.rtl?-1:1)*v,u=x?Math.abs(v)o/2)?t.flexAnimate(n,t.vars.pauseOnAction):w||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=l=r=i=null,v=0},!1)}else e=function(e){h.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(h.pause(),o=x?h.h:h.w,d=Number(new Date),t=e.touches[0].pageX,a=e.touches[0].pageY,s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o,i=x?a:t,r=x?t:a,g.addEventListener("touchmove",n,!1),g.addEventListener("touchend",c,!1))},n=function(e){t=e.touches[0].pageX,a=e.touches[0].pageY,l=x?i-a:(h.vars.rtl?-1:1)*(i-t);(!(u=x?Math.abs(l)o/2)?h.flexAnimate(a,h.vars.pauseOnAction):w||h.flexAnimate(h.currentSlide,h.vars.pauseOnAction,!0)}g.removeEventListener("touchend",c,!1),s=l=r=i=null},g.addEventListener("touchstart",e,!1)},resize:function(){!h.animating&&h.is(":visible")&&(b||h.doMath(),w?p.smoothHeight():b?(h.slides.width(h.computedW),h.update(h.pagingCount),h.setProps()):x?(h.viewport.height(h.h),h.setProps(h.h,"setTotal")):(h.vars.smoothHeight&&p.smoothHeight(),h.newSlides.width(h.computedW),h.setProps(h.computedW,"setTotal")))},smoothHeight:function(e){if(!x||w){var t=w?h:h.viewport;e?t.animate({height:h.slides.eq(h.animatingTo).innerHeight()},e):t.innerHeight(h.slides.eq(h.animatingTo).innerHeight())}},sync:function(e){var t=m(h.vars.sync).data("flexslider"),a=h.animatingTo;switch(e){case"animate":t.flexAnimate(a,h.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=m(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=p.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){p.pauseInvisible.isHidden()?h.startTimeout?clearTimeout(h.startTimeout):h.pause():h.started?h.play():0h.currentSlide?"next":"prev"),v&&1===h.pagingCount&&(h.direction=h.currentItemh.limit&&1!==h.visible?h.limit:l):0===h.currentSlide&&e===h.count-1&&h.vars.animationLoop&&"next"!==h.direction?y?(h.count+h.cloneOffset)*d:0:h.currentSlide===h.last&&0===e&&h.vars.animationLoop&&"prev"!==h.direction?y?0:(h.count+1)*d:y?(h.count-1-e+h.cloneOffset)*d:(e+h.cloneOffset)*d,h.setProps(o,"",h.vars.animationSpeed),h.transitions?(h.vars.animationLoop&&h.atEnd||(h.animating=!1,h.currentSlide=h.animatingTo),h.container.unbind("webkitTransitionEnd transitionend"),h.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(h.ensureAnimationEnd),h.wrapup(d)}),clearTimeout(h.ensureAnimationEnd),h.ensureAnimationEnd=setTimeout(function(){h.wrapup(d)},h.vars.animationSpeed+100)):h.container.animate(h.args,h.vars.animationSpeed,h.vars.easing,function(){h.wrapup(d)})}h.vars.smoothHeight&&p.smoothHeight(h.vars.animationSpeed)}},h.wrapup=function(e){w||b||(0===h.currentSlide&&h.animatingTo===h.last&&h.vars.animationLoop?h.setProps(e,"jumpEnd"):h.currentSlide===h.last&&0===h.animatingTo&&h.vars.animationLoop&&h.setProps(e,"jumpStart")),h.animating=!1,h.currentSlide=h.animatingTo,h.vars.after(h)},h.animateSlides=function(){!h.animating&&a&&h.flexAnimate(h.getTarget("next"))},h.pause=function(){clearInterval(h.animatedSlides),h.animatedSlides=null,h.playing=!1,h.vars.pausePlay&&p.pausePlay.update("play"),h.syncExists&&p.sync("pause")},h.play=function(){h.playing&&clearInterval(h.animatedSlides),h.animatedSlides=h.animatedSlides||setInterval(h.animateSlides,h.vars.slideshowSpeed),h.started=h.playing=!0,h.vars.pausePlay&&p.pausePlay.update("pause"),h.syncExists&&p.sync("play")},h.stop=function(){h.pause(),h.stopped=!0},h.canAdvance=function(e,t){var a=v?h.pagingCount-1:h.last;return!!t||(!(!v||h.currentItem!==h.count-1||0!==e||"prev"!==h.direction)||(!v||0!==h.currentItem||e!==h.pagingCount-1||"next"===h.direction)&&(!(e===h.currentSlide&&!v)&&(!!h.vars.animationLoop||(!h.atEnd||0!==h.currentSlide||e!==a||"next"===h.direction)&&(!h.atEnd||h.currentSlide!==a||0!==e||"next"!==h.direction))))},h.getTarget=function(e){return"next"===(h.direction=e)?h.currentSlide===h.last?0:h.currentSlide+1:0===h.currentSlide?h.last:h.currentSlide-1},h.setProps=function(e,t,a){var n,i=(n=e||(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo,function(){if(b)return"setTouch"===t?e:y&&h.animatingTo===h.last?0:y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:h.animatingTo===h.last?h.limit:n;switch(t){case"setTotal":return y?(h.count-1-h.currentSlide+h.cloneOffset)*e:(h.currentSlide+h.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return y?e:h.count*e;case"jumpStart":return y?h.count*e:e;default:return e}}()*(h.vars.rtl?1:-1)+"px");h.transitions&&(i=x?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)",a=a!==undefined?a/1e3+"s":"0s",h.container.css("-"+h.pfx+"-transition-duration",a),h.container.css("transition-duration",a)),h.args[h.prop]=i,(h.transitions||a===undefined)&&h.container.css(h.args),h.container.css("transform",i)},h.setup=function(e){var t,a;w?(h.vars.rtl?h.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):h.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(u?h.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+h.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(h.currentSlide).css({opacity:1,zIndex:2}):0==h.vars.fadeFirstSlide?h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).css({opacity:1}):h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).animate({opacity:1},h.vars.animationSpeed,h.vars.easing)),h.vars.smoothHeight&&p.smoothHeight()):("init"===e&&(h.viewport=m('
    ').css({overflow:"hidden",position:"relative"}).appendTo(h).append(h.container),h.cloneCount=0,h.cloneOffset=0,y&&(a=m.makeArray(h.slides).reverse(),h.slides=m(a),h.container.empty().append(h.slides))),h.vars.animationLoop&&!b&&(h.cloneCount=2,h.cloneOffset=1,"init"!==e&&h.container.find(".clone").remove(),h.container.append(p.uniqueID(h.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(p.uniqueID(h.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),h.newSlides=m(h.vars.selector,h),t=y?h.count-1-h.currentSlide+h.cloneOffset:h.currentSlide+h.cloneOffset,x&&!b?(h.container.height(200*(h.count+h.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){h.newSlides.css({display:"block"}),h.doMath(),h.viewport.height(h.h),h.setProps(t*h.h,"init")},"init"===e?100:0)):(h.container.width(200*(h.count+h.cloneCount)+"%"),h.setProps(t*h.computedW,"init"),setTimeout(function(){h.doMath(),h.vars.rtl?h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"right",display:"block"}):h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"left",display:"block"}),h.vars.smoothHeight&&p.smoothHeight()},"init"===e?100:0)));b||h.slides.removeClass(c+"active-slide").eq(h.currentSlide).addClass(c+"active-slide"),h.vars.init(h)},h.doMath=function(){var e=h.slides.first(),t=h.vars.itemMargin,a=h.vars.minItems,n=h.vars.maxItems;h.w=h.viewport===undefined?h.width():h.viewport.width(),h.isFirefox&&(h.w=h.width()),h.h=e.height(),h.boxPadding=e.outerWidth()-e.width(),b?(h.itemT=h.vars.itemWidth+t,h.itemM=t,h.minW=a?a*h.itemT:h.w,h.maxW=n?n*h.itemT-t:h.w,h.itemW=h.minW>h.w?(h.w-t*(a-1))/a:h.maxWh.w?h.w:h.vars.itemWidth,h.visible=Math.floor(h.w/h.itemW),h.move=0h.w?h.itemW*(h.count-1)+t*(h.count-1):(h.itemW+t)*h.count-h.w-t):(h.itemW=h.w,h.itemM=t,h.pagingCount=h.count,h.last=h.count-1),h.computedW=h.itemW-h.boxPadding,h.computedM=h.itemM},h.update=function(e,t){h.doMath(),b||(eh.controlNav.length?p.controlNav.update("add"):("remove"===t&&!b||h.pagingCounth.last&&(h.currentSlide-=1,h.animatingTo-=1),p.controlNav.update("remove",h.last))),h.vars.directionNav&&p.directionNav.update()},h.addSlide=function(e,t){var a=m(e);h.count+=1,h.last=h.count-1,x&&y?t!==undefined?h.slides.eq(h.count-t).after(a):h.container.prepend(a):t!==undefined?h.slides.eq(t).before(a):h.container.append(a),h.update(t,"add"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.added(h)},h.removeSlide=function(e){var t=isNaN(e)?h.slides.index(m(e)):e;h.count-=1,h.last=h.count-1,isNaN(e)?m(e,h.slides).remove():x&&y?h.slides.eq(h.last).remove():h.slides.eq(e).remove(),h.doMath(),h.update(t,"remove"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.removed(h)},p.init()},m(window).blur(function(e){a=!1}).focus(function(e){a=!0}),m.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},m.fn.flexslider=function(n){if(n===undefined&&(n={}),"object"==typeof n)return this.each(function(){var e=m(this),t=n.selector?n.selector:".slides > li",a=e.find(t);1===a.length&&!1===n.allowOneSlide||0===a.length?(a.fadeIn(400),n.start&&n.start(e)):e.data("flexslider")===undefined&&new m.flexslider(this,n)});var e=m(this).data("flexslider");switch(n){case"play":e.play();break;case"pause":e.pause();break;case"stop":e.stop();break;case"next":e.flexAnimate(e.getTarget("next"),!0);break;case"prev":case"previous":e.flexAnimate(e.getTarget("prev"),!0);break;default:"number"==typeof n&&e.flexAnimate(n,!0)}}}(jQuery); \ No newline at end of file +!function(m){var a=!0;m.flexslider=function(g,e){var h=m(g);"undefined"==typeof e.rtl&&"rtl"==m("html").attr("dir")&&(e.rtl=!0),h.vars=m.extend({},m.flexslider.defaults,e);var t,c=h.vars.namespace,S=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||S||window.DocumentTouch&&document instanceof DocumentTouch)&&h.vars.touch,l="click touchend MSPointerUp keyup",d="",x="vertical"===h.vars.direction,y=h.vars.reverse,b=0'),1").attr("href","#").text(n),"thumbnails"===h.vars.controlNav&&(e=m("").attr("src",t.attr("data-thumb"))),""!==t.attr("data-thumb-alt")&&e.attr("alt",t.attr("data-thumb-alt")),"thumbnails"===h.vars.controlNav&&!0===h.vars.thumbCaptions){var r=t.attr("data-thumbcaption");if(""!==r&&undefined!==r){var s=m("").addClass(c+"caption").text(r);e.append(s)}}var o=m("
  • ");e.appendTo(o),o.append("
  • "),h.controlNavScaffold.append(o),n++}h.controlsContainer?m(h.controlsContainer).append(h.controlNavScaffold):h.append(h.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),h.controlNavScaffold.delegate("a, img",l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(h.direction=a>h.currentSlide?"next":"prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},setupManual:function(){h.controlNav=h.manualControls,p.controlNav.active(),h.controlNav.bind(l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(a>h.currentSlide?h.direction="next":h.direction="prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===h.vars.controlNav?"img":"a";h.controlNav=m("."+c+"control-nav li "+e,h.controlsContainer?h.controlsContainer:h)},active:function(){h.controlNav.removeClass(c+"active").eq(h.animatingTo).addClass(c+"active")},update:function(e,t){1'+h.count+"")):1===h.pagingCount?h.controlNavScaffold.find("li").remove():h.controlNav.eq(t).closest("li").remove(),p.controlNav.set(),1
  • '+h.vars.prevText+'
  • '+h.vars.nextText+"
  • ");h.customDirectionNav?h.directionNav=h.customDirectionNav:h.controlsContainer?(m(h.controlsContainer).append(e),h.directionNav=m("."+c+"direction-nav li a",h.controlsContainer)):(h.append(e),h.directionNav=m("."+c+"direction-nav li a",h)),p.directionNav.update(),h.directionNav.bind(l,function(e){var t;e.preventDefault(),""!==d&&d!==e.type||(t=m(this).hasClass(c+"next")?h.getTarget("next"):h.getTarget("prev"),h.flexAnimate(t,h.vars.pauseOnAction)),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(){var e=c+"disabled";1===h.pagingCount?h.directionNav.addClass(e).attr("tabindex","-1"):h.vars.animationLoop?h.directionNav.removeClass(e).removeAttr("tabindex"):0===h.animatingTo?h.directionNav.removeClass(e).filter("."+c+"prev").addClass(e).attr("tabindex","-1"):h.animatingTo===h.last?h.directionNav.removeClass(e).filter("."+c+"next").addClass(e).attr("tabindex","-1"):h.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=m('
    ');h.controlsContainer?(h.controlsContainer.append(e),h.pausePlay=m("."+c+"pauseplay a",h.controlsContainer)):(h.append(e),h.pausePlay=m("."+c+"pauseplay a",h)),p.pausePlay.update(h.vars.slideshow?c+"pause":c+"play"),h.pausePlay.bind(l,function(e){e.preventDefault(),""!==d&&d!==e.type||(m(this).hasClass(c+"pause")?(h.manualPause=!0,h.manualPlay=!1,h.pause()):(h.manualPause=!1,h.manualPlay=!0,h.play())),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(e){"play"===e?h.pausePlay.removeClass(c+"pause").addClass(c+"play").html(h.vars.playText):h.pausePlay.removeClass(c+"play").addClass(c+"pause").html(h.vars.pauseText)}},touch:function(){var i,r,s,o,l,d,e,n,c,u=!1,t=0,a=0,v=0;if(S){g.style.msTouchAction="none",g._gesture=new MSGesture,(g._gesture.target=g).addEventListener("MSPointerDown",function p(e){e.stopPropagation(),h.animating?e.preventDefault():(h.pause(),g._gesture.addPointer(e.pointerId),v=0,o=x?h.h:h.w,d=Number(new Date),s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o)},!1),g._slider=h,g.addEventListener("MSGestureChange",function m(e){e.stopPropagation();var t=e.target._slider;if(!t)return;var a=-e.translationX,n=-e.translationY;if(v+=x?n:a,l=(t.vars.rtl?-1:1)*v,u=x?Math.abs(v)o/2)?t.flexAnimate(n,t.vars.pauseOnAction):w||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=l=r=i=null,v=0},!1)}else e=function(e){h.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(h.pause(),o=x?h.h:h.w,d=Number(new Date),t=e.touches[0].pageX,a=e.touches[0].pageY,s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o,i=x?a:t,r=x?t:a,g.addEventListener("touchmove",n,!1),g.addEventListener("touchend",c,!1))},n=function(e){t=e.touches[0].pageX,a=e.touches[0].pageY,l=x?i-a:(h.vars.rtl?-1:1)*(i-t);(!(u=x?Math.abs(l)o/2)?h.flexAnimate(a,h.vars.pauseOnAction):w||h.flexAnimate(h.currentSlide,h.vars.pauseOnAction,!0)}g.removeEventListener("touchend",c,!1),s=l=r=i=null},g.addEventListener("touchstart",e,!1)},resize:function(){!h.animating&&h.is(":visible")&&(b||h.doMath(),w?p.smoothHeight():b?(h.slides.width(h.computedW),h.update(h.pagingCount),h.setProps()):x?(h.viewport.height(h.h),h.setProps(h.h,"setTotal")):(h.vars.smoothHeight&&p.smoothHeight(),h.newSlides.width(h.computedW),h.setProps(h.computedW,"setTotal")))},smoothHeight:function(e){if(!x||w){var t=w?h:h.viewport;e?t.animate({height:h.slides.eq(h.animatingTo).innerHeight()},e):t.innerHeight(h.slides.eq(h.animatingTo).innerHeight())}},sync:function(e){var t=m(h.vars.sync).data("flexslider"),a=h.animatingTo;switch(e){case"animate":t.flexAnimate(a,h.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=m(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=p.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){p.pauseInvisible.isHidden()?h.startTimeout?clearTimeout(h.startTimeout):h.pause():h.started?h.play():0h.currentSlide?"next":"prev"),v&&1===h.pagingCount&&(h.direction=h.currentItemh.limit&&1!==h.visible?h.limit:l):0===h.currentSlide&&e===h.count-1&&h.vars.animationLoop&&"next"!==h.direction?y?(h.count+h.cloneOffset)*d:0:h.currentSlide===h.last&&0===e&&h.vars.animationLoop&&"prev"!==h.direction?y?0:(h.count+1)*d:y?(h.count-1-e+h.cloneOffset)*d:(e+h.cloneOffset)*d,h.setProps(o,"",h.vars.animationSpeed),h.transitions?(h.vars.animationLoop&&h.atEnd||(h.animating=!1,h.currentSlide=h.animatingTo),h.container.unbind("webkitTransitionEnd transitionend"),h.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(h.ensureAnimationEnd),h.wrapup(d)}),clearTimeout(h.ensureAnimationEnd),h.ensureAnimationEnd=setTimeout(function(){h.wrapup(d)},h.vars.animationSpeed+100)):h.container.animate(h.args,h.vars.animationSpeed,h.vars.easing,function(){h.wrapup(d)})}h.vars.smoothHeight&&p.smoothHeight(h.vars.animationSpeed)}},h.wrapup=function(e){w||b||(0===h.currentSlide&&h.animatingTo===h.last&&h.vars.animationLoop?h.setProps(e,"jumpEnd"):h.currentSlide===h.last&&0===h.animatingTo&&h.vars.animationLoop&&h.setProps(e,"jumpStart")),h.animating=!1,h.currentSlide=h.animatingTo,h.vars.after(h)},h.animateSlides=function(){!h.animating&&a&&h.flexAnimate(h.getTarget("next"))},h.pause=function(){clearInterval(h.animatedSlides),h.animatedSlides=null,h.playing=!1,h.vars.pausePlay&&p.pausePlay.update("play"),h.syncExists&&p.sync("pause")},h.play=function(){h.playing&&clearInterval(h.animatedSlides),h.animatedSlides=h.animatedSlides||setInterval(h.animateSlides,h.vars.slideshowSpeed),h.started=h.playing=!0,h.vars.pausePlay&&p.pausePlay.update("pause"),h.syncExists&&p.sync("play")},h.stop=function(){h.pause(),h.stopped=!0},h.canAdvance=function(e,t){var a=v?h.pagingCount-1:h.last;return!!t||(v&&h.currentItem===h.count-1&&0===e&&"prev"===h.direction||(!v||0!==h.currentItem||e!==h.pagingCount-1||"next"===h.direction)&&((e!==h.currentSlide||v)&&(!!h.vars.animationLoop||(!h.atEnd||0!==h.currentSlide||e!==a||"next"===h.direction)&&(!h.atEnd||h.currentSlide!==a||0!==e||"next"!==h.direction))))},h.getTarget=function(e){return"next"===(h.direction=e)?h.currentSlide===h.last?0:h.currentSlide+1:0===h.currentSlide?h.last:h.currentSlide-1},h.setProps=function(e,t,a){var n,i=(n=e||(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo,function(){if(b)return"setTouch"===t?e:y&&h.animatingTo===h.last?0:y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:h.animatingTo===h.last?h.limit:n;switch(t){case"setTotal":return y?(h.count-1-h.currentSlide+h.cloneOffset)*e:(h.currentSlide+h.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return y?e:h.count*e;case"jumpStart":return y?h.count*e:e;default:return e}}()*(h.vars.rtl?1:-1)+"px");h.transitions&&(i=x?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)",a=a!==undefined?a/1e3+"s":"0s",h.container.css("-"+h.pfx+"-transition-duration",a),h.container.css("transition-duration",a)),h.args[h.prop]=i,(h.transitions||a===undefined)&&h.container.css(h.args),h.container.css("transform",i)},h.setup=function(e){var t,a;w?(h.vars.rtl?h.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):h.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(u?h.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+h.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(h.currentSlide).css({opacity:1,zIndex:2}):0==h.vars.fadeFirstSlide?h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).css({opacity:1}):h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).animate({opacity:1},h.vars.animationSpeed,h.vars.easing)),h.vars.smoothHeight&&p.smoothHeight()):("init"===e&&(h.viewport=m('
    ').css({overflow:"hidden",position:"relative"}).appendTo(h).append(h.container),h.cloneCount=0,h.cloneOffset=0,y&&(a=m.makeArray(h.slides).reverse(),h.slides=m(a),h.container.empty().append(h.slides))),h.vars.animationLoop&&!b&&(h.cloneCount=2,h.cloneOffset=1,"init"!==e&&h.container.find(".clone").remove(),h.container.append(p.uniqueID(h.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(p.uniqueID(h.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),h.newSlides=m(h.vars.selector,h),t=y?h.count-1-h.currentSlide+h.cloneOffset:h.currentSlide+h.cloneOffset,x&&!b?(h.container.height(200*(h.count+h.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){h.newSlides.css({display:"block"}),h.doMath(),h.viewport.height(h.h),h.setProps(t*h.h,"init")},"init"===e?100:0)):(h.container.width(200*(h.count+h.cloneCount)+"%"),h.setProps(t*h.computedW,"init"),setTimeout(function(){h.doMath(),h.vars.rtl?h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"right",display:"block"}):h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"left",display:"block"}),h.vars.smoothHeight&&p.smoothHeight()},"init"===e?100:0)));b||h.slides.removeClass(c+"active-slide").eq(h.currentSlide).addClass(c+"active-slide"),h.vars.init(h)},h.doMath=function(){var e=h.slides.first(),t=h.vars.itemMargin,a=h.vars.minItems,n=h.vars.maxItems;h.w=h.viewport===undefined?h.width():h.viewport.width(),h.isFirefox&&(h.w=h.width()),h.h=e.height(),h.boxPadding=e.outerWidth()-e.width(),b?(h.itemT=h.vars.itemWidth+t,h.itemM=t,h.minW=a?a*h.itemT:h.w,h.maxW=n?n*h.itemT-t:h.w,h.itemW=h.minW>h.w?(h.w-t*(a-1))/a:h.maxWh.w?h.w:h.vars.itemWidth,h.visible=Math.floor(h.w/h.itemW),h.move=0h.w?h.itemW*(h.count-1)+t*(h.count-1):(h.itemW+t)*h.count-h.w-t):(h.itemW=h.w,h.itemM=t,h.pagingCount=h.count,h.last=h.count-1),h.computedW=h.itemW-h.boxPadding,h.computedM=h.itemM},h.update=function(e,t){h.doMath(),b||(eh.controlNav.length?p.controlNav.update("add"):("remove"===t&&!b||h.pagingCounth.last&&(h.currentSlide-=1,h.animatingTo-=1),p.controlNav.update("remove",h.last))),h.vars.directionNav&&p.directionNav.update()},h.addSlide=function(e,t){var a=m(e);h.count+=1,h.last=h.count-1,x&&y?t!==undefined?h.slides.eq(h.count-t).after(a):h.container.prepend(a):t!==undefined?h.slides.eq(t).before(a):h.container.append(a),h.update(t,"add"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.added(h)},h.removeSlide=function(e){var t=isNaN(e)?h.slides.index(m(e)):e;h.count-=1,h.last=h.count-1,isNaN(e)?m(e,h.slides).remove():x&&y?h.slides.eq(h.last).remove():h.slides.eq(e).remove(),h.doMath(),h.update(t,"remove"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.removed(h)},p.init()},m(window).blur(function(e){a=!1}).focus(function(e){a=!0}),m.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},m.fn.flexslider=function(n){if(n===undefined&&(n={}),"object"==typeof n)return this.each(function(){var e=m(this),t=n.selector?n.selector:".slides > li",a=e.find(t);1===a.length&&!1===n.allowOneSlide||0===a.length?(a.fadeIn(400),n.start&&n.start(e)):e.data("flexslider")===undefined&&new m.flexslider(this,n)});var e=m(this).data("flexslider");switch(n){case"play":e.play();break;case"pause":e.pause();break;case"stop":e.stop();break;case"next":e.flexAnimate(e.getTarget("next"),!0);break;case"prev":case"previous":e.flexAnimate(e.getTarget("prev"),!0);break;default:"number"==typeof n&&e.flexAnimate(n,!0)}}}(jQuery); \ No newline at end of file diff --git a/assets/js/frontend/country-select.min.js b/assets/js/frontend/country-select.min.js index 50f6637e597..7fa0e2369a9 100644 --- a/assets/js/frontend/country-select.min.js +++ b/assets/js/frontend/country-select.min.js @@ -1 +1 @@ -jQuery(function(p){if("undefined"==typeof wc_country_select_params)return!1;if(p().selectWoo){var t=function(){p("select.country_select:visible, select.state_select:visible").each(function(){var t=p.extend({placeholder:p(this).attr("data-placeholder")||p(this).attr("placeholder")||"",width:"100%"},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){var e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){var e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});p(this).on("select2:select",function(){p(this).focus()}).selectWoo(t)})};t(),p(document.body).bind("country_to_state_changed",function(){t()})}var e=wc_country_select_params.countries.replace(/"/g,'"'),u=p.parseJSON(e),d=".woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-address-fields,.woocommerce-shipping-calculator";p(document.body).on("change refresh","select.country_to_state, input.country_to_state",function(){var t=p(this).closest(d);t.length||(t=p(this).closest(".form-row").parent());var e,n=p(this).val(),o=t.find("#billing_state, #shipping_state, #calc_shipping_state"),c=o.closest("p.form-row"),r=o.attr("name"),a=o.attr("id"),i=o.val(),s=o.attr("placeholder")||o.attr("data-placeholder")||"";if(u[n])if(p.isEmptyObject(u[n]))e=p('').prop("id",a).prop("name",r).prop("placeholder",s).addClass("hidden"),c.hide().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]);else{var _=u[n],l=p('').text(wc_country_select_params.i18n_select_state_text);s||(s=wc_country_select_params.i18n_select_state_text),c.show(),o.is("input")&&(e=p("").prop("id",a).prop("name",r).data("placeholder",s).addClass("state_select"),o.replaceWith(e),o=t.find("#billing_state, #shipping_state, #calc_shipping_state")),o.empty().append(l),p.each(_,function(t){var e=p("").prop("value",t).text(_[t]);o.append(e)}),o.val(i).change(),p(document.body).trigger("country_to_state_changed",[n,t])}else o.is('select, input[type="hidden"]')&&(e=p('').prop("id",a).prop("name",r).prop("placeholder",s).addClass("input-text"),c.show().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]));p(document.body).trigger("country_to_state_changing",[n,t])}),p(document.body).on("wc_address_i18n_ready",function(){p(d).each(function(){var t=p(this).find("#billing_country, #shipping_country, #calc_shipping_country");0!==t.length&&0!==t.val().length&&t.trigger("refresh")})})}); \ No newline at end of file +jQuery(function(p){if("undefined"==typeof wc_country_select_params)return!1;if(p().selectWoo){var t=function(){p("select.country_select:visible, select.state_select:visible").each(function(){var t=p.extend({placeholder:p(this).attr("data-placeholder")||p(this).attr("placeholder")||"",width:"100%"},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){var e=t.input.length-t.maximum;return 1==e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){var e=t.minimum-t.input.length;return 1==e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});p(this).on("select2:select",function(){p(this).focus()}).selectWoo(t)})};t(),p(document.body).bind("country_to_state_changed",function(){t()})}var e=wc_country_select_params.countries.replace(/"/g,'"'),u=p.parseJSON(e),d=".woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-address-fields,.woocommerce-shipping-calculator";p(document.body).on("change refresh","select.country_to_state, input.country_to_state",function(){var t=p(this).closest(d);t.length||(t=p(this).closest(".form-row").parent());var e,n=p(this).val(),o=t.find("#billing_state, #shipping_state, #calc_shipping_state"),c=o.closest("p.form-row"),r=o.attr("name"),a=o.attr("id"),i=o.val(),s=o.attr("placeholder")||o.attr("data-placeholder")||"";if(u[n])if(p.isEmptyObject(u[n]))e=p('').prop("id",a).prop("name",r).prop("placeholder",s).addClass("hidden"),c.hide().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]);else{var _=u[n],l=p('').text(wc_country_select_params.i18n_select_state_text);s||(s=wc_country_select_params.i18n_select_state_text),c.show(),o.is("input")&&(e=p("").prop("id",a).prop("name",r).data("placeholder",s).addClass("state_select"),o.replaceWith(e),o=t.find("#billing_state, #shipping_state, #calc_shipping_state")),o.empty().append(l),p.each(_,function(t){var e=p("").prop("value",t).text(_[t]);o.append(e)}),o.val(i).change(),p(document.body).trigger("country_to_state_changed",[n,t])}else o.is('select, input[type="hidden"]')&&(e=p('').prop("id",a).prop("name",r).prop("placeholder",s).addClass("input-text"),c.show().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]));p(document.body).trigger("country_to_state_changing",[n,t])}),p(document.body).on("wc_address_i18n_ready",function(){p(d).each(function(){var t=p(this).find("#billing_country, #shipping_country, #calc_shipping_country");0!==t.length&&0!==t.val().length&&t.trigger("refresh")})})}); \ No newline at end of file diff --git a/assets/js/frontend/geolocation.min.js b/assets/js/frontend/geolocation.min.js index 2fbee5a8454..0ad1b2356f7 100644 --- a/assets/js/frontend/geolocation.min.js +++ b/assets/js/frontend/geolocation.min.js @@ -1 +1 @@ -jQuery(function(n){var t=window.location.toString(),a=function(){wc_geolocation_params.hash&&n('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var a=n(this),o=a.attr("href"),t=o.split("#");o=0<(o=t[0]).indexOf("?")?o+"&v="+wc_geolocation_params.hash:o+"?v="+wc_geolocation_params.hash,"undefined"!=typeof t[1]&&null!==t[1]&&(o=o+"#"+t[1]),a.attr("href",o)})},o={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(a){var o;a.success&&a.data.hash&&a.data.hash!==wc_geolocation_params.hash&&(o=a.data.hash,t=0');else{var e=a.attr("action");e&&(0');else{var n=a.attr("action");n&&(0\t\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t2\t\t\t\t\t\t\t3\t\t\t\t\t\t\t4\t\t\t\t\t\t\t5\t\t\t\t\t\t\t\t\t\t\t

    ')}).on("click","#respond p.stars a",function(){var t=s(this),e=s(this).closest("#respond").find("#rating"),i=s(this).closest(".stars");return e.val(t.text()),t.siblings("a").removeClass("active"),t.addClass("active"),i.addClass("selected"),!1}).on("click","#respond #submit",function(){var t=s(this).closest("#respond").find("#rating"),e=t.val();if(0 .woocommerce-product-gallery__image",start:function(){e.css("opacity",1)},after:function(t){i.initZoomForTarget(i.$images.eq(t.currentSlide))}},t);e.flexslider(o),s(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",function(){var i=s(this);i&&setTimeout(function(){var t=i.closest(".woocommerce-product-gallery__image").height(),e=i.closest(".flex-viewport");t&&e&&e.height(t)},100)}).each(function(){this.complete&&s(this).trigger("load")})},e.prototype.initZoom=function(){this.initZoomForTarget(this.$images.first())},e.prototype.initZoomForTarget=function(t){if(!this.zoom_enabled)return!1;var i=this.$target.width(),o=!1;if(s(t).each(function(t,e){if(s(e).find("img").data("large_image_width")>i)return!(o=!0)}),o){var e=s.extend({touch:!1},wc_single_product_params.zoom_options);"ontouchstart"in document.documentElement&&(e.on="click"),t.trigger("zoom.destroy"),t.zoom(e),setTimeout(function(){t.find(":hover").length&&t.trigger("mouseover")},100)}},e.prototype.initPhotoswipe=function(){this.zoom_enabled&&0🔍'),this.$target.on("click",".woocommerce-product-gallery__trigger",this.openPhotoswipe),this.$target.on("click",".woocommerce-product-gallery__image a",function(t){t.preventDefault()}),this.flexslider_enabled||this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)):this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)},e.prototype.onResetSlidePosition=function(){this.$target.flexslider(0)},e.prototype.getGalleryItems=function(){var t=this.$images,a=[];return 0\t\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t2\t\t\t\t\t\t\t3\t\t\t\t\t\t\t4\t\t\t\t\t\t\t5\t\t\t\t\t\t\t\t\t\t\t

    ')}).on("click","#respond p.stars a",function(){var t=s(this),e=s(this).closest("#respond").find("#rating"),i=s(this).closest(".stars");return e.val(t.text()),t.siblings("a").removeClass("active"),t.addClass("active"),i.addClass("selected"),!1}).on("click","#respond #submit",function(){var t=s(this).closest("#respond").find("#rating"),e=t.val();if(0 .woocommerce-product-gallery__image",start:function(){e.css("opacity",1)},after:function(t){i.initZoomForTarget(i.$images.eq(t.currentSlide))}},t);e.flexslider(o),s(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",function(){var i=s(this);i&&setTimeout(function(){var t=i.closest(".woocommerce-product-gallery__image").height(),e=i.closest(".flex-viewport");t&&e&&e.height(t)},100)}).each(function(){this.complete&&s(this).trigger("load")})},e.prototype.initZoom=function(){this.initZoomForTarget(this.$images.first())},e.prototype.initZoomForTarget=function(t){if(!this.zoom_enabled)return!1;var i=this.$target.width(),o=!1;if(s(t).each(function(t,e){if(s(e).find("img").data("large_image_width")>i)return!(o=!0)}),o){var e=s.extend({touch:!1},wc_single_product_params.zoom_options);"ontouchstart"in document.documentElement&&(e.on="click"),t.trigger("zoom.destroy"),t.zoom(e),setTimeout(function(){t.find(":hover").length&&t.trigger("mouseover")},100)}},e.prototype.initPhotoswipe=function(){this.zoom_enabled&&0🔍'),this.$target.on("click",".woocommerce-product-gallery__trigger",this.openPhotoswipe),this.$target.on("click",".woocommerce-product-gallery__image a",function(t){t.preventDefault()}),this.flexslider_enabled||this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)):this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)},e.prototype.onResetSlidePosition=function(){this.$target.flexslider(0)},e.prototype.getGalleryItems=function(){var t=this.$images,r=[];return 0=0.6.0", diff --git a/readme.txt b/readme.txt index 8517c1326b6..3936b7805f9 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: automattic, mikejolley, jameskoster, claudiosanches, claudiulodro, Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, downloadable, downloads, paypal, storefront, woo commerce Requires at least: 4.7 Tested up to: 5.1 -Stable tag: 3.5.7 +Stable tag: 3.5.8 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html