1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27250,e=>{"use strict";let t=[{id:"1",name:"Tata Salt",barcode:"8901030702000",category:"Grocery",mrp:28,sellingPrice:26,costPrice:22,stock:150,unit:"kg",lowStockThreshold:20,supplierId:"1",createdAt:new Date,updatedAt:new Date},{id:"2",name:"Fortune Sunflower Oil",barcode:"8901058001020",category:"Grocery",mrp:180,sellingPrice:175,costPrice:160,stock:45,unit:"ltr",lowStockThreshold:10,supplierId:"1",createdAt:new Date,updatedAt:new Date},{id:"3",name:"Parle-G Biscuits",barcode:"8904063124005",category:"Snacks",mrp:10,sellingPrice:10,costPrice:8,stock:8,unit:"pkt",lowStockThreshold:50,createdAt:new Date,updatedAt:new Date},{id:"4",name:"Amul Butter",barcode:"8901262150019",category:"Dairy",mrp:56,sellingPrice:54,costPrice:48,stock:30,unit:"pcs",lowStockThreshold:15,supplierId:"2",createdAt:new Date,updatedAt:new Date},{id:"5",name:"Maggi Noodles",barcode:"8901058854305",category:"Snacks",mrp:14,sellingPrice:14,costPrice:12,stock:5,unit:"pkt",lowStockThreshold:30,createdAt:new Date,updatedAt:new Date},{id:"6",name:"Britannia Bread",barcode:"8901063020307",category:"Bakery",mrp:45,sellingPrice:45,costPrice:38,stock:25,unit:"pcs",lowStockThreshold:10,createdAt:new Date,updatedAt:new Date},{id:"7",name:"Surf Excel",barcode:"8901030714009",category:"Household",mrp:125,sellingPrice:120,costPrice:105,stock:40,unit:"kg",lowStockThreshold:15,createdAt:new Date,updatedAt:new Date},{id:"8",name:"Colgate Toothpaste",barcode:"8901314010101",category:"Personal Care",mrp:95,sellingPrice:90,costPrice:78,stock:60,unit:"pcs",lowStockThreshold:20,createdAt:new Date,updatedAt:new Date}],a=[{id:"1",name:"Rahul Sharma",phone:"+91 98765 43210",email:"[email protected]",address:"123 MG Road, Delhi",notes:"Regular customer, prefers home delivery",createdAt:new Date("2024-01-15")},{id:"2",name:"Priya Patel",phone:"+91 87654 32109",email:"[email protected]",address:"456 Link Road, Mumbai",createdAt:new Date("2024-02-20")},{id:"3",name:"Amit Kumar",phone:"+91 76543 21098",address:"789 Station Road, Bangalore",createdAt:new Date("2024-03-10")}],r=[{id:"1",name:"Metro Wholesale",phone:"+91 11 2345 6789",email:"[email protected]",address:"Industrial Area, Sector 5",balance:15e3,transactions:[{id:"t1",supplierId:"1",type:"purchase",amount:25e3,description:"Weekly stock - Grocery items",items:[{productId:"1",productName:"Tata Salt",quantity:100,costPrice:22,total:2200},{productId:"2",productName:"Fortune Sunflower Oil",quantity:50,costPrice:160,total:8e3}],date:new Date(Date.now()-2592e5),createdAt:new Date(Date.now()-2592e5)},{id:"t2",supplierId:"1",type:"payment",amount:1e4,description:"Parti
1al payment",date:new Date(Date.now()-864e5),createdAt:new Date(Date.now()-864e5)}],createdAt:new Date("2023-06-01")},{id:"2",name:"Reliance Distribution",phone:"+91 22 3456 7890",email:"[email protected]",address:"Commerce Hub, Andheri",balance:0,transactions:[{id:"t3",supplierId:"2",type:"purchase",amount:5e3,description:"Dairy products",items:[{productId:"4",productName:"Amul Butter",quantity:100,costPrice:48,total:4800}],date:new Date(Date.now()-6048e5),createdAt:new Date(Date.now()-6048e5)},{id:"t4",supplierId:"2",type:"payment",amount:5e3,description:"Full payment",date:new Date(Date.now()-432e6),createdAt:new Date(Date.now()-432e6)}],createdAt:new Date("2023-08-15")}],o=[{id:"1",invoiceNumber:"INV-2024-001",customerId:"1",customerName:"Rahul Sharma",items:[{productId:"1",productName:"Tata Salt",quantity:2,price:26,discount:0,total:52},{productId:"2",productName:"Fortune Sunflower Oil",quantity:1,price:175,discount:5,total:170}],subtotal:227,discount:5,tax:0,total:222,paidAmount:222,pendingAmount:0,paymentMethod:"cash",status:"completed",createdAt:new Date},{id:"2",invoiceNumber:"INV-2024-002",customerId:"1",customerName:"Rahul Sharma",items:[{productId:"3",productName:"Parle-G Biscuits",quantity:5,price:10,discount:0,total:50},{productId:"5",productName:"Maggi Noodles",quantity:3,price:14,discount:0,total:42}],subtotal:92,discount:0,tax:0,total:92,paidAmount:50,pendingAmount:42,paymentMethod:"credit",status:"pending",createdAt:new Date(Date.now()-864e5)},{id:"3",invoiceNumber:"INV-2024-003",customerName:"Walk-in Customer",items:[{productId:"6",productName:"Britannia Bread",quantity:2,price:45,discount:0,total:90}],subtotal:90,discount:0,tax:0,total:90,paidAmount:90,pendingAmount:0,paymentMethod:"upi",status:"completed",createdAt:new Date(Date.now()-1728e5)}],i=[{id:"1",orderNumber:"ORD-2024-001",customerId:"1",customerName:"Rahul Sharma",customerPhone:"+91 98765 43210",items:[{productId:"1",productName:"Tata Salt",quantity:3,price:26},{productId:"4",productName:"Amul Butter",quantity:2,price:54}],subtotal:186,total:186,status:"pending",notes:"Please deliver before 5 PM",createdAt:new Date,updatedAt:new Date},{id:"2",orderNumber:"ORD-2024-002",customerId:"2",customerName:"Priya Patel",customerPhone:"+91 87654 32109",items:[{productId:"6",productName:"Britannia Bread",quantity:1,price:45},{productId:"8",productName:"Colgate Toothpaste",quantity:1,price:90}],subtotal:135,total:135,status:"confirmed",createdAt:new Date(Date.now()-36e5),updatedAt:new Date}],d=[{id:"1",category:"Utilities",amount:2500,description:"Electricity bill - November",date:new Date,createdAt:new Date},{id:"2",category:"Rent",amount:15e3,description:"Shop rent - November",date:new Date,createdAt:new Date},{id:"3",category:"Staff",amount:8e3,description:"Helper salary",date:new Date(Date.now()-432e6),createdAt:new Date},{id:"4",category:"Supplies",amount:5e3,description:"Weekly grocery restock",supplierId:"1",supplierName:"Metro Wholesale",date:new Date(Date.now()-1728e5),createdAt:new Date}],s=[{id:"n1",type:"low_stock",title:"Low Stock Alert",message:"Parle-G Biscuits is running low",data:{productId:"3",productName:"Parle-G Biscuits",currentStock:8},read:!1,dismissed:!1,createdAt:new Date(Date.now()-36e5)},{id:"n2",type:"low_stock",title:"Low Stock Alert",message:"Maggi Noodles is running low",data:{productId:"5",productName:"Maggi Noodles",currentStock:5},read:!1,dismissed:!1,createdAt:new Date(Date.now()-72e5)},{id:"n3",type:"new_order",title:"New Order Received",message:"Order from Rahul Sharma",data:{orderId:"1",orderNumber:"ORD-2024-001",customerName:"Rahul Sharma",orderTotal:186,items:[{productId:"1",productName:"Tata Salt",quantity:3,price:26},{productId:"4",productName:"Amul Butter",quantity:2,price:54}]},read:!1,dismissed:!1,createdAt:new Date}];e.s(["categories",0,["Grocery","Dairy","Snacks","Beverages","Bakery","Household","Personal Care","Frozen","Others"],"expenseCategories",0,["Utilities","Rent","Staff","Transportation","Maintenance","Marketing","Supplies","Others"],"mockCustomers",0,a,"mockDashboardStats",0,{todaySales:4850,weekSales:28750,monthSales:125e3,yearSales:145e4,totalRevenue:145e4,totalOrders:856,totalProfit:185e3,lowStockCount:3},"mockExpenses",0,d,"mockNotifications",0,s,"mockOrders",0,i,"mockProducts",0,t,"mockSales",0,o,"mockSuppliers",0,r])},91432,e=>{"use strict";var t=e.i(7156),a=e.i(81061);let r=(0,a.createContext)(void 0),o=[{id:"admin",name:"Shop Owner",phone:"1234567890",email:"[email protected]",role:"shopkeeper",password:"admin123"},{id:"1",name:"Rahul Sharma",phone:"9876543210",email:"[email protected]",address:"123 MG Road, Delhi",role:"customer",password:"password123"},{id:"2",name:"Priya Patel",phone:"8765432109",email:"[email protected]",address:"456 Link Road, Mumbai",role:"customer",password:"password123"}];function i({children:e}){let[i,d]=(0,a.useState)(null),[s,n]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=localStorage.getItem("erp_user");e&&d(JSON.parse(e)),n(!1)},[]);let c=(0,a.useCallback)(async(e,t)=>{await new Promise(e=>setTimeout(e,500));let a=e.replace(/\D/g,""),r=o.find(e=>e.phone===a&&e.password===t);if(r){let{password:e,...t}=r;return d(t),localStorage.setItem("erp_user",JSON.stringify(t)),!0}return!1},[]),u=(0,a.useCallback)(async(e,t,a)=>{await new Promise(e=>setTimeout(e,500));let r=t.replace(/\D/g,"");if(o.find(e=>e.phone===r))return!1;let i={id:String(o.length+1),name:e,phone:r,role:"customer"};return o.push({...i,password:a}),d(i),localStorage.setItem("erp_user",JSON.stringify(i)),!0},[]),l=(0,a.useCallback)(()=>{d(null),localStorage.removeItem("erp_user")},[]);return(0,t.jsx)(r.Provider,{value:{user:i,isAuthenticated:!!i,isLoading:s,login:c,signup:u,logout:l},children:e})}function d(){let e=(0,a.useContext)(r);if(!e)throw Error("useAuth must be used within an AuthProvider");return e}e.s(["AuthProvider",()=>i,"useAuth",()=>d])},25651,e=>{"use strict";var t=e.i(7156),a=e.i(81061),r=e.i(27250);let o=(0,a.createContext)(void 0);function i({children:e}){let[i,d]=(0,a.useState)(r.mockNotifications),s=(0,a.useRef)(null),n=(0,a.useRef)(!1);(0,a.useEffect)(()=>
1{s.current=new Audio("https://assets.mixkit.co/active_storage/sfx/2869/2869-preview.mp3"),s.current.volume=.5},[]),(0,a.useEffect)(()=>{n.current||(i.filter(e=>!e.read&&!e.dismissed).length>0&&s.current&&s.current.play().catch(()=>{}),n.current=!0)},[i]);let c=(0,a.useCallback)(()=>{s.current&&(s.current.currentTime=0,s.current.play().catch(()=>{}))},[]),u=i.filter(e=>!e.read&&!e.dismissed).length,l=(0,a.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,read:!0}:t))},[]),m=(0,a.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,dismissed:!0}:t))},[]),p=(0,a.useCallback)(e=>{d(t=>t.map(t=>"new_order"===t.type&&t.data?.orderId===e?{...t,dismissed:!0}:t))},[]),w=(0,a.useCallback)(e=>{d(t=>t.map(t=>"new_order"===t.type&&t.data?.orderId===e?{...t,dismissed:!0}:t))},[]),h=(0,a.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,dismissed:!0}:t))},[]),D=(0,a.useCallback)(e=>{let t={...e,id:`n${Date.now()}`,read:!1,dismissed:!1,createdAt:new Date};d(e=>[t,...e]),c()},[c]);return(0,t.jsx)(o.Provider,{value:{notifications:i,unreadCount:u,markAsRead:l,dismissNotification:m,acceptOrder:p,cancelOrder:w,ignoreLowStock:h,addNotification:D},children:e})}function d(){let e=(0,a.useContext)(o);if(!e)throw Error("useNotifications must be used within a NotificationProvider");return e}e.s(["NotificationProvider",()=>i,"useNotifications",()=>d])}]);
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.