1require.config({"config": { 2 "jsbuild":{"Magento_Customer/js/customer-data.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'underscore',\n 'ko',\n 'Magento_Customer/js/section-config',\n 'mage/url',\n 'mage/storage',\n 'jquery/jquery-storageapi'\n], function ($, _, ko, sectionConfig, url) {\n 'use strict';\n\n var options = {},\n storage,\n storageInvalidation,\n invalidateCacheBySessionTimeOut,\n invalidateCacheByCloseCookieSession,\n dataProvider,\n buffer,\n customerData,\n deferred = $.Deferred();\n\n url.setBaseUrl(window.BASE_URL);\n options.sectionLoadUrl = url.build('customer/section/load');\n\n /**\n * @param {Object} invalidateOptions\n */\n invalidateCacheBySessionTimeOut = function (invalidateOptions) {\n var date;\n\n if (new Date($.localStorage.get('mage-cache-timeout')) < new Date()) {\n storage.removeAll();\n }\n date = new Date(Date.now() + parseInt(invalidateOptions.cookieLifeTime, 10) * 1000);\n $.localStorage.set('mage-cache-timeout', date);\n };\n\n /**\n * Invalidate Cache By Close Cookie Session\n */\n invalidateCacheByCloseCookieSession = function () {\n if (!$.cookieStorage.isSet('mage-cache-sessid')) {\n storage.removeAll();\n }\n\n $.cookieStorage.set('mage-cache-sessid', true);\n };\n\n dataProvider = {\n\n /**\n * @param {Object} sectionNames\n * @return {Object}\n */\n getFromStorage: function (sectionNames) {\n var result = {};\n\n _.each(sectionNames, function (sectionName) {\n result[sectionName] = storage.get(sectionName);\n });\n\n return result;\n },\n\n /**\n * @param {Object} sectionNames\n * @param {Boolean} forceNewSectionTimestamp\n * @return {*}\n */\n getFromServer: function (sectionNames, forceNewSectionTimestamp) {\n var parameters;\n\n sectionNames = sectionConfig.filterClientSideSections(sectionNames);\n parameters = _.isArray(sectionNames) && sectionNames.indexOf('*') < 0 ? {\n sections: sectionNames.join(',')\n } : [];\n parameters['force_new_section_timestamp'] = forceNewSectionTimestamp;\n\n return $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) {\n throw new Error(jqXHR);\n });\n }\n };\n\n /**\n * @param {Function} target\n * @param {String} sectionName\n * @return {*}\n */\n ko.extenders.disposableCustomerData = function (target, sectionName) {\n var sectionDataIds, newSectionDataIds = {};\n\n target.subscribe(function () {\n setTimeout(function () {\n storage.remove(sectionName);\n sectionDataIds = $.cookieStorage.get('section_data_ids') || {};\n _.each(sectionDataIds, function (data, name) {\n if (name !== sectionName) {\n newSectionDataIds[name] = data;\n }\n });\n $.cookieStorage.set('section_data_ids', newSectionDataIds);\n }, 3000);\n });\n\n return target;\n };\n\n buffer = {\n data: {},\n\n /**\n * @param {String} sectionName\n */\n bind: function (sectionName) {\n this.data[sectionName] = ko.observable({});\n },\n\n /**\n * @param {String} sectionName\n * @return {Object}\n */\n get: function (sectionName) {\n if (!this.data[sectionName]) {\n this.bind(sectionName);\n }\n\n return this.data[sectionName];\n },\n\n /**\n * @return {Array}\n */\n keys: function () {\n return _.keys(this.data);\n },\n\n /**\n * @param {String} sectionName\n * @param {Object} sectionData\n */\n notify: function (sectionName, sectionData) {\
2n if (!this.data[sectionName]) {\n this.bind(sectionName);\n }\n this.data[sectionName](sectionData);\n },\n\n /**\n * @param {Object} sections\n */\n update: function (sections) {\n var sectionId = 0,\n sectionDataIds = $.cookieStorage.get('section_data_ids') || {};\n\n _.each(sections, function (sectionData, sectionName) {\n sectionId = sectionData['data_id'];\n sectionDataIds[sectionName] = sectionId;\n storage.set(sectionName, sectionData);\n storageInvalidation.remove(sectionName);\n buffer.notify(sectionName, sectionData);\n });\n $.cookieStorage.set('section_data_ids', sectionDataIds);\n },\n\n /**\n * @param {Object} sections\n */\n remove: function (sections) {\n _.each(sections, function (sectionName) {\n storage.remove(sectionName);\n\n if (!sectionConfig.isClientSideSection(sectionName)) {\n storageInvalidation.set(sectionName, true);\n }\n });\n }\n };\n\n customerData = {\n\n /**\n * Customer data initialization\n */\n init: function () {\n var expiredSectionNames = this.getExpiredSectionNames();\n\n if (expiredSectionNames.length > 0) {\n _.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) {\n buffer.notify(sectionName, sectionData);\n });\n this.reload(expiredSectionNames, false);\n } else {\n _.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) {\n buffer.notify(sectionName, sectionData);\n });\n\n if (!_.isEmpty(storageInvalidation.keys())) {\n this.reload(storageInvalidation.keys(), false);\n }\n }\n\n if (!_.isEmpty($.cookieStorage.get('section_data_clean'))) {\n this.reload(sectionConfig.getSectionNames(), true);\n $.cookieStorage.set('section_data_clean', '');\n }\n },\n\n /**\n * Storage init\n */\n initStorage: function () {\n $.cookieStorage.setConf({\n path: '/',\n expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000)\n });\n storage = $.initNamespaceStorage('mage-cache-storage').localStorage;\n storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage;\n },\n\n /**\n * Retrieve the list of sections that has expired since last page reload.\n *\n * Sections can expire due to lifetime constraints or due to inconsistent storage information\n * (validated by cookie data).\n *\n * @return {Array}\n */\n getExpiredSectionNames: function () {\n var expiredSectionNames = [],\n cookieSectionTimestamps = $.cookieStorage.get('section_data_ids') || {},\n sectionLifetime = options.expirableSectionLifetime * 60,\n currentTimestamp = Math.floor(Date.now() / 1000),\n sectionData;\n\n // process sections that can expire due to lifetime constraints\n _.each(options.expirableSectionNames, function (sectionName) {\n sectionData = storage.get(sectionName);\n\n if (typeof sectionData === 'object' && sectionData['data_id'] + sectionLifetime <= currentTimestamp) {\n expiredSectionNames.push(sectionName);\n }\n });\n\n // process sections that can expire due to storage information inconsistency\n _.each(cookieSectionTimestamps, function (cookieSectionTimestamp, sectionName) {\n sectionData = storage.get(sectionName);\n\n if (typeof sectionData === 'undefined' ||\n typeof sectionData === 'object' &&\n cookieSectionTimestamp !== sectionData['data_id']\n ) {\n expiredSectionNames.push(sectionName);\n }\n });\n\n //remove expired section names of previously installed/enable modules\n expiredSectionNames = _.intersection(expiredSectionNames, sectionConfig.getSectionNames());\n\n return _.uniq(expiredSectionNames);\n },\n\n /**\n * Check if some sections have to be reloaded.\n *\n * @deprecated Use getExpiredSectionNames instead.\n *\n * @return {Boolean}\n */\n needReload: function () {\n var expiredSectionNames = this.getExpiredSectionNames();\n\n return expiredSectionNames.length > 0;\n },\n\n /**\n * Retrieve the list of expired keys.\n *\n * @deprecated Use getExpiredSectionNames instead.\n *\n * @return {Array}\n */\n getExpiredKeys: function () {\n return this.getExpiredSectionNames();\n },\n\n /**\n * @param {String} sectionName\n * @return {*}\n */\n get: function (sectionName) {\n return buffer.get(sectionName);\n },\n\n /**\n * @param {String} sectionName\n * @param {Object} sectionData\n */\n set: function (sectionName, sectionData) {\
2n var data = {};\n\n data[sectionName] = sectionData;\n buffer.update(data);\n },\n\n /**\n * Avoid using this function directly 'cause of possible performance drawbacks.\n * Each customer section reload brings new non-cached ajax request.\n *\n * @param {Array} sectionNames\n * @param {Boolean} forceNewSectionTimestamp\n * @return {*}\n */\n reload: function (sectionNames, forceNewSectionTimestamp) {\n return dataProvider.getFromServer(sectionNames, forceNewSectionTimestamp).done(function (sections) {\n $(document).trigger('customer-data-reload', [sectionNames]);\n buffer.update(sections);\n });\n },\n\n /**\n * @param {Array} sectionNames\n */\n invalidate: function (sectionNames) {\n var sectionDataIds,\n sectionsNamesForInvalidation;\n\n sectionsNamesForInvalidation = _.contains(sectionNames, '*') ? sectionConfig.getSectionNames() :\n sectionNames;\n\n $(document).trigger('customer-data-invalidate', [sectionsNamesForInvalidation]);\n buffer.remove(sectionsNamesForInvalidation);\n sectionDataIds = $.cookieStorage.get('section_data_ids') || {};\n\n // Invalidate section in cookie (increase version of section with 1000)\n _.each(sectionsNamesForInvalidation, function (sectionName) {\n if (!sectionConfig.isClientSideSection(sectionName)) {\n sectionDataIds[sectionName] += 1000;\n }\n });\n $.cookieStorage.set('section_data_ids', sectionDataIds);\n },\n\n /**\n * Checks if customer data is initialized.\n *\n * @returns {jQuery.Deferred}\n */\n getInitCustomerData: function () {\n return deferred.promise();\n },\n\n /**\n * Reload sections on ajax complete\n *\n * @param {Object} jsonResponse\n * @param {Object} settings\n */\n onAjaxComplete: function (jsonResponse, settings) {\n var sections,\n redirects;\n\n if (settings.type.match(/post|put|delete/i)) {\n sections = sectionConfig.getAffectedSections(settings.url);\n\n if (sections && sections.length) {\n this.invalidate(sections);\n redirects = ['redirect', 'backUrl'];\n\n if (_.isObject(jsonResponse) && !_.isEmpty(_.pick(jsonResponse, redirects))) { //eslint-disable-line\n return;\n }\n this.reload(sections, true);\n }\n }\n },\n\n /**\n * @param {Object} settings\n * @constructor\n */\n 'Magento_Customer/js/customer-data': function (settings) {\n options = settings;\n customerData.initStorage();\n invalidateCacheBySessionTimeOut(settings);\n invalidateCacheByCloseCookieSession();\n customerData.init();\n deferred.resolve();\n }\n };\n\n /**\n * Events listener\n */\n $(document).on('ajaxComplete', function (event, xhr, settings) {\n customerData.onAjaxComplete(xhr.responseJSON, settings);\n });\n\n /**\n * Events listener\n */\n $(document).on('submit', function (event) {\n var sections;\n\n if (event.target.method.match(/post|put|delete/i)) {\n sections = sectionConfig.getAffectedSections(event.target.action);\n\n if (sections) {\n customerData.invalidate(sections);\n }\n }\n });\n\n return customerData;\n});\n","Magento_Customer/js/customer-global-session-loader.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Customer/js/customer-data'\n], function ($, customerData) {\n 'use strict';\n\n return function () {\n var customer;\n\n // When the session is available, this customer menu will be available\n if ($('.customer-menu').length > 0) {\n customer = customerData.get('customer');\n\n customerData.getInitCustomerData().done(function () {\n // Check if the customer data is set in local storage, if not reload data from server\n if (!customer().firstname) {\n customerData.reload([], false);\n }\n });\n }\n };\n});\n","Magento_Customer/js/invalidation-processor.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'underscore',\n 'uiElement',\n 'Magento_Customer/js/customer-data'\n], function (_, Element, customerData) {\n 'use strict';\n\n return Element.extend({\n /**\n * Initialize object\n */\n initialize: function () {\n this._super();\n this.process(customerData);\n },\n\n /**\n * Process all rules in loop, each rule can invali
2date some sections in customer data\n *\n * @param {Object} customerDataObject\n */\n process: function (customerDataObject) {\n _.each(this.invalidationRules, function (rule, ruleName) {\n _.each(rule, function (ruleArgs, rulePath) {\n require([rulePath], function (Rule) {\n var currentRule = new Rule(ruleArgs);\n\n if (!_.isFunction(currentRule.process)) {\n throw new Error('Rule ' + ruleName + ' should implement invalidationProcessor interface');\n }\n currentRule.process(customerDataObject);\n });\n });\n });\n }\n });\n});\n","Magento_Customer/js/logout-redirect.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/mage'\n], function ($) {\n 'use strict';\n\n return function (data) {\
2n $($.mage.redirect(data.url, 'assign', 5000));\n };\n});\n","Magento_Customer/js/password-strength-indicator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Customer/js/zxcvbn',\n 'mage/translate',\n 'mage/validation'\n], function ($, zxcvbn, $t) {\n 'use strict';\n\n $.widget('mage.passwordStrengthIndicator', {\n options: {\n cache: {},\n passwordSelector: '[type=password]',\n passwordStrengthMeterSelector: '[data-role=password-strength-meter]',\n passwordStrengthMeterLabelSelector: '[data-role=password-strength-meter-label]',\n formSelector: 'form',\n emailSelector: 'input[type=\"email\"]'\n },\n\n /**\n * Widget initialization\n * @private\n */\n _create: function () {\n this.options.cache.input = $(this.options.passwordSelector, this.element);\n this.options.cache.meter = $(this.options.passwordStrengthMeterSelector, this.element);\n this.options.cache.label = $(this.options.passwordStrengthMeterLabelSelector, this.element);\n\n // We need to look outside the module for backward compatibility, since someone can already use the module.\n // @todo Narrow this selector in 2.3 so it doesn't accidentally finds the email field from the\n // newsletter email field or any other \"email\" field.\n this.options.cache.email = $(this.options.formSelector).find(this.options.emailSelector);\n this._bind();\n },\n\n /**\n * Event binding, will monitor change, keyup and paste events.\n * @private\n */\n _bind: function () {\n this._on(this.options.cache.input, {\n 'change': this._calculateStrength,\n 'keyup': this._calculateStrength,\n 'paste': this._calculateStrength\n });\n\n if (this.options.cache.email.length) {\n this._on(this.options.cache.email, {\n 'change': this._calculateStrength,\n 'keyup': this._calculateStrength,\n 'paste': this._calculateStrength\n });\n }\n },\n\n /**\n * Calculate password strength\n * @private\n */\n _calculateStrength: function () {\n var password = this._getPassword(),\n isEmpty = password.length === 0,\n zxcvbnScore,\n displayScore,\n isValid;\n\n // Display score is based on combination of whether password is empty, valid, and zxcvbn strength\n if (isEmpty) {\n displayScore = 0;\n } else {\n this.options.cache.input.rules('add', {\n 'password-not-equal-to-user-name': this.options.cache.email.val()\n });\n\n // We should only perform this check in case there is an email field on screen\n if (this.options.cache.email.length &&\n password.toLowerCase() === this.options.cache.email.val().toLowerCase()) {\n displayScore = 1;\n } else {\n isValid = $.validator.validateSingleElement(this.options.cache.input);\n zxcvbnScore = zxcvbn(password).score;\n displayScore = isValid && zxcvbnScore > 0 ? zxcvbnScore : 1;\n }\n }\n\n // Update label\n this._displayStrength(displayScore);\n },\n\n /**\n * Display strength\n * @param {Number} displayScore\n * @private\n */\n _displayStrength: function (displayScore) {\n var strengthLabel = '',\n className;\n\n switch (displayScore) {\n case 0:\n strengthLabel = $t('No Password');\n className = 'password-none';\n break;\n\n case 1:\n strengthLabel = $t('Weak');\n className = 'password-weak';\n break;\n\n case 2:\n strengthLabel = $t('Medium');\n className = 'password-medium';\n break;\n\n case 3:\n strengthLabel = $t('Strong');\n className = 'password-strong';\n break;\n\n case 4:\n strengthLabel = $t('Ver
2y Strong');\n className = 'password-very-strong';\n break;\n }\n\n this.options.cache.meter\n .removeClass()\n .addClass(className);\n this.options.cache.label.text(strengthLabel);\n },\n\n /**\n * Get password value\n * @returns {*}\n * @private\n */\n _getPassword: function () {\n return this.options.cache.input.val();\n }\n });\n\n return $.mage.passwordStrengthIndicator;\n});\n","Magento_Customer/js/section-config.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(['underscore'], function (_) {\n 'use strict';\n\n var baseUrls = [],\n sections = [],\n clientSideSections = [],\n sectionNames = [],\n canonize;\n\n /**\n * @param {String} url\n * @return {String}\n */\n canonize = function (url) {\n var route = url;\n\n _.some(baseUrls, function (baseUrl) {\n route = url.replace(baseUrl, '');\n\n return route !== url;\n });\n\n return route.replace(/^\\/?index.php\\/?/, '').toLowerCase();\n };\n\n return {\n /**\n * Returns a list of sections which should be invalidated for given URL.\n * @param {String} url - URL which was requested.\n * @return {Object} - List of sections to invalidate.\n */\n getAffectedSections: function (url) {\n var route = canonize(url),\n actions = _.find(sections, function (val, section) {\n var matched;\n\n // Covers the case where \"*\" works as a glob pattern.\n if (section.indexOf('*') >= 0) {\n section = section.replace(/\\*/g, '[^/]+') + '$';\n matched = route.match(section);\n\n return matched && matched[0] === route;\n }\n\n return route.indexOf(section) === 0;\n });\n\n return _.union(_.toArray(actions), sections['*']);\n },\n\n /**\n * Filters the list of given sections to the ones defined as client side.\n * @param {Object} allSections - List of sections to check.\n * @return {Object} - List of filtered sections.\n */\n filterClientSideSections: function (allSections) {\n return _.difference(allSections, clientSideSections);\n },\n\n /**\n * Tells if section is defined as client side.\n * @param {String} sectionName - Name of the section to check.\n * @return {Boolean}\n */\n isClientSideSection: function (sectionName) {\n return _.contains(clientSideSections, sectionName);\n },\n\n /**\n * Returns array of section names.\n * @returns {Array}\n */\n getSectionNames: function () {\n return sectionNames;\n },\n\n /**\n * @param {Object} options\n * @constructor\n */\n 'Magento_Customer/js/section-config': function (options) {\n baseUrls = options.baseUrls;\n sections = options.sections;\n clientSideSections = options.clientSideSections;\n sectionNames = options.sectionNames;\n }\n };\n});\n","Magento_Customer/js/show-password.js":"/**\n* Copyright \u00a9 Magento, Inc. All rights reserved.\n* See COPYING.txt for license details.\n*/\n\ndefine([\n 'jquery',\n 'uiComponent'\n], function ($, Component) {\n 'use strict';\n\n return Component.extend({\n passwordSelector: '',\n passwordInputType: 'password',\n textInputType: 'text',\n\n defaults: {\n template: 'Magento_Customer/show-password',\n isPasswordVisible: false\n },\n\n /**\n * @return {Object}\n */\n initObservable: function () {\n this._super()\n .observe(['isPasswordVisible']);\n\n this.isPasswordVisible.subscribe(function (isChecked) {\n this._showPassword(isChecked);\n }.bind(this));\n\n return this;\n },\n\n /**\n * Show/Hide password\n * @private\n */\n _showPassword: function (isChecked) {\n $(this.passwordSelector).attr('type',\n isChecked ? this.textInputType : this.passwordInputType\n );\n }\n });\n});\n","Magento_Customer/js/validation.js":"define([\n 'jquery',\n 'moment',\n 'mageUtils',\n 'jquery/validate',\n 'validation',\n 'mage/translate'\n], function ($, moment, utils) {\n 'use strict';\n\n $.validator.addMethod(\n 'validate-date',\n function (value, element, params) {\n var dateFormat = utils.normalizeDate(params.dateFormat);\n\n if (value === '') {\n return true;\n }\n\n return moment(value, dateFormat, true).isValid();\n },\n $.mage.__('Invalid date')\n );\n\n $.validator.addMethod(\n 'validate-dob',\n function (value, element, params) {\n var dateFormat = utils.convertToMomentFormat(params.dateFormat);\n\n if (value === '') {\n return true;\n }\n\n return moment(value, dateFormat).isBefore(moment());\n },\n $.mage.__('The Date of Birth should not be greater than today.')\n );\n});\n","Magento_Customer/js/action/check-email-availability.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'mage/storage',\n 'Magento_Checkout/js/model/url-builder'\n], function (storage, urlBuilder) {\n 'use strict';\n\n return function (deferred, email) {\n return storage.post(\n urlBuilder.createUrl('/customers/isEmailAvailable', {}),\n JSON.stringify({\n customerEmail: email\n }),\n false\n ).done(function (isEmailAvailable) {\n if (isEmailAvailable) {\n deferred.resolve();\n } else {\n deferred.reject();\n }\n }).fail(function () {\n deferred.reject();\n });\n };\n});\n","Magento_Customer/js/action/login.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/storage',\n 'Magento_Ui/js/model/messageList',\n 'Magento_Customer/js/customer-data',\n 'mage/translate'\n], function ($, storage, globalMessageList, customerData, $t) {\n 'use strict';\n\n var callbacks = [],\n\n /**\n * @param {Object} loginData\n * @param {String} redirectUrl\n * @param {*} isGlobal\n * @param {Object} messageContainer\n */\n action = function (loginData, redirectUrl, isGlobal, messageContainer) {\n messageContainer = messageContainer || globalMessageList;\n let customerLoginUrl = 'customer/ajax/login';\n\n if (loginData.customerLoginUrl) {\n customerLoginUrl = loginData.customerLoginUrl;\n delete loginData.customerLoginUrl;\n }\n \n return storage.post(\n customerLoginUrl,\n JSON.stringify(loginData),\n isGlobal\n ).done(function (response) {\n if (response.errors) {\n messageContainer.addErrorMessage(response);\n callbacks.forEach(function (callback) {\n callback(loginData);\n });\n } else {\n callbacks.forEach(function (callback) {\n callback(loginData);\n });\n customerData.invalidate(['customer']);\n\n if($('body').hasClass('checkout-index-index')){\n\n $('body').trigger('processStart');\n var loader = $('body').find('.loading-mask').find('p');\n if(customerLoginUrl.indexOf('login') != -1 ){\n loader.closest('div').addClass('redirecting');\n loader.text('Please wait, we are redirecting you.');\n }\n\n }\n\n if (response.redirectUrl) {\n window.location.href = response.redirectUrl;\n } else if (redirectUrl) {\n window.location.href = redirectUrl;\n } else {\n location.reload();\n }\n }\n }).fail(function () {\n messageContainer.addErrorMessage({\n 'message': $t('Could not authenticate. Please try again later')\n });\n callbacks.forEach(function (callback) {\n callback(loginData);\n });\n });\n };\n\n /**\n * @param {Function} callback\n */\n action.registerLoginCallback = function (callback) {\n callbacks.push(callback);\n };\n\n return action;\n});\n","Magento_Customer/js/invalidation-rules/website-rule.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'uiClass'\n], function (Element) {\n 'use strict';\n\n return Element.extend({\n\n defaults: {\n scopeConfig: {}\n },\n\n /**\n * Takes website id from current customer data and compare it with current website id\n * If customer belongs to another scope, we need to invali
2date current section\n *\n * @param {Object} customerData\n */\n process: function (customerData) {\n var customer = customerData.get('customer');\n\n if (this.scopeConfig && customer() &&\n ~~customer().websiteId !== ~~this.scopeConfig.websiteId && ~~customer().websiteId !== 0) {\n customerData.reload(['customer']);\n }\n }\n });\n});\n","Magento_Customer/js/model/address-list.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'ko',\n './customer-addresses'\n], function (ko, defaultProvider) {\n 'use strict';\n\n return ko.observableArray(defaultProvider.getAddressItems());\n});\n","Magento_Customer/js/model/authentication-popup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/modal/modal'\n], function ($, modal) {\n 'use strict';\n\n return {\n modalWindow: null,\n\n /**\n * Create popUp window for provided element\n *\n * @param {HTMLElement} element\n */\n createPopUp: function (element) {\n var options = {\n 'type': 'popup',\n 'modalClass': 'popup-authentication',\n 'focus': '[name=username]',\n 'responsive': true,\n 'innerScroll': true,\n 'trigger': '.proceed-to-checkout',\n 'buttons': []\n };\n\n this.modalWindow = element;\n modal(options, $(this.modalWindow));\n },\n\n /** Show login popup window */\n showModal: function () {\n $(this.modalWindow).modal('openModal').trigger('contentUpdated');\n }\n };\n});\n","Magento_Customer/js/model/customer-addresses.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'ko',\n './customer/address'\n], function ($, ko, Address) {\n 'use strict';\n\n var isLoggedIn = ko.observable(window.isCustomerLoggedIn);\n\n return {\n /**\n * @return {Array}\n */\n getAddressItems: function () {\n var items = [],\n customerData = window.customerData;\n\n if (isLoggedIn()) {\n if (Object.keys(customerData).length) {\n $.each(customerData.addresses, function (key, item) {\n items.push(new Address(item));\n });\n }\n }\n\n return items;\n }\n };\n});\n","Magento_Customer/js/model/customer.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'ko',\n 'underscore',\n './address-list'\n], function ($, ko, _, addressList) {\n 'use strict';\n\n var isLoggedIn = ko.observable(window.isCustomerLoggedIn),\n customerData = {};\n\n if (isLoggedIn()) {\n customerData = window.customerData;\n } else {\n customerData = {};\n }\n\n return {\n customerData: customerData,\n customerDetails: {},\n isLoggedIn: isLoggedIn,\n\n /**\n * @param {Boolean} flag\n */\n setIsLoggedIn: function (flag) {\n isLoggedIn(flag);\n },\n\n /**\n * @return {Array}\n */\n getBillingAddressList: function () {\n return addressList();\n },\n\n /**\n * @return {Array}\n */\n getShippingAddressList: function () {\n return addressList();\n },\n\n /**\n * @param {String} fieldName\n * @param {*} value\n */\n setDetails: function (fieldName, value) {\n if (fieldName) {\n this.customerDetails[fieldName] = value;\n }\n },\n\n /**\n * @param {String} fieldName\n * @return {*}\n */\n getDetails: function (fieldName) {\n if (fieldName) {\n if (this.customerDetails.hasOwnProperty(fieldName)) {\
2n return this.customerDetails[fieldName];\n }\n\n return undefined;\n }\n\n return this.customerDetails;\n },\n\n /**\n * @param {Array} address\n * @return {Number}\n */\n addCustomerAddress: function (address) {\n var fields = [\n 'customer_id', 'country_id', 'street', 'company', 'telephone', 'fax', 'postcode', 'city',\n 'firstname', 'lastname', 'middlename', 'prefix', 'suffix', 'vat_id', 'default_billing',\n 'default_shipping'\n ],\n customerAddress = {},\n hasAddress = 0,\n existingAddress;\n\n if (!this.customerData.addresses) {\n this.customerData.addresses = [];\n }\n\n customerAddress = _.pick(address, fields);\n\n if (address.hasOwnProperty('region_id')) {\n customerAddress.region = {\n 'region_id': address['region_id'],\n region: address.region\n };\n }\n\n for (existingAddress in this.customerData.addresses) {\n if (this.customerData.addresses.hasOwnProperty(existingAddress)) {\n if (_.isEqual(this.customerData.addresses[existingAddress], customerAddress)) { //eslint-disable-line\n hasAddress = existingAddress;\n break;\n }\n }\n }\n\n if (hasAddress === 0) {\n return this.customerData.addresses.push(customerAddress) - 1;\n }\n\n return hasAddress;\n },\n\n /**\n * @param {*} addressId\n * @return {Boolean}\n */\n setAddressAsDefaultBilling: function (addressId) {\n if (this.customerData.addresses[addressId]) {\n this.customerData.addresses[addressId]['default_billing'] = 1;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * @param {*} addressId\n * @return {Boolean}\n */\n setAddressAsDefaultShipping: function (addressId) {\n if (this.customerData.addresses[addressId]) {\n this.customerData.addresses[addressId]['default_shipping'] = 1;\n\n return true;\n }\n\n return false;\n }\n };\n});\n","Magento_Customer/js/model/customer/address.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine(['underscore'], function (_) {\n 'use strict';\n\n /**\n * Returns new address object.\n *\n * @param {Object} addressData\n * @return {Object}\n */\n return function (addressData) {\n var regionId;\n\n if (addressData.region['region_id'] && addressData.region['region_id'] !== '0') {\n regionId = addressData.region['region_id'] + '';\n }\n\n return {\n customerAddressId: addressData.id,\n email: addressData.email,\n countryId: addressData['country_id'],\n regionId: regionId,\n regionCode: addressData.region['region_code'],\n region: addressData.region.region,\n customerId: addressData['customer_id'],\n street: addressData.street,\n company: addressData.company,\n telephone: addressData.telephone,\n fax: addressData.fax,\n postcode: addressData.postcode,\n city: addressData.city,\n firstname: addressData.firstname,\n lastname: addressData.lastname,\n middlename: addressData.middlename,\n prefix: addressData.prefix,\n suffix: addressData.suffix,\n vatId: addressData['vat_id'],\n sameAsBilling: addressData['same_as_billing'],\n saveInAddressBook: addressData['save_in_address_book'],\n customAttributes: _.toArray(addressData['custom_attributes']).reverse(),\n\n /**\n * @return {*}\n */\n isDefaultShipping: function () {\n return addressData['default_shipping'];\n },\n\n /**\n * @return {*}\n */\n isDefaultBilling: function () {\n return addressData['default_billing'];\n },\n\n /**\n * @return {*}\n */\n getAddressInline: function () {\n return addressData.inline;\n },\n\n /**\n * @return {String}\n */\n getType: function () {\n return 'customer-address';\n },\n\n /**\n * @return {String}\n */\n getKey: function () {\n return this.getType() + this.customerAddressId;\n },\n\n /**\n * @return {String}\n */\n getCacheKey: function () {\n return this.getKey();\n },\n\n /**\n * @return {Boolean}\n */\n isEditable: function () {\n return false;\n },\n\n /**\n * @return {Boolean}\n */\n canUseForBilling: function () {\n return true;\n }\n };\n };\n});\n","Magento_Customer/js/view/authentication-popup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'ko',\n 'Magento_Ui/js/form/form',\n 'Magento_Customer/js/action/login',\n 'Magento_Customer/js/customer-data',\n 'Magento_Customer/js/model/authentication-popup',\n 'mage/translate',\n 'mage/url',\n 'Magento_Ui/js/modal/alert',\n 'mage/validation'\n], function ($, ko, Component, loginAction, customerData, authenticationPopup, $t, url, alert) {\n 'use strict';\n\n return Component.extend({\n registerUrl: window.authenticationPopup.customerRegisterUrl,\n forgotPasswordUrl: window.authenticationPopup.customerForgotPasswordUrl,\n autocomplete: window.authenticationPopup.autocomplete,\n modalWindow: null,\n isLoading: ko.observable(false),\n\n defaults: {\n template: 'Magento_Customer/authentication-popup'\n },\n\n /**\n * Init\n */\n initialize: function () {\n var self = this;\n\n this._super();\n url.setBaseUrl(window.authenticationPopup.baseUrl);\n loginAction.registerLoginCallback(function () {\n self.isLoading(false);\n });\n },\n\n /** Init popup login window */\n setModalElement: function (element) {\n if (authenticationPopup.modalWindow == null) {\n authenticationPopup.createPopUp(element);\n }\n },\n\n /** Is login form enabled for current customer */\n isActive: function () {\n var customer = customerData.get('customer');\n\n return customer() == false; //eslint-disable-line eqeqeq\n },\n\n /** Show login popup window */\n showModal: function () {\n if (this.modalWindow) {\
2n $(this.modalWindow).modal('openModal');\n } else {\n alert({\n content: $t('Guest checkout is disabled.')\n });\n }\n },\n\n /**\n * Provide login action\n *\n * @return {Boolean}\n */\n login: function (formUiElement, event) {\n var loginData = {},\n formElement = $(event.currentTarget),\n formDataArray = formElement.serializeArray();\n\n event.stopPropagation();\n formDataArray.forEach(function (entry) {\n loginData[entry.name] = entry.value;\n });\n loginData['customerLoginUrl'] = window.authenticationPopup.customerLoginUrl;\n if (formElement.validation() &&\n formElement.validation('isValid')\n ) {\n this.isLoading(true);\n loginAction(loginData);\n }\n\n return false;\n }\n });\n});\n","Magento_Customer/js/view/customer.js":"/**\n* Copyright \u00a9 Magento, Inc. All rights reserved.\n* See COPYING.txt for license details.\n*/\n\ndefine([\n 'uiComponent',\n 'Magento_Customer/js/customer-data'\n], function (Component, customerData) {\n 'use strict';\n\n return Component.extend({\n /** @inheritdoc */\n initialize: function () {\n this._super();\n\n this.customer = customerData.get('customer');\n }\n });\n});\n","Magento_Directory/js/region-updater.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/template',\n 'underscore',\n 'jquery-ui-modules/widget',\n 'mage/validation'\n], function ($, mageTemplate, _) {\n 'use strict';\n\n $.widget('mage.directoryRegionUpdater', {\n options: {\n regionTemplate:\n '<option value=\"<%- data.value %>\" <% if (data.isSelected) { %>selected=\"selected\"<% } %>>' +\n '<%- data.title %>' +\n '</option>',\n isRegionRequired: true,\n isZipRequired: true,\n isCountryRequired: true,\n currentRegion: null,\n isMultipleCountriesAllowed: true\n },\n\n /**\n *\n * @private\n */\n _create: function () {\n this._initCountryElement();\n\n this.currentRegionOption = this.options.currentRegion;\n this.regionTmpl = mageTemplate(this.options.regionTemplate);\n\n this._updateRegion(this.element.find('option:selected').val());\n\n $(this.options.regionListId).on('change', $.proxy(function (e) {\n this.setOption = false;\n this.currentRegionOption = $(e.target).val();\n }, this));\n\n $(this.options.regionInputId).on('focusout', $.proxy(function () {\n this.setOption = true;\n }, this));\n },\n\n /**\n *\n * @private\n */\n _initCountryElement: function () {\n\n if (this.options.isMultipleCountriesAllowed) {\n this.element.parents('div.field').show();\n this.element.on('change', $.proxy(function (e) {\n // clear region inputs on country change\n $(this.options.regionListId).val('');\n $(this.options.regionInputId).val('');\n this._updateRegion($(e.target).val());\n }, this));\n\n if (this.options.isCountryRequired) {\n this.element.addClass('required-entry');\n this.element.parents('div.field').addClass('required');\n }\n } else {\n this.element.parents('div.field').hide();\n }\n },\n\n /**\n * Remove options from dropdown list\n *\n * @param {Object} selectElement - jQuery object for dropdown list\n * @private\n */\n _removeSelectOptions: function (selectElement) {\n selectElement.find('option').each(function (index) {\n if (index) {\n $(this).remove();\n }\n });\n }
2,\n\n /**\n * Render dropdown list\n * @param {Object} selectElement - jQuery object for dropdown list\n * @param {String} key - region code\n * @param {Object} value - region object\n * @private\n */\n _renderSelectOption: function (selectElement, key, value) {\n selectElement.append($.proxy(function () {\n var name = value.name.replace(/[!\"#$%&'()*+,.\\/:;<=>?@[\\\\\\]^`{|}~]/g, '\\\\$&'),\n tmplData,\n tmpl;\n\n if (value.code && $(name).is('span')) {\n key = value.code;\n value.name = $(name).text();\n }\n\n tmplData = {\n value: key,\n title: value.name,\n isSelected: false\n };\n\n if (this.options.defaultRegion === key) {\n tmplData.isSelected = true;\n }\n\n tmpl = this.regionTmpl({\n data: tmplData\n });\n\n return $(tmpl);\n }, this));\n },\n\n /**\n * Takes clearError callback function as first option\n * If no form is passed as option, look up the closest form and call clearError method.\n * @private\n */\n _clearError: function () {\n var args = ['clearError', this.options.regionListId, this.options.regionInputId, this.options.postcodeId];\n\n if (this.options.clearError && typeof this.options.clearError === 'function') {\n this.options.clearError.call(this);\n } else {\n if (!this.options.form) {\n this.options.form = this.element.closest('form').length ? $(this.element.closest('form')[0]) : null;\n }\n\n this.options.form = $(this.options.form);\n\n this.options.form && this.options.form.data('validator') &&\n this.options.form.validation.apply(this.options.form, _.compact(args));\n\n // Clean up errors on region & zip fix\n $(this.options.regionInputId).removeClass('mage-error').parent().find('[generated]').remove();\n $(this.options.regionListId).removeClass('mage-error').parent().find('[generated]').remove();\n $(this.options.postcodeId).removeClass('mage-error').parent().find('[generated]').remove();\n }\n },\n\n /**\n * Update dropdown list based on the country selected\n *\n * @param {String} country - 2 uppercase letter for country code\n * @private\n */\n _updateRegion: function (country) {\n // Clear validation error messages\n var regionList = $(this.options.regionListId),\n regionInput = $(this.options.regionInputId),\n postcode = $(this.options.postcodeId),\n label = regionList.parent().siblings('label'),\n container = regionList.parents('div.field'),\n regionsEntries,\n regionId,\n regionData;\n\n this._clearError();\n this._checkRegionRequired(country);\n\n // Populate state/province dropdown list if available or use input box\n if (this.options.regionJson[country]) {\n this._removeSelectOptions(regionList);\n regionsEntries = _.pairs(this.options.regionJson[country]);\n $.each(regionsEntries, $.proxy(function (key, value) {\n regionData = value[1];\n regionId = regionData.id;\n this._renderSelectOption(regionList, regionId.toString(), regionData);\n }, this));\n\n if (this.currentRegionOption) {\n regionList.val(this.currentRegionOption);\n }\n\n if (this.setOption) {\n regionList.find('option').filter(function () {\n return this.text === regionInput.val();\n }).attr('selected', true);\n }\n\n if (this.options.isRegionRequired) {\n regionList.addClass('required-entry').removeAttr('disabled');\n container.addClass('required').show();\n } else {\n regionList.removeClass('required-entry validate-select').removeAttr('data-validate');\n container.removeClass('required');\n\n if (!this.options.optionalRegionAllowed) { //eslint-disable-line max-depth\n regionList.hide();\n container.hide();\n } else {\n regionList.removeAttr('disabled').show();\n }\n }\n\n regionList.show();\n regionInput.hide();\n label.attr('for', regionList.attr('id'));\n } else {\n this._removeSelectOptions(regionList);\n\n if (this.options.isRegionRequired) {\n regionInput.addClass('required-entry').removeAttr('disabled');\n container.addClass('required').show();\n } else {\n if (!this.options.optionalRegionAllowed) { //eslint-disable-line max-depth\n regionInput.attr('disabled', 'disabled');\n container.hide();\n }\n container.removeClass('required');\n regionInput.removeClass('required-entry');\n }\n\n regionList.removeClass('required-entry').prop('disabled', 'disabled').hide();\n regionInput.show();\n label.attr('for', regionInput.attr('id'));\n }\n\n // If country is in optionalzip list, make postcode input not required\n if (this.options.isZipRequired) {\n $.inArray(country, this.options.countriesWithOptionalZip) >= 0 ?\n postcode.removeClass('required-entry').closest('.field').removeClass('required') :\n postcode.addClass('required-entry').closest('.field').addClass('required');\n }\n\n // Add defaultvalue attribute to state/province select element\n regionList.attr('defaultvalue', this.options.defaultRegion);\n this.options.form.find('[type=\"submit\"]').removeAttr('disabled').show();\n },\n\n /**\n * Check if the selected country has a mandatory region selection\n *\n * @param {String} country - Code of the country - 2 uppercase letter for country code\n * @private\n */\n _checkReg
2ionRequired: function (country) {\n var self = this;\n\n this.options.isRegionRequired = false;\n $.each(this.options.regionJson.config['regions_required'], function (index, elem) {\n if (elem === country) {\n self.options.isRegionRequired = true;\n }\n });\n }\n });\n\n return $.mage.directoryRegionUpdater;\n});\n","Magento_Theme/js/cookie-status.js":"define([\n 'jquery',\n 'Magento_Ui/js/modal/modal',\n 'mage/translate'\n], function ($, modal) {\n 'use strict';\n\n $.widget('mage.cookieStatus', {\n options: {\n type: 'popup',\n responsive: true,\n innerScroll: true,\n autoOpen: true,\n buttons: [{\n text: $.mage.__('Close'),\n class: 'cookie-status',\n\n /**\n * Callback for click event\n */\n click: function () {\n this.closeModal();\n }\n }]\n },\n\n /**\n * Init object\n * @private\n */\n _init: function () {\n\n if (!navigator.cookieEnabled) {\n modal(this.options, $('#cookie-status'));\n }\n }\n });\n\n return $.mage.cookieStatus;\n});\n","Magento_Theme/js/row-builder.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * JQuery UI Widget declaration: 'mage.rowBuilder'\n *\n * @api\n */\ndefine([\n 'jquery',\n 'mage/template',\n 'jquery-ui-modules/widget'\n], function ($, mageTemplate) {\n 'use strict';\n\n $.widget('mage.rowBuilder', {\n\n /**\n * options with default values for setting up the template\n */\n options: {\n //Default template options\n rowTemplate: '#template-registrant',\n rowContainer: '#registrant-container',\n //Row index used by the template rows.\n rowIndex: 0,\n //Row count: Should not be set externally\n rowCount: 0,\n rowParentElem: '<li></li>',\n rowContainerClass: 'fields',\n addRowBtn: '#add-registrant-button',\n btnRemoveIdPrefix: 'btn-remove',\n btnRemoveSelector: '.btn-remove',\n rowIdPrefix: 'row',\n //This class is added to rows added after the first one. Adds the dotted separator\n additionalRowClass: 'add-row',\n\n /*\n This is provided during widget instantiation. eg :\n formDataPost : {\"formData\":formData,\"templateFields\":['field1-name','field2-name'] }\n -\"formData\" is the multi-dimensional array of form field values : [['a','b'],['c','b']]\n received from the server and encoded\n -\"templateFields\" are the input fields in the template with index suffixed after the field name\n eg field1-name{index}\n */\n formDataPost: null,\n //Default selectors for add element of a template\n addEventSelector: 'button',\n //Default selectors for remove markup elements of a template\n remEventSelector: 'a',\n //This option allows adding first row delete option and a row separator\n hideFirstRowAddSeparator: true,\n //Max rows - This option should be set when instantiating the widget\n maxRows: 1000,\n maxRowsMsg: '#max-registrant-message'\n },\n\n /**\n * Initialize create\n * @private\n */\n _create: function () {\n this.rowTemplate = mageTemplate(this.options.rowTemplate);\n\n this.options.rowCount = this.options.rowIndex = 0;\n\n //On document ready related tasks\n $($.proxy(this.ready, this));\n\n //Binding template-wide events handlers for adding and removing rows\n this.element.on(\n 'click',\n this.options.addEventSelector + this.options.addRowBtn,\n $.proxy(this.handleAdd, this)\n );\n this.element.on(\n 'click',\n this.options.remEventSelector + this.options.btnRemoveSelector,\n $.proxy(this.handleRemove, this)\n );\n },\n\n /**\n * Initialize template\n * @public\n */\n ready: function () {\n if (this.options.formDataPost &&\n this.options.formDataPost.formData &&\n this.options.formDataPost.formData.length\n ) {\n this.processFormDataArr(this.options.formDataPost);\n } else if (this.options.rowIndex === 0 && this.options.maxRows !== 0) {\n //If no form data , then add default row\n this.addRow(0);\n }\n },\n\n /**\n * Process and loop through all row data to create preselected values. This is used for any error on submit.\n * For complex implementations the inheriting widget can override this behavior\n * @public\n * @param {Object} formDataArr\n */\n processFormDataArr: function (formDataArr) {\n var formData = formDataArr.formData,\n templateFields = formDataArr.templateFields,\n formRow,\n i, j;\n\n for (i = this.options.rowIndex = 0; i < formData.length; this.options.rowIndex = i++) {\n this.addRow(i);\n\n formRow = formData[i];\n\n for (j = 0; j < formRow.length;
2 j++) {\n this.setFieldById(templateFields[j] + i, formRow[j]);\n }\n }\n\n },\n\n /**\n * Initialize and create markup for template row. Add it to the parent container.\n * The template processing will substitute row index at all places marked with _index_ in the template\n * using the template\n * @public\n * @param {Number} index - current index/count of the created template. This will be used as the id\n * @return {*}\n */\n addRow: function (index) {\n var row = $(this.options.rowParentElem),\n tmpl;\n\n row.addClass(this.options.rowContainerClass).attr('id', this.options.rowIdPrefix + index);\n\n tmpl = this.rowTemplate({\n data: {\n _index_: index\n }\n });\n\n $(tmpl).appendTo(row);\n\n $(this.options.rowContainer).append(row).trigger('contentUpdated');\n\n row.addClass(this.options.additionalRowClass);\n\n //Remove 'delete' link and additionalRowClass for first row\n if (this.options.rowIndex === 0 && this.options.hideFirstRowAddSeparator) {\n $('#' + this._esc(this.options.btnRemoveIdPrefix) + '0').remove();\n $('#' + this._esc(this.options.rowIdPrefix) + '0').removeClass(this.options.additionalRowClass);\n }\n\n this.maxRowCheck(++this.options.rowCount);\n\n return row;\n },\n\n /**\n * Remove return item information row\n * @public\n * @param {*} rowIndex - return item information row index\n * @return {Boolean}\n */\n removeRow: function (rowIndex) {\n $('#' + this._esc(this.options.rowIdPrefix) + rowIndex).remove();\n this.maxRowCheck(--this.options.rowCount);\n\n return false;\n },\n\n /**\n * Function to check if maximum rows are exceeded and render/hide maxMsg and Add btn\n * @public\n * @param {Number} rowIndex\n */\n maxRowCheck: function (rowIndex) {\n var addRowBtn = $(this.options.addRowBtn),\n maxRowMsg = $(this.options.maxRowsMsg);\n\n //liIndex starts from 0\n if (rowIndex >= this.options.maxRows) {\n addRowBtn.hide();\n maxRowMsg.show();\n } else if (addRowBtn.is(':hidden')) {\n addRowBtn.show();\n maxRowMsg.hide();\n }\n },\n\n /**\n * Set the value on given element\n * @public\n * @param {String} domId\n * @param {String} value\n */\n setFieldById: function (domId, value) {\n var x = $('#' + this._esc(domId));\n\n if (x.length) {\n\n if (x.is(':checkbox')) {\n x.attr('checked', true);\n } else if (x.is('option')) {\n x.attr('selected', 'selected');\n } else {\n x.val(value);\n }\n }\n },\n\n /**\n * Delegated handler for adding a row\n * @public\n * @return {Boolean}\n */\n handleAdd: function () {\n this.addRow(++this.options.rowIndex);\n\n return false;\n },\n\n /**\n * Delegated handler for removing a selected row\n * @public\n * @param {Object} e - Native event object\n * @return {Boolean}\n */\n handleRemove: function (e) {\n this.removeRow($(e.currentTarget).closest('[id^=\"' + this.options.btnRemoveIdPrefix + '\"]')\n .attr('id').replace(this.options.btnRemoveIdPrefix, ''));\n\n return false;\n },\n\n /**\n * Utility function to add escape chars for jquery selector strings\n * @private\n * @param {String} str - String to be processed\n * @return {String}\n */\n _esc: function (str) {\n return str ? str.replace(/([ ;&,.+*~\\':\"!\\^$\\[\\]()=>|\\/@])/g, '\\\\$1') : str;\n }\n });\n\n return $.mage.rowBuilder;\n});\n","Magento_Theme/js/theme.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/smart-keyboard-handler',\n 'mage/mage',\n 'mage/ie-class-fixer',\n 'domReady!'\n], function ($, keyboardHandler) {\n 'use strict';\n\n $('.cart-summary').mage('sticky', {\n container: '#maincontent',\n spacingTop: 65 //height of sticky header in px\n });\n\n //changes\n var mobileAccountLinks = $('.header.content .header.links').first().clone();\n\n var needHelp = $('.top-bar-menu').find('.need-help').parent('li').clone().wrap('<div/>').parent().html();\n var callUs = $('.top-bar-menu').find('.call-us').parent('li').clone().wrap('<div/>').parent().html();\n\n mobileAccountLinks.find('.header.links')\n .append('<!-- added from Magento_Theme/js/theme.js -->')\n .append(needHelp)\n .append(callUs);\n\n mobileAccountLinks.appendTo('#store\\\\.links');\n\n keyboardHandler.apply();\n});\n","Magento_Theme/js/signin-alert.js":"define([\n 'jquery',\n 'mage/url',\n 'Magento_Ui/js/modal/alert',\n 'Magento_Customer/js/model/customer',\n 'enquire',\n 'mage/translate',\n 'jquery-ui-modules/widget'\n], function($, urlBuilder, alert, customer, enquire) {\n \"use strict\";\n $.widget('jerrys.signinAlert', {\n options: {\n signInLoginRegister: '.signin-alert-create-account, .signin-alert-login',\n signInAlertPopup: '.sign-in-alert',\n closeAlert: '.close-alert',\n cookieLiveTime: 0,\n cookieName: 'signinalert',\n cookieEnabled: 0\n },\n\n /** @inheritdoc */\n _create: function () {\n\n $(document).ready(this.initAlertPopup.bind(this));\n $(document).on(\"click\",this.options.signInLoginRegister, this.signInRegister.bind(this));\n $(document).on(\"click\",this.options.closeAlert, this.closeAlertPopup.bind(this));\n },\n\n /**\n * @param {jQuery.Event} event\n * @private\n */\n initAlertPopup: function () {\n var self = this;\n\n enquire.register(\"screen and (max-width: 767px)\", {\n match : function() {\
2n\n if (self.readCookie() != 1 && self.options.cookieEnabled) {\n self.createCookie();\n\n if (!customer.isLoggedIn() && !$('.authorization-link').find('a').hasClass('logged-in')) {\n \n $(self.options.signInAlertPopup).show();\n\n setTimeout(function(){\n \n $(self.options.signInAlertPopup).hide();\n\n }, 10000);\n\n }\n }\n\n },\n unmatch : function() {\n\n self.closeAlertPopup();\n }\n });\n\n },\n\n /**\n * @param {jQuery.Event} event\n * @private\n */\n signInRegister: function (event) {\n event.preventDefault();\n if($(event.target).hasClass('signin-alert-create-account')){\n\n $('.create-account-link').closest('a').click();\n $('a[href=\"#amsl-register-content\"]').click();\n }
2else{\n\n $('.log-in-link').closest('a').click();\n $('a[href=\"#amsl-login-content\"]').click();\n }\n\n },\n\n closeAlertPopup: function(e) {\n\n var self = this;\n $(this.options.signInAlertPopup).hide();\n },\n\n setCookieLiveTime: function(value)\n {\n this.options.cookieLiveTime = value;\n },\n\n createCookie: function() {\n var days = this.options.cookieLiveTime;\n var value = 1;\n var name = this.options.cookieName;\n if (days) {\n var date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n var expires = \"; expires=\"+date.toGMTString();\n }\n else var expires = \"\";\n document.cookie = escape(name)+\"=\"+escape(value)+expires+\"; path=/\";\n },\n\n readCookie: function(name) {\n var name = this.options.cookieName;\n var nameEQ = escape(name) + \"=\";\n var ca = document.cookie.split(';');\n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') c = c.substring(1,c.length);\n if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length,c.length));\n }\n return null;\n }\n\n });\n\n return $.jerrys.signinAlert;\n});","Magento_Theme/js/model/breadcrumb-list.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([], function () {\n 'use strict';\n\n return [];\n});\n","Magento_Theme/js/view/add-home-breadcrumb.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/* eslint-disable max-nested-callbacks, no-undef */\ndefine([\n 'jquery',\n 'Magento_Theme/js/model/breadcrumb-list',\n 'mage/translate'\n], function ($, breadcrumbList) {\n 'use strict';\n\n /**\n * @return {Object}\n */\n var homeCrumb = function () {\n return {\n name: 'home',\n label: $.mage.__('Home'),\n title: $.mage.__('Go to Home Page'),\n link: BASE_URL || ''\n };\n };\n\n return function (breadcrumb) {\n\n breadcrumbList.unshift(homeCrumb());\n\n return breadcrumb;\n };\n});\n","Magento_Theme/js/view/breadcrumbs.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/template',\n 'Magento_Theme/js/model/breadcrumb-list',\n 'text!Magento_Theme/templates/breadcrumbs.html',\n 'jquery-ui-modules/widget'\n], function ($, mageTemplate, breadcrumbList, tpl) {\n 'use strict';\n\n /**\n * Breadcrumb Widget.\n */\n $.widget('mage.breadcrumbs', {\n\n /** @inheritdoc */\n _init: function () {\n this._super();\n this._render();\n },\n\n /**\n * Render breadcrumb.\n *\n * @private\n */\n _render: function () {\n var html,\n crumbs = breadcrumbList,\n template = mageTemplate(tpl);\n\n this._decorate(crumbs);\n\n html = template({\n 'breadcrumbs': crumbs\n });\n\n if (html.length) {\n $(this.element).html(html);\n }\n },\n\n /**\n * Decorate list.\n *\n * @param {Array} list\n * @private\n */\n _decorate: function (list) {\n\n if (list.length) {\n list[0].first = true;\n }\n\n if (list.length > 1) {\n list[list.length - 1].last = true;\n }\n }\n });\n\n return $.mage.breadcrumbs;\n});\n","Magento_Theme/js/view/messages.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'uiComponent',\n 'Magento_Customer/js/customer-data',\n 'underscore',\n 'escaper',\n 'jquery/jquery-storageapi'\n], function ($, Component, customerData, _, escaper) {\n 'use strict';\n\n return Component.extend({\n defaults: {\n cookieMessages: [],\n messages: [],\n allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a']\n },\n\n /**\n * Extends Component object by storage observable messages.\n */\n initialize: function () {\n this._super();\n\n this.cookieMessages = _.unique($.cookieStorage.get('mage-messages'), 'text');\n this.messages = customerData.get('messages').extend({\n disposableCustomerData: 'messages'\n });\n\n // Force to clean obsolete messages\n if (!_.isEmpty(this.messages().messages)) {\n customerData.set('messages', {});\n }\n\n $.mage.cookies.set('mage-messages', '', {\n samesite: 'strict',\n domain: ''\n });\n },\n\n /**\n * Prepare the given message to be rendered as HTML\n *\n * @param {String} message\n * @return {String}\n */\n prepareMessageForHtml: function (message) {\n return escaper.escapeHtml(message, this.allowedTags);\n }\n });\n});
2\n","Magento_Wishlist/js/add-to-wishlist.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'jquery-ui-modules/widget'\n], function ($) {\n 'use strict';\n\n $.widget('mage.addToWishlist', {\n options: {\n bundleInfo: 'div.control [name^=bundle_option]',\n configurableInfo: '.super-attribute-select',\n groupedInfo: '#super-product-table input',\n downloadableInfo: '#downloadable-links-list input',\n customOptionsInfo: '.product-custom-option',\n qtyInfo: '#qty',\n actionElement: '[data-action=\"add-to-wishlist\"]',\n productListWrapper: '.product-item-info',\n productPageWrapper: '.product-info-main'\n },\n\n /** @inheritdoc */\n _create: function () {\n this._bind();\n },\n\n /**\n * @private\n */\n _bind: function () {\n var options = this.options,\n dataUpdateFunc = '_updateWishlistData',\n validateProductQty = '_validateWishlistQty',\n changeCustomOption = 'change ' + options.customOptionsInfo,\n changeQty = 'change ' + options.qtyInfo,\n updateWishlist = 'click ' + options.actionElement,\n events = {},\n key;\n\n if ('productType' in options) {\n if (typeof options.productType === 'string') {\n options.productType = [options.productType];\n }\n } else {\n options.productType = [];\n }\n\n events[changeCustomOption] = dataUpdateFunc;\n events[changeQty] = dataUpdateFunc;\n events[updateWishlist] = validateProductQty;\n\n for (key in options.productType) {\n if (options.productType.hasOwnProperty(key) && options.productType[key] + 'Info' in options) {\n events['change ' + options[options.productType[key] + 'Info']] = dataUpdateFunc;\n }\n }\n this._on(events);\n },\n\n /**\n * @param {jQuery.Event} event\n * @private\n */\n _updateWishlistData: function (event) {\n var dataToAdd = {},\n isFileUploaded = false,\n handleObjSelector = null,\n self = this;\n\n if (event.handleObj.selector == this.options.qtyInfo) { //eslint-disable-line eqeqeq\n this._updateAddToWishlistButton({}, event);\n event.stopPropagation();\n\n return;\n }\n\n handleObjSelector = $(event.currentTarget).closest('form').find(event.handleObj.selector);\n\n handleObjSelector.each(function (index, element) {\n if ($(element).is('input[type=text]') ||\n $(element).is('input[type=email]') ||\n $(element).is('input[type=number]') ||\n $(element).is('input[type=hidden]') ||\n $(element).is('input[type=checkbox]:checked') ||\n $(element).is('input[type=radio]:checked') ||\n $(element).is('textarea') ||\n $('#' + element.id + ' option:selected').length\n ) {\n if ($(element).data('selector') || $(element).attr('name')) {\n dataToAdd = $.extend({}, dataToAdd, self._getElementData(element));\n }\n\n return;\n }\n\n if ($(element).is('input[type=file]') && $(element).val()) {\n isFileUploaded = true;\n }\n });\n\n if (isFileUploaded) {\n this.bindFormSubmit();\n }\n this._updateAddToWishlistButton(dataToAdd, event);\n event.stopPropagation();\n },\n\n /**\n * @param {Object} dataToAdd\n * @param {jQuery.Event} event\n * @private\n */\n _updateAddToWishlistButton: function (dataToAdd, event) {\n var self = this,\n buttons = this._getAddToWishlistButton(event);\n\n buttons.each(function (index, element) {\n var params = $(element).data('post'),\n currentTarget = event.currentTarget,\n targetElement,\n targetValue;\n\n if (!params) {\n params = {\n 'data': {}\n };\n } else if ($(currentTarget).data('selector') || $(currentTarget).attr('name')) {\n targetElement = self._getElementData(currentTarget);\n targetValue = Object.keys(targetElement)[0];\n\n if (params.data.hasOwnProperty(targetValue) && !dataToAdd.hasOwnProperty(targetValue)) {\n delete params.data[targetValue];\n }\n }\n\n params.data = $.extend({}, params.data, dataToAdd, {\n 'qty': $(self.options.qtyInfo).val()\n });\n $(element).data('post', params);\n });\n },\n\n /**\n * @param {jQuery.Event} event\n * @private\n */\n _getAddToWishlistButton: function (event) {\n var productListWrapper = $(event.currentTarget).closest(this.options.productListWrapper);\n\n if (productListWrapper.length) {\n return productListWrapper.find(this.options.actionElement);\n }\n\n return $(this.options.actionElement);\n },\n\n /**\n * @param {Object} array1\n * @param {Object} array2\n * @return {Object}\n * @private\n * @deprecated\n */\n _arrayDiffByKeys: function (array1, array2) {\n var result = {};\n\n $.each(array1, function (key, value) {\n if (key.indexOf('option') === -1) {\n return;\n }\n\n if (!array2[key]) {\n result[key] = value;\n }\n });\n\n return result;\n },\n\n /**\n * @param {HTMLElement} element\n * @return {Object}\n * @private\n */\n _getElementData: function (element) {\n var data, elementName, elementValue;\n\n element = $(element);\n data = {};\n elementName = element.data('selector') ? element.data('selector') : element.attr('name');\n elementValue = element.val();\n\n if (element.is('select[multiple]') && elementValue !== null) {\n if (elementName.substr(elementName.length - 2) == '[]') { //eslint-disable-line eqeqeq\n elementName = elementName.substring(0, elementName.length - 2);\n }\n $.each(elementValue, function (key, option) {\n data[elementName + '[' + option + ']'] = option;\n });\n } else if (elementName.substr(elementName.length - 2) == '[]') { //eslint-disable-line eqeqeq, max-depth\n elementName = elementName.substring(0, elementName.length - 2);\n\n data[elementName + '[' + elementValue + ']'] = elementValue;\n } else {\n data[elementName] = elementValue;\n }\n\n return data;\n },\n\n /**\n * @param {Object} params\n * @param {Object} dataToAdd\n * @private\n * @deprecated\n */\n _removeExcessiveData: function (params, dataToAdd) {\n var dataToRemove = this._arrayDiffByKeys(params.data, dataToAdd);\n\n $.each(dataToRemove, function (key) {\n delete params.data[key];\n });\n },\n\n /**\n * Bind form submit.\n */\n bindFormSubmit: function () {\n var self = this;
2\n\n $('[data-action=\"add-to-wishlist\"]').on('click', function (event) {\n var element, params, form, action;\n\n event.stopPropagation();\n event.preventDefault();\n\n element = $('input[type=file]' + self.options.customOptionsInfo);\n params = $(event.currentTarget).data('post');\n form = $(element).closest('form');\n action = params.action;\n\n if (params.data.id) {\n $('<input>', {\n type: 'hidden',\n name: 'id',\n value: params.data.id\n }).appendTo(form);\n }\n\n if (params.data.uenc) {\n action += 'uenc/' + params.data.uenc;\n }\n\n $(form).attr('action', action).trigger('submit');\n });\n },\n\n /**\n * Validate product quantity before updating Wish List\n *\n * @param {jQuery.Event} event\n * @private\n */\n _validateWishlistQty: function (event) {\n var element = $(this.options.qtyInfo);\n\n if (!(element.validation() && element.validation('isValid'))) {\n event.preventDefault();\n event.stopPropagation();\n\n return;\n }\n }\n });\n\n return $.mage.addToWishlist;\n});\n","Magento_Wishlist/js/search.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'jquery-ui-modules/widget'\n], function ($) {\n 'use strict';\n\n $.widget('mage.wishlistSearch', {\n\n /**\n * Bind handlers to events\n */\n _create: function () {\n this.element.on('change', $.proxy(this._toggleForm, this));\n },\n\n /**\n * Toggle Form\n * @private\n */\n _toggleForm: function () {\n switch (this.element.val()) {\n case 'name':\n $(this.options.emailFormSelector).hide();\n $(this.options.nameFormSelector).show();\n break;\n\n case 'email':\n $(this.options.nameFormSelector).hide();\n $(this.options.emailFormSelector).show();\n break;\n default:\n $(this.options.emailFormSelector).add(this.options.nameFormSelector).hide();\n }\n }\n });\n\n return $.mage.wishlistSearch;\n});\n","Magento_Wishlist/js/wishlist.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'mage/template',\n 'Magento_Ui/js/modal/alert',\n 'jquery-ui-modules/widget',\n 'mage/validation/validation',\n 'mage/dataPost'\n], function ($, mageTemplate, alert) {\n 'use strict';\n\n $.widget('mage.wishlist', {\n options: {\n dataAttribute: 'item-id',\n nameFormat: 'qty[{0}]',\n btnRemoveSelector: '[data-role=remove]',\n qtySelector: '[data-role=qty]',\n addToCartSelector: '[data-role=tocart]',\n addAllToCartSelector: '[data-role=all-tocart]',\n commentInputType: 'textarea',\n infoList: false\n },\n\n /**\n * Bind handlers to events.\n */\n _create: function () {\n var _this = this;\n\n if (!this.options.infoList) {\n this.element\n .on('addToCart', function (event, context) {\n var urlParams;\n\n event.stopPropagation(event);\n $(context).data('stop-processing', true);\n urlParams = _this._getItemsToCartParams(\n $(context).parents('[data-row=product-item]').find(_this.options.addToCartSelector)\n );
2\n $.mage.dataPost().postData(urlParams);\n\n return false;\n })\n .on('click', this.options.btnRemoveSelector, $.proxy(function (event) {\n event.preventDefault();\n $.mage.dataPost().postData($(event.currentTarget).data('post-remove'));\n }, this))\n .on('click', this.options.addToCartSelector, $.proxy(this._beforeAddToCart, this))\n .on('click', this.options.addAllToCartSelector, $.proxy(this._addAllWItemsToCart, this))\n .on('focusin focusout', this.options.commentInputType, $.proxy(this._focusComment, this));\n }\n\n // Setup validation for the form\n this.element.mage('validation', {\n /** @inheritdoc */\n errorPlacement: function (error, element) {\n error.insertAfter(element.next());\n }\n });\n },\n\n /**\n * Process data before add to cart\n *\n * - update item's qty value.\n *\n * @param {Event} event\n * @private\n */\n _beforeAddToCart: function (event) {\n var elem = $(event.currentTarget),\n itemId = elem.data(this.options.dataAttribute),\n qtyName = $.validator.format(this.options.nameFormat, itemId),\n qtyValue = elem.parents().find('[name=\"' + qtyName + '\"]').val(),\n params = elem.data('post');\n\n if (params) {\n params.data = $.extend({}, params.data, {\n 'qty': qtyValue\n });\n elem.data('post', params);\n }\n },\n\n /**\n * Add wish list items to cart.\n * @private\n * @param {jQuery} elem - clicked 'add to cart' button\n */\n _getItemsToCartParams: function (elem) {\n var itemId, url, qtyName, qtyValue;\n\n if (elem.data(this.options.dataAttribute)) {\n itemId = elem.data(this.options.dataAttribute);\n url = this.options.addToCartUrl;\n qtyName = $.validator.format(this.options.nameFormat, itemId);\n qtyValue = elem.parents().find('[name=\"' + qtyName + '\"]').val();\n url.data.item = itemId;\n url.data.qty = qtyValue;\n\n return url;\n }\n },\n\n /**\n * Add all wish list items to cart\n * @private\n */\n _addAllWItemsToCart: function () {\n var urlParams = this.options.addAllToCartUrl,\n separator = urlParams.action.indexOf('?') >= 0 ? '&' : '?';\n\n this.element.find(this.options.qtySelector).each(function (index, element) {\n urlParams.action += separator + $(element).prop('name') + '=' + encodeURIComponent($(element).val());\n separator = '&';\n });\n $.mage.dataPost().postData(urlParams);\n },\n\n /**\n * Toggle comment string.\n * @private\n * @param {Event} e\n */\n _focusComment: function (e) {\n var commentInput = e.currentTarget;\n\n if (commentInput.value === '' || commentInput.value === this.options.commentString) {\n commentInput.value = commentInput.value === this.options.commentString ?\n '' : this.options.commentString;\n }\n }\n });\n\n // Extension for mage.wishlist - Select All checkbox\n $.widget('mage.wishlist', $.mage.wishlist, {\n options: {\n selectAllCheckbox: '#select-all',\n parentContainer: '#wishlist-table'\n },\n\n /** @inheritdoc */\n _create: function () {\n var selectAllCheckboxParent, checkboxCount;\n\n this._super();\n selectAllCheckboxParent = $(this.options.selectAllCheckbox).parents(this.options.parentContainer);\n checkboxCount = selectAllCheckboxParent\n .find('input
2:checkbox:not(' + this.options.selectAllCheckbox + ')').length;\n // If Select all checkbox is checked, check all item checkboxes, if unchecked, uncheck all item checkboxes\n $(this.options.selectAllCheckbox).on('click', function () {\n selectAllCheckboxParent.find('input:checkbox').attr('checked', $(this).is(':checked'));\n });\n // If all item checkboxes are checked, check select all checkbox,\n // if not all item checkboxes are checked, uncheck select all checkbox\n selectAllCheckboxParent.on(\n 'click',\n 'input:checkbox:not(' + this.options.selectAllCheckbox + ')',\n $.proxy(function () {\n var checkedCount = selectAllCheckboxParent\n .find('input:checkbox:checked:not(' + this.options.selectAllCheckbox + ')').length;\n\n $(this.options.selectAllCheckbox).attr('checked', checkboxCount === checkedCount);\n }, this)\n );\n }\n });\n // Extension for mage.wishlist info add to cart\n $.widget('mage.wishlist', $.mage.wishlist, {\n /** @inheritdoc */\n _create: function () {\n this._super();\n\n if (this.options.infoList) {\n this.element.on('addToCart', $.proxy(function (event, context) {\n this.element.find('input:checkbox').attr('checked', false);\n $(context).closest('tr').find('input:checkbox').attr('checked', true);\n this.element.trigger('submit');\n }, this));\n this._checkBoxValidate();\n }\n },\n\n /**\n * validate checkbox selection.\n * @private\n */\n _checkBoxValidate: function () {\n this.element.validation({\n submitHandler: $.proxy(function (form) {\n if ($(form).find('input:checkbox:checked').length) {\n form.submit();\n } else {\n alert({\n content: this.options.checkBoxValidationMessage\n });\n }\n }, this)\n });\n }\n });\n\n // Extension for mage.wishlist - Add Wishlist item to Gift Registry\n $.widget('mage.wishlist', $.mage.wishlist, {\n options: {\n formTmplSelector: '#form-tmpl',\n formTmplId: '#wishlist-hidden-form'\n },\n\n /** @inheritdoc */\n _create: function () {\n var _this = this;\n\n this._super();\n this.element.on('click', '[data-wishlist-to-giftregistry]', function () {\n var json = $(this).data('wishlist-to-giftregistry'),\n tmplJson = {\n item: json.itemId,\n entity: json.entity,\n url: json.url\n },\n html = mageTemplate(_this.options.formTmplSelector, {\n data: tmplJson\n });\n\n $(html).appendTo('body');\n $(_this.options.formTmplId).trigger('submit');\n });\n }\n });\n\n return $.mage.wishlist;\n});\n","Magento_Wishlist/js/product/addtowishlist-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/uenc-processor',\n 'Magento_Catalog/js/product/list/column-status-validator'\n], function (Element, uencProcessor, columnStatusValidator) {\n 'use strict';\n\n return Element.extend({\n defaults: {\n label: ''\n },\n\n /**\n * Get request POST data.\n *\n * @param {Object} row\n * @return {String}\n */\n getDataPost: function (row) {\n return uencProcessor(row['extension_attributes']['wishlist_button'].url);\n },\n\n /**\n * Check if component must be shown.\n *\n * @return {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'add_to_wishlist', 'show_buttons');\n },\n\n /**\n * Get button label.\n *\n * @return {String}\n */\n getLabel: function () {\n return this.label;\n }\n });\n});\n","Magento_Wishlist/js/view/wishlist.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'uiComponent',\n 'Magento_Customer/js/customer-data'\n], function (Component, customerData) {\n 'use strict';\n\n return Component.extend({\n /** @inheritdoc */\n initialize: function () {\n this._super();\n\n this.wishlist = customerData.get('wishlist');\n }\n });\n});\n","Magento_Newsletter/js/newsletter-sign-up.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'uiElement',\n 'mage/url',\n 'subscriptionStatusResolver',\n 'mage/validation'\n], function ($, Component, urlBuilder, subscriptionStatusResolver) {\n 'use strict';\n\n return Component.extend({\n\n defaults: {\n signUpElement: '',\n submitButton: '',\n element: null\n },\n\n /** @inheritdoc */\n initialize: function (config, element) {\n this._super();\n this.element = element;\n $(element).on('change', $.proxy(this.updateSignUpStatus, this));\n this.updateSignUpStatus();\n },\n\n /**\n * Send status request and update subscription element according to result.\n */\n updateSignUpStatus: function () {\n var element = $(this.element),\n email = element.val(),\n self = this,\n newsletterSubscription;\n\n if ($(self.signUpElement).is(':checked')) {\n return;\n }\n\n if (!email || !$.validator.methods['validate-email'].call(this, email, element)) {\n return;\n }\n\n newsletterSubscription = $.Deferred();\n\n $(self.submitButton).prop('disabled', true);\n\n subscriptionStatusResolver(email, newsletterSubscription);\n\n $.when(newsletterSubscription).done(function (isSubscribed) {\n if (isSubscribed) {\n $(self.signUpElement).prop('checked', true);\n }\n }).always(function () {\n $(self.submitButton).prop('disabled', false);\n });\n }\n });\n});\n","Magento_Newsletter/js/subscription-status-resolver.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/url'\n], function ($, urlBuilder) {\n 'use strict';\n\n return function (email, deferred) {\n return $.getJSON(\n urlBuilder.build('newsletter/ajax/status'),\n {\n email: email\n }\n ).done(function (response) {\n if (response.errors) {\n deferred.reject();\n } else {\n deferred.resolve(response.subscribed);\n }\n }).fail(function () {\n deferred.reject();\n });\n };\n});\n"} 3}});
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.