1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f088878e-d891-40b0-a408-f8f09533a680",e._sentryDebugIdIdentifier="sentry-dbid-f088878e-d891-40b0-a408-f8f09533a680")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5122],{26463:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/orders",function(){return o(72289)}])},42222:function(e,t,o){"use strict";o.d(t,{Z:function(){return AccountLayout_AccountLayout}});var n=o(24246),i=o(27378),a=o(86677),r=o(90909),c=o(38944),s=o(66839),l=o(75275),u=o(46177),d=o.n(u),AccountNavigation_AccountNavigation=e=>{let{items:t,activeMenu:o,onClick:r,className:u}=e,_=(0,a.useRouter)(),{pathname:v}=_,[f,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{var e;let t=0,scrollEvent=()=>{var e,o,n;let i=null!==(n=null!==(o=null===(e=window)||void 0===e?void 0:e.scrollY)&&void 0!==o?o:document.documentElement.scrollTop)&&void 0!==n?n:0;i>t?m(!1):i<t&&m(!0),t=i<=0?0:i};return null===(e=document)||void 0===e||e.addEventListener("scroll",scrollEvent),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("scroll",scrollEvent)}},[v]);let b=(0,i.useCallback)(e=>()=>{r(e)},[r]);return(0,n.jsx)("div",{className:(0,c.Z)(d().root,u,{[d().sticky]:f,[d().notSticky]:!f}),children:t.map(e=>(0,n.jsxs)(s.Z,{id:e.id,className:(0,c.Z)(d().item,{[d().active]:o===e.id}),onClick:b(e.id),icon:e.icon,iconSize:"xl",animate:"star"===e.icon,children:[(0,n.jsx)(l.default,{id:"".concat(e.id,"-label"),className:(0,c.Z)(d().label,{[d().stroke]:o===e.id,[d().noStroke]:o!==e.id}),tag:"span",children:e.label}),e.hasNotification&&(0,n.jsx)("div",{className:d().notificationDot})]},e.id))})},_=o(44618),AccountLayout_AccountLayout=e=>{var t,o;let{children:c}=e,{t:s}=(0,r.$)("common",{keyPrefix:"accountLayout"}),{partner:l}=(0,_.Xf)(),u=(0,i.useCallback)(()=>{if(!l)return!1;let e=[!l.phone,!l.birthdate,!1===l.passwordUpdated];return e.some(e=>e)},[l]),d=[{id:"account-home-menu-nav",route:"/user",icon:"home",label:s("homeLabel")},{id:"account-profile-menu-nav",route:"/user/profile",icon:"user",label:s("profileLabel"),hasNotification:u()},{id:"account-orders-menu-nav",route:"/user/orders",icon:"box",label:s("orderLabel")},{id:"account-appointments-menu-nav",route:"/user/appointments",icon:"calendar-clock",label:s("appointmentLabel")},{id:"account-prescription-menu-nav",route:"/user/prescriptions",icon:"clipboard-prescription",label:s("prescriptionLabel")},{id:"account-invoices-menu-nav",route:"/user/invoices",icon:"file-invoice-dollar",label:s("invoiceLabel")},{id:"account-addresses-menu-nav",route:"/user/addresses",icon:"location-dot",label:s("addressLabel")}].filter(Boolean),v=(0,a.useRouter)(),{pathname:f,query:m}=v,b=null!==(o=null===(t=d.find(e=>e.route===f))||void 0===t?void 0:t.id)&&void 0!==o?o:"",[g,h]=(0,i.useState)(b);(0,i.useEffect)(()=>{h(b)},[b]);let p=(0,i.useCallback)(e=>{let t=d.find(t=>t.id===e);if(t){h(e);let o=document.getElementById(e);null==o||o.scrollIntoView({behavior:"smooth",block:"nearest"}),v.push(t.route)}},[v]),y=(null==m?void 0:m.appointmentCanceled)==="true";return(0,n.jsxs)(n.Fragment,{children:[!y&&(0,n.jsx)(AccountNavigation_AccountNavigation,{items:d,activeMenu:g,onClick:p}),c]})}},72289:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSP:function(){return p},default:function(){return OrderHistoryPage}});var n=o(24246),i=o(27378),a=o(97663),r=o.n(a),c=o(90909),s=o(85210),l=o(57062),u=o(92410),d=o(760),_=o(71897),v=o(75275),f=o(42222),m=o(90583),b=o(40901),g=o(88322),h=o.n(g),p=!0;function OrderHistoryPage(e){let{t}=(0,c.$)("common"),o=(0,b.SS)("bfMx.omnichannelCommerceContext.orderIssueReport__op"),{data:a,quotations:f,error:m}=e,g=a||[];(0,i.useEffect)(()=>{f.length>0&&r().dataLayer({dataLayer:{event:"account_draft_order",ecommerce:{label:"view"}}})},[]);let p=(0,i.useCallback)(e=>(0,n.jsx)(s.Z,{order:e,enableAccountReportIssue:o}),[o]),y=(0,i.useCallback)(()=>{location.reload()},[]),historyList=(e,o)=>(0,n.jsx)(l.Z,{items:o,title:e,headings:[t("orderHistory.firstHeading"),t("orderHistory.secondHeading")],renderItem:p,error:{imageSrc:"https://s3.benandfrank.com/headless/img/mole-right.svg",title:t("orderHistory.errorTitle"),ctaLable:t("orderHistory.ctaErrorLabel"),ctaHref:"/shop/category/opticos-30"}});return m?(0,n.jsx)(u.Z,{children:(0,n.jsx)(d.Z,{imageSrc:"https://s3.benandfrank.com/headless/img/mole-right.svg",title:t("alternativeStatusMessageTitle"),subtitle:t("alternativeStatusMessageSubtitle"),children:(0,n.jsx)(_.default,{size:"md",onClick:y,children:t("refresh")})})}):(0,n.jsxs)(u.Z,{children:[!!f.length&&(0,n.jsxs)("div",{className:h().quotationsRoot,children:[(0,n.jsx)("div",{className:h().quotation,children:(0,n.jsx)(v.default,{tag:"p",size:"sm",weight:"medium",html:t("orderHistory.quotation")})}),historyList(t("orderHistory.quotationTitle"),f)]}),f.length&&0===g.length?null:historyList(t("orderHistory.title"),g)]})}OrderHistoryPage.getLayout=function(e){return(0,n.jsx)(f.Z,{children:e})},OrderHistoryPage.Layout=m.Z},88322:function(e){e.exports={quotationsRoot:"styles_quotationsRoot__eFVDS",quotation:"styles_quotation__XL3_U"}},46177:function(e){e.exports={root:"AccountNavigation_root__Xu0LQ",item:"AccountNavigation_item__LE2YH",icon:"AccountNavigation_icon__k8Lza",iconActive:"AccountNavigation_iconActive__KFHHd",active:"AccountNavigation_active__GNDzn",stroke:"AccountNavigation_stroke__V8Ie5",noStroke:"AccountNavigation_noStroke__WVkZ8",label:"AccountNavigation_label__YD1g6",sticky:"AccountNavigation_sticky__Phc3j",notSticky:"AccountNavigation_notSticky__dKebV",notificationDot:"AccountNavigation_notificationDot__28Ns_"}}},function(e){e.O(0,[583,87,9774,2888,179],function(){return e(e.s=26463)}
1),_N_E=e.O()}]);
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.