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AA,EAEA,OAAAjC,EAAAO,EAAAC,IAGAgC,EAAAC,KAAA,2BAAAA,KAAA,+BACAD,EAAAlE,QAAA4D,EAAAQ,KAAA,SACAF,EAAAjD,KAAA2C,EAAAQ,KAAA,KAAAF,EAAAjD,KAAAmD,KAAAF,QC7CA,IAAAG,EAAA3C,EAAAO,OAAAV,EAAA,WAAAG,EAAA,QACA2C,EAAA3C,EAAAO,EAAAoC","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/global","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__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\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 = self[\"__LOADABLE_LOADED_CHUNKS__\"] = self[\"__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","_newCartData$order$no","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","concat","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","g","globalThis","this","Function","o","obj","prop","prototype","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}