PageSourceSearch

https://dashboard.velocity.in/assets/orders_table-Gp9_qVfK.js

js velocity.in collected 2026-10-01 11:36:29 UTC 88,970 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bxr4U5Py.js","assets/index-BYjmYzu-.js","assets/index-BoBYvmN_.css","assets/index-ByjQY1tN.js","assets/index-CZNe-HiK.js","assets/Portal-BnIU9h3K.js","assets/getScrollBarSize-BX5bDlpW.js","assets/index-BblLubfX.css","assets/RightArrow-98Smf9Wq.js","assets/index-Cy7Vl5oX.js","assets/CloseIcon-DqZkkrpQ.js","assets/index-CKFX8CyF.css","assets/exchange_solo_shipping_components-DrG49Eme.js","assets/ship_button-DxHCPfuX.js","assets/ship_button-2DgR0jg5.css","assets/exchange_solo_shipping_components-BACp_p1r.css","assets/index-BT5g8ZbQ.js","assets/index-CneRmXqw.js","assets/Dropdown-Dy0ThnTD.js","assets/PlusOutlined-ByZyTB3m.js","assets/index-D7HIeDvb.js","assets/constants-B67rsI0D.js","assets/ManualOrder-BOvpA-1P.js","assets/index-B9RcjhjN.css","assets/index-Da9nGkgH.js","assets/DisconnectOutlined-BlFIV8_K.js","assets/GlobalOutlined-B48SQCSw.js","assets/Skeleton-DbxtqGSl.js","assets/index-CYNcHCkl.js","assets/useManualReturnFlow-DRoCtg-j.js","assets/shared-D_T4I7Hi.js","assets/index-Cz8vn1jM.js","assets/amazon_address_verified_badge-CcBrk7aQ.js","assets/InfoCircleOutlined-DObI79rA.js","assets/amazon_address_verified_badge-DqGxDAVq.css","assets/buyer_info_eye-CP21mU9K.js","assets/index-DbMkVQt2.js","assets/EyeOutlined-Cm45kPpF.js","assets/buyer_info_eye-C9glSLR_.css","assets/index-C_j0F2to.js","assets/utils-BZTh1pv3.js","assets/react-number-format.es-HDPTMfGw.js","assets/Table-B5SVGtym.js","assets/index-BG2GygdK.js","assets/css-CG3sgCP8.js","assets/isEqual-DutTMpuB.js","assets/dropdown-CVdns1v5.js","assets/isNumeric-OYazz19Q.js","assets/index-Dc7VWUtF.css","assets/index-BM3i_oFH.js","assets/PlusOutlined-CPs_XxoL.js","assets/index--DEz-n84.css","assets/RightArrowDiagnol-C8GaNRqk.js","assets/form_utils-BRD3em_d.js","assets/shared-DtElROdW.css","assets/solo_shipping_edit_customer-BBus1BnW.js","assets/use_country_list-BcafOyCY.js","assets/Suggestions-CggwJVPl.js","assets/index-DpRxiyQB.js","assets/modal_component-CgKrFsb7.js","assets/modal_header-su8lU-Gk.js","assets/index-BNQX9KrA.js","assets/DialogWrap-BcWh8mEF.js","assets/useId-CCfbXMy0.js","assets/index-8VM8nRWn.css","assets/exchange_edit_utils-DywbiHo4.js","assets/solo_shipping_edit.module-Wqcl7gGd.js","assets/solo_shipping_edit-BlNR2vpX.css","assets/col-DSokC5oO.js","assets/solo_shipping_edit_customer-GVBMbmMr.css","assets/solo_shipping_edit_pickup-BjWUcRcq.js","assets/index-CtrSteMo.js","assets/QuestionCircleOutlined-CkfPyHQh.js","assets/useManualExchangeFlow-Ce5ojUT8.js","assets/other_details_form-n07bSaev.js","assets/UpOutlined--pJ7qTde.js","assets/DownOutlined-CNOnAf1g.js","assets/index-Ck98gylS.js","assets/DeleteIcon-CjMAKgqy.js","assets/product_creation_form-Cg8vqGOa.js","assets/CloseOutlined-Dj9ziNvG.js","assets/utils-CvUC3fFy.js","assets/RuppeeCircleIcon-Cky5YoQj.js","assets/package_creation_form-BFlHy_D_.js","assets/PackageSmall-Cz2t3tKf.js","assets/OpenBoxDeliveryIcon-DMejWF9J.js","assets/index-BYzjpSmu.js","assets/index-DwwQrX9h.js","assets/TagV2-Fo7EmOP1.js","assets/TimerLine-DdiIAplH.js","assets/index-Oo4On0q3.css","assets/index-CSibPLgg.js","assets/other_details_form-Bx9NicQN.css","assets/common_utils-apf5QVJD.js","assets/integrations_constants-CA4Ima8N.js","assets/index-B5-8UM3L.js","assets/index-DG0JEyiY.js","assets/index-fdvm3zS5.js","assets/index-Z1OhEc9H.css","assets/index-BVeJ-34q.js","assets/FileTextOutlined-Dz6fIgnP.js","assets/BulkUpload-Dxg7UkJb.js","assets/CsvDocument-Bm57hEhI.js","assets/bulk_create.module-B0QSD11K.js","assets/bulk_create-z3nMd_Q5.css","assets/index-yNgqIjMK.js","assets/DeleteOutlined-DFutYCzo.js","assets/DownloadOutlined-DTidZHln.js","assets/progress-CulXLWa9.js","assets/UploadOutlined-C4BYaSIH.js","assets/index-OthMuT-P.css","assets/index-DSxvmbkW.js","assets/index-DFzZ1UCK.js","assets/warning_modal.module-BYzNoG0k.js","assets/CloseCircleFilled-CihxIFhu.js","assets/ToolOutlined-Bs62p_Qe.js","assets/warning_modal-Cfzi77jx.css","assets/common-CVblNTI2.js","assets/ExclamationCircleFilled-BbRiwZEw.js","assets/index-BChi9RGi.css","assets/index-UVgf_GqK.js","assets/index-C06G1oJB.css","assets/index-MAVvr33h.js","assets/index.module-C1ppdSyB.js","assets/index-CTAE3wkZ.css","assets/Truck-C4WtqYkB.js","assets/LocationPin-BqUoIN3V.js","assets/Package-DnPe42V9.js","assets/Guidelines-z-H_jsmH.js","assets/bulk_labels_download_modal-D0NMKdcH.js","assets/index.module-Bzx3iP0g.js","assets/index-BVaKwq82.css","assets/CheckCircleFilled-BANXNh6y.js","assets/CheckOutlined-MXWxCOVM.js","assets/index-BA1Vh8bk.js","assets/Keyframes-CEQCE7hz.js","assets/confirmation_modal
1-aINd-abh.js","assets/confirmation_modal-C7ftM7n0.css","assets/CopyOutlined-CvUfh1dz.js","assets/mixpanel_utils-BIdpoJGP.js","assets/disable_tooltips-CFCTnA_K.js","assets/TagOutlined-Dr4hLQtJ.js","assets/EditOutlined-BAkUIEJs.js","assets/CheckCircleOutlined-D9_Yb30M.js","assets/DeleteOutlined-DPlW08at.js","assets/DownloadOutlined-Cpoeis49.js","assets/index-BDWfjqiX.css","assets/index-DVDEDsrA.js","assets/index-CeA2aCez.css","assets/vas_banners-qbN6Yu33.js","assets/firebase-CW9I-1vg.js","assets/utils-0rEeyWE7.js","assets/rto_risk-MK6tLe1H.js","assets/rto_risk-Df1DDUCU.css","assets/index-CtGilxXr.js","assets/index-DIINYW3v.js"])))=>i.map(i=>d[i]);
2import{r as s,_ as er,$ as tr,b as sr,j as e,bd as o,W as Ie,bg as m,hT as Wt,ay as be,bS as se,kF as rr,ak as X,bW as ne,aS as Te,bt as et,d as Be,bi as pe,fV as nr,bj as Ce,aA as ue,gs as Ke,kG as zt,a1 as U,Z as as,bU as ir,fi as or,dO as ar,bh as tt,dP as lr,T as ls,k4 as cr,a3 as dr,Y as ur,ci as pr,kH as mr,kI as _r,jN as hr,aU as we,by as cs,kJ as gr,a4 as Q,eg as Se,kK as ds,dG as Cr,fc as fr,cb as us,X as Qe,eI as xr,bw as yr,o as jr,p as vr,ek as Sr,L as Ir,F as wr,v as br,cu as Tr,x as kr,eE as Zt,jW as ps,kL as Er,jI as Dr,kM as Rr,eC as Lr,a9 as Nr,kN as Or,kO as Ar,kP as Fr,kQ as Pr,jL as Br,d$ as Mr,jm as ms,n as _s,jn as Ur,gq as Hr,b9 as Vr,c8 as Wr,bI as zr,gY as Zr,dp as $r,ds as Yr,dq as Gr,i$ as qr,bv as W,fL as Kr,gi as We,bk as $t,gZ as Qr,ew as Xr,kR as Jr,kS as en,ch as tn,aT as Yt,bu as sn,gj as Gt}from"./index-BYjmYzu-.js";import{S as rn}from"./Filter-DEWjv1rw.js";import{S as nn}from"./index-Cee1dYyO.js";import{S as on}from"./IntegrationIcon-BiE4LdB7.js";import{S as an}from"./Package-DnPe42V9.js";import{P as ln}from"./index-Ln_OQCmy.js";import{d as ie}from"./index-BT5g8ZbQ.js";import{R as cn}from"./LeftOutlined-Bj9cZ122.js";import{D as dn}from"./index-DWTh2oxh.js";import{D as un}from"./index-CGu_v2k-.js";import{w as qt,N as pn,I as mn,G as _n}from"./warning_modal.module-BYzNoG0k.js";import{D as hn}from"./index-EFx6b1xQ.js";import{S as gn}from"./index-D7HIeDvb.js";import{t as hs}from"./mixpanel_utils-BIdpoJGP.js";import{S as gs,E as Cn}from"./index-ydV7JsxX.js";import{b as ve,S as fn,c as xn,A as yn,P as jn,D as vn,d as Kt}from"./index-DwwQrX9h.js";import{C as Sn}from"./index-Cz8vn1jM.js";import{u as In,a as wn,b as bn,B as Tn}from"./buyer_info_eye-CP21mU9K.js";import{P as kn}from"./product_column-lnr6P4qP.js";import{f as ze,s as Fe,a as Cs,P as En,S as Dn}from"./ship_button-DxHCPfuX.js";import{C as Rn}from"./carrier_details-BFM4z9HH.js";import{f as Xe,I as Ln}from"./index-CgVHZW-i.js";import{a as Nn}from"./index-BYzjpSmu.js";import{S as On}from"./utils-DckeAkVs.js";import{O as An}from"./index-C1ZgstEG.js";import{B as Je}from"./index-CgY3NbeE.js";import{R as Fn}from"./InfoCircleOutlined-DObI79rA.js";import{g as Pn,e as Bn}from"./index-UVgf_GqK.js";import{d as Qt}from"./common-4kKnXVgZ.js";import{s as Mn}from"./return_order.module-gqXvlspy.js";import{S as Un}from"./Truck-C4WtqYkB.js";import{S as Hn}from"./EditPencil-BGoWgho6.js";import{M as st}from"./modal_component-CgKrFsb7.js";import{a as fs}from"./modal_header-su8lU-Gk.js";import{S as Vn}from"./TruckRtoLine-DCzMXGi9.js";import{C as xs}from"./disable_tooltips-CFCTnA_K.js";import{D as ys}from"./dropdown-CVdns1v5.js";import{R as Wn}from"./ExclamationCircleFilled-BbRiwZEw.js";import{C as zn}from"./index-ByjQY1tN.js";import{D as Zn}from"./index-Cy7Vl5oX.js";import{g as $n,c as Yn}from"./index-a4NdiaCj.js";import{S as Gn}from"./BulkUpload-Dxg7UkJb.js";import{v as qn}from"./form_utils-BRD3em_d.js";import{U as Kn}from"./index-yNgqIjMK.js";import{R as Qn}from"./DownloadOutlined-Cpoeis49.js";import{R as Xt}from"./TagOutlined-Dr4hLQtJ.js";import{R as Jt}from"./EditOutlined-BAkUIEJs.js";import{R as js}from"./PlusOutlined-CPs_XxoL.js";import{R as Xn}from"./CopyOutlined-CvUfh1dz.js";import{R as Jn}from"./ExclamationCircleOutlined-htogdyLm.js";import{R as ei}from"./CheckCircleOutlined-D9_Yb30M.js";import{M as ti}from"./index-BNQX9KrA.js";import{R as vs}from"./SyncOutlined-B6P8b_PL.js";import{R as si}from"./DeleteOutlined-DPlW08at.js";import{T as ri}from"./table_loader-1S6nfwbj.js";import{f as es,u as Ze,b as ts}from"./firebase-CW9I-1vg.js";import{T as ni}from"./Table-B5SVGtym.js";import{S as ii}from"./Skeleton-B0jWT2qh.js";
2import"./utils-BZTh1pv3.js";import"./react-number-format.es-HDPTMfGw.js";import"./index-C3z6_BZa.js";import"./constant-BjqaakFy.js";import"./MoneyBillLine-DnUa9uMh.js";import"./InvoiceLine-_87NgkCt.js";import"./BillLine-lEZAu1jX.js";import"./WalletOutlined-_1SGXT6X.js";import"./utils-k_PfN3YJ.js";import"./DownOutlined-CNOnAf1g.js";import"./CloseCircleFilled-CihxIFhu.js";import"./PackageSmall-Cz2t3tKf.js";import"./ToolOutlined-Bs62p_Qe.js";import"./index-Dn8Hzhoo.js";import"./index-D6c-D_1p.js";import"./constants-B67rsI0D.js";import"./ManualOrder-BOvpA-1P.js";import"./TagV2-Fo7EmOP1.js";import"./TimerLine-DdiIAplH.js";import"./amazon_address_verified_badge-CcBrk7aQ.js";import"./index-DbMkVQt2.js";import"./EyeOutlined-Cm45kPpF.js";import"./product_brief-Du75T5en.js";import"./index-C_j0F2to.js";import"./index-aSaBEyNL.js";import"./RightOutlined-nkDSTxE1.js";import"./index-BxoH0HJA.js";import"./walletPromo-7iFugMAD.js";import"./index-B5-8UM3L.js";import"./css-CG3sgCP8.js";import"./DialogWrap-BcWh8mEF.js";import"./Portal-BnIU9h3K.js";import"./getScrollBarSize-BX5bDlpW.js";import"./useId-CCfbXMy0.js";import"./use_is_mobile-DqL4BDQM.js";import"./constant-C4dI9lln.js";import"./utils-0rEeyWE7.js";import"./PackageMedium-KH3dGcuL.js";import"./CartTrolley-Bh7kmKkA.js";import"./constants-Bu9vwQ3w.js";import"./KeyLine-DgqVzgWN.js";import"./MessageFill-BLP7fHxQ.js";import"./ClipboardLineIcon-BgT9J_h3.js";import"./ExchangeLine-JzMuzJ_J.js";import"./layout.module-CnEu4Xzs.js";import"./ExportOutlined-sAzuxo5O.js";import"./index-Da4By-ji.js";import"./Timeline-BEefx6d8.js";import"./duration-C7B3TU_l.js";import"./Dropdown-Dy0ThnTD.js";import"./isNumeric-OYazz19Q.js";import"./index-CZNe-HiK.js";import"./CloseIcon-DqZkkrpQ.js";import"./QuestionCircleOutlined-BTBigpWi.js";import"./QuestionCircleOutlined-CkfPyHQh.js";import"./DeleteOutlined-DFutYCzo.js";import"./DownloadOutlined-DTidZHln.js";import"./progress-CulXLWa9.js";import"./PlusOutlined-ByZyTB3m.js";import"./index-BG2GygdK.js";import"./isEqual-DutTMpuB.js";import"./Keyframes-CEQCE7hz.js";var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z"}}]},name:"environment",theme:"outlined"},ai=function(r,c){return s.createElement(er,tr({},r,{ref:c,icon:oi}))},ss=s.forwardRef(ai);const li="_actionsRow_1vjm1_10",ci="_actionCard_1vjm1_14",di="_iconBadge_1vjm1_31",ui="_icon_1vjm1_31",pi="_cardTitle_1vjm1_45",mi="_cardDescription_1vjm1_52",_i="_cardButton_1vjm1_59",hi="_orDivider_1vjm1_63",gi="_orLine_1vjm1_68",Ci="_orLabel_1vjm1_73",z={actionsRow:li,actionCard:ci,iconBadge:di,icon:ui,cardTitle:pi,cardDescription:mi,cardButton:_i,orDivider:hi,orLine:gi,orLabel:Ci},fi=({onAddManualOrder:t})=>{const r=sr();return e.jsxs(o,{align:"stretch",justify:"center",gap:0,className:z.actionsRow,children:[e.jsxs(o,{vertical:!0,gap:15,className:z.actionCard,children:[e.jsx("div",{className:z.iconBadge,children:e.jsx(on,{className:z.icon})}),e.jsxs(o,{vertical:!0,gap:6,children:[e.jsx("p",{className:z.cardTitle,children:"Connect your sales channel"}),e.jsx("p",{className:z.cardDescription,children:"Sync orders from platforms you already sell on."})]}),e.jsx(Ie,{size:"small",className:z.cardButton,onClick:()=>r("/shipping/settings/integration"),children:"Connect Channel"})]}),e.jsxs(o,{vertical:!0,align:"center",justify:"center",className:z.orDivider,"aria-hidden":!0,
2children:[e.jsx("span",{className:z.orLine}),e.jsx("span",{className:z.orLabel,children:"OR"}),e.jsx("span",{className:z.orLine})]}),e.jsxs(o,{vertical:!0,gap:15,className:z.actionCard,children:[e.jsx("div",{className:z.iconBadge,children:e.jsx(an,{className:z.icon})}),e.jsxs(o,{vertical:!0,gap:6,children:[e.jsx("p",{className:z.cardTitle,children:"Add order manually"}),e.jsx("p",{className:z.cardDescription,children:"Create a new order and start fulfilling right away."})]}),e.jsx(Ie,{size:"small",className:z.cardButton,onClick:t,children:"Add New Order"})]})]})},xi=({tags:t})=>{const[r,c]=s.useState(!1),p=[...new Set(t.filter(Boolean))];if(p.length===0)return null;const d=p.length-1,g=f=>{f.stopPropagation(),c(!0)},v=f=>{f.stopPropagation(),c(!1)};return r?e.jsxs(o,{align:"center",gap:8,wrap:"wrap",className:m.orderTagsList,children:[p.map((f,x)=>e.jsx(Wt,{text:f},`${f}-${x}`)),e.jsx("button",{type:"button",className:m.orderTagsCollapseButton,"data-stop-row-click":!0,onClick:v,"aria-label":"Collapse tags",children:e.jsx(cn,{})})]}):e.jsxs(o,{align:"center",gap:8,className:m.orderTagsList,children:[e.jsx(Wt,{text:p[0]}),d>0&&e.jsxs("button",{type:"button",className:m.orderTagsMoreButton,"data-stop-row-click":!0,onClick:g,children:["+",d]})]})},yi="_fastFilterButton_iya6n_10",ji="_fastFilterButtonContent_iya6n_14",vi="_activeButton_iya6n_25",$e={fastFilterButton:yi,fastFilterButtonContent:ji,activeButton:vi},Si=()=>{const{query:t,appendParams:r,removeParam:c}=be(),p=t.express==="true",d=()=>{p?c("express"):r({express:!0})};return e.jsx(se,{size:"small",className:X($e.fastFilterButton,{[$e.activeButton]:p}),onClick:d,children:e.jsxs(o,{gap:4,align:"center",className:$e.fastFilterButtonContent,children:[e.jsx("p",{children:"Eligible for"}),e.jsx(rr,{}),e.jsxs("p",{children:[e.jsx("span",{children:"Fast"})," Delivery"]})]})})},Ii="_rtoRiskStatusTitle_3mkj9_10",wi="_rtoRiskStatusContainer_3mkj9_15",bi="_rtoRiskStatusText_3mkj9_19",Ye={rtoRiskStatusTitle:Ii,rtoRiskStatusContainer:wi,rtoRiskStatusText:bi},Ti={low:{label:"Low",textColor:"#1AB746",bgColor:"#1AB7460F",popoverText:"This order has a LOW risk of RTO based on customer profile and order history."},medium:{label:"Medium",textColor:"#ED8B2A",bgColor:"#ED8B2A0F",popoverText:"This order has a MEDIUM risk of RTO based on customer profile and order history."},high:{label:"High",textColor:"#D93E3E",bgColor:"#D93E3E0D",popoverText:"This order has a HIGH risk of RTO based on customer profile and order history."},very_high:{label:"Very High",textColor:"#8B0000",bgColor:"#8B000014",popoverText:"This order has a VERY HIGH risk of RTO based on customer profile and order history."},"N/A":{label:"N/A",textColor:"#3D3D6B",bgColor:"#F4F4F4",popoverText:""}},ki=({status:t})=>{if(!t)return null;const r=Ti[t];return r?e.jsx(o,{align:"center",gap:6,children:e.jsx(ne,{title:r.popoverText,color:"#FFFFFF",placement:"top",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsxs(o,{className:Ye.rtoRiskStatusContainer,align:"center",gap:4,style:{backgroundColor:r.bgColor},children:[e.jsx("p",{className:Ye.rtoRiskStatusTitle,children:"RTO Risk :"}),e.jsx("p",{className:Ye.rtoRiskStatusText,style:{color:r.textColor},children:r.label})]})})}):(console.warn(`Unknown RTO risk status: ${t}`),null)},Ei=t=>({...t,request_status:t.request_status==="pending"&&!t.address_validity?"pending":t.request_status||"success"}),Di=({orderId:t,orderIdText:r,isInternalRtoScoreEnabled:c,insights:p,order_date:d,store_name:g,channel:v,express:f})=>{const[x,C]=s.useState(!1),[b,u]=s.useState(null),{shipfastProfile:y}=Te(),{updateShipfastOrderInsights:w}=et(),{isShipfastChildUser:l,userUuid:j}=Be(),T=a=>{if(a)return c?a.internal_rto_score??a.rto_risk:a.rto_risk},k=T(p)||T(b),L=a=>{if(!t)return;const D=Ei(a);u(D),w(t,D)},E=async()=>{if(t)for(let a=0;a<3;a++){await new Promise(B=>setTimeout(B,1200));const D=await zt(t);if(!(!D.ok||!D.data)&&(L(D.data),D.data.address_validity||D.data.request_status==="success"))break}},N=async()=>{if(t)try{C(!0),hs("shipfast_orders_view_rto_risk",{client_id:y==null?void 0:y.id,user_uuid:j,is_child_user:l});const{ok:a,data:D}=await zt(t);if(!a||!D){U((D==null?void 0:D.error)||"Failed to fetch RTO risk");return}L(D),(!D.address_validity||D.request_status==="pending")&&E()}catch{U("Failed to fetch RTO risk")}finally{C(!1)}};return e.jsxs(o,{vertical:!0,gap:3,className:m.orderIdColumn,children:[e.jsxs(o,{align:"center",gap:6,className:m.orderIdContainer,children:[e.jsxs(o,{align:"center",gap:6,className:m.orderIdTextRow,children:[e.jsx(gn,{storeName:g,channel:v}),e.jsx("div",{className:m.orderIdTextWrapper,children:e.jsx(pe,{isHoverable:!0,isIndexColumn:!0,className:m.orderIdText,copyable:{text:r,tooltips:!1},ellipsis:{tooltip:{title:r,color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"}}},children:r})})]}),f&&e.jsx(nr,{})]}),e.jsx(Ce,{children:ue(d).format("DD MMM YY | hh:mm A")}),k?e.jsx(e.Fragment,{children:e.jsx(ki,{status:b?Ke(b,c):Ke(p,c)})}):e.jsx(ne,{title:"Check RTO risk for this order and unlock address quality check for the buyer's address",color:"#FFFFFF",placement:"top",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(se,{loading:x,size:"small",className:m.viewRtoRiskButton,icon:e.jsx(gs,{}),onClick:a=>{a.stopPropagation(),N()},children:"RTO Risk"})})]})},Ri=s.memo(Di),Li="_container_1ry2s_10",Ni="_fallbackTag_1ry2s_17",Oi="_initiated_1ry2s_23",Ai="_placed_1ry2s_24",Fi="_queued_1ry2s_25",Pi="_answered_1ry2s_26",Bi="_completed_1ry2s_30",Mi="_rejected_1ry2s_34",Ui="_failed_1ry2s_35",Ge={container:Li,fallbackTag:Ni,initiated:Oi,placed:Ai,queued:Fi,answered:Pi,completed:Bi,rejected:Mi,failed:Ui},Ss=["answered","completed"],Is=["initiated","placed"],ws=["failed","rejected"],Ne={success:"#1AB746",initiated:"var(--shipfast-primary-color)",failed:"#D93E3E",default:"#3D3D6B"},Hi=t=>Ss.includes(t)?"aiCallSuccess":Is.includes(t)?"aiCallInitiated":ws.includes(t)?"aiCallFailed":null,Vi=t=>Ss.includes(t)?Ne.success:Is.includes(t)?Ne.initiated:ws.includes(t)?Ne.failed:Ne.default,Wi=({status:t,isIvr:r})=>{const c=t==null?void 0:t.toLowerCase(),p=`${r?"IVR":"AI"} call ${as(c)}`,d=Hi(c);
2return d?e.jsx(ve,{type:d,tooltipTitle:p,tooltipTextColor:Vi(c)}):e.jsx(ne,{title:p,color:"#FFFFFF",overlayInnerStyle:{color:Ne.default},children:e.jsxs(ir,{className:X(Ge.container,Ge.fallbackTag,Ge[c]),onClick:g=>g.stopPropagation(),children:[r?"IVR":"AI"," call ",c]})})},zi=s.memo(Wi),Zi=t=>s.createElement("svg",{width:18,height:17,viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{d:"M7.25584 15.0875C7.1158 15.1219 6.96929 15.1219 6.82926 15.0875C5.18772 14.6843 3.82465 13.8338 2.74005 12.5362C1.60881 11.1827 1.04345 9.68014 1.04395 8.02843V4.77593C1.04395 4.34311 1.32238 3.95942 1.73386 3.82522L6.73246 2.19489C6.93396 2.12917 7.15112 2.12917 7.35262 2.19489L12.3512 3.82522C12.7627 3.95942 13.0411 4.34311 13.0411 4.77593V8.02843C13.0411 9.68058 12.4758 11.1834 11.345 12.5368C10.2609 13.8345 8.89783 14.6847 7.25584 15.0875Z",fill:"url(#amazon_table_verified_paint0_radial)"}),s.createElement("path",{d:"M6.79004 1.07617C6.9541 1.02149 7.13182 1.02159 7.2959 1.07617L13.3398 3.09082C13.6664 3.19973 13.8866 3.50538 13.8867 3.84961V7.90332C13.8866 9.83677 13.2406 11.596 11.9404 13.1865C10.6874 14.7194 9.11296 15.718 7.21289 16.1875C7.1016 16.215 6.98531 16.215 6.87402 16.187
25C4.97449 15.7175 3.40013 14.7184 2.14648 13.1855C0.845697 11.595 0.19971 9.83621 0.200195 7.90332V3.84961C0.200275 3.50534 0.420455 3.19969 0.74707 3.09082L6.79004 1.07617Z",fill:"#2DBFF8",fillOpacity:.12,stroke:"#2DBFF8",strokeWidth:.4}),s.createElement("g",{clipPath:"url(#amazon_table_verified_clip0)"},s.createElement("path",{d:"M8.46297 8.85137C8.0298 9.48488 7.3955 9.78422 6.65321 9.78422C5.75166 9.78422 4.97963 9.09045 5.09076 8.17051C5.21363 7.15 6.0064 6.71097 7.32429 6.54936C7.55946 6.5208 7.65689 6.51258 8.1644 6.47501L8.2184 6.4711V6.38697C8.21801 5.6842 7.8005 5.20447 7.23977 5.20447C6.67747 5.20447 6.285 5.49677 6.04435 6.19289L5.3048 5.93776C5.65188 4.93213 6.33704 4.42188 7.23977 4.42188C8.25793 4.42188 9.00061 5.27412 9.00061 6.38697C9.00061 7.42352 9.06439 8.24798 9.1896 8.56141C9.32891 8.91084 9.37978 8.99849 9.53551 9.19258L8.92509 9.68209C8.72005 9.42696 8.63083 9.27162 8.46297 8.85137ZM8.22232 7.25604C7.72967 7.29283 7.63694 7.30026 7.41937 7.32687C6.42039 7.44935 5.93362 7.71934 5.86749 8.2652C5.81858 8.67332 6.18444 9.00241 6.65321 9.00241C7.45107 9.00241 8.02941 8.52189 8.22701 7.25604H8.22232Z",fill:"black"}),s.createElement("g",{clipPath:"url(#amazon_table_verified_clip1)"},s.createElement("path",{d:"M10.6663 11.1704C10.5606 11.2486 10.3763 11.202 10.4597 10.9982C10.563 10.7446 10.6737 10.4472 10.5622 10.3126C10.48 10.2128 10.3791 10.1632 10.1603 10.1632C9.98035 10.1632 9.89035 10.1866 9.77101 10.1945C9.69118 10.1999 9.65597 10.0782 9.7354 10.0223C9.83753 9.9499 9.94827 9.89316 10.0758 9.85481C10.5258 9.7202 11.056 9.79416 11.1206 9.88729C11.2634 10.0947 11.0419 10.8921 10.6663 11.1704ZM10.2042 10.7466C10.1023 10.8444 9.99393 10.9353 9.87979 11.0185C9.04946 11.6509 7.97378 11.9811 7.03975 11.9811C5.53599 11.9811 4.1911 11.2795 3.1706 10.1048C3.08295 10.0149 3.15534 9.88337 3.25786 9.95459C4.3574 10.7673 5.71834 11.2588 7.12701 11.2588C8.01369 11.2588 8.96924 11.0487 9.87979 10.5967C9.94357 10.5666 10.0148 10.5255 10.077 10.4969C10.2206 10.4148 10.347 10.6167 10.2042 10.7466Z",fill:"#FF9900"}))),s.createElement("circle",{cx:14.0868,cy:3.91298,r:3.66298,fill:"#1AB746",stroke:"white",strokeWidth:.5}),s.createElement("g",{clipPath:"url(#amazon_table_verified_clip2)"},s.createElement("path",{d:"M12.5454 4.12702L13.5726 5.15417L15.6269 2.95312",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})),s.createElement("defs",null,s.createElement("radialGradient",{id:"amazon_table_verified_paint0_radial",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.04254 8.61538) rotate(89.9838) scale(8.21623 7.55729)"},s.createElement("stop",{stopColor:"white"}),s.createElement("stop",{offset:1,stopColor:"#2DBFF8"})),s.createElement("clipPath",{id:"amazon_table_verified_clip0"},s.createElement("rect",{width:9.39115,height:9.39115,fill:"white",transform:"translate(2.34863 3.13281)"})),s.createElement("clipPath",{id:"amazon_table_verified_clip1"},s.createElement("rect",{width:9.39115,height:9.39115,fill:"white",transform:"translate(2.34863 3.91406)"})),s.createElement("clipPath",{id:"amazon_table_verified_clip2"},s.createElement("rect",{width:4.69557,height:4.69557,fill:"white",transform:"translate(11.7383 1.5625)"})))),{Paragraph:$i}=ls,Yi=s.memo(({shipping_address:t,insights:r,showEdit:c,onEditCustomer:p,orderId:d,returnId:g,piiMasked:v})=>{const{isBuyerDataAccessEnabled:f}=Te(),x=g?"return":"shipment",C=g||d,b=In(t,x,C),u=wn(v,x,C),y=b==null?void 0:b.name,w=b==null?void 0:b.phone,l=r==null?void 0:r.address_validity,j=or(l),T=ar(r,t);return e.jsx(tt,{placement:"bottom",overlayClassName:m.customerDetailsPopover,content:e.jsx(Sn,{shippingAddress:t,handleEdit:c?p:void 0,addressValidity:l||void 0,insights:r,shipmentId:d,returnId:g,piiMasked:v}),trigger:"hover",children:e.jsxs(o,{vertical:!0,onClick:k=>{k.stopPropagation(),p()},children:[e.jsxs(o,{vertical:!0,children:[e.jsx(o,{align:"center",gap:6,children:e.jsx(pe,{isHoverable:!0,children:y})}),!!w&&e.jsxs(o,{align:"center",gap:4,children:[e.jsx(lr,{className:m.phoneIcon}),e.jsx("div",{className:m.customerPhoneCopyWrapper,children:e.jsx(Ce,{copyable:u?!1:{text:w,tooltips:!1},className:u||!f?bn.maskedText:void 0,children:w})}),e.jsx(Tn,{shipmentId:d,returnId:g,piiMasked:v})]})]}),e.jsxs(o,{gap:4,className:X(m.addressValidityContainer,{[m.addressValidityContainerWithIcon]:j==null?void 0:j.icon}),style:{backgroundColor:j==null?void 0:j.titleBgColor,borderColor:j==null?void 0:j.titleBorderColor},children:[(j==null?void 0:j.icon)&&e.jsx(o,{className:m.addressValidityIconContainer,style:{color:j==null?void 0:j.titleColor},children:j==null?void 0:j.icon}),e.jsxs($i,{type:"secondary",className:m.addressValidityAddressText,ellipsis:{rows:1},children:[e.jsx("span",{className:m.addressValidityAddressText,children:t==null?void 0:t.city}),","," ",e.jsx("span",{className:m.addressValidityAddressText,children:t==null?void 0:t.zip})]}),T&&e.jsx(Zi,{"aria-label":"Amazon verified address",className:m.amazonVerifiedTableIcon,onClick:k=>k.stopPropagation()})]})]})})}),Gi=s.memo(({shipmentId:t,applicable_weight:r,packages:c,package_id:p,weight:d,volume_weight:g,showPackageWarning:v=!1,status:f,insights:x})=>{var L,E,N;const C=!!t&&v&&f==="pending"&&cr(x),b=ze(r==null?void 0:r.value),u=c.find(a=>a.id===p),y=ze(d==null?void 0:d.value),w=ze(g==null?void 0:g.value),l=(L=u==null?void 0:u.attributes)==null?void 0:L.length,j=(E=u==null?void 0:u.attributes)==null?void 0:E.width,T=(N=u==null?void 0:u.attributes)==null?void 0:N.height,k=l&&j&&T?` (${l}x${j}x${T})`:"";return e.jsxs(o,{vertical:!0,gap:6,children:[e.jsxs(o,{gap:4,align:"center",children:[e.jsx(pe,{children:b}),C&&e.jsx(tt,{placement:"bottomLeft",trigger:"hover",overlayClassName:Fe.weightSlabPopoverOverlay,className:m.popover,content:e.jsx(En,{shipmentId:t,deadWeightInGrams:d==null?void 0:d.value,historicWeight:x==null?void 0:x.historic_weight}),children:e.jsx(Cs,{"aria-hidden":"true",className:Fe.packageWeightWarningIcon})})]}),e.jsxs(o,{gap:4,align:"center",children:[e.jsx(ne,{title:"Dead Weight",color:"#fff",overlayInnerStyle:{color:"#3d3d6b"},children:e.jsx("div",{className:Fe.packageWeightLabel,children:"D"})}),e.jsx(Ce,{children:y})]}),e.jsxs(o,{gap:4,align:"center",children:[e.jsx(ne,{title:"Volumetric Weight",color:"#fff",overlayInnerStyle:{color:"#3d3d6b"},children:e.jsx("div",{className:Fe.packageWeightLabel,children:"V"})}
2),e.jsxs(Ce,{children:[w,k]})]})]})}),qi=({shipmentId:t,obdImages:r,enabled:c})=>{const p=s.useMemo(()=>Xe(r),[r]),[d,g]=s.useState(p);return s.useEffect(()=>{g(p)},[p]),s.useEffect(()=>{if(!c||p.length>0||!t)return;let v=!1;return(async()=>{var b,u;const{ok:x,data:C}=await dr(ur.shipfast.getOrder(t));v||!x||g(Xe((u=(b=C==null?void 0:C.data)==null?void 0:b.attributes)==null?void 0:u.obd_images))})(),()=>{v=!0}},[c,p.length,t]),d},Ki="_viewButton_rxd5q_10",Qi={viewButton:Ki},Xi=t=>{t.stopPropagation()},Ji=t=>{t.stopPropagation(),t.preventDefault()},eo=({obdImages:t,className:r,ariaLabel:c="View open box delivery proof"})=>{const p=s.useMemo(()=>Xe(t),[t]),[d,g]=s.useState(!1);if(!p.length)return null;const v=f=>{Ji(f),g(!0)};return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:r||Qi.viewButton,"aria-label":c,"data-stop-row-click":!0,onClick:v,onMouseDown:Xi,children:e.jsx(gs,{"aria-hidden":"true"})}),d&&e.jsx(Ln,{title:"Open Box Delivery Proof",description:"Delivery proof captured during open box delivery",images:p,imageAltPrefix:"Open box delivery proof",emptyText:"No open box delivery proof found",width:"medium",onClose:()=>g(!1)})]})},to=s.memo(({shipment:t,currentActiveTab:r})=>{const{id:c,attributes:{is_obd:p,obd_images:d,epod_images:g,carrier:v,tracking_number:f,rto_awb:x,status:C,sub_status:b}}=t,u=f||"",y=["rto_initiated"].includes(r)&&!!x,w=["delivered"].includes(r)&&!!p,l=C==="rto_delivered"||b==="rto_delivered",j=["delivered","rto_delivered"].includes(r)||r==="rto_initiated"&&l,T=qi({shipmentId:c,obdImages:d,enabled:w}),k=w&&T.length>0;return v?e.jsx(e.Fragment,{children:e.jsxs(o,{vertical:!0,gap:4,children:[e.jsx(Rn,{carrierId:v==null?void 0:v.id,awbNo:u}),y&&e.jsxs(Ce,{copyable:{text:x},children:["RTO AWB: ",x]}),w&&e.jsxs(o,{align:"center",className:X(m.obdTagWrapper,{[m.obdTagWrapperWithPreview]:k}),children:[e.jsx(ne,{...Nn,children:e.jsxs(o,{align:"center",gap:4,className:m.obdTag,children:[e.jsx(fn,{"aria-hidden":"true"}),e.jsx("p",{children:"OBD"})]})}),k&&e.jsxs("div",{className:m.obdPreviewAction,"data-stop-row-click":!0,onClick:L=>L.stopPropagation(),onMouseDown:L=>L.stopPropagation(),children:[e.jsx("span",{className:m.obdDivider,"aria-hidden":"true"}),e.jsx(eo,{obdImages:T,className:m.obdViewButton})]})]}),e.jsx(Cn,{shipmentId:c,epodImages:g,enabled:j})]})}):e.jsx(e.Fragment,{})}),so=s.memo(({shipment:t})=>{var p;const{attributes:{shipment_milestones:r}}=t,c=(p=r==null?void 0:r.find(d=>d.milestone==="delivered"))==null?void 0:p.milestone_at;return e.jsx(o,{vertical:!0,gap:8,align:"flex-start",children:c?e.jsx(pe,{children:ue(c).format("DD MMM YY")}):e.jsx(pe,{type:"secondary"})})}),ro=s.memo(({tracking_details:t,rto_reason:r})=>{var d;const c=pr(r)||"NA",p=(d=t==null?void 0:t[0])==null?void 0:d.updated_at;return e.jsxs(o,{vertical:!0,children:[e.jsx(pe,{ellipsis:{tooltip:{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"}}},children:c}),p&&e.jsx(Ce,{children:ue(p).format("DD MMM YY")})]})}),no=s.memo(({shipment:t})=>{const{attributes:{status:r}}=t;return e.jsx(o,{gap:16,justify:"space-between",align:"flex-start",style:{flexWrap:"wrap"},children:e.jsx(mr,{status:r})})}),io=({shipment_milestones:t})=>{var p,d;const r=(p=t==null?void 0:t.find(g=>g.milestone==="original_expected_delivery_date"))==null?void 0:p.milestone_at,c=(d=t==null?void 0:t.find(g=>g.milestone==="expected_delivery_date"))==null?void 0:d.milestone_at;return e.jsx(o,{vertical:!0,children:e.jsx(pe,{children:typeof c=="string"&&c?ue(c||"").format("DD MMM YY"):r?ue(r||"").format("DD MMM YY"):e.jsx("span",{style:{color:"#aaa"},children:"NA"})})})},oo=s.memo(({shipment:t,currentActiveTab:r,handleTrackingDetails:c})=>{var j;const{attributes:{status:p,npr_reason:d,order:{status:g}},id:v}=t,{color:f}=hr(p),x=On[p],C=(j=t.attributes)==null?void 0:j.attempt_count,b=!!C&&["in_transit","ndr_raised"].includes(r),u=["pending","invoiced","new","cancelled","rejected","processing"].includes(g)?as(g):"",y=x||u,w=r==="ready_to_ship"&&!!d,l=_r(d);return e.jsx(o,{vertical:!0,gap:8,children:e.jsxs(o,{vertical:!0,gap:2,children:[e.jsx(tt,{placement:"bottom",content:e.jsx(An,{orderId:v,handleOrderTracking:()=>c(v)}),trigger:"hover",overlayClassName:m.popover,children:e.jsxs(o,{align:"center",gap:4,children:[e.jsx(Je,{color:f,text:e.jsx(pe,{isHoverable:!0,children:y})}),w&&e.jsx(ne,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:l,children:e.jsx(Fn,{className:m.statusInfoIcon,onClick:T=>T.stopPropagation()})})]})}),b&&e.jsx(o,{align:"center",gap:4,children:e.jsxs(Ce,{className:m.attemptCountText,children:["Attempt:"," ",e.jsx("span",{className:m.attemptCount,children:C})]})})]})})}),ao=t=>s.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{d:"M10.7267 3.29688V5.3257C10.7267 6.07269 10.1212 6.67825 9.3742 6.67825H1.93555",stroke:"#0F48E3",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M3.28849 8.70609L1.25977 6.67726L3.28849 4.64844",stroke:"#0F48E3",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),lo=({className:t,...r})=>e.jsx(se,{size:"small",type:"default",icon:e.jsx(ao,{}),className:X(Mn.returnAction,t),...r,children:"RETURN"}),bs=t=>s.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("g",{clipPath:"url(#clip0_1920_8846)"},s.createElement("path",{d:"M3.75 5.625L1.5 7.875L3.75 10.125",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M3.75 2.625H7.875C8.57119 2.625 9.23887 2.90156 9.73116 3.39384C10.2234 3.88613 10.5 4.55381 10.5 5.25C10.5 5.94619 10.2234 6.61387 9.73116 7.10616C9.23887 7.59844 8.57119 7.875 7.875 7.875H1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_1920_8846"},s.createElement("rect",{width:12,height:12,fill:"white"})))),co="_modalWrap_9e9fd_10",uo="_container_9e9fd_16",po="_closeRow_9e9fd_22",mo="_content_9e9fd_27",_o="_iconOuterContainer_9e9fd_33",ho="_iconInnerContainer_9e9fd_40",go="_title_9e9fd_51",Co="_description_9e9fd_59",fo="_buttonRow_9e9fd_68",xo="_actionButton_9e9fd_74",
2yo="_cancelButton_9e9fd_85",jo="_confirmButton_9e9fd_90",q={modalWrap:co,container:uo,closeRow:po,content:mo,iconOuterContainer:_o,iconInnerContainer:ho,title:go,description:Co,buttonRow:fo,actionButton:xo,cancelButton:yo,confirmButton:jo},Ts=({onClose:t,shipmentId:r,onSuccess:c})=>{const[p,d]=s.useState(!1),{isFeatureEnabled:g}=we("cred_client"),v=async()=>{if(g)return;d(!0);const{ok:f,data:x}=await gr({shipmentId:r});if(d(!1),f){Q(x==null?void 0:x.message),c==null||c(),t();return}(x==null?void 0:x.error_category)==="carrier"?Se((x==null?void 0:x.error)||"Failed to initiate RTO"):U((x==null?void 0:x.error)||"Failed to initiate RTO")};return e.jsx(st,{onClose:t,hideHeader:!0,forceWidth:440,fluidHeight:!0,modalClassWrap:q.modalWrap,children:e.jsxs(o,{className:q.container,vertical:!0,children:[e.jsx(o,{justify:"flex-end",className:q.closeRow,children:e.jsx(fs,{onClose:t})}),e.jsxs(o,{vertical:!0,align:"center",className:q.content,children:[e.jsx(o,{align:"center",justify:"center",className:q.iconOuterContainer,children:e.jsx(o,{align:"center",justify:"center",className:q.iconInnerContainer,children:e.jsx(Vn,{})})}),e.jsx("p",{className:q.title,children:"Initiate RTO"}),e.jsx("p",{className:q.description,children:"Kindly click 'Yes' if you want to initiate this RTO?"}),e.jsxs(o,{align:"center",className:q.buttonRow,children:[e.jsx(cs,{onClick:t,className:X(q.actionButton,q.cancelButton),disabled:p,children:"CANCEL"}),e.jsx(Ie,{onClick:v,loading:p,disabled:p,className:X(q.actionButton,q.confirmButton),children:"YES"})]})]})]})})},vo=({shipment:t,setIsShippingDrawerOpen:r,setIsManualReturnDrawerOpen:c,setSelectedReturnOrder:p,hideExtraActions:d=!1})=>{var xe,ye,ae,je,_e,de,te;const{appendParams:g}=be(),{id:v,attributes:f}=t,{status:x}=f,{shipfastOrders:C,reloadShipfastOrders:b}=et(),{isDemo:u,shipfastProfile:y,isInternalRtoScoreEnabled:w}=Te(),{isShipfastChildUser:l,userUuid:j}=Be(),[T,k]=s.useState(null),[L,E]=s.useState(!1),[N,a]=s.useState(!1),[D,B]=s.useState(!1),J=((xe=C==null?void 0:C.find(_=>{var h;return _.attributes.callable&&!!((h=_.attributes.enabled_agent)!=null&&h.agent_key)}))==null?void 0:xe.id)===t.id,O=!((ae=(ye=y==null?void 0:y.attributes)==null?void 0:ye.frontend_configs)!=null&&ae.isAiTourFinished),[A,oe]=s.useState(J&&O);s.useRef(null);const{isLoading:F}=ds(T?t.attributes.order.id:null),{isFeatureEnabled:P}=we("reattempt_with_address"),{isFeatureEnabled:Z}=we("cred_client"),$=!!(f!=null&&f.reattempt_allowed),ee=Ke(f==null?void 0:f.insights,w),ke=ee==="very_high",ce=ee==="very_high"?"Very High RTO Risk":"Medium RTO Risk",fe=ee==="very_high"?"Selected order has a very high order risk. It is recommended that your review this order before shipping":"Selected order has a medium order risk. Consider reviewing this order before shipping",me=async()=>{g({orderId:v,mode:"view"}),r(!0)},Ee=()=>{if(ke&&w){E(!0);return}me()};switch(x){case"invoiced":case"pending":case"new":return e.jsxs(o,{gap:10,align:"center",style:{flexWrap:"wrap"},children:[e.jsx(Dn,{testId:"orders-action-ship-button",loading:D,onClick:Ee}),L&&e.jsx(st,{onClose:()=>E(!1),title:ce,description:fe,hideHeader:!0,modalClassWrap:qt.warningModal,width:"xs",forceWidth:440,fluidHeight:!0,bodyPadding:16,children:e.jsxs(o,{vertical:!0,gap:16,align:"center",children:[e.jsx("div",{className:qt.iconBadge,children:ee==="very_high"?e.jsx(fr,{style:{fontSize:32,color:"#D93E3E"}}):e.jsx(Wn,{style:{fontSize:32,color:"#D93E3E"}})}),e.jsxs(o,{vertical:!0,gap:4,align:"center",children:[e.jsx("p",{className:m.modalTitle,children:ce}),e.jsx("p",{className:m.modalSubTitle,style:{textAlign:"center",color:"#808699",fontSize:14,lineHeight:"20px"},children:fe})]}),e.jsx(o,{justify:"center",style:{width:"100%"},children:e.jsx(se,{type:"primary",onClick:()=>{E(!1),me()},children:"CONTINUE SHIPPING"})})]})})]});case"need_attention":case"ndr_raised":{const _=[];u||_.push(...P?[{key:"update_address",label:"Update Address & Re-attempt",disabled:!$,onClick:async()=>{g({orderId:v,mode:"update_address"})},icon:e.jsx(Hn,{className:m.secondaryIcon})},{key:"reattempt_delivery",label:"Reattempt Delivery",disabled:!$,onClick:async()=>{Qe("shipfast_orders_reattempt_delivery",{client_id:y==null?void 0:y.id,user_uuid:j,is_child_user:l});const{ok:S,data:H}=await xr({shipmentId:t==null?void 0:t.id,body:{}});S?(Q((H==null?void 0:H.message)||"Delivery reattempted successfully"),b()):(H==null?void 0:H.error_category)==="carrier"?Se((H==null?void 0:H.error)||"Failed to reattempt delivery"):U((H==null?void 0:H.error)||"Failed to reattempt delivery")},icon:e.jsx(Un,{className:m.secondaryIcon})}]:[],{key:"rto",label:Z?e.jsx(ne,{title:xs,color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx("span",{children:"Initiate RTO"})}):"Initiate RTO",disabled:!!Z,onClick:()=>{Z||a(!0)},icon:e.jsx(bs,{className:m.secondaryIcon})});const h=(_==null?void 0:_.length)>0;return e.jsxs(e.Fragment,{children:[e.jsx(o,{align:"center",gap:10,children:e.jsx(ys,{menu:{items:_},disabled:!h||d,trigger:["click"],children:e.jsxs(se,{size:"small",type:"default",className:m.ndrActionButton,children:["ACTION ",e.jsx(Cr,{})]})})}),N&&e.jsx(Ts,{shipmentId:t.id,onClose:()=>a(!1),onSuccess:b})]})}case"delivered":return(_e=(je=t==null?void 0:t.attributes)==null?void 0:je.order)!=null&&_e.return_present?e.jsx(e.Fragment,{}):e.jsxs(e.Fragment,{children:[T&&e.jsx(So,{orderId:(te=(de=t==null?void 0:t.attributes)==null?void 0:de.order)==null?void 0:te.id,setIsManualReturnDrawerOpen:c,setSelectedReturnOrder:p,setReturnOrderId:k}),e.jsx(lo,{onClick:()=>{k(v)},loading:F})]});default:return e.jsx(e.Fragment,{})}},So=({orderId:t,setIsManualReturnDrawerOpen:r,setSelectedReturnOrder:c,setReturnOrderId:p})=>{const{setReturnItems:d}=us(),{appendParams:g}=be(),{isLoading:v,shipfastOrder:f}=ds(t);return s.useEffect(()=>{var x,C,b,u;
2if(f.id){const y=f,w=((x=y==null?void 0:y.attributes)==null?void 0:x.items)||[],l=((C=y==null?void 0:y.attributes)==null?void 0:C.shipping_address)||{},{full_address:j,street_address:T,city:k,state:L,zip:E,country:N,name:a,phone:D}=l||{},B={full_address:j,street_address:T,city:k,state:L,zip:E,country:N,name:a,phone:D};d({order_id:y.id,return_reason:"",warehouse_id:(u=(b=y==null?void 0:y.attributes)==null?void 0:b.pickup_details)==null?void 0:u.owner_id,shipping_address:B,return_items_attributes:w.map(({id:J,quantity:O})=>({quantity:O,order_item_id:J}))}),g({step:"selectOrderItems",order_status:"delivered",sort_by:"updated_at",sort_order:"desc",perPage:"6"}),r(!0),c(y),p("")}},[f.id]),v?e.jsx(e.Fragment,{}):e.jsx(e.Fragment,{})},ks=[{value:"marked_delivered_not_delivered",disputeType:"mdnd",title:"Marked delivered but not delivered (MDND)",description:"Courier marked delivered but customer did not receive the order"},{value:"wrong_product",disputeType:"wrong_product",title:"Wrong Product Received",description:"You received a wrong product in the delivered package"},{value:"damaged_product",disputeType:"damaged_product",title:"Damaged Product Received",description:"You received a damaged or tampered product in the delivered package"},{value:"missing_items_in_package",disputeType:"missing_items",title:"Missing items in package",description:"Return package received but items or quantity is missing"},{value:"cod_fraud_payment_not_received",disputeType:"cod_fraud",title:"COD Fraud / Payment not received",description:"Order delivered and COD collected but payment not remitted"}],qe={marked_delivered_not_delivered:"Buyer VOC (If available)",wrong_product:"Pre packing Video With Label, Unboxing Video with all sides of packing video and label",damaged_product:"Pre packing Video With Label, Unboxing Video with all sides of packing video and label",missing_items_in_package:"Pre packing Video With Label, Unboxing Video with all sides of packing video and label",cod_fraud_payment_not_received:"Buyer VOC, Any Payment proof ( if available) , product images, unboxing video"},rs=t=>{var r;return(r=ks.find(c=>c.value===t))==null?void 0:r.disputeType},Io="_container_nmz03_10",wo="_orderInfoBar_nmz03_16",bo="_orderInfoLabel_nmz03_21",To="_orderInfoValue_nmz03_26",ko="_sectionTitle_nmz03_31",Eo="_requiredLabel_nmz03_36",Do="_uploadHint_nmz03_41",Ro="_issueCard_nmz03_46",Lo="_issueCardSelected_nmz03_53",No="_issueIcon_nmz03_58",Oo="_issueTitle_nmz03_69",Ao="_issueDescription_nmz03_74",Fo="_labeledInput_nmz03_79",Po="_uploadTitle_nmz03_91",Bo="_uploadDragger_nmz03_101",Mo="_uploadDraggerError_nmz03_110",Uo="_dragTextTitle_nmz03_117",Ho="_dividerContainer_nmz03_122",Vo="_divider_nmz03_122",Wo="_browseFilesContainer_nmz03_136",zo="_form_nmz03_146",Zo="_errorText_nmz03_153",$o="_submitButtonContainer_nmz03_158",Yo="_cancelButton_nmz03_168",R={container:Io,orderInfoBar:wo,orderInfoLabel:bo,orderInfoValue:To,sectionTitle:ko,requiredLabel:Eo,uploadHint:Do,issueCard:Ro,issueCardSelected:Lo,issueIcon:No,issueTitle:Oo,issueDescription:Ao,labeledInput:Fo,uploadTitle:Po,uploadDragger:Bo,uploadDraggerError:Mo,dragTextTitle:Uo,dividerContainer:Ho,divider:Vo,browseFilesContainer:Wo,form:zo,errorText:Zo,submitButtonContainer:$o,cancelButton:Yo},Go=({open:t,onClose:r,shipment:c,reloadShipfastOrders:p})=>{var k,L;const[d,g]=s.useState([]),[v,f]=s.useState(""),[x,C]=s.useState(!1),{id:b,attributes:u}=c,y=((k=u==null?void 0:u.order)==null?void 0:k.display_id)||(u==null?void 0:u.display_id)||((L=u==null?void 0:u.order)==null?void 0:L.external_id)||"-",w=(u==null?void 0:u.tracking_number)||"-",l=()=>{g([]),f(""),r()},j=E=>E==="marked_delivered_not_delivered"?!0:d.some(a=>!!a.originFileObj)?(f(""),!0):(f(qe[E]),!1),T=async E=>{var J;if(!E.issue_type){U("Please select an issue type");return}if(!j(E.issue_type))return;const N=rs(E.issue_type);if(!N){U("Invalid dispute type selected");return}const a=d.map(O=>O.originFileObj).filter(Boolean);C(!0);const{ok:D,data:B}=await Yn({shipmentId:b,disputeType:N,reason:E.description,disputeImages:a});if(C(!1),D){Q((B==null?void 0:B.message)||"Dispute raised successfully!"),p(),l();return}U((B==null?void 0:B.error)||((J=B==null?void 0:B.errors)==null?void 0:J[0])||"Failed to raise dispute")};return e.jsx(zn,{open:t,onClose:l,width:560,header:e.jsx(Zn,{headerTitle:"Raise Dispute",subTitle:"Select a dispute reason and provide the required details to raise your claim.",onClose:l}),children:e.jsxs(o,{vertical:!0,gap:24,className:R.container,children:[e.jsxs(o,{align:"center",gap:20,className:R.orderInfoBar,children:[e.jsxs(o,{gap:8,align:"center",children:[e.jsx("span",{className:R.orderInfoLabel,children:"Order Id:"}),e.jsxs("span",{className:R.orderInfoValue,children:["#",y]})]}),e.jsx(yr,{type:"vertical"}),e.jsxs(o,{gap:8,align:"center",children:[e.jsx("span",{className:R.orderInfoLabel,children:"AWB:"}),e.jsx("span",{className:R.orderInfoValue,children:w})]})]}),e.jsx(jr,{initialValues:{issue_type:"marked_delivered_not_delivered",description:""},onSubmit:T,children:({values:E,setFieldValue:N})=>e.jsxs(vr,{className:R.form,children:[e.jsxs(o,{vertical:!0,gap:24,children:[e.jsxs(o,{vertical:!0,gap:12,children:[e.jsx("p",{className:R.sectionTitle,children:"Select the Issue"}),e.jsx(o,{vertical:!0,gap:12,children:ks.map(a=>{const D=E.issue_type===a.value;return e.jsxs(o,{align:"center",justify:"space-between",gap:12,className:X(R.issueCard,{[R.issueCardSelected]:D}),onClick:()=>{N("issue_type",a.value),f("")},children:[e.jsxs(o,{align:"center",gap:12,children:[e.jsx(o,{align:"center",justify:"center",className:R.issueIcon,children:$n(rs(a.value)||a.value)}),e.jsxs(o,{vertical:!0,gap:4,children:[e.jsx("p",{className:R.issueTitle,children:a.title}),e.jsx("p",{className:R.issueDescription,children:a.description})]})]}),e.jsx(Sr,{checked:D})]},a.value)})})]}),e.jsxs(o,{vertical:!0,gap:16,children:[e.jsx("p",{className:R.sectionTitle,children:"Issue Details"}),e.jsx(Ir,{component:wr,name:"description",label:"Describe the issue",placeholder:"Describe the issue",required:!0,wrapperClassName:R.labeledInput,validate:qn([{test:br.required,message:"Description is required"}])}),e.jsxs(o,{vertical:!0,gap:8,children:[e.jsxs(o,{vertical:!0,gap:4,children:[e.jsx("p",{className:X(R.uploadTitle,E.issue_type!=="marked_delivered_not_delivered"&&R.requiredLabel),children:"Upload"}),e.jsx("p",{className:R.uploadHint,children:E.issue_type?qe[E.issue_type]:qe.marked_delivered_not_delivered})]}),e.jsx(Kn.Dragger,{fileList:d,onChange:a=>{g(a.fileList),a.fileList.length>0&&f("")},beforeUpload:()=>!1,multiple:!0,maxCount:5,className:X(R.uploadDragger,{[R.uploadDraggerError]:!!v}),children:e.jsxs(o,{gap:8,align:"center",justify:"center",vertical:!0,children:[e.jsx(Gn,{}),e.jsx("p",{className:R.dragTextTitle,children:"Drag your file to start uploading"}),e.jsxs(o,{align:"center",gap:8,className:R.dividerContainer,children:[e.jsx("div",{className:R.divider}),e.jsx("p",{children:"OR"}),e.jsx("div",{className:R.divider})]}),e.jsx(o,{className:R.browseFilesContainer,children:e.jsx("p",{children:"Browse files"})})]})}),!!v&&e.jsx("p",{className:R.errorText,children:v})]})]})]}
2),e.jsxs(o,{justify:"flex-start",gap:12,className:R.submitButtonContainer,children:[e.jsx(Tr,{onClick:l,className:R.cancelButton,children:"CANCEL"}),e.jsx(kr,{loading:x,disabled:x,htmlType:"submit",Component:Ie,children:"RAISE DISPUTE"})]})]})})]})})},Es=t=>t!=null&&"type"in t&&t.type==="divider",ns=t=>t!=null&&!Es(t),qo=(t=[])=>t.filter((r,c,p)=>{if(!Es(r))return!0;const d=p.slice(0,c).some(ns),g=p.slice(c+1).some(ns);return d&&g}),Ko=s.memo(({shipment:t,reloadShipfastOrders:r,orderStatus:c,onEditOrder:p,setIsShippingDrawerOpen:d,onEditOrderAutomation:g,onViewOrder:v,handleTrackingDetails:f,setIsManualReturnDrawerOpen:x,setSelectedReturnOrder:C,setInitiateCalls:b})=>{var _e,de,te;const{appendParams:u}=be(),{isAiCallingEnabled:y,shipfastProfile:w}=Te(),{isFeatureEnabled:l}=we("cred_client"),{isShipfastChildUser:j,userUuid:T}=Be(),k=_=>l?e.jsx(ne,{title:xs,color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx("span",{children:_})}):_,[L,E]=s.useState(!1),[N,a]=s.useState(!1),D=[...Zt.ready_to_ship,...Zt.in_transit],B=async _=>{const{ok:h,data:S}=await Pn(_);if(!h){U((S==null?void 0:S.error)||"Failed to download invoice");return}Qt(S==null?void 0:S.file,"invoice.pdf"),r()},J=async _=>{const{ok:h,data:S}=await Bn(_);if(!h){(S==null?void 0:S.error_category)==="carrier"?Se((S==null?void 0:S.error)||"Failed to download label"):U((S==null?void 0:S.error)||"Failed to download label");return}Qt(S==null?void 0:S.file,"label.pdf")},{id:O,attributes:A}=t,oe=A==null?void 0:A.calls,{status:F,order:P,is_cod:Z}=A,$=c,ee=A==null?void 0:A.sub_status,ke=$==="all"&&F!="pending",ce=$==="ndr_raised"&&!["undelivered","ndr_raised","not_serviceable"].includes(ee),fe=!!(oe!=null&&oe.some(_=>{var h,S,H;return ps({agentName:((h=_==null?void 0:_.agent)==null?void 0:h.name)||((S=_==null?void 0:_.agent)==null?void 0:S.agent_name),agentKey:(H=_==null?void 0:_.agent)==null?void 0:H.key})})),me=y&&(A==null?void 0:A.callable)&&!!((_e=A==null?void 0:A.enabled_agent)!=null&&_e.agent_key)&&["pending","ndr_raised"].includes($)&&($==="pending"&&["invoiced","pending","new"].includes(F)||$==="ndr_raised"&&["need_attention","ndr_raised"].includes(F)),Ee=(P==null?void 0:P.final_automation_outcome)==="confirmed"||((de=P==null?void 0:P.automation_outcomes)==null?void 0:de.some(_=>_.key==="order_and_address_confirmation"&&_.outcome==="confirmed")),xe=$==="pending"&&["pending","new","invoiced"].includes(F)&&!Ee,ye=[...F==="in_transit"?[{key:"track",label:"Track",icon:e.jsx(ss,{className:m.secondaryIcon}),onClick:()=>{f(O)}},{key:"initiate_rto",label:k("Initiate RTO"),icon:e.jsx(bs,{className:m.secondaryIcon}),disabled:!!l,onClick:()=>{l||a(!0)}}]:[],...F==="all"||F==="rto_initiated"?[{key:"track",label:"Track",icon:e.jsx(ss,{className:m.secondaryIcon}),onClick:()=>{f(O)}}]:[],...(te=w==null?void 0:w.attributes)!=null&&te.should_generate_invoice?[{key:"download",label:"Download Invoice",icon:e.jsx(Qn,{className:m.secondaryIcon}),onClick:_=>{B((P==null?void 0:P.id)||"")},disabled:!1}]:[],...["ready_for_pickup","pickup_scheduled","not_picked","in_transit"].includes(F)?[{key:"download_label",label:"Download Label",icon:e.jsx(Xt,{className:m.secondaryIcon}),onClick:_=>{J(O)}}]:[],...Z&&(F==="ready_for_pickup"||F==="in_transit")?[{key:"postPaidConversion",label:"Convert to Prepaid",icon:e.jsx(Dr,{className:m.secondaryIcon,style:{stroke:"currentColor",fill:"none",strokeWidth:1.5}}),onClick:async()=>{try{const{data:_,ok:h}=await Er({shipmentId:O});if(!h){(_==null?void 0:_.error_category)==="carrier"?Se((_==null?void 0:_.error)||"Failed to convert to prepaid"):U((_==null?void 0:_.error)||"Failed to convert to prepaid");return}Q("Shipment marked as prepaid successfully!"),r()}catch{U("Something went wrong while converting to prepaid")}}}]:[],...["ready_to_ship","in_transit"].includes($)&&D.includes(F)&&(A!=null&&A.can_update_shipping_address)?[{key:"update_address_shipment",label:"Update Address",icon:e.jsx(Jt,{className:m.secondaryIcon}),onClick:()=>{u({orderId:O,mode:"update_address"})}}]:[],{type:"divider"},...xe?[{key:"confirm_order",label:"Confirm Order",icon:e.jsx(xn,{className:m.secondaryIcon}),onClick:async()=>{const _=P==null?void 0:P.id;if(!_){U("Order not found");return}const{ok:h,data:S}=await Rr({orderId:_});h?(Q((S==null?void 0:S.message)||"Order confirmed successfully"),r()):U((S==null?void 0:S.error)||"Failed to confirm order")}}]:[],...["pending","new"].includes(F)?[{key:"edit",label:"Edit Order",icon:e.jsx(Jt,{className:m.secondaryIcon}),onClick:_=>{p(O)}},{key:"tag",label:"Add tag",icon:e.jsx(Xt,{className:m.secondaryIcon}),onClick:_=>{p(O)}}]:[],...me?[{key:"initiate_ai_call",label:"Initiate AI Call",icon:e.jsx(Lr,{className:m.secondaryIcon}),onClick:()=>{b({showModal:!0,shipmentIds:[O]})}}
2]:[],...y&&(oe==null?void 0:oe.length)>0?[{key:"ai",label:fe?"IVR Call Details":"AI Call Details",icon:e.jsx(Nr,{className:m.secondaryIcon}),onClick:_=>{g(O)}}]:[],...["rejected","cancelled"].includes(F)?[{key:"createNewShipment",label:"Create New Shipment",icon:e.jsx(js,{className:m.secondaryIcon}),onClick:async _=>{const{data:h,ok:S}=await Or({orderId:P.id});S?(Q("New shipment created successfully!"),v(h.data.id),r()):U((h==null?void 0:h.error)||"Failed to create new shipment!")}}]:[],{key:"clone",label:"Clone Order",icon:e.jsx(Xn,{className:m.secondaryIcon}),onClick:async _=>{const{data:h,ok:S}=await Ar({orderId:P.id});S?(Q("Order cloned successfully!"),r()):U((h==null?void 0:h.error)||"Failed to clone order!")}},...["delivered","rto_delivered"].includes(F)?[{key:"Raise Dispute",label:"Raise Dispute",icon:e.jsx(Jn,{className:m.secondaryIcon}),onClick:()=>{E(!0)}}]:[],...["pending","new"].includes(F)?[{key:"selfFulfill",label:"Mark as fulfilled",icon:e.jsx(ei,{className:m.secondaryIcon}),onClick:async()=>{try{const{data:_,ok:h}=await Fr({shipmentId:O});h?(Q("Order marked as self fulfilled successfully!"),r()):U((_==null?void 0:_.error)||"Failed to mark order as self fulfilled!")}catch{U("Failed to mark order as self fulfilled!")}}}]:[],{type:"divider"},...["ready_for_pickup","pickup_scheduled","not_picked"].includes(F)?[{key:"reassign",label:k("Re-Assign Shipment"),icon:e.jsx(vs,{}),danger:!0,disabled:!!l,onClick:_=>{l||ti.confirm({title:"Re-Assign Shipment",content:"Are you sure you want to re-assign this shipment? This will cancel the current shipment and create a new one.",okText:"Yes",cancelText:"No",onOk:async()=>{if(l)return;hs("shipfast_orders_reassign_shipment",{client_id:w==null?void 0:w.id,user_uuid:T,is_child_user:j});const{data:h,ok:S}=await Pr({orderId:P.id,shipmentId:O});S?(Q("Shipment cancelled successfully"),v(h.data.id),r()):(h==null?void 0:h.error_category)==="carrier"?Se((h==null?void 0:h.error)||"Failed to re-assign shipment!"):U((h==null?void 0:h.error)||"Failed to re-assign shipment!")},centered:!0,maskClosable:!0})}}]:[],...["pending","ready_for_pickup","pickup_scheduled","not_picked"].includes(F)?[{key:"cancel",label:k("Cancel order"),icon:e.jsx(si,{}),danger:!0,disabled:!!l,onClick:async _=>{if(!l){const{data:h,ok:S}=await Br({shipmentId:O});S?(Q((h==null?void 0:h.message)||"Shipment cancelled successfully!"),r()):(h==null?void 0:h.error_category)==="carrier"?Se((h==null?void 0:h.error)||"Failed to cancel shipment!"):U((h==null?void 0:h.error)||"Failed to cancel shipment!");return}}}]:[]],ae=qo(ye),je=((ae==null?void 0:ae.length)??0)>0;return e.jsxs("div",{onClick:_=>_.stopPropagation(),children:[e.jsxs(o,{gap:10,justify:"flex-end",children:[!ke&&e.jsx(vo,{shipment:t,setIsShippingDrawerOpen:d,setIsManualReturnDrawerOpen:x,setSelectedReturnOrder:C,hideExtraActions:ce}),je&&e.jsx(ys,{menu:{items:ae},trigger:["click"],children:e.jsx(se,{size:"small",type:"text",children:e.jsx(Mr,{})})})]}),L&&e.jsx(Go,{open:L,onClose:()=>E(!1),shipment:t,reloadShipfastOrders:r}),N&&e.jsx(Ts,{shipmentId:O,onClose:()=>a(!1),onSuccess:r})]})}),Qo=t=>s.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("rect",{width:32,height:32,rx:6,fill:"#0042EC",fillOpacity:.1}),s.createElement("path",{d:"M24.56 10.7949V23.3059C24.56 23.3988 24.5476 23.4857 24.5259 23.5724C24.5228 23.5724 24.5228 23.5755 24.5228 23.5786C24.4795 23.7429 24.3958 23.8947 24.278 24.0187C24.0952 24.2263 23.8286 24.3627 23.5311 24.372H23.528C23.5156 24.3751 23.5032 24.3751 23.4908 24.3751H7.12779C6.95733 24.3751 6.79929 24.3348 6.65672 24.2635C6.446 24.1582 6.27554 23.9877 6.17014 23.777C6.12055 23.6778 6.08648 23.5693 6.07097 23.4547C6.06169 23.4051 6.05859 23.3555 6.05859 23.3059V10.7949C6.05859 10.2061 6.54204 9.72266 7.12779 9.72266H23.4909C24.0766 9.72266 24.56 10.2061 24.56 10.7949Z",fill:"#0F48E3"}),s.createElement("path",{d:"M24.56 10.7949V23.3059C24.56 23.3988 24.5476 23.4857 24.5259 23.5724C24.5228 23.5724 24.5228 23.5755 24.5228 23.5786C24.4795 23.7429 24.3958 23.8947 24.278 24.0187C24.0952 24.2263 23.8286 24.3627 23.5311 24.372H23.528C23.5156 24.3751 23.5032 24.3751 23.4908 24.3751H7.12779C6.95733 24.3751 6.79929 24.3348 6.65672 24.2635C6.446 24.1582 6.27554 23.9877 6.17014 23.777C6.12055 23.6778 6.08648 23.5693 6.07097 23.4547C6.06169 23.4051 6.05859 23.3555 6.05859 23.3059V10.7949C6.05859 10.2061 6.54204 9.72266 7.12779 9.72266
2H23.4909C24.0766 9.72266 24.56 10.2061 24.56 10.7949Z",fill:"#0F48E3"}),s.createElement("path",{d:"M15.3031 13.0928H7.43768C7.29201 13.0928 7.15567 13.0742 7.02238 13.0401C6.46766 12.9068 6.05859 12.5009 6.05859 12.0236V8.06923C6.05859 7.48035 6.68151 7 7.43768 7H11.7113L13.3166 9.72409L13.8869 10.6879L14.4261 11.6053L15.3031 13.0928Z",fill:"#0F48E3"}),s.createElement("path",{d:"M7.13039 23.4128C7.07337 23.4128 7.02344 23.3629 7.02344 23.3059V10.7944C7.02344 10.7374 7.07337 10.6875 7.13039 10.6875H23.4915C23.5485 10.6875 23.5984 10.7374 23.5984 10.7944V23.3059C23.5984 23.3629 23.5485 23.4128 23.4915 23.4128H7.13039Z",fill:"white"}),s.createElement("path",{d:"M27.9411 12.5352C27.9442 12.5383 27.9411 12.5383 27.9411 12.5414L27.8543 12.8265L27.4111 14.2614L26.9369 15.7954L26.4938 17.2272L26.0196 18.7613L25.5796 20.1961L24.5569 23.4996C24.5475 23.5245 24.5352 23.5492 24.5258 23.574C24.5227 23.574 24.5227 23.5771 24.5227 23.5802C24.5196 23.5833 24.5165 23.5864 24.5165 23.5864C24.5165 23.5895 24.5135 23.5957 24.5104 23.5988C24.3368 23.949 23.9525 24.2465 23.5434 24.3705C23.5372 24.3705 23.5342 24.3736 23.5311 24.3736H23.528C23.3916 24.4139 23.2583 24.4356 23.1251 24.4356H6.76513C6.22591 24.4356 5.91288 24.0823 6.02138 23.6298C6.02757 23.5864 6.04308 23.543 6.05855 23.4996L6.07092 23.4563L7.02234 20.3789L9.27227 13.093L9.44272 12.5414C9.64107 12.0269 10.2857 11.6055 10.8745 11.6055H27.2344C27.8202 11.6055 28.1394 12.0238 27.9411 12.5352Z",fill:"#407BFF"}),s.createElement("path",{opacity:.5,d:"M26.0212 18.7617L25.5785 20.1957H18.9453V18.7617H26.0212Z",fill:"#EEF3FF"}),s.createElement("path",{opacity:.5,d:"M26.9388 15.793L26.4961 17.227H19.957V15.793H26.9388Z",fill:"#EEF3FF"}),s.createElement("path",{opacity:.06,d:"M27.9417 12.5336C27.9448 12.5367 27.9417 12.5367 27.9417 12.5398L27.8549 12.8249L27.4118 14.2598L26.9376 15.7938L26.4944 17.2256L26.0203 18.7597L25.5802 20.1945L24.5575 23.4981C24.5482 23.5229 24.5358 23.5476 24.5265 23.5724C24.5234 23.5724 24.5234 23.5755 24.5234 23.5786C24.5203 23.5817 24.5172 23.5848 24.5172 23.5848C24.5172 23.5879 24.5141 23.5941 24.511 23.5972C24.4676 23.7553 24.3871 23.9009 24.2786 24.0187C24.0958 24.2232 23.8354 24.3534 23.5441 24.3689C23.538 24.3689 23.5349 24.372 23.5318 24.372H23.5287C23.3923 24.4123 23.259 24.434 23.1258 24.434H8.28125L8.34012 24.3751L9.30391 23.4113L21.1114 11.6038L22.0287 10.6864L22.9925 9.72266H23.4915C24.0772 9.72266 24.5606 10.2061 24.5606 10.7949V11.6038H27.2351C27.8209 11.6039 28.1401 12.0222 27.9417 12.5336Z",fill:"#040000"})),Xo=t=>s.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("rect",{width:32,height:32,rx:6,fill:"#FDCF99",fillOpacity:.3}),s.createElement("path",{d:"M24.5937 12.5879H18.0412L21.9998 5H11.9465L7.40625 18.0542H13.6687L10.6492 27L24.5937 12.5879Z",fill:"#EEBC39"}),s.createElement("path",{d:"M12.9404 6.38281H19.097L13.5516 7.76059L10.1602 13.9481L12.9404 6.38281Z",fill:"#FFF0C7"})),Jo=t=>s.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("rect",{width:32,height:32,rx:6,fill:"#1AB746",fillOpacity:.1}),s.createElement("path",{d:"M12.8656 7.80859L25 16.832C24.3228 17.7464 24.5119 19.0389 25.4263 19.7195L22.1434 24.1298C21.2291 23.4527 19.9366 23.6417 19.2594 24.5561L7.12156 15.5292C7.80219 14.6148 7.60969 13.3223 6.69531 12.6452L9.97813 8.23141C10.8925 8.91203 12.1816 8.71953 12.8656 7.80859Z",fill:"#99DF9D"}),s.createElement("path",{d:"M26.383 17.8549C26.5343 17.9683 26.5652 18.1849 26.4518 18.3361L25.4274 19.718C24.513 19.0374 24.3239 17.7449 25.0011 16.8305L26.383 17.8549ZM22.1446 24.1283L21.1202 25.5102C21.0068 25.6614 20.7902 25.6924 20.6389 25.5789L19.2605 24.5546C19.9377 23.6402 21.2302 23.4511 22.1446 24.1283ZM17.9096 13.6955C19.2777 14.7164 19.563 16.6552 18.5455 18.0268C17.5246 19.3983 15.5858 19.6802 14.2177 18.6627C12.8461 17.6418 12.5608 15.703 13.5783 14.3349C14.5993 12.9633 16.538 12.678 17.9096 13.6955Z",fill:"#57B05C"}),s.createElement("path",{d:"M7.11969 15.53L16.6828 22.6422H16.6794L7.33281 19.6687C7.68 18.5825 7.07844 17.4241 5.99219 17.0769L6.37375 15.8772L6.60406 15.1484L7.11969 15.53Z",fill:"#99DF9D"}),s.createElement("path",{d:"M16.6814 22.6422L13.323 21.5731L6.43422 16.4513L6.23828 16.3069L6.37578 15.8772L6.60609 15.1484L7.12172 15.53L16.6814 22.6422Z",fill:"#57B05C"}),s.createElement("path",{d:"M17.4609 23.2202H8.4375C8.4375 22.0823 7.51281 21.1577 6.375 21.1577V19.3633L7.33406 19.6692L16.6806 22.6427H16.6841L17.4609 23.2202Z",fill:"#99DF9D"}),s.createElement("path",{d:"M17.4609 23.2202H15.2541L7.33406 20.7005L6.375 20.3945V19.3633L7.33406 19.6692L16.6806 22.6427H16.6841L17.4609 23.2202Z",fill:"#3C973E"}),s.createElement("path",{d:"M25.6241 21.1562V22.875C25.6241 23.0641 25.4694 23.2188 25.2803 23.2188H24.2422L24.3384 22.9128L24.8506 21.3075C25.0878 21.2078 25.3491 21.1562 25.6241 21.1562Z",fill:"#297E29"}),s.createElement("path",{d:"M25.625 19.4492V21.1577C25.35 21.1577 25.0888 21.2092 24.8516 21.3089L25.3053 19.8823V19.8789L25.4256 19.7208L25.625 19.4492Z",fill:"#39A03C"}),s.createElement("path",{d:"M25.3039 19.8828L24.8502 21.3094L24.338 22.9147C24.0939 22.8356 23.843 22.8081 23.5989 22.8219C23.4064 22.8322 23.2173 22.87 23.0352 22.9319L25.3039 19.8828Z",fill:"#99DF9D"}),s.createElement("path",{d:"M24.3405 22.9128L24.2442 23.2188L23.818 24.5525C23.763 24.7313 23.567 24.8309 23.3883 24.7759L21.9961 24.3325L22.1439 24.1297L23.0377 22.93C23.2198 22.8681 23.4089 22.8303 23.6014 22.82C23.8455 22.8062 24.0964 22.8337 24.3405 22.9128ZM25.6261 13.9375V15.3881L24.942 15.1681L24.0105 14.8725H24.007C23.7286 14.5219 23.5636 14.0784 23.5636 13.5938H25.2823C25.4714 13.5938 25.6261 13.7484 25.6261 13.9375Z",fill:"#57B05C"}),s.createElement("path",{d:"M24.0069 14.8725L21.1434 13.9616H21.14L20.6484 13.5938H23.5634C23.5634 14.0784 23.7284 14.5219 24.0069 14.8725Z",fill:"#99DF9D"}),s.createElement("path",{d:"M8.66969 9.99141L7.9375 10.978V10.9745L8.28813 9.87109L8.66969 9.99141Z",fill:"#57B05C"}),s.createElement("path",{d:"M8.43872 23.2172H6.71997C6.5309 23.2172 6.37622 23.0625 6.37622 22.8735V21.1547C7.51403 21.1547 8.43872 22.0794 8.43872 23.2172ZM5.99465 17.0744C7.0809 17.4216 7.68247 18.58 7.33528 19.6663L6.37622 
219.3603L5.69559 19.1438C5.51684 19.0888 5.41715 18.8928 5.47215 18.7141L5.99465 17.0744ZM12.8662 7.80347V7.8069C12.1822 8.71784 10.8931 8.91034 9.97872 8.22972L11.0065 6.85128C11.1165 6.69659 11.3331 6.66565 11.4843 6.77909L12.8662 7.80347ZM6.6959 12.6435C7.61028 13.3207 7.80278 14.6132 7.12215 15.5275L5.74372 14.5032C5.58903 14.3897 5.55809 14.1732 5.67153 14.0219L6.6959 12.6435Z",fill:"#57B05C"}),s.createElement("path",{d:"M24.9288 15.1984C24.7809 15.6006 24.7569 16.2434 24.8497 16.7178L21.1406 13.9609L24.0041 14.8719H24.0075L24.9391 15.1675L24.9288 15.1984Z",fill:"#99DF9D"}),s.createElement("path",{d:"M24.8502 16.7183C24.7573 16.2439 24.7814 15.6011 24.9292 15.1989L24.9395 15.168L25.6236 15.388L26.3042 15.6045C26.483 15.6595 26.5827 15.8555 26.5277 16.0342L26.0292 17.5948L24.998 16.8317L24.8502 16.7183ZM25.3039 19.8808L24.8502 21.3073L24.338 22.9127C24.0939 22.8336 23.843 22.8061 23.5989 22.8198C23.4064 22.8302 23.2173 22.868 23.0352 22.9298L25.3039 19.8808Z",fill:"#57B05C"}),s.createElement("path",{d:"M23.6014 22.8198C23.4089 22.8301 23.2198 22.8679 23.0377 22.9298L22.443 23.7307L22.1439 24.1295L21.9961 24.3323L23.1064 24.6864L23.3883 24.7757C23.567 24.8307 23.763 24.731 23.818 24.5523L24.2442 23.2185L24.2786 23.1085L24.3405 22.9126C24.0964 22.8335 23.8455 22.806 23.6014 22.8198Z",fill:"#39A03C"}),s.createElement("path",{d:"M24.3655 14.9867L24.008 14.8733H24.0045C23.9289 14.7805 23.8636 14.6808 23.8086 14.5742L24.3655 14.9867Z",fill:"#297E29"}),s.createElement("path",{d:"M24.0069 14.8725L21.1434 13.9616H21.14L20.6484 13.5938H22.4944L23.8109 14.5734C23.8659 14.68 23.9313 14.7797 24.0069 14.8725Z",fill:"#39A03C"}),s.createElement("path",{d:"M24.8084 15.7656C24.8256 15.6247 24.8463 15.4872 24.8772 15.3669L24.365 14.9853L24.0075 14.8719H24.0041L21.1406 13.9609L24.5988 16.5322L24.8497 16.7178C24.7947 16.4325 24.7809 16.0853 24.8084 15.7656Z",fill:"#57B05C"}),s.createElement("path",{d:"M26 17.5694L26.0688 17.4766L26.0309 17.5934L26 17.5694Z",fill:"#57B05C"}),s.createElement("path",{d:"M26.3816 16.4809L24.9997 15.4566L24.8794 15.3672C24.8484 15.4875 24.8278 15.625 24.8106 15.7659C24.7831 16.0856 24.7969 16.4328 24.8519 16.7181L24.9997 16.8316L26 17.5706L26.0687 17.4778L26.385 16.4844L26.3816 16.4809Z",fill:"#39A03C"})),ea=t=>s.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("rect",{width:32,height:32,rx:6,fill:"#46D5BD",fillOpacity:.14}),s.createElement("path",{d:"M24.5792 14.0197C23.0392 14.3131 21.6459 14.0197 21.1326 13.0664C20.6192 12.1131 20.9859 10.7931 22.0859 9.61974C21.1326 8.66641 19.8859 8.00641 18.5659 7.56641C18.0526 9.10641 17.0992 10.1331 15.9992 10.1331C14.8992 10.1331 13.9459 9.10641 13.4326 7.56641C12.1126 8.00641 10.9392 8.66641 9.98589 9.61974C11.0859 10.7931 11.4526 12.1864 10.9392 13.0664C10.4259 14.0197 9.03255 14.3131 7.49255 14.0197C7.27255 14.6064 7.19922 15.3397 7.19922 15.9997C7.19922 16.6597 7.27255 17.3931 7.41922 17.9797C8.95922 17.6864 10.3526 17.9797 10.8659 18.9331C11.3792 19.8864 11.0126 21.2064 9.91255 22.3797C10.8659 23.3331 12.1126 23.9931 13.4326 24.4331C13.9459 22.8931 14.8992 21.8664 15.9992 21.8664C17.0992 21.8664 18.0526 22.8931 18.5659 24.4331C19.8859 24.0664 21.0592 23.3331 22.0859 22.3797C20.9859 21.2064 20.6192 19.8131 21.1326 18.9331C21.6459 17.9797 23.0392 17.6864 24.5792 17.9797C24.7259 17.3197 24.7992 16.6597 24.7992 15.9997C24.7992 15.3397 24.7259 14.6064 24.5792 14.0197Z",fill:"#35C4AC",stroke:"#35C4AC",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.0008 18.2008C17.2158 18.2008 18.2008 17.2158 18.2008 16.0008C18.2008 14.7858 17.2158 13.8008 16.0008 13.8008C14.7858 13.8008 13.8008 14.7858 13.8008 16.0008C13.8008 17.2158 14.7858 18.2008 16.0008 18.2008Z",fill:"white",stroke:"#D7F1F3",strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"})),ta=t=>s.createElement("svg",{width:38,height:38,viewBox:"0 0 38 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{d:"M14.2507 6.33406H23.7507V19.0007H31.4141L19.0007 31.4141L6.58739 19.0007H14.2507V6.33406Z",fill:"#1AB746"})),sa="_modalWrapper_1x8vx_10",ra="_container_1x8vx_23",na="_header_1x8vx_31",ia="_content_1x8vx_40",oa="_title_1x8vx_40",aa="_highlightedText_1x8vx_47",la="_highlightedText2_1x8vx_50",ca="_description_1x8vx_54",da="_highlightedText3_1x8vx_63",ua="_itemsContainer_1x8vx_67",pa="_howItWorksTitle_1x8vx_76",ma="_itemContainer_1x8vx_82",_a="_itemDescription_1x8vx_85",ha="_bannerIcon_1x8vx_91",ga="_closeButtonWrapper_1x8vx_97",Ca="_button_1x8vx_104",V={modalWrapper:sa,container:ra,header:na,content:ia,title:oa,highlightedText:aa,highlightedText2:la,description:ca,highlightedText3:da,itemsContainer:ua,howItWorksTitle:pa,itemContainer:ma,itemDescription:_a,bannerIcon:ha,closeButtonWrapper:ga,button:Ca},fa=()=>{const{shipfastProfile:t}=Te(),{isShipfastChildUser:r,userUuid:c}=Be(),[p,d]=s.useState(!1),{shippingRules:g,reloadShippingRules:v}=ms(),f=[{icon:e.jsx(Qo,{}),description:"Analyzes historical delivery performance of couriers based on destination"},{icon:e.jsx(Xo,{}),description:"Factors in real-time signals like operational constraints and weather disruptions"},{icon:e.jsx(Jo,{}),description:"Optimizes for cost alongside delivery performance"},{icon:e.jsx(ea,{}),description:"Automatically assigns the most optimal courier"}],x=async()=>{var w;if(!(t!=null&&t.id))return;const u="recommended-adoption-banner-activity",y=await es(u,t==null?void 0:t.id);if(y){const l=y.data();if(((l==null?void 0:l.closeCount)||0)>=3){d(!1);return}const T=(w=l==null?void 0:l.date)!=null&&w.toDate?ue(l.date.toDate()).format("YYYY-MM-DD"):l!=null&&l.date?ue(l.date).format("YYYY-MM-DD"):null,k=ue().format("YYYY-MM-DD");T===k?d(!1):(await Ze(u,t==null?void 0:t.id,{date:ts()}),d(!0))}else await Ze(u,t==null?void 0:t.id,{date:ts(),closeCount:0}),d(!0)},C=()=>{var y,w,l;d(!1);const u="recommended-adoption-banner-activity";es(u,t==null?void 0:t.id).then(j=>{var k;const T=((k=j==null?void 0:j.data())==null?void 0:k.closeCount)||0;
2return Ze(u,t==null?void 0:t.id,{closeCount:T+1})}),Qe("recommended-adoption-banner-closed",{email:(w=(y=t==null?void 0:t.attributes)==null?void 0:y.contact_information)==null?void 0:w.email,seller:(l=t==null?void 0:t.attributes)==null?void 0:l.name,client_id:t==null?void 0:t.id,user_uuid:c,is_child_user:r})},b=async()=>{var j,T,k,L;const u=g.find(E=>{var N;return((N=E==null?void 0:E.attributes)==null?void 0:N.name)=="default"}),y={courier_selection_mode:"recommended"},{ok:w,data:l}=await Ur({ruleId:(j=u==null?void 0:u.attributes)==null?void 0:j.id,updateData:y});w?(Q("Courier priority has been successfully updated to Velocity recommended"),Qe("recommended-adoption-banner-switched",{email:(k=(T=t==null?void 0:t.attributes)==null?void 0:T.contact_information)==null?void 0:k.email,seller:(L=t==null?void 0:t.attributes)==null?void 0:L.name,client_id:t==null?void 0:t.id,user_uuid:c,is_child_user:r}),d(!1),v()):U((l==null?void 0:l.error)||(l==null?void 0:l.message)||"Failed to update courier priority")};return s.useEffect(()=>{x()},[t==null?void 0:t.id]),p?e.jsx(st,{hideHeader:!0,onClose:C,width:"medium",modalClassWrap:V.modalWrapper,children:e.jsxs(o,{className:V.container,vertical:!0,gap:11,children:[e.jsx(o,{className:V.header}),e.jsx("img",{src:_s("recommended_adoption.png"),alt:"","aria-hidden":!0,className:V.bannerIcon}),e.jsx(o,{className:V.closeButtonWrapper,align:"center",gap:10,children:e.jsx(fs,{onClose:C})}),e.jsxs(o,{className:V.content,vertical:!0,align:"flex-start",gap:6,children:[e.jsxs(o,{align:"center",children:[e.jsxs("p",{className:V.title,children:[e.jsx("span",{className:V.highlightedText,children:"Reduce RTOs "})," by up to ",e.jsx("span",{className:V.highlightedText2,children:"8%"})]}),e.jsx(ta,{})]}),e.jsxs("p",{className:V.description,children:["Use"," ",e.jsx("span",{className:V.highlightedText3,children:"Velocity Recommended"})," ","to automatically assign the most optimal courier for every order."]}),e.jsxs(o,{className:V.itemsContainer,vertical:!0,align:"flex-start",children:[e.jsx("p",{className:V.howItWorksTitle,children:"How It Works?"}),f.map(({icon:u,description:y})=>e.jsxs(o,{className:V.itemContainer,gap:10,align:"center",children:[u,e.jsx("p",{className:V.itemDescription,children:y})]}))]})]}),e.jsxs(o,{className:V.content,gap:12,children:[e.jsx(cs,{className:V.button,size:"small",onClick:C,children:"Cancel"}),e.jsx(Ie,{className:V.button,size:"small",onClick:b,children:"SWITCH TO RECOMMENDED"})]})]})}):null},n={ORDER_ID:"name",CUSTOMER:"customer",PRODUCT:"items",PACKAGE:"package",PAYMENT:"payment",PICKUP:"pickup",SHIPPING_DETAILS:"shipping_details",DELIVERED_ON:"delivered_on",RTO_REASON:"reason_for_return",ISSUE:"issue",PENDING_STATUS:"pending_status",ESTIMATED_DELIVERY:"delivery_date",STATUS:"status",ACTIONS:"actions"},xa="32px",ya={pending:{[n.ORDER_ID]:"14%",[n.CUSTOMER]:"14%",[n.PRODUCT]:"14%",[n.PACKAGE]:"12%",[n.PAYMENT]:"10%",[n.PICKUP]:"15%",[n.PENDING_STATUS]:"9%",[n.ACTIONS]:"12%"},ready_to_ship:{[n.ORDER_ID]:"14%",[n.CUSTOMER]:"20%",[n.PRODUCT]:"16%",[n.PAYMENT]:"10%",[n.SHIPPING_DETAILS]:"18%",[n.STATUS]:"14%",[n.ACTIONS]:"8%"},in_transit:{[n.ORDER_ID]:"17%",[n.CUSTOMER]:"19%",[n.PAYMENT]:"13%",[n.SHIPPING_DETAILS]:"21%",[n.ESTIMATED_DELIVERY]:"14%",[n.STATUS]:"10%",[n.ACTIONS]:"6%"},delivered:{[n.ORDER_ID]:"16%",[n.CUSTOMER]:"16%",[n.PRODUCT]:"14%",[n.PAYMENT]:"10%",[n.SHIPPING_DETAILS]:"20%",[n.DELIVERED_ON]:"12%",[n.ACTIONS]:"12%"},ndr_raised:{[n.ORDER_ID]:"14%",[n.CUSTOMER]:"18%",[n.PAYMENT]:"10%",[n.SHIPPING_DETAILS]:"18%",[n.ISSUE]:"12%",[n.STATUS]:"14%",[n.ACTIONS]:"14%"},rto_initiated:{[n.ORDER_ID]:"16%",[n.CUSTOMER]:"16%",[n.PAYMENT]:"10%",[n.SHIPPING_DETAILS]:"20%",[n.RTO_REASON]:"16%",[n.STATUS]:"14%",[n.ACTIONS]:"8%"},cancelled:{[n.ORDER_ID]:"14%",[n.CUSTOMER]:"16%",[n.PRODUCT]:"12%",[n.PACKAGE]:"11%",[n.PAYMENT]:"9%",[n.SHIPPING_DETAILS]:"18%",[n.STATUS]:"14%",[n.ACTIONS]:"6%"},all:{[n.ORDER_ID]:"12%",[n.CUSTOMER]:"14%",[n.PRODUCT]:"12%",[n.PACKAGE]:"10%",[n.PAYMENT]:"9%",[n.SHIPPING_DETAILS]:"18%",[n.STATUS]:"14%",[n.ACTIONS]:"11%"}},ja=(t,r)=>{var c;return(c=ya[t])==null?void 0:c[r]},va="_badge_1cilg_10",Sa="_activeBadge_1cilg_25",Ia="_icon_1cilg_33",wa="_label_1cilg_39",Pe={badge:va,activeBadge:Sa,icon:Ia,label:wa},ba=({filteredOrderCount:t=0})=>{const{query:r,appendParams:c,removeParam:p}=be(),d=r.weightWarningFlag==="true",g=d&&Number(t)>0,v=()=>{if(d){p("weightWarningFlag");return}c({weightWarningFlag:!0,pageNumber:"1"})};return e.jsxs("button",{type:"button",className:X(Pe.badge,{[Pe.activeBadge]:d}),onClick:v,"data-testid":"weight-mismatch-alert-badge",children:[e.jsx(Cs,{className:Pe.icon,"aria-hidden":!0}),e.jsxs("span",{className:Pe.label,children:["Weight mismatch alert",g?` (${t})`:""]})]})},Ta=ie(()=>W(()=>import("./index-Bxr4U5Py.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
2)),null),ka=ie(()=>W(()=>import("./index-CYNcHCkl.js"),__vite__mapDeps([28,1,2,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,6,44,45,46,18,47,48,49,50,19,51,52,53,54,55,56,57,58,59,60,61,62,5,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,21,26,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,3,4,7,9,10,11])),null),Ea=ie(()=>W(()=>import("./index-DpRxiyQB.js"),__vite__mapDeps([58,1,2,59,60,61,62,5,6,63,64])),null),Da=ie(()=>W(()=>import("./index-fdvm3zS5.js"),__vite__mapDeps([97,1,2,9,10,11,3,4,5,6,7,56,53,68,98]))),is=ie(()=>W(()=>import("./index-BVeJ-34q.js"),__vite__mapDeps([99,1,2,3,4,5,6,7,9,10,11,100,101,102,74,75,76,53,77,78,79,66,67,80,68,81,21,26,50,19,82,83,84,85,86,87,88,89,90,33,91,92,103,104,105,106,107,108,109,56,13,14,17,18,110])),null),Ra=ie(()=>W(()=>import("./index-DSxvmbkW.js"),__vite__mapDeps([111,1,2,58,59,60,61,62,5,6,63,64,112,113,46,18,47,114,76,84,33,115,116,117,118,119,120,121,83,53,66,67,80,68,77,50,19,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,87,88,89,90,139,140,141,142,143,144,106,145,107,146])),e.jsx("div",{children:e.jsx(ii,{active:!0,title:!1,paragraph:{rows:1,width:"198px"}})})),La=ie(()=>W(()=>import("./index-DVDEDsrA.js"),__vite__mapDeps([147,1,2,59,60,61,62,5,6,63,120,121,42,43,44,45,46,18,47,108,148]))),Na=ie(()=>W(()=>import("./vas_banners-qbN6Yu33.js"),__vite__mapDeps([149,1,2,150,151,152,59,60,61,62,5,6,63,77,153])),null),Oa=ie(()=>W(()=>import("./index-CtGilxXr.js"),__vite__mapDeps([154,1,2,3,4,5,6,7,10])),null),Aa=ie(()=>W(()=>import("./index-DIINYW3v.js"),__vite__mapDeps([155,1,2,3,4,5,6,7,10])),null),Gc=async({request:t})=>{const r=new URL(t.url),c=r.searchParams.get("order_status"),p=r.searchParams.get("sort_by"),d=r.searchParams.get("sort_order"),g=r.searchParams.get("dateFilter"),v=r.searchParams.get("dateTypeFilter");return c==null||p==null||d==null||g==null?(r.searchParams.set("order_status",c||"pending"),r.searchParams.set("sort_by","updated_at"),r.searchParams.set("sort_order","desc"),r.searchParams.set("dateFilter","all"),v==null&&r.searchParams.set("dateTypeFilter","order_date"),sn(r.toString())):null},{Text:os}=ls,qc=()=>{var at,lt;const{selectedShipfastOrdersId:t}=Hr(),{totalFilterCount:r}=Vr(),{isInternalRtoScoreEnabled:c,hasCreatedOrders:p,isLoading:d,reloadShipfastProfile:g,isConnectEnabled:v,isPrimeAccount:f}=Te(),{totalFilterCount:x}=Wr(),{appendParams:C,setSearchParams:b,query:u,resetParams:y}=be(),[w,l]=s.useState(!1),[j,T]=s.useState(!1),[k,L]=s.useState(!1),[E,N]=s.useState(!1);zr();const a=u.order_status,[D,B]=s.useState(!1),{hasSpecialCharInHeaderSearch:J}=Zr(),{shippingRules:O}=ms(),A=O.find(i=>{var I;return((I=i==null?void 0:i.attributes)==null?void 0:I.name)=="default"}),oe=["recommended","recommended_delivery"].includes(((at=A==null?void 0:A.attributes)==null?void 0:at.courier_selection_mode)||""),[F,P]=s.useState(null),{shipfastOrders:Z,isLoading:$,isValidating:ee,meta:ke,reloadShipfastOrders:ce}=et(),{TAB_ITEMS:fe}=$r(),{shipfastCarriers:me}=Yr(),Ee=s.useMemo(()=>new Set(me.filter(i=>i.attributes.channel==="external").map(i=>i.id)),[me]),{reset:xe}=us(),{shipmentsData:ye,setShipmentsData:ae,reset:je}=Gr(),{packages:_e,defaultPackageId:de}=qr(),te=u.selected_order_ids,_=u.mode==="update_address",{isFeatureEnabled:h}=we("vas_banners"),[S,H]=s.useState({showModal:!1,shipmentIds:[]}),[De,rt]=s.useState({show:!1,jobId:"",extraInfo:""});s.useEffect(()=>{const i=te?te==null?void 0:te.split(","):[];ae(i.map(I=>({...ye.find(G=>G.shipment_id===I),shipment_id:I,package_id:de})))},[te,de]);const nt=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"tracking"}),l(!0)},[l,u]),{isFeatureEnabled:Ds}=we("disable_fast_shipment_filter"),Rs=s.useCallback(i=>{l(!0),C({orderId:i,mode:"edit",editType:"customer"})},[a,l]),Ls=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"items"}),l(!0)},[l]),it=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"pickup_address"}),l(!0)},[l]),Ns=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"details",focusField:null}),l(!0)},[l,u]),Os=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"dispute"}),l(!0)},[l,u]),As=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"details",focusField:"tags"}),l(!0)},[l,u]),Fs=s.useCallback(i=>{C({orderId:i,mode:"edit",editType:"automation"}),l(!0)},[l,u]),Ps=s.useCallback(i=>{C({orderId:i,mode:"view"}),l(!0)},[l,u]),Bs=s.useCallback(ce,[]);s.useEffect(()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{W(()=>import("./index-Bxr4U5Py.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
2)),W(()=>import("./index-BVeJ-34q.js"),__vite__mapDeps([99,1,2,3,4,5,6,7,9,10,11,100,101,102,74,75,76,53,77,78,79,66,67,80,68,81,21,26,50,19,82,83,84,85,86,87,88,89,90,33,91,92,103,104,105,106,107,108,109,56,13,14,17,18,110])),setTimeout(()=>{requestIdleCallback(()=>{W(()=>import("./index-DIINYW3v.js"),__vite__mapDeps([155,1,2,3,4,5,6,7,10])),W(()=>import("./index-CtGilxXr.js"),__vite__mapDeps([154,1,2,3,4,5,6,7,10]))})},1e3)}):(setTimeout(()=>{W(()=>import("./index-Bxr4U5Py.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])),W(()=>import("./index-BVeJ-34q.js"),__vite__mapDeps([99,1,2,3,4,5,6,7,9,10,11,100,101,102,74,75,76,53,77,78,79,66,67,80,68,81,21,26,50,19,82,83,84,85,86,87,88,89,90,33,91,92,103,104,105,106,107,108,109,56,13,14,17,18,110]))},1e3),setTimeout(()=>{W(()=>import("./index-DIINYW3v.js"),__vite__mapDeps([155,1,2,3,4,5,6,7,10])),W(()=>import("./index-CtGilxXr.js"),__vite__mapDeps([154,1,2,3,4,5,6,7,10]))},2e3))},[]);const Y=i=>ja(a,i),Me=[{title:"Order ID",key:n.ORDER_ID,width:Y(n.ORDER_ID),show:!0,render:(i,{attributes:{order:{external_id:I,order_date:M,display_id:G,id:re,channel:he,store_name:ge},express:Re,insights:He}})=>{const Ae=G||I;return e.jsx(Ri,{orderId:re,orderIdText:Ae,isInternalRtoScoreEnabled:c,insights:He,order_date:M,store_name:ge,channel:he,express:Re})}},{title:"Customer",key:n.CUSTOMER,width:Y(n.CUSTOMER),show:["pending","ready_to_ship","in_transit","delivered","ndr_raised","rto_initiated","cancelled","all"].includes(a),render:(i,{attributes:{shipping_address:I,insights:M,pii_masked:G},id:re})=>e.jsx(Yi,{shipping_address:I,insights:M,orderId:re,piiMasked:G,onEditCustomer:()=>Rs(re),showEdit:a!=="ready_to_ship"})},{title:"Product",dataIndex:"items",key:n.PRODUCT,width:Y(n.PRODUCT),show:["pending","ready_to_ship","all","delivered","cancelled"].includes(a),render:(i,{attributes:{items:I,amount:M,status:G,total_price:re,is_dangerous_goods:he},id:ge})=>e.jsx(kn,{items:I,total_price:re,status:G,orderId:ge,onProductEdit:Ls,isDangerousGoods:he})},{title:"Package",key:n.PACKAGE,width:Y(n.PACKAGE),show:["pending","all","cancelled"].includes(a),render:(i,{id:I,attributes:{weight:M,volume_weight:G,applicable_weight:re,package_id:he,insights:ge,status:Re}})=>e.jsx(Gi,{shipmentId:I,applicable_weight:re,packages:_e,package_id:he,weight:M,volume_weight:G,showPackageWarning:a==="pending",status:Re,insights:ge})},{title:"Payment",key:n.PAYMENT,width:Y(n.PAYMENT),show:!0,render:(i,{attributes:{total_price:I,is_cod:M,cod_amount:G}})=>e.jsx(ln,{amount:I,payment_status:M,is_cod:M,cod_amount:G})},{title:"Pickup",key:n.PICKUP,width:Y(n.PICKUP),show:["pending"].includes(a),render:(i,{attributes:{pickup_warehouse:I},id:M})=>e.jsx(Kr,{handleEdit:it,onOpenDetails:()=>it(M),warehousePickupDetails:I,orderId:M})},{title:"Shipping Details",key:n.SHIPPING_DETAILS,width:Y(n.SHIPPING_DETAILS),show:["ready_to_ship","in_transit","delivered","rto_delivered","ndr_raised","rto_initiated","cancelled","all"].includes(a),render:(i,I)=>e.jsx(to,{shipment:I,currentActiveTab:a})},{title:"Delivered On",show:["delivered"].includes(a),key:n.DELIVERED_ON,width:Y(n.DELIVERED_ON),render:(i,I)=>e.jsx(so,{shipment:I})},{title:"RTO Reason",show:["rto_initiated"].includes(a),key:n.RTO_REASON,width:Y(n.RTO_REASON),render:(i,{attributes:{tracking_details:I,rto_reason:M}})=>e.jsx(ro,{tracking_details:I,rto_reason:M})},{title:"Issue",show:["ndr_raised"].includes(a),key:n.ISSUE,width:Y(n.ISSUE),render:(i,{attributes:{needs_attention_issue:I,ndr_reason:M}})=>e.jsx(pn,{status:I,ndr_reason:M})},{title:"Status",key:n.PENDING_STATUS,width:Y(n.PENDING_STATUS),show:["pending"].includes(a),render:(i,I)=>e.jsx(no,{shipment:I})},{title:"Estimated Delivery",show:["in_transit"].includes(a),key:n.ESTIMATED_DELIVERY,width:Y(n.ESTIMATED_DELIVERY),render:(i,{attributes:{shipment_milestones:I}})=>e.jsx(io,{shipment_milestones:I})},{title:"Status",show:["in_transit","ready_to_ship","all","ndr_raised","cancelled","rto_initiated"].includes(a),key:n.STATUS,width:Y(n.STATUS),render:(i,I)=>e.jsx(oo,{shipment:I,currentActiveTab:a,handleTrackingDetails:nt})},{title:"",key:n.ACTIONS,width:Y(n.ACTIONS),show:!0,render:(i,I)=>e.jsx(Ko,{shipment:I,reloadShipfastOrders:Bs,onEditOrder:Ns,setIsShippingDrawerOpen:l,orderStatus:a,onEditOrderAutomation:Fs,onViewOrder:Ps,handleTrackingDetails:nt,setIsManualReturnDrawerOpen:B,setSelectedReturnOrder:P,setInitiateCalls:H})}],Ms=Me==null?void 0:Me.filter(i=>i.show),Us=Z==null?void 0:Z.map(i=>i.id),le=((lt=fe.find(i=>i.key===a))==null?void 0:lt.count)||0,Oe=u.selectAll==="true",Ue=Oe?le:t==null?void 0:t.length,Hs=Ue>0,ot=Z==null?void 0:Z.map(i=>i.id),Vs=["pending","ndr_raised","ready_to_ship","in_transit","all"].includes(a)&&!Oe&&Ue<le,Ws=s.useMemo(()=>["ndr_raised","pending","ready_to_ship","in_transit","all"].includes(a)?{columnWidth:xa,selectedRowKeys:Oe?ot:t,type:"checkbox",onChange:i=>{s.startTransition(()=>C({selected_order_ids:i.join(","),selectAll:[]}))}}:void 0,[a,Oe,ot,t]),zs=s.useMemo(()=>[{value:10,label:"10"},{value:15,label:"15"},{value:50,label:"50"},{value:100,label:"100"}],[]),Zs=()=>{Gt(!0,"shipping"),setTimeout(()=>{Gt(!1,"shipping")},5e3)};return!d&&!p?e.jsxs(e.Fragment,{children:[e.jsx(nn,{icon:e.jsx("img",{src:_s("big-package.png"),alt:"","aria-hidden":!0,
2className:m.bigPackageIcon}),title:"You’re all set to start fulfilling orders! 🎉",description:"Looks like you don’t have any orders yet. Connect a sales channel or add a manual order to get started",actions:e.jsx(fi,{onAddManualOrder:()=>T(!0)})}),j&&e.jsx(is,{onClose:()=>{g(),T(!1)},setIsShippingDrawerOpen:l})]}):e.jsxs(e.Fragment,{children:[w&&e.jsx(Ta,{open:w,onClose:()=>{l(!1),b({...u,orderId:null,mode:null,editType:null,focusField:null,selectedPackage:null})}}),k&&e.jsx(Oa,{onClose:()=>L(!1)}),E&&e.jsx(Aa,{onClose:()=>N(!1)}),e.jsx(o,{justify:"space-between",align:"center",className:m.header,children:Hs?e.jsxs(e.Fragment,{children:[e.jsxs(o,{gap:10,align:"center",children:[e.jsxs(os,{type:"secondary",children:[We(Ue)," out of"," ",We(le)," ",$t("Order",le)," Selected"]}),e.jsxs(o,{align:"center",children:[e.jsx(se,{type:"link",size:"small",danger:!0,onClick:()=>{C({selected_order_ids:[],selectAll:""})},children:"Clear All"}),Vs&&e.jsx(se,{size:"small",type:"link",onClick:()=>{C({selectAll:"true"})},children:"Select All Orders"})]})]}),e.jsx(Ra,{setFetchDocument:rt,showShippingLottie:Zs})]}):e.jsxs(e.Fragment,{children:[e.jsxs(os,{type:"secondary",children:[We(le)," ",$t("Order",le)]}),e.jsxs(o,{gap:10,align:"center",children:[a==="ndr_raised"&&e.jsx(mn,{}),e.jsx(_n,{}),a==="pending"&&e.jsx(ba,{filteredOrderCount:le}),e.jsx(un,{type:"orders"}),e.jsx(hn,{}),e.jsx(ne,{title:"Search by Multiple Order IDs & SKU IDs",color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},open:J||void 0,children:e.jsx(se,{size:"small",className:J?m.multiSearchHighlight:void 0,icon:e.jsx(Je,{count:x,size:"small",children:e.jsx(Xr,{})}),onClick:()=>{Qr(!1),N(!0)}})}),["pending","new"].includes(a)&&!Ds&&e.jsx(Si,{}),e.jsx(se,{size:"small",icon:e.jsx(Je,{count:r,size:"small",children:e.jsx(rn,{})}),onClick:()=>L(!0),className:m.filterButton,children:"Filter"}),e.jsx(dn,{disableDownload:$||ee||le===0,showDownloadProgress:!0}),e.jsx(Ie,{size:"small",onClick:()=>T(!0),children:e.jsxs(o,{gap:4,className:m.addOrderButton,children:[e.jsx(js,{}),e.jsx("p",{children:"ADD ORDER"})]})}),e.jsx(se,{size:"small",icon:e.jsx(vs,{}),onClick:ce,disabled:$||ee,loading:$||ee,className:m.reloadButton})]})]})}),($||ee)&&!(Z!=null&&Z.length)||d?e.jsx(ri,{columns:8}):e.jsx(o,{style:{flex:1},children:e.jsx(ni,{onRow:i=>({onClick:I=>{I.target.closest('button, a, input, textarea, select, [role="button"], [data-stop-row-click], .ant-modal-wrap, .ant-dropdown, .ant-popover, .ant-select-dropdown')||(C({orderId:i.id,mode:"edit",editType:"details",focusField:null}),l(!0))}}),expandable:{rowExpandable:i=>i.id!==void 0,expandedRowRender:i=>{var _t,ht,gt,Ct,ft,xt,yt,jt,vt,St,It,wt,bt,Tt,kt,Et,Dt,Rt,Lt,Nt,Ot,At,Ft,Pt,Bt,Mt,Ut,Ht;const{otp_verification:I}=i.attributes,{tag_list:M,ai_tag_list:G,ops_tag_list:re}=(_t=i.attributes)==null?void 0:_t.order,he=!!((ht=i.attributes)!=null&&ht.is_obd),ge=(gt=i.attributes)==null?void 0:gt.label_download_time,Re=["ready_to_ship"].includes(a)&&!!ge,He=t.includes(i.id),Ae=a==="pending"?"order_and_address_confirmation":a==="ndr_raised"?"ndr_management":void 0,K=Ae?(ft=(Ct=i.attributes)==null?void 0:Ct.calls)==null?void 0:ft.find(Le=>{var Vt;return((Vt=Le.agent)==null?void 0:Vt.key)===Ae}):void 0,ct=K==null?void 0:K.status,$s=ps({agentName:((xt=K==null?void 0:K.agent)==null?void 0:xt.name)||((yt=K==null?void 0:K.agent)==null?void 0:yt.agent_name),agentKey:(jt=K==null?void 0:K.agent)==null?void 0:jt.key}),Ys=(St=(vt=i.attributes)==null?void 0:vt.shipment_disputes)!=null&&St.length?i.attributes.shipment_disputes:Array.isArray((It=i.attributes)==null?void 0:It.shipment_dispute)?i.attributes.shipment_dispute:[],Ve=Jr(Ys),dt=en(Ve),Gs=["delivered"].includes(a)&&!!I,qs=["delivered","all","rto_initiated"].includes(a)&&!!dt,ut=(bt=(wt=i.attributes)==null?void 0:wt.order)==null?void 0:bt.final_automation_outcome,Ks=(Dt=(Et=(kt=(Tt=i.attributes)==null?void 0:Tt.order)==null?void 0:kt.automation_outcomes)==null?void 0:Et.find(Le=>Le.outcome===ut))==null?void 0:Dt.mode,pt=(Rt=i.attributes)==null?void 0:Rt.final_automation_outcome,Qs=(Ot=(Nt=(Lt=i.attributes)==null?void 0:Lt.automation_outcomes)==null?void 0:Nt.find(Le=>Le.outcome===pt))==null?void 0:Ot.mode,mt=(At=i.attributes)==null?void 0:At.delivery_delay_days,Xs=a==="in_transit"&&!!mt&&mt>0,Js=!!((Pt=(Ft=i.attributes)==null?void 0:Ft.carrier)!=null&&Pt.id)&&Ee.has((Mt=(Bt=i.attributes)==null?void 0:Bt.carrier)==null?void 0:Mt.id);return e.jsxs(o,{gap:8,className:X(m.expandedRowTagsContainer,{[m.tagRowSelected]:He,[m.tagRowLeftPadding]:["ndr_raised","pending","ready_to_ship","in_transit","all"].includes(a),[m.tagRowLeftPaddingNoSelection]:["delivered","rto_initiated"].includes(a)}),children:[["pending","new"].includes((Ut=i.attributes)==null?void 0:Ut.status)&&e.jsx(yn,{onAddTag:()=>{As(i.id)}}),["prime","non_prime"].includes((Ht=i.attributes)==null?void 0:Ht.mode)&&e.jsx(jn,{}),!!he&&a!=="delivered"&&e.jsx(ve,{type:"obd"}),Re&&e.jsx(ve,{type:"labelDownload"}),Gs&&e.jsx(ve,{type:"otpVerified"}),qs&&Ve&&e.jsx(vn,{orderId:i.id,tooltipTitle:dt.text,onOpenDisputeDetails:Os,variant:Ve}),ct&&e.jsx(zi,{status:ct,isIvr:$s}),Xs&&e.jsx(ve,{type:"delayed"}),Js&&e.jsx(ve,{type:"externalCourier"}),["ready_to_ship","pending","all"].includes(a)&&e.jsx(Kt,{outcome:ut,mode:Ks}
2),["ndr_raised","all"].includes(a)&&e.jsx(Kt,{outcome:pt,mode:Qs}),e.jsx(xi,{tags:[...M||[],...G||[],...re||[]]})]})},expandedRowKeys:Us,showExpandColumn:!1,expandedRowClassName:()=>m.expandedRow},rowKey:"id",columns:Ms,rowSelection:Ws,dataSource:Z,locale:{emptyText:"No data found"},className:m.table,pagination:!1,sticky:{offsetHeader:0}},a)}),e.jsx(tn,{meta:{...ke,total:le},perPageOptions:zs}),D&&e.jsx(ka,{selectedReturnOrder:F,setSelectedReturnOrder:P,onClose:({ok:i,data:I})=>{B(!1),i?Q((I==null?void 0:I.message)||"Return accepted successfully!"):(P(null),y(),C({order_status:"delivered"})),je(),xe()}}),_&&e.jsx(Da,{onCloseDrawer:()=>C({orderId:"",mode:""})}),j&&e.jsx(is,{onClose:()=>T(!1),setIsShippingDrawerOpen:l}),h&&!f&&!v&&!Yt()&&e.jsx(Na,{page:"orders"}),!Yt()&&!oe&&!f&&e.jsx(fa,{}),S.showModal&&e.jsx(Ea,{onClose:()=>{H({showModal:!1,shipmentIds:[]})},shipmentIds:S.shipmentIds}),De.show&&e.jsx(La,{jobId:De.jobId,onClose:()=>rt({show:!1,jobId:"",extraInfo:"",type:""}),onSuccess:De.type=="reassign"?()=>{ce()}:void 0,extraInfo:De.extraInfo,type:De.type})]})};export{qc as default,Gc as loader};

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.