PageSourceSearch

https://www.yashojewellers.com/_next/static/chunks/9458.833251d320827268.js

js yashojewellers.com collected 2026-10-02 01:56:07 UTC 3,851 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9458],{15268:function(t,e,s){var o=s(87066),i=s(43812);let r=i.BUILDER_URL,a=t=>{let{job_id:e,endpoint:s,payload:a,responseData:d,errorMsg:u}=t,n=JSON.stringify(a),l=JSON.stringify(u),c={responseData:JSON.stringify({job_id:e,endpoint:s,payLoad:n,responseData:d,error:l})};(0,i.isDevelopment)()||o.Z.post("".concat(r,"/error-log"),c).then(t=>{200===t.status&&console.log("Success response",t.data)}).catch(t=>{})};e.Z=a},79458:function(t,e,s){s.r(e),s.d(e,{WishlistContext:function(){return c},WishlistProvider:function(){return p}});var o=s(85893),i=s(67294),r=s(82940),a=s(37351),d=s(60017),u=s(85574),n=s(68015),l=s(15268);let c=(0,i.createContext)(),p=t=>{let{children:e}=t,[s,p]=(0,i.useState)([]),v=(0,i.useContext)(a.ThemeContext),[_,h]=(0,i.useState)(0),[y,g]=(0,i.useState)(!0),m=(0,r.b)(),{userId:S,token:C,websiteStatus:f,userDetails:w}=(0,i.useContext)(u.UserContext),{currentCurrency:I}=(0,i.useContext)(d.CurrencyContext),{jboId:W}=(0,n.useJobId)(),[L,k]=(0,i.useState)(!1),b=async()=>{try{let t=3==f&&(null==w?void 0:w.user_type)==1?"product/siteWishList":"product/getWishList",e=await m.post(t,{user_id:S,token:C,product_id:[]});if(e.data){let s=Array.isArray(e.data.data)?e.data.data:[];p(s),localStorage.setItem("wishlist",JSON.stringify(s))}k(!1)}catch(a){var o;k(!0);let i=3==f&&(null==w?void 0:w.user_type)==1?"product/siteWishList":"product/getWishList",r=(null==a?void 0:null===(o=a.response)||void 0===o?void 0:o.data)?a.response.data:"";(0,l.Z)({job_id:W,endpoint:i,payload:{user_id:S,token:C,product_id:[]},responseData:r,errorMsg:a})}};(0,i.useEffect)(()=>{if(S&&"null"!==S&&C&&(null==v?void 0:v.siteStatus)===1){x();let t=localStorage.getItem("wishlist"),e=localStorage.getItem("wishlistCount");try{t&&e?(p(JSON.parse(t)),h(JSON.parse(e))):b()}catch(s){console.error("Wishlist parsing failed:",s),localStorage.removeItem("wishlist"),localStorage.removeItem("wishlistCount"),b()}}else p([]),localStorage.removeItem("wishlist"),localStorage.removeItem("wishlistCount")},[y,I,S,C,null==v?void 0:v.siteStatus]);let x=async()=>{try{let t=await m.post("user/UserWishListCount",{user_id:S});t.data&&t.data.count?(h(t.data.count),localStorage.setItem("wishlistCount",t.data.count)):h(0)}catch(o){var e;let s=(null==o?void 0:null===(e=o.response)||void 0===e?void 0:e.data)?o.response.data:"";(0,l.Z)({job_id:W,endpoint:"user/UserWishListCount",payload:{user_id:S},responseData:s,errorMsg:o})}},N=async t=>{let e=(null==t?void 0:t.mProductId)||(null==t?void 0:t.product_id1)||t.product_id||(null==t?void 0:t.id)||t.jbo_own_products_id;try{let s=await m.post("/user/addToWishList",{user_id:S,token:C,quantity:1,product_id:e});return"1"==s.data.status&&(b(),x(),g(!y)),s.data.status}catch(a){var o;let i={user_id:S,token:C,quantity:1,product_id:(null==t?void 0:t.mProductId)?null==t?void 0:t.mProductId:t.product_id||t.id},r=(null==a?void 0:null===(o=a.response)||void 0===o?void 0:o.data)?a.response.data:"";return(0,l.Z)({job_id:W,endpoint:"/user/addToWishList",payload:i,responseData:r,errorMsg:a}),null}},D=async t=>{let e={user_id:S,token:C,product_id:(null==t?void 0:t.mProductId)?null==t?void 0:t.mProductId:t.product_id1||t.id||t.product_id};try{let s=await m.post("/user/removeWishList",e);return 1===s.data.status&&(x(),b().then(()=>{p(e=>e.map(e=>e.product_id===t.id?{...e,isRemoved:!0}:e))}).then(()=>g(t=>!t))),s.data.status}catch(a){var o;let i={user_id:S,token:C,product_id:t.product_id?t.product_id:t.id},r=(null==a?void 0:null===(o=a.response)||void 0===o?void 0:o.data)?a.response.data:"";(0,l.Z)({job_id:W,endpoint:"/user/removeWishList",payload:i,responseData:r,errorMsg:a})}};return(0,o.jsx)(c.Provider,{value:{wishlist:s,addToWishlist:N,removeFromWishlist:D,wishlistCount:_,fetchWishlistCount:x,errorState:L,fetchWishlist:b},children:e})}}}]);

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.