PageSourceSearch

https://www.beechenghiang.com.hk/_next/static/chunks/pages/authenticate-1ce665189ed980e0b1f1.js

js beechenghiang.com.hk collected 2026-09-24 15:01:58 UTC 7,691 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1030],{93576:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return T}});var r=n(85893),c=n(809),o=n.n(c),a=n(92447),s=n(64121),i=n(42517),u=n(9008),d=n(11163),l=n(48633),p=n(39704),f=n(33271),_=n(67294),m=n(40452),k=n.n(m),h=n(73944),g=n(11752),v=n(30381),x=n.n(v),y=n(38135),S=n(2714),w=(0,g.default)().publicRuntimeConfig,b=w.cookiesConstant,I=w.WebOpenPublicKey,C=w.WebCookiesTimeout,T=!0;t.default=function(e){var t=e.preferenceParams,n=(e._nextI18Next,e.tokenParams),c=e.callback,m=((0,d.useRouter)(),(0,i.$G)(["common"]).t),g=(0,p.I0)(),v=(0,l.kP)(),w=(0,s.Z)(v,2),T=w[0],P=w[1],N=(0,_.useState)(!1),O=N[0],U=(N[1],(0,_.useState)(!1)),L=U[0],E=U[1],j=(0,y.X)("_afid",""),q=(0,s.Z)(j,1)[0],A=function(){var e=(0,a.Z)(o().mark((function e(r){var c,a,s,i,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null==r){e.next=22;break}return E(!1),s=[],e.next=6,g((0,h.mH)(n,t,localStorage.getItem("_deliveryLoc")));case 6:return null!=(i=e.sent)&&(null===(c=i.merchants)||void 0===c?void 0:c.length)>0&&i.merchants.map((function(e){var t;(null===(t=e.products)||void 0===t?void 0:t.length)>0&&(e.products.map((function(e){s.push({type:0,product_id:e.product_id,qty:e.qty,uom_id:null!=e.variance?e.variance.Id:0,added_date:e.added_date})})),e.bundleDealProducts.length>0&&e.bundleDealProducts.map((function(e){e.items.map((function(e){s.push({type:0,product_id:e.product_id,qty:e.qty,uom_id:null!=e.variance?e.variance.Id:0,added_date:e.added_date})}))})),e.groupProducts.length>0&&e.groupProducts.map((function(e){e.items.map((function(e){s.push({type:0,product_id:e.product_id,qty:e.qty,uom_id:null!=e.variance?e.variance.Id:0,added_date:e.added_date})}))})))})),e.next=10,g((0,h.KA)(n,t,localStorage.getItem("_deliveryLoc")));case 10:if(null!=(u=e.sent)&&(null===(a=u.merchants)||void 0===a?void 0:a.length)>0&&u.merchants.map((function(e){var t;(null===(t=e.products)||void 0===t?void 0:t.length)>0&&e.products.map((function(e){s.push({type:1,product_id:e.product_id,qty:e.qty,uom_id:null!=e.variance?e.variance.Id:0,added_date:e.added_date})}))})),!(s.length>0)){e.next=18;break}return d={items:s},e.next=16,g((0,h.o3)(r,d));case 16:!0===e.sent&&console.log("preferenceParams",t);case 18:return e.next=20,B(r,t);case 20:e.next=23;break;case 22:window.location.href="/403/";case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(0),console.log(e.t0.message),window.location.href="/";case 29:case"end":return e.stop()}}),e,null,[[0,25]])})));return function(t){return e.apply(this,arguments)}}(),B=(0,_.useCallback)(function(){var e=(0,a.Z)(o().mark((function e(t,n){var r,c,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g((0,h.mH)(t,{CultureId:n.CultureId},localStorage.getItem("_deliveryLoc")));case 3:if(null==(r=e.sent)){e.next=7;break}return e.next=7,Z(r,0);case 7:return e.next=9,g((0,h.KA)(t,{CultureId:n.CultureId},localStorage.getItem("_deliveryLoc")));case 9:if(null==(c=e.sent)){e.next=13;break}return e.next=13,Z(c,1);case 13:if(""===q){e.next=21;break}return a={slug:q},e.next=17,g((0,S.cB)(t,a));case 17:e.sent,E(!0),e.next=22;break;case 21:E(!0);case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),console.log("error",e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}(),[O,q]),Z=function(){var e=(0,a.Z)(o().mark((function e(t,n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===(r=t.merchants)||void 0===r?void 0:r.length)>0&&null!=r?0===n?localStorage.setItem("_cartSession",JSON.stringify({myCart:r})):localStorage.setItem("_cartBuyLaterSession",JSON.stringify({myBuyLaterCart:r})):0===n?localStorage.setItem("_cartSession",JSON.stringify({myCart:[]})):localStorage.setItem("_cartBuyLaterSession",JSON.stringify({myBuyLaterCart:[]}));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),J=function(){var e=(0,a.Z)(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g((0,S.Ai)(t));case 2:n=e.sent,(r=null===n||void 0===n?void 0:n.delivery_addresses.find((function(e){return e.is_default})))&&localStorage.setItem("_deliveryLoc",r.district_id);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,_.useEffect)((function(){var e=!0;return!0===e&&!0===L&&(setTimeout((function(){(0,l.w7)({callbackUrl:"/"})}),1e3),window.location.href=c),function(){e=!1}}),[L]),(0,_.useEffect)((function(){function e(){return(e=(0,a.Z)(o().mark((function e(t){var n,r,c,a,s,i,u,d,l,p,f,_,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(null===t||void 0===t?void 0:t.user)&&void 0==(null===t||void 0===t?void 0:t.user)){e.next=35;break}
1return n=t.user,r=JSON.parse(n.name),c=k().encrypt(r.refresh_token,I).toString(),e.prev=4,(a=new Date).setFullYear(a.getFullYear()+2),(s=new Date).setSeconds(C),i=x().utc().add(parseInt(r.expires_in)-10,"seconds"),u=x().utc().add(parseInt(C)-10,"seconds"),document.cookie="".concat(b.cookiesUserPreference_accessToken,"=").concat(r.access_token,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesUserPreference_tokenType,"=").concat(r.token_type,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesUserPreference_expiring,"=").concat(i,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesUserPreference_isLogin,"=1;secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesUserPreference_refresh_token,"=").concat(c,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesAuth_accessToken,"=").concat(r.access_token,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesAuth_tokenType,"=").concat(r.token_type,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesAuth_expires,"=").concat(i,";secure;expires=").concat(s.toUTCString(),";path=/"),document.cookie="".concat(b.cookiesAuth_isLogin,"=1;secure;expires=").concat(s.toUTCString(),";path=/"),e.next=22,window.localStorage.getItem("userPublicToken");case 22:if(!(d=e.sent)){e.next=29;break}return l=JSON.parse(d),p=l.cart_guid,f=l.scope,_=l.token_type,m={access_token:r.access_token,expires_in:C,publicTokenExpiresIn:u,cart_guid:p,scope:f,token_type:_,refreshToken:c},e.next=29,window.localStorage.setItem("userPublicToken",JSON.stringify(m));case 29:setTimeout((function(){A(r),J(r)}),2e3),e.next=35;break;case 32:e.prev=32,e.t0=e.catch(4),e.t0.toString().search("404")>0&&(window.location.href="/404/");case 35:case"end":return e.stop()}}),e,null,[[4,32]])})))).apply(this,arguments)}var t=!0;return!1===P&&!0===t&&function(t){e.apply(this,arguments)}(T),function(){t=!1}}),[]),(0,r.jsxs)(_.Fragment,{children:[(0,r.jsxs)(u.default,{children:[(0,r.jsx)("title",{children:"Order Online | Bee Cheng Hiang | Asia's Famous Bakkwa"}),(0,r.jsx)("meta",{name:"robots",content:"NOINDEX, NOFOLLOW"})]}),(0,r.jsxs)("div",{className:"overlayBackground",style:{justifyContent:"center",flexDirection:"column",alignItems:"center",background:"#ffffff"},children:[(0,r.jsx)(f.Z,{}),(0,r.jsxs)("h3",{style:{marginTop:5,fontSize:15,fontWeight:600},children:[m("msg_authenticate_connect_acc")," ..."]})]})]})}},55250:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/authenticate",function(){return n(93576)}])}},function(e){e.O(0,[2714,9774,2888,179],(function(){return t=55250,e(e.s=t);var t}));var t=e.O();_N_E=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.