PageSourceSearch

https://chickenloveyou.cl/_next/static/chunks/8459-39dede76c38b1176.js

js chickenloveyou.cl collected 2026-09-24 12:56:39 UTC 7,356 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8459],{2618:function(e,t,r){r.d(t,{t:function(){return l}});var n=r(31842),i=r(57650);let{getStoreData:o}=n.default;async function l(e,t,r){var n,l,a,s;let d=null!==(a=t().cart)&&void 0!==a?a:{},{cartStoreId:c}=d;if((null!==(s=null===(n=d.cart)||void 0===n?void 0:n.length)&&void 0!==s?s:0)===0||null==c)return null;await e(o({id:String(c),dispatchType:r},{onSuccess:null,onFailure:null,skipNextActions:!0,skipCheckScheduledDateAvailability:!1,skipPersist:!1}));let u=null===(l=t().searchStore)||void 0===l?void 0:l.currentSubsidiary;return(null==u?void 0:u.id)&&(0,i.l)(u.id,c)?u:null}},74134:function(e,t,r){r.d(t,{z:function(){return a}});var n=r(85893),i=r(67294);let o={primary:"!bg-primary text-content-inverse hover:opacity-90 active:opacity-80 disabled:opacity-50",secondary:"!bg-surface text-secondary border border-secondary hover:!bg-secondary-100 active:opacity-80 disabled:opacity-50",ghost:"!bg-transparent text-content-secondary hover:!bg-surface-muted active:!bg-surface-strong disabled:opacity-50",danger:"!bg-error-strong text-content-inverse hover:!bg-error-emphasis active:!bg-error-emphasis disabled:opacity-50"},l={sm:"px-3 py-1.5 text-sm rounded-lg",md:"px-4 py-2.5 text-base rounded-xl",lg:"px-6 py-3.5 text-lg rounded-xl"},a=(0,i.forwardRef)((e,t)=>{let{variant:r="primary",size:i="md",fullWidth:a=!1,loading:s=!1,disabled:d,className:c="",children:u,...h}=e;return(0,n.jsx)("button",{ref:t,disabled:d||s,className:"\n          inline-flex items-center justify-center font-semibold transition-all duration-150\n          ".concat(o[r],"\n          ").concat(l[i],"\n          ").concat(a?"w-full":"","\n          ").concat(c,"\n        ").trim(),...h,children:s?(0,n.jsx)("span",{className:"inline-block h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):u})});a.displayName="Button"},62609:function(e,t,r){r.d(t,{KU:function(){return s},SV:function(){return a}});var n=r(85893),i=r(67294),o=r(74134);function l(e){let{onRetry:t}=e;return(0,n.jsxs)("div",{className:"flex min-h-[300px] flex-col items-center justify-center px-6 py-12 text-center",children:[(0,n.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-error-soft",children:(0,n.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-error",children:[(0,n.jsx)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,n.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,n.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),(0,n.jsx)("h2",{className:"mb-1 font-title text-lg font-bold text-content",children:"Algo sali\xf3 mal"}),(0,n.jsx)("p",{className:"mb-6 max-w-xs text-sm text-content-muted",children:"Ocurri\xf3 un error inesperado. Por favor, intenta nuevamente."}),(0,n.jsx)(o.z,{variant:"primary",onClick:t,children:"Reintentar"})]})}class a extends i.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){var r,n;let i=this.props.scope||"Unknown";console.error("[ErrorBoundary:".concat(i,"]"),e,t),null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,n.jsx)(l,{onRetry:this.handleRetry}):this.props.children}constructor(e){super(e),this.handleRetry=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}}function s(e){let{children:t,scope:r}=e;return(0,n.jsx)(a,{scope:r,fallback:(0,n.jsx)("div",{className:"rounded-xl border border-error-soft bg-error-soft px-4 py-3 text-sm text-error-strong",children:"Esta secci\xf3n no pudo cargarse."}),children:t})}},45123:function(e,t,r){r.d(t,{X:function(){return E}});var n=r(31955),i=r(67294),o=r(26628),l=r(54865),a=r(18672),s=r(82586),d=r(83765),c=r(43919),u=r(4122),h=r(63253),p=r(4376),f=r(79011),v=r(19034),y=r(31842),x=r(2618);let{getCurrentUser:g,setAddress:b}=d.default,{getDefaultStoreId:m,getPopUpBanners:S}=c.default,{setMenuPreview:k}=u.default,{getLastOrder:w}=v.default,{getScheduledDateAvailability:N,getStoreData:j,getStoreDeliveryOptions:A,setDispatchType:C}=y.default;function E(){let e=(0,o.I0)(),t=(0,o.oR)(),r=(0,i.useRef)(!1),[d,c]=(0,i.useState)(!1);return(0,i.useEffect)(()=>
1{if(r.current)return;r.current=!0;let i=async()=>{try{var r,i,o,d,u,v,y,E,P,R;let c=(null===(r=t.getState().core)||void 0===r?void 0:null===(i=r.settings)||void 0===i?void 0:i.tenant)||window.location.hostname.split(".")[0];c&&(0,l.sR)(c);let h=n.Z.get(s.r.accessToken),p=n.Z.get(s.r.guestUserToken),f=n.Z.get(s.r.dispatchType)||"store_delivery",S=n.Z.get(s.r.currentSubsidiary);if(h){(0,l.mC)(h);try{await e(g(void 0,void 0,h))}catch(e){console.error("[useV2Hydration] getCurrentUser failed:",e)}}else p&&(0,l.mC)(p);e(C(f));let V=(t,r)=>{e(k(!1)),t.futureOrdersEnabled&&e(N()).catch(e=>{console.warn("[useV2Hydration] availability prefetch failed (".concat(r,"):"),e)})};if(S)try{await e(j({id:S,dispatchType:f},{onSuccess:null,onFailure:null,skipNextActions:!0,skipCheckScheduledDateAvailability:!1,skipPersist:!0}));let r=t.getState(),n=null===(o=r.searchStore)||void 0===o?void 0:o.currentSubsidiary;if(null==n?void 0:n.id){V(n,"cookie");let t=null===(d=r.auth)||void 0===d?void 0:null===(u=d.address)||void 0===u?void 0:u.current;"in_store"!==f&&(null==t?void 0:t.latitude)&&(null==t?void 0:t.longitude)&&!(null==t?void 0:t.isStoreAddress)&&e(A({lat:t.latitude,lng:t.longitude})).catch(()=>{})}}catch(e){console.error("[useV2Hydration] getStoreData failed:",e)}else{let r=!1;try{let n=await (0,x.t)(e,t.getState,f);n&&(V(n,"cart-store"),r=!0)}catch(e){console.warn("[useV2Hydration] cart-store restore failed:",e)}let n=!1,i=h||p;if(!r&&i)try{await e(w(i));let r=null===(v=t.getState().order)||void 0===v?void 0:v.lastOrder,o=null==r?void 0:r.storeId,l=null!==(y=null==r?void 0:r.dispatchMethod)&&void 0!==y?y:f;if(o){e(C(l));let i=l!==a.CK.PICKUP&&(null==r?void 0:r.userAddress)?{placeId:r.googlePlaceId,textAddress:r.userAddress,description:r.userAddress,latitude:r.userLatitude,longitude:r.userLongitude,city:r.userCity,hasStreetNumber:!0}:null;i&&e(b(i)),await e(j({id:String(o),dispatchType:l},{onSuccess:null,onFailure:null,skipNextActions:!0,skipCheckScheduledDateAvailability:!1,skipPersist:!1}));let s=null===(E=t.getState().searchStore)||void 0===E?void 0:E.currentSubsidiary;(null==s?void 0:s.id)&&(V(s,"last-order"),n=!0)}}catch(e){console.warn("[useV2Hydration] last-order restore failed:",e)}if(!r&&!n)try{await e(m());let r=null===(P=t.getState().core)||void 0===P?void 0:P.defaultStoreId;if(r){e(k(!0)),await e(j({id:r,dispatchType:f},{onSuccess:null,onFailure:null,skipNextActions:!0,skipCheckScheduledDateAvailability:!0,skipPersist:!0}));let n=null===(R=t.getState().searchStore)||void 0===R?void 0:R.currentSubsidiary;(null==n?void 0:n.id)&&n.futureOrdersEnabled&&e(N()).catch(e=>{console.warn("[useV2Hydration] availability prefetch failed (preview):",e)})}}catch(e){console.error("[useV2Hydration] preview load failed:",e)}}}finally{c(!0)}e(S()).then(()=>{e(f.ZP.setNextAction(h.ZP.openModal(p.ee.POP_UP_BANNERS)))}).catch(e=>{console.error("[useV2Hydration] getPopUpBanners failed:",e)})};i()},[e]),{v2StoreContextHydrated: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.