1function notifyAdditionToCart(n){function f(n){setTimeout(()=>{n.remove()},300)}const t=n;if(t instanceof HTMLElement){$(t).viModal();$(t).find(".vi-scrollpane").viScrollpane();$(t).find(".vi-receipt").viReceipt();const r=[...document.querySelectorAll(".add-to-cart-notification")].filter(n=>n!==t);r.forEach(n=>{$(n).modal("hide"),f(n)});const i=parseInt(t.dataset.duration)*1e3;let u;setTimeout(()=>{$(t).modal("show")},500);i&&(u=setTimeout(()=>{$(t).modal("hide")},i))}}function initializeNotification(n){const t=(new DOMParser).parseFromString(n,"text/html").body.firstElementChild;return document.body.append(t),t}function handleSideView(n){const t=document.getElementById("cart-toast")?.content.cloneNode(!0);if(t){const i=t.querySelector("div"),u=parseInt(i.dataset.duration)*1e3,f=i.dataset.position,e=parseInt(i.dataset.bulkNotificationLimit),r=JSON.parse(i.dataset.products||"[]");toast||(toast=new vi.Toast({position:f,duration:u}));const o=i.dataset.hasError?.toLowerCase()==="true",s=i.dataset.errorMessage;if(o){toast.push({text:s});n.remove();return}if(r?.length>e){const n=`${r.length} ${i.dataset.bulkNotificationMessage}`;toast.push({text:n})}else Array.isArray(r)&&r.forEach(n=>{const t=n.Quantity===1?i.dataset.singleNotificationMessage:i.dataset.multipleQuantityNotificationMessage,r=t.replace("{0}",n.Quantity).replace("{1}",n.Name);toast.push({text:r})});n.remove()}}let toast=null;window.notification={initializeNotification,notifyAdditionToCart,handleSideView,initializeAndDispatch:function(n){if(n&&n.trim()){const t=initializeNotification(n),i=!!document.getElementById("cart-toast");i?this.handleSideView(t):this.notifyAdditionToCart(t)}}}
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.