PageSourceSearch

https://www.costco.com.au/spartacus/assets/chunk-5ETMJ6VZ.js

js costco.com.au collected 2026-10-02 06:07:13 UTC 8,130 bytes, 1 lines download raw bytes

1import{a as oe,b as ne}from"./chunk-XUFA6U7R.js";import{e as w}from"./chunk-23OYWDAP.js";import{n as se}from"./chunk-RXO5FOGF.js";import{e as _,f as b}from"./chunk-BZRY3WX3.js";import{r as ee}from"./chunk-NGFOYMLE.js";import{b as R}from"./chunk-FCZ6MCLW.js";import{b as N,d as re}from"./chunk-ABACGHJ4.js";import{g as x}from"./chunk-GDB2PFOH.js";import{b as ie}from"./chunk-WRVDYOEU.js";import{f as te}from"./chunk-QUDZR5CE.js";import{Hf as J,K as g,Me as A,Qe as V,R as O,Rg as Q,Uf as k,Vd as E,ee as u,eg as C,fg as l,ga as q,gg as K,hg as Z,i as h,ig as z,ka as U,na as W,nf as v,p as L,q as B,rd as $,sa as d,sd as m,td as y,te as n,ua as I,v as Y,va as s,wa as X}from"./chunk-ZIECK5QA.js";import{a as S,m as M}from"./chunk-3JMZ37NM.js";var T="/maintenance/?err=1",G="/membership",Ee=new I("error.handler.config"),ue=new I("success.handler.config"),be=(()=>{let i=class i{constructor(e,r,t,o,a,p){this.windowRef=e,this.authHttpHeaderService=r,this.errorHandlers=t,this.successHandlers=o,this.cookieService=a,this.sipAuthService=p}static performErrorPageRedirect(){location.href=T}intercept(e,r){return r.handle(e).pipe(W(t=>{t instanceof $&&this.handleSuccessResponse(e,t)}),g(t=>(t instanceof m&&setTimeout(()=>M(this,null,function*(){let o=yield this.authHttpHeaderService.getStableToken().pipe(O(1)).toPromise();switch(t.status){case 401:if(this.isExpiredToken(t))if(this.cookieService.get("costcosipstorefrontRememberMe"))yield this.sipAuthService.loadSession();else return console.error("HandleExpiredAccessToken "),this.authHttpHeaderService.handleExpiredAccessToken(e,r,o)}t.ok||this.handleErrorResponse(e,t)})),B(t))))}isExpiredToken(e){return e.error?.errors?.[0]?.type==="InvalidTokenError"}handleSuccessResponse(e,r){this.successHandlers.some(o=>o.isError(e,r))&&(console.error("handleSuccessResponse - error ",e,r.status),this.doErrorHandling())}handleErrorResponse(e,r){this.errorHandlers.some(o=>o.isError(e,r))&&(console.error("handleErrorResponse ",e,r.status),this.doErrorHandling())}doErrorHandling(){this.windowRef.nativeWindow&&i.performErrorPageRedirect()}};i.\u0275fac=function(r){return new(r||i)(s(A),s(J),s(Ee),s(ue),s(ee),s(se))},i.\u0275prov=d({token:i,factory:i.\u0275fac,providedIn:"root"});let c=i;return c})();var P=class extends Z{constructor(i,de,e){super(i,de),this.code=e}};var j=(()=>{let i=class i{constructor(e,r,t,o,a){this.router=e,this.winRef=r,this.routingConfigService=t,this.skeleton=o,this.redirect=a}handleRedirect(e,r={},t){if(this.skeleton)return!0;if(this.redirect)return this.redirect.target={location:e,status:t},!0;if(this.winRef.nativeWindow)if(this.isExternalUrl(e))this.winRef.nativeWindow.location.href=e;else{R.isFirstRender=!1;let o=e.split("?")[0],a=this.routingConfigService.getRouteName(o),p=this.router.parseUrl(e);if(a||p.root.segments.length)return p.queryParams=S(S({},p.queryParams),r.queryParams),p.fragment=r.fragment,p;this.router.navigateByUrl(e)}}isExternalUrl(e){return ie.test(e)}getCorrectPath(e,r){if(e&&decodeURIComponent(e.url)!==decodeURIComponent("/"+r.url.join("/"))){let t=this.router.parseUrl(e.url);return t.queryParams=S(S({},t.queryParams),r.queryParams),t.fragment=r.fragment,t}return null}};i.\u0275fac=function(r){return new(r||i)(s(u),s(A),s(V),s("SKELETON",8),s("REDIRECT",8))},i.\u0275prov=d({token:i,factory:i.\u0275fac,providedIn:"root"});let c=i;return c})();var Pe=/^[45]0[0-9]$/,pe=(()=>{let i=class i extends z{constructor(e,r,t,o,a,p,f){super(r,t,o),this.sipRedirectService=e,this._http=r,this._occEndpoints=t,this._converter=o,this.router=a,this.skeletonProduct=p,this.skeletonCategory=f,this.loggerFactory=X(x),this.log=this.loggerFactory.getLogger("SipOccCmsPageAdapter")}load(e,r){return R.isFirstRender=!1,e?.type===n.CATEGORY_PAGE&&this.skeletonCategory?e=new P(this.skeletonCategory,e.type):e?.type===n.PRODUCT_PAGE&&this.skeletonProduct?e=new P(this.skeletonProduct,e.type):e?.type===n.CONTENT_PAGE&&e?.code&&this.skeletonCategory&&(e=new P(this.skeletonCategory,e.type,e.code)),super.load(e).pipe(re(this.log,e.type?"loadByPageContext":"loadById"),N(t=>{if(t instanceof m){if(t.status===400&&(e.type===n.CATEGORY_PAGE||e.type===n.PRODUCT_PAGE))return this.load({id:e.type===n.CATEGORY_PAGE?b.NOT_FOUND_PAGE:_.NOT_FOUND_PAGE,type:n.CONTENT_PAGE},r);if(t.status===404&&e.type===n.CONTENT_PAGE)return this.load({id:"pageNotFound",type:n.CONTENT_PAGE},r);if(t.status===0||t.error?.type==="abort")return h;if(e.id===l&&Pe.test(String(t.status))){this.log.error(`Homepage unavailable (status ${t.status}), redirecting to Membership page`);let a=this.sipRedirectService.handleRedirect(G);return a instanceof E&&this.router.navigateByUrl(a),h}}this.log.error("unhandled CMS error",JSON.stringify(t));let o=this.sipRedirectService.handleRedirect(T);o instanceof E&&this.router.navigateByUrl(o)}))}
1getPagesRequestParams(e){if(e.id===l||e.id===K)return{};let r={};return e.type&&(r.pageType=e.type),e.type===n.CONTENT_PAGE?(r.pageLabelOrId=e.id,r.code=e.code):r.code=e.id,r}};i.\u0275fac=function(r){return new(r||i)(s(j),s(y),s(v),s(C),s(u),s("PRODUCT_CODE",8),s("CATEGORY_CODE",8))},i.\u0275prov=d({token:i,factory:i.\u0275fac,providedIn:"root"});let c=i;return c})();var Se=/^[45]0[0-9]$/,lr=(()=>{let i=class i extends pe{constructor(e,r,t,o,a,p,f,le,he,me,fe){super(r,t,o,a,p,me,fe),this.cmsService=e,this.siteService=f,this.headerService=le,this.bffEndpointsService=he,this.siteService.getSite().pipe(O(1)).subscribe(H=>{this.enableCSForHomePage=H.enableCSForHomePage,this.enableCSForContentPage=H.enableCSForContentPage,this.enableCSForHeaderPage=H.enableCSForHeaderPage})}isEnabled(){return this.siteService.getSite().pipe(Y(e=>e.enableCSForHomePage||e.enableCSForContentPage||e.enableCSForHeaderPage))}getPagesRequestParams(e){let r=super.getPagesRequestParams(e);if(e.id===l)return r;if(e.type===n.CONTENT_PAGE)if(e?.id.includes(w))r.pageLabelOrId=w;else if(this.enableCSForContentPage){let t=e.id,o=t.startsWith("/content/");r.pageLabelOrId=o?t.replace(/^\/content\//,""):t.replace(/^\/+/,"")}else r.pageLabelOrId=e.id;return r}buildPagesEndpoint(e,r){let t;return e.id===l&&this.enableCSForHomePage||e.type===n.CONTENT_PAGE&&this.enableCSForContentPage&&e.id!==l||e.type===n.CATEGORY_PAGE||e.type===n.PRODUCT_PAGE?t=this.bffEndpointsService.resolveEndpointUrl("pages",{queryParams:r}):t=this.occEndpoints.buildUrl("pages",{queryParams:r}),t}load(e,r){return R.isFirstRender=!1,this.isEnabled().pipe(U(o=>{if(!o)return super.load(e);let a=this.getPagesRequestParams(e),p=this.buildPagesEndpoint(e,a),f=e.type?p:this.occEndpoints.buildUrl("page",{urlParams:{id:e.id}});return this.enableCSForHeaderPage?this.headerService.loadCSHeader().pipe(U(()=>this.http.get(f,{headers:this.headers})),this._converter.pipeable(k)):this.http.get(f,{headers:this.headers}).pipe(this._converter.pipeable(k))})).pipe(N(o=>this.handleCmsError(o,e,r)))}getComponentData(e={}){let r=this.bffEndpointsService.resolveEndpointUrl("components",e);return this.http.get(r).pipe(g(()=>L(null)))}getContentStackPageData(){return this.cmsService.getContentSlot("contentStack").pipe(q(1))}handleCmsError(e,r,t){if(e instanceof m&&e.status===400&&(r.type===n.CATEGORY_PAGE||r.type===n.PRODUCT_PAGE))return this.load({id:r.type===n.CATEGORY_PAGE?b.NOT_FOUND_PAGE:_.NOT_FOUND_PAGE,type:n.CONTENT_PAGE},t);if(e instanceof m){if(e.status===404&&r.type===n.CONTENT_PAGE)return this.load({id:"pageNotFound",type:n.CONTENT_PAGE},t);if(e.status===0||e.error?.type==="abort")return h;if(r.id===l&&Se.test(String(e.status))){this.log.error(`Homepage unavailable (status ${e.status}), redirecting to Membership page`);let a=this.sipRedirectService.handleRedirect(G);return a instanceof E&&this.router.navigateByUrl(a),h}}this.log.error("unhandled CMS error",JSON.stringify(e));let o=this.sipRedirectService.handleRedirect(T);return o instanceof E&&this.router.navigateByUrl(o),h}};i.\u0275fac=function(r){return new(r||i)(s(Q),s(j),s(y),s(v),s(C),s(u),s(te),s(ne),s(oe),s("PRODUCT_CODE",8),s("CATEGORY_CODE",8))},i.\u0275prov=d({token:i,factory:i.\u0275fac,providedIn:"root"});let c=i;return c})();export{T as a,Ee as b,ue as c,be as d,j as e,pe as f,lr as g};

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.