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,EAAAgC","sources":["webpack://@logos/commerceweb-frontend/./Scripts/site/cart/entries/shoppingcart.js","webpack://@logos/commerceweb-frontend/./Scripts/site/cart/utility/cartnotificationutility.js","webpack://@logos/commerceweb-frontend/./Scripts/site/cart/utility/eventaggregator.js","webpack://@logos/commerceweb-frontend/webpack/bootstrap","webpack://@logos/commerceweb-frontend/webpack/runtime/chunk loaded","webpack://@logos/commerceweb-frontend/webpack/runtime/hasOwnProperty shorthand","webpack://@logos/commerceweb-frontend/webpack/runtime/jsonp chunk loading","webpack://@logos/commerceweb-frontend/webpack/startup"],"sourcesContent":["const cartNotificationUtility = require('../utility/cartnotificationutility.js');\n\ncartNotificationUtility.init();\n","'use strict';\n\nconst $ = require('jquery');\nconst events = require('./eventaggregator.js');\n\nmodule.exports = {\n\tinit: function () {\n\t\tlet alreadyDisplayedNotification = false;\n\t\tlet previousNumberOfPayments = null;\n\n\t\tevents.on('cart:updated', (event, newCartData) => {\n\t\t\tconst notifications = newCartData.order.notifications ?? [];\n\t\t\tconst immediatePaymentPreventsBalanceDueFromSurpassingLimitNotification = notifications.find(\n\t\t\t\tn => n.code === 'ImmediatePaymentPreventsBalanceDueFromSurpassingLimit'\n\t\t\t);\n\t\t\tconst notificationBannerNotification = $(\n\t\t\t\t'.js-cart-notification[js-notification-code=\"ImmediatePaymentPreventsBalanceDueFromSurpassingLimit\"]'\n\t\t\t);\n\n\t\t\tif (immediatePaymentPreventsBalanceDueFromSurpassingLimitNotification) {\n\t\t\t\t// Note that this creates a different style of notification than the _Notifications.cshtml notification that may be present on page load.\n\t\t\t\t// We could unify these styles, but the static notification (from _Notifications.cshtml) feels better-suited to a notification display for a page load,\n\t\t\t\t// and the dynamic sweep-in/sweep-out notification from window.NotificationUtility.notify feels better-suited to a notification display for an update after page load.\n\t\t\t\tif (\n\t\t\t\t\twindow.NotificationUtility &&\n\t\t\t\t\tnotificationBannerNotification.length === 0 &&\n\t\t\t\t\t(!alreadyDisplayedNotification || newCartData.order.numberOfPayments !== previousNumberOfPayments)\n\t\t\t\t) {\n\t\t\t\t\twindow.NotificationUtility.notify(\n\t\t\t\t\t\timmediatePaymentPreventsBalanceDueFromSurpassingLimitNotification.message,\n\t\t\t\t\t\timmediatePaymentPreventsBalanceDueFromSurpassingLimitNotification.kind\n\t\t\t\t\t);\n\t\t\t\t\talreadyDisplayedNotification = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\talreadyDisplayedNotification = false;\n\n\t\t\t\tif (notificationBannerNotification.length > 0) {\n\t\t\t\t\tnotificationBannerNotification.remove();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpreviousNumberOfPayments = newCartData.order.numberOfPayments;\n\n\t\t\tconst otherNotifications = notifications.filter(\n\t\t\t\tn => n.code !== 'ImmediatePaymentPreventsBalanceDueFromSurpassingLimit'\n\t\t\t);\n\n\t\t\totherNotifications.forEach(notification =>\n\t\t\t\twindow.NotificationUtility.notify(notification.message, notification.kind)\n\t\t\t);\n\t\t});\n\t},\n};\n","'use strict';\n\nconst handlers = {};\n// pending events allow a lot of subscribers to all come online during the same tick\nlet pending = {};\n// the timeout id to clear pending events at the end of a tick after an event has been triggered\nlet clear = undefined;\nconst eventAggregator = {\n\ton: function (events, handler) {\n\t\t// events can be one event (\"cart:updated\") or multiple separated by spaces (\"cart:validated cart:invalidated\")\n\t\t// this preserves the behavior of jQuery.on()\n\t\tfor (const event of events.split(' ')) {\n\t\t\tif (!handlers[event]) {\n\t\t\t\thandlers[event] = [];\n\t\t\t}\n\t\t\t// don't modify the handlers array or it'll cause iterator issues\n\t\t\thandlers[event] = [...handlers[event], handler];\n\t\t\t// pending events were fired on the same tick, but before you registered your handler\n\t\t\tif (!pending[event]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const data of pending[event]) {\n\t\t\t\thandler({ type: event }, data);\n\t\t\t}\n\t\t}\n\t},\n\toff: function (events, handler) {\n\t\t// events can be one event (\"cart:updated\") or multiple separated by spaces (\"cart:validated cart:invalidated\")\n\t\t// this preserves the behavior of jQuery.off()\n\t\tfor (const event of events.split(' ')) {\n\t\t\tif (!handlers[event]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst index = handlers[event].indexOf(handler);\n\t\t\tif (index === -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// don't modify the handlers array or it'll cause iterator issues\n\t\t\thandlers[event] = handlers[event].filter((it, ix) => ix !== index);\n\t\t}\n\t},\n\ttrigger: function (event, data) {\n\t\tif (typeof window === 'undefined') {\n\t\t\tthrow new Error('Events cannot be triggered server-side. Wrap them in an event handler or useEffect.');\n\t\t}\n\t\tif (!pending[event]) {\n\t\t\tpending[event] = [];\n\t\t}\n\t\tpending[event].push(data);\n\t\tif (!handlers[event]) {\n\t\t\treturn;\n\t\t}\n\t\tfor (const handler of handlers[event]) {\n\t\t\ttry {\n\t\t\t\thandler({ type: event }, data);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(`[eventAggregator] Error in \"${event}\" handler:`, e);\n\t\t\t}\n\t\t}\n\t\tif (!clear) {\n\t\t\tclear = setTimeout(() => {\n\t\t\t\t// on the next tick, clear the pending queue and allow us to restart the pending queue\n\t\t\t\tclear = undefined;\n\t\t\t\tpending = {};\n\t\t\t}, 0);\n\t\t}\n\t},\n};\n\nif (!global.eventAggregator) {\n\tglobal.eventAggregator = eventAggregator;\n}\nmodule.exports = global.eventAggregator;\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","const deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tlet notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tlet [chunkIds, fn, priority] = deferred[i];\n\t\tlet fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tconst r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nconst installedChunks = {\n\t9240: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nconst webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tlet [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nconst chunkLoadingGlobal = globalThis[\"__LOADABLE_LOADED_CHUNKS__\"] ||= [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nlet __webpack_exports__ = __webpack_require__.O(undefined, [3420], () => (__webpack_require__(22658)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["require","init","$","events","module","exports","alreadyDisplayedNotification","previousNumberOfPayments","on","event","newCartData","notifications","order","immediatePaymentPreventsBalanceDueFromSurpassingLimitNotification","find","n","code","notificationBannerNotification","window","NotificationUtility","length","numberOfPayments","notify","message","kind","remove","filter","forEach","notification","handlers","clear","pending","eventAggregator","handler","split","data","type","off","index","indexOf","it","ix","trigger","Error","push","e","console","error","setTimeout","undefined","global","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","m","deferred","O","result","chunkIds","fn","priority","i","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","o","obj","prop","prototype","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","globalThis","bind","__webpack_exports__"],"sourceRoot":""}