PageSourceSearch

https://gatekeeperpress.com/wp-content/plugins/gs-product-configur…?ver=fa27359eeeec86f82494

js gatekeeperpress.com collected 2026-10-02 07:50:32 UTC 16,363 bytes, 2 lines download raw bytes

1(()=>{"use strict";var t={n:i=>{var o=i&&i.__esModule?()=>i.default:()=>i;return t.d(o,{a:o}),o},d:(i,o)=>{for(var n in o)t.o(o,n)&&!t.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:o[n]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i)};const i=window.jQuery;var o=t.n(i),n=function(t,i,o){if(o||2===arguments.length)for(var n,e=0,a=i.length;e<a;e++)!n&&e in i||(n||(n=Array.prototype.slice.call(i,0,e)),n[e]=i[e]);return t.concat(n||Array.prototype.slice.call(i))};window.gform.addAction("gform_frontend_pages_evaluated",(function(t,i,o){window["gspc_gfpcl_".concat(i)]=o}));var e=function(){function t(t){var i=this;this.quantityDivSelector="div.quantity",this.addToCartSelector='button[name="add-to-cart"], button[class*="add_to_cart_button"]',this.variationsSelector="table.variations",this.onVariationChange=function(t,o){i.updateProductPrice(o.display_price),i.$formEl.find('[name="input_gspc_variation_id"]').val(o.variation_id),i._variationId=o.variation_id},this.isValidMatchVariation=function(t,o,n){if("number"==typeof n.fieldId&&(n.fieldId=""+n.fieldId),0!==n.fieldId.indexOf("gspc_product_variation_"))return t;var e=n.fieldId.replace("gspc_product_variation_",""),a=i.$formEl.find('select[data-attribute_name="attribute_'.concat(e,'"]'));return window.gf_matches_operation(a.val(),n.value,n.operator)},this.getQuantityInput=function(){var t=i.$formEl.find("input.qty");return t.length?t:i.$formEl.find(".gspc__mapped-quantity").hasClass("gfield--type-product")?i.$formEl.find('.gspc__mapped-quantity input[id^="ginput_quantity_"]'):i.$formEl.find(".gspc__mapped-quantity input").first()},this.isValidMatchQuantity=function(t,o,n){return"gspc_quantity"!==n.fieldId?t:window.gf_matches_operation(i.getQuantityInput().val(),n.value,n.operator)};var n=null===window||void 0===window?void 0:window["gs_product_configurator_".concat(t.formId)];if(n)return this.gfPageConditionalLogic=void 0,n.bindFormEventsGFPL(),void n.bindFormEventsGPPT();Object.assign(this,t),this.canEditForms&&this.showAdminAlerts(),this.bindGlobalEvents(),this.bindProductImageEvents(),this.bindWCBookingsEvents(),this.bindAddToCartClick(),this.isAjax&&(this.cacheFormAttributes(),this.cacheQuantityDiv(),this.cacheAddToCart(),this.cacheVariations(),this.cacheWcpaFields()),this.gfPageConditionalLogic=null===window||void 0===window?void 0:window["gspc_gfpcl_".concat(this.formId)],this.$formEl.find(".gform_page").length<=1||(this.isAjax?(this.bindEventsAJAX(),this.bindFormEventsGPPT()):this.setCurrentPage(parseInt(o()("#gform_source_page_number_".concat(this.formId)).val(),10)),this.bindFormEventsGFPL(),this.updateUI())}return Object.defineProperty(t.prototype,"$formEl",{get:function(){return o()("#gform_".concat(this.formId))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$currentPage",{get:function(){return o()("#gform_page_".concat(this.formId,"_").concat(this.currentPage))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$formFooter",{get:function(){return this.$currentPage.length?this.$currentPage.find(".gform_page_footer"):this.$formEl.find(".gform_footer")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"productId",{get:function(){if(this._productId)return this._productId;var t=this.$formEl.find(this.addToCartSelector);if(t.val())return this._productId=parseInt(t.val(),10),this._productId;var i=this.$formEl.find('input[name="add-to-cart"]');if(i.length)return this._productId=parseInt(i.val(),10),this._productId;var o=this.$formEl.find('input[name="input_gspc_product_id"]');return o.length?(this._productId=parseInt(o.val(),10),this._productId):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variationId",{get:function(){if(this._variationId)return this._variationId;var t=this.$formEl.find('input[name="variation_id"]');if(t.length)return this._variationId=parseInt(t.val(),10),this._variationId;var i=this.$formEl.find('input[name="input_gspc_variation_id"]');return i.length?(this._variationId=parseInt(i.val(),10),this._variationId):null},enumerable:!1,configurable:!0}),t.prototype.showAdminAlerts=function(){"booking"===this.productType&&this.$formEl.find(".gform_page").length>1&&(console.error("GS Product Configurator: The form with ID ".concat(this.formId,' is a multi-page form and the product type is "booking". When navigating a multi-page form, the selected booking time is lost.')),window.alert("(Onl
1y visible to admins)\n\nGS Product Configurator: The form with ID ".concat(this.formId,' is a multi-page form and the product type is "booking". When navigating a multi-page form, the selected booking time is lost.')))},t.prototype.bindGlobalEvents=function(){var t=this;window.gform.addFilter("gform_spinner_target_elem",(function(i,o){if(o!==t.formId)return i;var n=t.$formEl.find('[name="add-to-cart"]:visible');return n.length?n:i}),50,"gspc_set_spinner_target"),window.gform.addFilter("gform_abort_conditional_logic_do_action",(function(i,o,n,e,a,r,d){return parseInt(d)===t.formId&&n==="#gform_submit_button_".concat(t.formId)&&(window.do_callback=null),i})),window.gform.addAction("gform_post_conditional_logic_field_action",(function(i,o,n,e,a){parseInt(i)===t.formId&&n==="#gform_submit_button_".concat(t.formId)&&("show"===o?t.$formEl.removeClass("gspc__form--submit-conditionally-hidden"):"hide"===o&&t.$formEl.addClass("gspc__form--submit-conditionally-hidden"))})),this.bindEventsAJAX(),window.gform.addFilter("gform_is_value_match",this.isValidMatchVariation),window.gform.addFilter("gform_is_value_match",this.isValidMatchQuantity),this.$formEl.on("change","select[data-attribute_name]",(function(i){var n,e=o()(null==i?void 0:i.currentTarget).data("attribute_name").replace("attribute_",""),a=t.getConditionalLogicDependents("gspc_product_variation_".concat(e));null===(n=null===window||void 0===window?void 0:window.gf_apply_rules)||void 0===n||n.call(window,t.formId,a)})),this.getQuantityInput().on("change keyup",(function(i){var o,n=t.getConditionalLogicDependents("gspc_quantity");null===(o=null===window||void 0===window?void 0:window.gf_apply_rules)||void 0===o||o.call(window,t.formId,n)})),this.$formEl.on("found_variation",this.onVariationChange),this.$formEl.on("reset_data",(function(i){var e,a=[];t.$formEl.find("select[data-attribute_name]").each((function(i,e){var r=o()(e).data("attribute_name").replace("attribute_","");a=n(n([],a,!0),t.getConditionalLogicDependents("gspc_product_variation_".concat(r)),!0)})),null===(e=null===window||void 0===window?void 0:window.gf_apply_rules)||void 0===e||e.call(window,t.formId,a),t.$formEl.find('[name="input_gspc_variation_id"]').val(""),t.updateProductPrice(t.$formEl.find('[name="gspc_product_price"]').val())})),window.gform.addFilter("gppa_submit_button",(function(t,i){return t.add(i.find('button[name="add-to-cart"]'))}))},t.prototype.updateProductPrice=function(t){var i=this.$formEl.find("#ginput_base_price_".concat(this.formId,"_").concat(this.productBasePriceFieldId));if(i.length){var o=new window.Currency(window.gf_global.gf_currency_config).toMoney(t,!0);o!==i.val()&&i.val(o).trigger("change"),window.gformCalculateTotalPrice(this.formId)}},t.prototype.getConditionalLogicDependents=function(t){var i,o,n,e=null===(i=null===window||void 0===window?void 0:window.gf_form_conditional_logic)||void 0===i?void 0:i[this.formId];if(!e)return[];for(var a=[],r=0,d=Object.entries(e.logic);r<d.length;r++){var s=d[r],c=s[0],l=s[1];if(l.field||l.nextButton)for(var f=0,u=[null===(o=l.field)||void 0===o?void 0:o.rules,null===(n=l.nextButton)||void 0===n?void 0:n.rules].filter(Boolean);f<u.length;f++)for(var g=0,h=u[f];g<h.length;g++){var p=h[g];if("function"==typeof t){if(!t(p.fieldId))continue}else if(p.fieldId!==t)continue;a.push(c)}}return a},t.prototype.bindEventsAJAX=function(){var t=this;o()(document).on("gform_page_loaded gform_post_render",(function(i,o,n){o==t.formId&&(t.cacheWcpaFields(),t.setCurrentPage(parseInt(n)),t.updateUI(),t.restoreWcpaFields())}))},t.prototype.cacheWcpaFields=function(){var t=this,i=this.$formEl.find(".wc-pao-addon-container, .wc-pao-addon");i.length&&(this._wcpaFieldsHtml=i.parent().html(),this._wcpaFieldsValues={},i.find("input, select, textarea").each((function(i,n){var e=o()(n);t._wcpaFieldsValues[e.attr("name")]=e.val()})))},t.prototype.restoreWcpaFields=function(){var t=this;if(this._wcpaFieldsHtml){var i=this.$formEl.find(".gform_page, .gform_body").first();i.length&&0===i.find(".wc-pao-addon-container, .wc-pao-addon").length&&i.prepend(this._wcpaFieldsHtml),this._wcpaFieldsValues&&Object.entries(this._wcpaFieldsValues).forEac
1h((function(i){var o=i[0],n=i[1];t.$formEl.find('[name="'.concat(o,'"]')).val(n)})),"function"==typeof window.wc_product_addons_init&&window.wc_product_addons_init()}},t.prototype.bindFormEventsGFPL=function(){var t,i,o=this;window.gform.addAction("gform_frontend_pages_evaluated",(function(t,i,n){i===o.formId&&(void 0===o.gfPageConditionalLogic&&(o.gfPageConditionalLogic=n),o.updateUI())})),null===(i=null===(t=null===window||void 0===window?void 0:window.gform)||void 0===t?void 0:t.state)||void 0===i||i.watch(this.formId,["pagination/pages"],(function(t,i,n){o.setPageState(n[i].value),o.updateUI()}))},t.prototype.swapProductImageUsingChoice=function(t){if(!o()(t).closest(".gfield").is(":hidden")){var i=o()(t).attr("data-gspc-product-image");this.swapProductImage(i,o()(t).closest(".product"))}},t.prototype.swapProductImage=function(t,i){if(t){var n=i.find(".images"),e=i.find(".flex-control-nav").find("li:eq(0) img"),a=n.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),r=a.find(".wp-post-image"),d=a.find("a").eq(0);r.data("original-image")||r.data("original-image",r.attr("src"));var s=new Image;s.src=t,s.onload=function(){var i=s.width,c=s.height;r.removeAttr("height"),r.removeAttr("width"),r.attr("srcset",t),r.removeAttr("sizes"),r.removeAttr("title"),r.removeAttr("data-caption"),r.removeAttr("alt"),r.attr("data-src",t),r.attr("data-large_image",t),r.attr("data-large_image_width",i),r.attr("data-large_image_height",c),a.attr("data-thumb",t),e.attr("src",t),d.attr("href",t),window.setTimeout((function(){o()(window).trigger("resize"),n.trigger("woocommerce_gallery_init_zoom")}),20)}}},t.prototype.bindProductImageEvents=function(){var t=this,i=this;o()("[data-gspc-product-image]").each((function(){(o()(this).is(":selected")||o()(this).is(":checked"))&&i.swapProductImageUsingChoice(this)})),o()(".gspc__form-wrapper").on("change",'input[type="radio"]',(function(){o()(this).is("[data-gspc-product-image]")&&i.swapProductImageUsingChoice(this)})),o()(".gspc__form-wrapper").on("change","select",(function(){var t=o()(this).find(":selected");t.is("[data-gspc-product-image]")&&i.swapProductImageUsingChoice(t)})),window.gform.addAction("gform_post_conditional_logic_field_action",(function(n,e,a,r,d){if(parseInt(n)===t.formId){var s=o()(a);if("hide"!==e){var c=s.find("[data-gspc-product-image]");c.length&&c.each((function(){if(o()(this).is(":selected")||o()(this).is(":checked"))return i.swapProductImageUsingChoice(this),!1}))}else{var l=s.closest(".product");t.swapProductImage(l.find(".wp-post-image").data("original-image"),l)}}}))},t.prototype.bindWCBookingsEvents=function(){var t=this;this.syncWCBookingsPrice(),o()(document).on("wc_booking_form_changed",(function(i,o){t.syncWCBookingsPrice()}))},t.prototype.syncWCBookingsPrice=function(){var t=this.$formEl.closest(".product").find(".wc-bookings-booking-cost .woocommerce-Price-amount");if(t.length){var i=new window.Currency(window.gf_global.gf_currency_config);this.updateProductPrice(i.toNumber(t.text()))}},t.prototype.bindFormEventsGPPT=function(){var t=this;this.$formEl.on("softValidationPageLoad.gppt",(function(i,o,n,e){var a=null===window||void 0===window?void 0:window["GPPageTransitions_".concat(t.formId)],r=(null==a?void 0:a.getCurrentPageRealIndex())+1;t.setCurrentPage(r),t.updateUI()}))},t.prototype.setCurrentPage=function(t){this.currentPage=t},t.prototype.getPageCount=function(){var t;return null!==(t=this.$formEl.find(".gform_page").length)&&void 0!==t?t:1},t.prototype.setPageState=function(t){this.pageState=t},t.prototype.isOnLastVisiblePage=function(){var t,i=this.gfPageConditionalLogic,o=null===window||void 0===window?void 0:window["GPPageTransitions_".concat(this.formId)];if(o)return o.isOnLastPage();if(this.pageState)return this.pageState.currentPage===this.pageState.lastPage;if(i){for(var n=0,e=0,a=0,r=i.options.pages;a<r.length;a++){var d=r[a];i.isPageVisible(d)&&(n=e),e++}return(null!==(t=this.currentPage)&&void 0!==t?t:1)-1===n+1}return this.currentPage===this.$formEl.find(".gform_page").length||1===this.currentPage&&0===this.getPageCount()},Object.defineProperty(t.prototype,"$quantityDiv",{get:function(){var t,i,o=this.quantityDivSelector;return this.cacheQuantityDiv(),(null===(t=this.$formEl)||void 0===t?void 0:t.find(o).length)?null===(i=this.$formEl)||void 0===i?void 0:i.find(o):this._$quantityDiv}
1,enumerable:!1,configurable:!0}),t.prototype.cacheQuantityDiv=function(){var t,i=this.quantityDivSelector;this._$quantityDiv&&this._$quantityDiv.length||(this._$quantityDiv=null===(t=this.$formEl)||void 0===t?void 0:t.find(i).clone())},t.prototype.cacheFormAttributes=function(){var t,i;this.formAttributes||(this.formAttributes=null===(i=null===(t=this.$formEl)||void 0===t?void 0:t[0])||void 0===i?void 0:i.attributes)},Object.defineProperty(t.prototype,"$addToCart",{get:function(){var t,i,o=this.addToCartSelector;return this.cacheAddToCart(),(null===(t=this.$formEl)||void 0===t?void 0:t.find(o).length)?null===(i=this.$formEl)||void 0===i?void 0:i.find(o):this._$addToCart},enumerable:!1,configurable:!0}),t.prototype.cacheAddToCart=function(){var t;this._$addToCart&&this._$addToCart.length||(this._$addToCart=null===(t=this.$formEl)||void 0===t?void 0:t.find(this.addToCartSelector).clone())},Object.defineProperty(t.prototype,"$variations",{get:function(){var t,i,o=this.variationsSelector;return this.cacheVariations(),(null===(t=this.$formEl)||void 0===t?void 0:t.find(o).length)?null===(i=this.$formEl)||void 0===i?void 0:i.find(o):this._$variations},enumerable:!1,configurable:!0}),t.prototype.cacheVariations=function(){if(!this.variationId){var t=this.$formEl.find('input[name="variation_id"]').val();t&&(this._variationId=parseInt(t,10))}this._$variations&&this._$variations.length||(this._$variations=this.$formEl.find(this.variationsSelector))},t.prototype.updateUI=function(){if(1!==this.getPageCount()||this.isAjax){this.cacheFormAttributes(),this.$formEl.off("found_variation",this.onVariationChange),this.$formEl.on("found_variation",this.onVariationChange);var t=this,i=t.$currentPage,n=t.$formFooter,e=t.$quantityDiv,a=t.$addToCart,r=t.$variations,d=this.$formEl.find("#gform_submit_button_".concat(this.formId));if(this.$formEl.addClass("cart"),this.formAttributes)for(var s=0,c=this.formAttributes;s<c.length;s++){var l=c[s];"action"!==l.name&&this.$formEl.attr(l.name,l.value)}r.length&&0===this.$formEl.find(this.variationsSelector).length&&(r.prependTo(this.$formEl),o()(".variations_form").each((function(){o()(this).wc_variation_form()}))),d.addClass("gspc__submit--hidden"),this.$formEl.find(".gspc--is-last-page").removeClass("gspc--is-last-page"),this.bindAddToCartClick(),this.$formEl.find('button[name="add-to-cart"]').each((function(){0===o()(this).closest(".gspc--is-last-page").length&&(o()(this).prev(".quantity").remove(),o()(this).remove())})),this.isOnLastVisiblePage()&&(e.appendTo(n).show(),a.appendTo(n).show(),i.addClass("gspc--is-last-page")),this.$formEl.find('input[type="hidden"][name="add-to-cart"]').remove(),(this.$formFooter.length?this.$formFooter:this.$formEl).append('<input type="hidden" name="add-to-cart" value="'.concat(this.productId,'" class="gspc-add-to-cart-hidden">')),this.variationId&&0===this.$formEl.find('input[name="variation_id"]').length&&this.$formEl.append('<input type="hidden" name="variation_id" value="'.concat(this.variationId,'">'))}},t.prototype.bindAddToCartClick=function(){this.$addToCart.off("click.gspcHandleButtonClick"),this.$addToCart.on("click.gspcHandleButtonClick",(function(){var t,i;null===(i=null===(t=window.gform)||void 0===t?void 0:t.submission)||void 0===i||i.handleButtonClick(this)}))},t}();window.GSProductConfigurator=e})();
2//# sourceMappingURL=gs-product-configurator.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.