PageSourceSearch

https://www.sallybeauty.com/on/demandware.static/Sites-SA-Site/-/default/v1790232200049/js/biztalk.js

js sallybeauty.com collected 2026-09-24 17:38:48 UTC 22,739 bytes, 125 lines download raw bytes

vendor: 3,658 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./cartridges/int_biztalk/cartridge/client/default/js/biztalk.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js":
90/*!************************************************************************************************************************************!*\
91  !*** ../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js ***!
92  \************************************************************************************************************************************/
93/*! no static exports found */
94/***/ (function(module, exports, __webpack_require__) {
95
96"use strict";
97eval("\n\n/**\n * Remove all validation. Should be called every time before revalidating form\n * @param {element} form - Form to be cleared\n * @returns {void}\n */\nfunction clearFormErrors(form) {\n    $(form).find('.form-control.is-invalid').removeClass('is-invalid');\n}\n\nmodule.exports = function (formElement, payload) {\n    // clear form validation first\n    clearFormErrors(formElement);\n    $('.alert', formElement).remove();\n\n    if (typeof payload === 'object' && payload.fields) {\n        Object.keys(payload.fields).forEach(function (key) {\n            if (payload.fields[key]) {\n                var feedbackElement = $(formElement).find('[name=\"' + key + '\"]')\n                    .parent()\n                    .children('.invalid-feedback');\n\n                if (feedbackElement.length > 0) {\n                    if (Array.isArray(payload[key])) {\n                        feedbackElement.html(payload.fields[key].join('<br/>'));\n                    } else {\n                        feedbackElement.html(payload.fields[key]);\n                    }\n                    feedbackElement.siblings('.form-control').addClass('is-invalid');\n                }\n            }\n        });\n    }\n    if (payload && payload.error) {\n        var form = $(formElement).prop('tagName') === 'FORM'\n            ? $(formElement)\n            : $(formElement).parents('form');\n\n        form.prepend('<div class=\"alert alert-danger\" role=\"alert\">'\n            + payload.error.join('<br/>') + '</div>');\n    }\n};\n\n\n//# sourceURL=webpack:///../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js?");
98
99/***/ }),
100
101/***/ "../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js":
102/*!***************************************************************************************************************!*\
103  !*** ../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js ***!
104  \***************************************************************************************************************/
105/*! no static exports found */
106/***/ (function(module, exports, __webpack_require__) {
107
108"use strict";
109eval("\n\nmodule.exports = function (include) {\n    if (typeof include === 'function') {\n        include();\n    } else if (typeof include === 'object') {\n        Object.keys(include).forEach(function (key) {\n            if (typeof include[key] === 'function') {\n                include[key]();\n            }\n        });\n    }\n};\n\n\n//# sourceURL=webpack:///../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js?");
110
111/***/ }),
112
113/***/ "./cartridges/int_biztalk/cartridge/client/default/js/biztalk.js":
114/*!***********************************************************************!*\
115  !*** ./cartridges/int_biztalk/cartridge/client/default/js/biztalk.js ***!
116  \***********************************************************************/
117/*! no static exports found */
118/***/ (function(module, exports, __webpack_require__) {
119
120"use strict";
121eval("\n\nvar processInclude = __webpack_require__(/*! base/util */ \"../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js\");\nvar formValidation = __webpack_require__(/*! base/components/formValidation */ \"../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js\");\n\nvar isCheckoutV2 = $('.isCheckoutV2').val();\nfunction showBackdrop() {\n    if ($('#loyalty-error-backdrop').length === 0) {\n        $('body').append('<div id=\"loyalty-error-backdrop\" class=\"loyalty-error-backdrop\"></div>');\n    }\n}\n\nfunction removeBackdrop() {\n    $('#loyalty-error-backdrop').remove();\n}\n\nfunction handleBackdrop() {\n\tif (isCheckoutV2 === 'true') {\n\t\tshowBackdrop();\n\t\tsetTimeout(function () {\n\t\t\t$('.loyalty-alert-message').empty();\n\t\t\tremoveBackdrop();\n\t\t}, 5000);\n\t} else {\n\t\tsetTimeout(function () {\n\t\t\t$('.loyalty-alert-message').empty();\n\t\t}, 5000);\n\t}\n}\n$(document).ready(function () {\n\t//my-account generate barcodes\n\t$('[data-role=\"barcode\"]').each(function(){\n\t\t$(this).barcode($(this).data(\"value\"), $(this).data(\"type\"));\n\t});\n\n\t$('.reward-coupon').each(function () {\n\t\t$(this).barcode($(this).data(\"value\"), $(this).data(\"type\"));\n\t});\n\n\t// cart apply loyalty promotion code\n\t$('.promo-apply-btn-sec button.not-applied').each(function(){\n\t\t$(this).on('click', function (e) {\n\t\t\te.preventDefault();\n\n\t\t\t//clear any rewards errors\n\t\t\tvar $errorContainer = $('.available-rewards__error');\n\t\t\t$errorContainer.empty();\n\t\t\t$errorContainer.removeClass('available-rewards__error--show');\n\t\t\t\n\t\t\tvar loyaltyReward = $(this).data(\"code\");\n\t\t\tvar couponCode = loyaltyReward.split('-')[0];\n\t\t\t$('#couponCode').val(loyaltyReward); \n\t\t\t$('.promo-code-form1 input[name=loyaltyreward]').val(true);\n\t\t\t$('div.promo-code-submit-loyalty button').click();\n\t\t});\n\t});\n\t\n\t//cart remove loyalty promotion code\n\t$('.promo-remove-btn-sec button.remove-applied').each(function(){\n\t\t$(this).on('click', function (e) {\n\t        e.preventDefault();\n\n\t\t\t//get coupon code from remove button\n\t\t\tvar couponCodeRaw = $(this).data('code');\n\t\t\t\n\t\t\t//trigger removal of coupon\n\t\t\tvar $removeButton = $('button.remove-coupon[data-code=\"'+couponCodeRaw+'\"]');\n\t\t\t$removeButton.click();\n\t\t});\n\t});\n\t\n\t//my account - apply reward\n\t$('.apply-reward').each(function(){\t\t\n\t\t$(this).on('click', function (e) {\n\t        e.preventDefault();\n\n\t        var couponCodeRaw = $(this).data('coupon');\n\t        var applied = $(this).data('applied');\n\t        $('#couponCode').val(couponCodeRaw);\n\t        $('#applied').val(applied);\n\t        $('form[name=\"apply-reward-form\"]').submit();\n\t\t});\t\n\t});\n\t\n\t//my account apply reward form\n    $('form[name=\"apply-reward-form\"]').submit(function (e) {\n    \t\n        e.preventDefault();\n        $.spinner().start();\n        \n        $('.applyloyaltyerror').empty();\n        \n        if (!$('#couponCode').val()) {\n            $.spinner().stop();\n            return false;\n        }\n        \n        $.ajax({\n            url: $(this).attr('action'),\n            type: 'GET',\n            dataType: 'json',\n            data: $(this).serialize(),\n            success: function (data) {\
121n                if (data.error) {\n\t\t\t\t\t$('.applyloyaltyerror').empty().addClass('mb-4').append(`<span class=\"df_alert--error-block\"><span>${data.errorMessage}</span></span>`);\n\t\t\t\t\tif(data.callRedeemRewards) {\n\t\t\t\t\t\t// Make additional Ajax call to redeem couponCode\n\t\t\t\t\t\tcallRedeemRewards(couponCode);\n\t\t\t\t\t}\n\t\t\t\t\t$.spinner().stop();\n                } else {\n\t\t\t\t\t//window.location.href = data.successRedirect;\n           \n                /*\n                 * BEGIN LOYALTY - Function call to update the displayed rewards\n                 */\n                updateLoyaltyRewards(data.totals.discounts);\n                /*\n                 * END LOYALTY\n                 */\n                $.spinner().stop();\n                }\n            },\n            error: function (err) {\n                if (err.responseJSON.redirectUrl) {\n                    window.location.href = err.responseJSON.redirectUrl;\n                } else {\n                    if( err.responseJSON && err.responseJSON.errorMessage ) {\n\t\t\t\t\t\t$('.applyloyaltyerror').empty().addClass('mb-4').append(`<span class=\"df_alert--error-block\"><span>${err.responseJSON.errorMessage}</span></span>`);\n                    }\n                    $.spinner().stop();\n                }\n            }\n        });\n        return false;\n    });\n    /**\n     * LOYALTY - re-renders the loyalty rewards in my-account\n     * \n     * @param data\n     */\n    function updateLoyaltyRewards(data) {\n    \t\n    \tvar appliedCoupons = {};\n    \t\n    \t//generate current applied coupons object\n    \tdata.forEach(function(item) {\n    \t\tif(item.type == 'coupon' && item.applied) {\n    \t\t\t//need code and UUID\n    \t\t\tappliedCoupons[item.couponCode] = item.UUID;\n    \t\t\t\n    \t\t}\n    \t});\n    \t\n            //loop all rewards\n    \t\t$(\".item\").each(function(e) {\n    \t\t\tvar $parentDiv=$(this).find('.rewards__circle');\n                var $applyCTA = $parentDiv.find('.promo-apply-btn-sec');\n                var $applyCTAButton = $applyCTA.find('button');\n                var $removeCTA = $parentDiv.find('.promo-remove-btn-sec');\n                var $removeCTAButton = $removeCTA.find('button');\n                var couponCodeRaw = $applyCTAButton.data('coupon');\n                $removeCTAButton.data( \"uuid\",appliedCoupons[couponCodeRaw]);\n    \t\t\t//if promo is not applied then show the apply button and hide the remove\n    \t\t\tif(!appliedCoupons.hasOwnProperty(couponCodeRaw)) {\n    \t\t        $applyCTA.removeClass('d-none');\n                    $removeCTA.addClass('d-none');\n    \t\t\t} else {\n    \t\t        $applyCTA.addClass('d-none');\n                    $removeCTA.removeClass('d-none');\n    \t\t\t}\n    \t\t});\n\t\n    }\n\n\tfunction callRedeemRewards(couponCode) {\n        var updateMissedRewards = $('.update-missing-rewards').data('url');\n        $.ajax({\n            url: updateMissedRewards,\n            method: 'POST',\n            dataType: 'json',\n            data: {\n                couponCode: couponCode\n                }
121,\n            success: function (data) {\n                // do nothing, quietly exit\n            }\n        });\n    }\n    \n    $('.remove-coupon-dashboard').on('click', function (e) {\n        e.preventDefault();\n\n        var couponCode = $(this).data('code');\n        var uuid = $(this).data('uuid');\n        var $deleteConfirmBtn = $('.remove-coupon-confirmation-btn');\n        var $productToRemoveSpan = $('.coupon-to-remove');\n        $('.applyloyaltyerror').empty();\n        $deleteConfirmBtn.data('uuid', uuid);\n        $deleteConfirmBtn.data('code', couponCode);\n\n        $productToRemoveSpan.empty().append(couponCode);\n\n    });\n    $('body').on('click', '.remove-coupon-confirmation-btn', function (e) {\n        e.preventDefault();\n        var url = $(this).data('action');\n        var uuid = $(this).data('uuid');\n        var couponCode = $(this).data('code');\n        var urlParams = {\n            code: couponCode,\n            uuid: uuid\n        };\n\n        url = appendToUrl(url, urlParams);\n\n        $('body > .modal-backdrop').remove();\n\n        $.spinner().start();\n        $.ajax({\n            url: url,\n            type: 'get',\n            dataType: 'json',\n            success: function (data) {\
121n                /*\n                 * BEGIN LOYALTY - Function call to update the displayed rewards\n                 */\n                updateLoyaltyRewards(data.totals.discounts);\n                /*\n                 * END LOYALTY\n                 */\n                $.spinner().stop();\n            },\n            error: function (err) {\n                \t$.spinner().stop();\n                    window.location.href = err.responseJSON.redirectUrl;\n            }\n        });\n\t});\n\n    $('.addloyalty-profile-form').submit(function (e) {\n        e.preventDefault();\n        $.spinner().start();\n        \n        $('.loyalty-alert-message').empty();\n\t\tvar isCheckoutV2 = $('.isCheckoutV2').val();\n        \n        var $form = $(this);\n\n        $('.addloyalty-profile-form .form-control.is-invalid').removeClass('is-invalid');\n         // event tracking for GA4 new create account after placed the order\n\t\t var joinRewards = $('.addloyalty-profile-form input.custom-control-input').is(':checked').toString();\n\t\ttry {\n\t\t\tif (window.dataLayer != null) {\n\t\t\t\tif (isCheckoutV2 === 'true') {\n\t\t\t\t\twindow.dataLayer.push({\n\t\t\t\t\t\tevent: 'vsu_complete',\n\t\t\t\t\t\tjoin_rewards: joinRewards,\n\t\t\t\t\t\temail_subscriber: 'false',\n\t\t\t\t\t\ttext_subscriber: 'false'\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twindow.dataLayer.push({\n\t\t\t\t\t\tevent: 'vsu_complete',\n\t\t\t\t\t\tjoin_rewards: joinRewards\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.log('Error in create account GTM push after placing the order (biztalk.js, line 236):', e);\n\t\t}\n\n        $.ajax({\n            url: $form.attr('action'),\n            type: 'GET',\n            dataType: 'json',\n            data: $form.serialize(),\n            success: function (data) {\
121n                if (!data.success) {\n                \tif(data.errorMessage) {\n\t                \t$('.loyalty-alert-message').append(\n\t\t                        '<div class=\"alert alert-danger df_alert--error-block loyalty-message-alert text-center\" role=\"alert\">'\n\t\t                        + data.errorMessage\n\t\t                        + '</div>'\n\t\t                );\n                \t\thandleBackdrop();\n\t                } \n                \tif(data.fields) {\n                \t\tformValidation($form, data);\n                \t}\n                \t\n                \t//refresh recaptcha\n                \tif (typeof grecaptcha !== \"undefined\") {\n                \t\tgrecaptcha.reset();\n                \t}\n                \t\n                } else {\n                \twindow.location.href = data.redirectUrl;\n                }\n                $.spinner().stop();\n            },\n            error: function (err) {\n\t\t\t\tvar errorClass = 'alert alert-danger loyalty-message-alert text-center';\n\t\t\t\tif (isCheckoutV2 === 'true') {\n\t\t\t\t\terrorClass = 'df_alert--error-block alert-error loyalty-message-alert text-center';\n\t\t\t\t}\n                $('.loyalty-alert-message').append(\n                        '<div class=\"' + errorClass + '\" role=\"alert\">'\n                        + 'Error creating a Loyalty Rewards profile. Please try again later.'\n                        + '</div>'\n                );\n                $.spinner().stop();\n                \n                //refresh recaptcha\n                if (typeof grecaptcha !== \"undefined\") {\n                \tgrecaptcha.reset();\n                }\n                handleBackdrop();\n            }\n        });\n        return false;\n    });\n\n    $('.addloyalty-profile-link').each(function() {\n    \t$(this).on('click', function (e) {\n    \n\t        e.preventDefault();\n\t        $.spinner().start();\n\t        \n\t        $('.loyalty-alert-message').empty();\n\t        \n\t        $.ajax({\n\t            url: $(this).data('action'),\n\t            type: 'GET',\n\t            dataType: 'json',\n\t            success: function (data) {\
121n\t                if (data.error) {\n\t                \t$('.loyalty-alert-message').append(\n\t\t                        '<div class=\"alert alert-danger loyalty-message-alert text-center\" role=\"alert\">'\n\t\t                        + data.errorMessage\n\t\t                        + '</div>'\n\t\t                );\n\t                } else {\n\t                \twindow.location.href = data.redirectUrl;\n\t                }\n\t                $.spinner().stop();\n\t                \n\t                setTimeout(function () {\n\t                    $('.loyalty-alert-message').empty();\n\t                }, 5000);\n\t            },\n\t            error: function (err) {\n\t                $('.loyalty-alert-message').append(\n\t                        '<div class=\"alert alert-danger loyalty-message-alert text-center\" role=\"alert\">'\n\t                        + 'Error creating a Loyalty Rewards profile. Please try again later.'\n\t                        + '</div>'\n\t                );\n\t                $.spinner().stop();\n\t                \n\t                setTimeout(function () {\n\t                    $('.loyalty-alert-message').empty();\n\t                }, 5000);\n\t            }\n\t        });\n\t        return false;\n    \t});\n    });\n    \n    $('.verifyloyalty-profile-link').each(function() {\n    \t$(this).on('click', function (e) {\n    \n\t        e.preventDefault();\n\t        $.spinner().start();\n\t        \n\t        $('.loyalty-alert-message').empty();\n\t        \n\t        $.ajax({\n\t            url: $(this).data('action'),\n\t            type: 'GET',\n\t            dataType: 'json',\n\t            success: function (data) {\
121n\n\t                var messageType;\n\t\t\t\t\tif (data.error) {\n\t\t\t\t\t\tmessageType = \"alert alert-danger \";\n\t\t\t\t\t\tvar message = data.errorMessage;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmessageType = \"alert alert-success \";\n\t\t\t\t\t\tvar message = \"Please check your spam mail if you have not received a verification email.\";\n\t\t\t\t\t}\n\t\t\t\t\tif (isCheckoutV2 === 'true') {\n\t\t\t\t\t\tif (data.error) {\n\t\t\t\t\t\t\tmessageType = \"df_alert--error-block\";\n\t\t\t\t\t\t\tvar message = data.errorMessage;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessageType = \"df_alert--success-block\";\n\t\t\t\t\t\t\tvar message = \"Please check your spam mail if you have not received a verification email.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t                $('.loyalty-alert-message').append(\n\t                        '<div class=\"' + messageType + '\" role=\"alert\">'\n\t                        + message\n\t                        + '</div>'\n\t                );\n\n\t                $.spinner().stop();\n                \thandleBackdrop();\n\t            },\n\t            error: function (err) {\n\t                $('.loyalty-alert-message').append(\n\t                        '<div class=\"df_alert--error-block alert alert-danger loyalty-message-alert text-center\" role=\"alert\">'\n\t                        + 'Error generating a profile verification email.'\n\t                        + '</div>'\n\t                );\n\t                \n\t                $.spinner().stop();\n\t                handleBackdrop();\n\t            }\n\t        });\n\t        return false;\n    \t});\n    });\n});\n\n//# sourceURL=webpack:///./cartridges/int_biztalk/cartridge/client/default/js/biztalk.js?");
122
123/***/ })
123
124
125/******/ });

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.