{"version":3,"file":"ReceiptNotification.EAdmBtov.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/UhImAVcibTYq5pnst4s7/t7AFu5KOMqyh0K3jKtWL/ReceiptNotification.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{createPortal}from\"react-dom\";export function ReceiptNotification(){const[shouldRender,setShouldRender]=React.useState(false);const[visible,setVisible]=React.useState(false);const[data,setData]=React.useState({article:\"\",brand:\"\",time:\"\"});const brands=[\"Apple E-mail\",\"BestBuy E-mail\",\"Canada Goose E-mail\",\"Dior E-mail\",\"Dyson E-mail\",\"eBay E-mail\",\"FARFETCH E-mail\",\"FlightClub E-mail\",\"GOAT E-mail\",\"Grailed E-mail\",\"Gucci E-mail\",\"Harrods Paper (80mm)\",\"Louis Vuitton E-mail\",\"Louis Vuitton Paper (A5)\",\"Moncler (2025) E-mail\",\"Moncler (2020) E-mail\",\"Mr Porter E-mail\",\"Nike E-mail\",\"Saint Laurent E-mail\",\"Selfridges E-mail\",\"Selfridges Paper (80mm)\",\"StockX E-mail\",\"StockX Paper (A6)\",\"Trapstar E-mail\",\"Sephora Paper (80mm)\"];const getArticle=word=>{const vowels=[\"a\",\"e\",\"i\",\"o\",\"u\"];return vowels.includes(word[0].toLowerCase())?\"An\":\"A\";};React.useEffect(()=>{const show=()=>{// --- THE REFINED SELLAPP SENSOR ---\n// We only look for SellApp specifically, not 'any' iframe.\nconst sellAppActive=document.querySelector('[id*=\"sellapp\"]')||document.querySelector('[class*=\"sellapp\"]')||document.querySelector('iframe[src*=\"sellapp\"]')||document.querySelector(\".sellapp-modal-wrapper\");if(sellAppActive){// If checkout is found, wait 8 seconds and try again\nsetTimeout(show,8e3);return;}// ----------------------------------\nconst selectedBrand=brands[Math.floor(Math.random()*brands.length)];const secondsAgo=Math.floor(Math.random()*58)+1;setData({article:getArticle(selectedBrand),brand:selectedBrand,time:`${secondsAgo}s ago`});setShouldRender(true);requestAnimationFrame(()=>{setTimeout(()=>{setVisible(true);const hideTimeout=setTimeout(()=>{setVisible(false);setTimeout(()=>{setShouldRender(false);scheduleNext();},600);},6e3);},20);});};const scheduleNext=()=>{const delay=1e4+Math.random()*25e3;setTimeout(show,delay);};const initialTimeout=setTimeout(show,18e3);return()=>clearTimeout(initialTimeout);},[]);if(!shouldRender)return null;return /*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(\"div\",{className:`notif-root ${visible?\"is-visible\":\"\"}`,style:{position:\"fixed\",bottom:\"30px\",left:\"24px\",zIndex:10,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"notif-card-solid\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"notif-inner\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"notif-head\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"status-dot\"}),\"RECENT ACTIVITY\",/*#__PURE__*/_jsx(\"span\",{className:\"v-pill\",children:\"VERIFIED\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"notif-msg\",children:[data.article,\" \",data.brand,\" Receipt was generated\"]}),/*#__PURE__*/_jsx(\"div\",{className:\"notif-sub\",children:data.time})]}),/*#__PURE__*/_jsx(\"div\",{className:\"p-bar-track\",children:/*#__PURE__*/_jsx(\"div\",{className:\"p-bar-fill\"})})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@500;600;700&display=swap');\n                .notif-root { opacity: 0; transform: translateY(15px); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease; }\n                .notif-root.is-visible { opacity: 1; transform: translateY(0); }\n                .notif-card-solid { width: 310px; background: #0b0b0c; border-radius: 12px; color: white; font-family: 'Instrument Sans', sans-serif; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); overflow: hidden; }\n                .notif-inner { padding: 15px 18px; }\n                .notif-head { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; color: rgba(255, 255, 255, 0.4); margin-bottom: 5px; letter-spacing: 0.1em; }\n                .status-dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px rgba(34, 197, 94, 0.5); animation: pulse-ring 2s infinite ease-in-out; }\n                @keyframes pulse-ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } }\n                .v-pill { margin-left: auto; background: rgba(34, 197, 94, 0.1); color: #22c55e; padding: 2px 5px; border-radius: 3px; font-size: 8px; }\n                .notif-msg { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #f0f0f0; }\n                .notif-sub { font-size: 10px; color: rgba(255, 255, 255, 0.3); margin-top: 3px; }\n                .p-bar-track { height: 2px; width: 100%; background: rgba(255, 255, 255, 0.03); }\n                .p-bar-fill { height: 100%; background: #ffffff; animation: p-anim 6s linear forwards; }\n                @keyframes p-anim { from { width: 100%; } to { width: 0%; } }\n                @media (max-width: 600px) { .notif-root { left: 50% !important; transform: translateX(-50%) translateY(15px); } .notif-root.is-visible { transform: translateX(-50%) translateY(0); } }\n                `})]}),document.body);}\nexport const __FramerMetadata__ = {\"exports\":{\"ReceiptNotification\":{\"type\":\"reactComponent\",\"name\":\"ReceiptNotification\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReceiptNotification.map"],"mappings":"8IAAyH,SAAgB,GAAqB,CAAC,GAAK,CAAC,EAAa,GAAiBA,EAAe,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAe,GAAM,CAAM,CAAC,EAAK,GAASA,EAAe,CAAC,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,CAAC,CAAO,EAAO,CAAC,eAAe,iBAAiB,sBAAsB,cAAc,eAAe,cAAc,kBAAkB,oBAAoB,cAAc,iBAAiB,eAAe,uBAAuB,uBAAuB,2BAA2B,wBAAw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