PageSourceSearch

https://panel.bookzpro.com/NListerPlacementShippingOptions.pf8jE1.js

js bookzpro.com collected 2026-09-24 19:03:10 UTC 30,564 bytes, 1 lines download raw bytes

1import{L as se}from"./LoadingIndicator.pf8jE1.js";import{B as ie}from"./BStepper.pf8jE1.js";import{p as oe,t as H}from"./stringUtils.pf8jE1.js";import{_ as M,ab as Y,m as K,a9 as X,aZ as ae,f7 as $,ad as re,f as ee,f8 as de,f9 as R,c as v,w as a,V as te,r as x,o as m,a as s,d as t,t as g,b9 as ue,j as b,F as D,k,ba as ce,a2 as me,I as pe,l as P,g as h,a3 as w,aM as L,$ as q,fa as he,s as E,aj as fe,q as N,K as A,W as O,x as j,p as ge,n as T,u as ye,c6 as B,B as G,R as U,c8 as Se,S as Q,a5 as _e,X as J,bi as be,h as xe,Q as Ce,a0 as Z,a1 as F,bg as we}from"./index.pf8jE1.js";import{B as z}from"./BCard.pf8jE1.js";import{D as ve}from"./DynamicDropdown.pf8jE1.js";import{A as Ve}from"./AbsoluteLoader.pf8jE1.js";import{B as De}from"./BPrimarySecondaryBtnGroup.pf8jE1.js";import"./BBtnPrimary.pf8jE1.js";import"./BBtnSecondaryOutlined.pf8jE1.js";const W=()=>({height:"",length:"",width:"",qty:"",isStackable:!1,weight:""}),Ie=()=>({contactEmail:"",contactPhone:"",contactName:"",readyToShipWindowStart:"",palletInputs:[W()],freightDeclaredAmount:"",freightDeclaredCurrency:$.USD,freightClass:"NONE"}),Oe={name:"NListerShipmentDialog",components:{AbsoluteLoader:Ve,IconButton:X,DynamicDropdown:ve,BCard:z},props:{sessionId:{type:[Number,String],default:null},placementOption:{type:Object,default:null},placementOptionId:{type:Number,default:null},shipments:{type:Array,default:null}},emits:["onSuccess","close-nlister-shipment-dialog"],data(){return{dialog:!0,loading:!1,shipmentTypes:[],dateMenuModel:[],transportConfig:[],currentIndex:0,shipWindowDateFormat:R,firstSection:!1,secondSection:!1,thirdSection:!1,Currency:$,FreightClass:de,localShipments:[]}},computed:{rules(){return{required:l=>!!l||""}}},watch:{dialog(l){l?(this.localShipments=[...this.shipments],this.parseData()):this.$emit("close-nlister-shipment-dialog")}},mounted(){this.localShipments=[...this.shipments],this.parseData()},methods:{...K(["setNListerTransportConfig"]),parseEnum:oe,formatDate:Y,parseData(){this.localShipments&&this.localShipments.length>0&&(this.dateMenuModel=this.localShipments.map(()=>!1),this.transportConfig=this.localShipments.map(l=>{const e=l.transportConfig?JSON.parse(JSON.stringify(l.transportConfig)):Ie();return e.palletInputs?.forEach(i=>{i.width=i.width?(i.width/10).toFixed(0):"",i.height=i.height?(i.height/10).toFixed(0):"",i.length=i.length?(i.length/10).toFixed(0):"",i.weight=i.weight?(i.weight/10).toFixed(0):""}),e.freightDeclaredAmount=e.freightDeclaredAmount?re(e.freightDeclaredAmount):"",e.readyToShipWindowStart=e.readyToShipWindowStart?ee(e.readyToShipWindowStart,R):"",e}))},getFormattedData(){const l={shipmentTransportConfigMap:{}};return this.shipments.forEach((e,i)=>{const f=e.idStr,n=JSON.parse(JSON.stringify(this.transportConfig[i]));(n.contactName?"LTL":"SPD")==="SPD"?l.shipmentTransportConfigMap[f]={readyToShipWindowStart:n.readyToShipWindowStart}:(n.palletInputs?.forEach(p=>{p.width=p.width?(p.width*10).toFixed(0):"",p.height=p.height?(p.height*10).toFixed(0):"",p.length=p.length?(p.length*10).toFixed(0):"",p.weight=p.weight?(p.weight*10).toFixed(0):""}),n.freightDeclaredAmount=n.freightDeclaredAmount?ae(n.freightDeclaredAmount):"",l.shipmentTransportConfigMap[f]={...n})}),l},async submitTransportationConfig(){this.loading=!0;const l=this.getFormattedData(),e=this.$route.params.sessionId,i=this.placementOption.idStr;await this.setNListerTransportConfig({sessionId:e,placementId:i,payload:l})&&(this.$emit("onSuccess"),this.dialog=!1),this.loading=!1},addPalletLine(l){this.transportConfig[l].palletInputs?this.transportConfig[l].palletInputs.push(W()):this.transportConfig[l].palletInputs=[W()]},removePalletLine(l,e){this.transportConfig[l].palletInputs.splice(e,1)},handleButtonClick(){this.currentIndex<this.shipments.length-1?this.nextShipment():this.submitTransportationConfig()},nextShipment(){this.currentIndex<this.shipments.length-1&&this.currentIndex++},closeDialog(){this.currentIndex=0,this.dialog=!1}}},Pe={class:"text-text_muted pt-1 pb-6"},Le={class:"w-100"},Ne={class:"d-flex py-3"},ke={class:"w-100"},Ae={class:"pallet-table b-table w-100 mt-3"},Te={class:"b-tbody"},Ee={class:"text-center"},Ue={class:"text-center"},Fe={class:"d-flex justify-center"},qe={class:"text-center"},We={class:"text-center"},Me={class:"text-center"},ze={class:"d-flex justify-center py-4"},Re={class:"mt-6 d-flex justify-end"};function je(l,e,i,f,n,o){const p=x("absolute-loader"),V=x("dynamic-dropdown"),d=x("icon-button"),I=x("b-card");return m(),v(te,{modelValue:n.dialog,"onUpdate:modelValue":e[3]||(e[3]=C=>n.dialog=C),width:"682"},{default:a(()=>[s(I,null,{default:a(()=>[e[17]||(e[17]=t("div",{style:{"font-size":"18px","font-weight":"600","letter-spacing":"0.18px"}}," Shipment Configurations ",-1)),t("div",Pe," Placement Option "+g(i.placementOptionId),1),s(p,{value:n.loading},null,8,["value"]),s(ue,{modelValue:n.currentIndex,"onUpdate:modelValue":e[2]||(e[2]=C=>n.currentIndex=C)},{default:a(()=>[(m(!0),b(D,null,k(i.shipments,(C,u)=>(m(),v(ce,{key:u},{default:a(()=>[s(me,{ref_for:!0,ref:"transportationConfigForm_"+u,onSubmit:pe(o.handleButtonClick,["prevent"])},{default:a(()=>[t("table",Le,[t("tbody",null,[t("tr",null,[e[4]||(e[4]=t("td",{class:"first-col-width"},[t("label",null,[h("Destination "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(w,{value:C?.destinationAddress?.city,class:"form-input destination-text-field pb-2",variant:"outlined","hide-details":"",disabled:""}
1,null,8,["value"])])]),t("tr",null,[e[5]||(e[5]=t("td",{class:"first-col-width"},[t("label",null,[h("Shipment Type "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(L,{modelValue:n.shipmentTypes[u],"onUpdate:modelValue":r=>n.shipmentTypes[u]=r,class:"form-input pb-2",placeholder:"Select Shipment Type",items:[{title:"SPD",value:"SPD"},{title:"LTL",value:"LTL"}],rules:[o.rules.required],color:"primary",variant:"outlined","hide-details":""},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("tr",null,[e[6]||(e[6]=t("td",{style:{width:"140px"}},[t("label",null,[h("Ship Date "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(q,{modelValue:n.dateMenuModel[u],"onUpdate:modelValue":r=>n.dateMenuModel[u]=r,"close-on-content-click":!1},{activator:a(({props:r})=>[s(w,E({"model-value":n.transportConfig[u]?.readyToShipWindowStart?o.formatDate(n.transportConfig[u]?.readyToShipWindowStart):"",ref_for:!0},r,{class:"form-input",placeholder:"Select Date",color:"primary",variant:"outlined",rules:[o.rules.required],"append-inner-icon":"mdi-calendar-blank","hide-details":"",readonly:""}),null,16,["model-value","rules"])]),default:a(()=>[s(he,{color:"primary",rounded:"lg",min:o.formatDate(new Date,"YYYY-MM-DD"),"hide-header":"","onUpdate:modelValue":r=>{n.transportConfig[u].readyToShipWindowStart=o.formatDate(r,n.shipWindowDateFormat),n.dateMenuModel[u]=!1}},null,8,["min","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])])])])]),n.shipmentTypes[u]==="LTL"?(m(),b(D,{key:0},[e[15]||(e[15]=t("div",{class:"mb-6"},null,-1)),s(V,{modelValue:n.firstSection,"onUpdate:modelValue":e[0]||(e[0]=r=>n.firstSection=r),title:"Contact & Freight Info",class:"mb-3"},{default:a(()=>[t("div",Ne,[t("table",ke,[t("tbody",null,[t("tr",null,[e[7]||(e[7]=t("td",{class:"first-col-width"},[t("label",null,[h("Contact Name "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(w,{modelValue:n.transportConfig[u].contactName,"onUpdate:modelValue":r=>n.transportConfig[u].contactName=r,color:"primary",class:"form-input pb-2",variant:"outlined","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("tr",null,[e[8]||(e[8]=t("td",null,[t("label",null,[h("Phone "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(w,{modelValue:n.transportConfig[u].contactPhone,"onUpdate:modelValue":r=>n.transportConfig[u].contactPhone=r,color:"primary",class:"form-input pb-2",variant:"outlined","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("tr",null,[e[9]||(e[9]=t("td",null,[t("label",null,[h("Email "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(w,{modelValue:n.transportConfig[u].contactEmail,"onUpdate:modelValue":r=>n.transportConfig[u].contactEmail=r,color:"primary",class:"form-input pb-2",variant:"outlined","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("tr",null,[e[10]||(e[10]=t("td",null,[t("label",null,[h("Freight Class "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(L,{modelValue:n.transportConfig[u].freightClass,"onUpdate:modelValue":r=>n.transportConfig[u].freightClass=r,color:"primary",class:"form-input pb-2",items:Object.entries(n.FreightClass).map(([r,c])=>({title:o.parseEnum(r),value:c})),variant:"outlined",density:"compact","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","items","rules"])])]),t("tr",null,[e[11]||(e[11]=t("td",null,[t("label",null,[h("Declared Amount "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(w,{modelValue:n.transportConfig[u].freightDeclaredAmount,"onUpdate:modelValue":r=>n.transportConfig[u].freightDeclaredAmount=r,color:"primary",class:"form-input pb-2",variant:"outlined","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("tr",null,[e[12]||(e[12]=t("td",null,[t("label",null,[h("Currency "),t("span",{class:"text-danger"},"*")])],-1)),t("td",null,[s(L,{modelValue:n.transportConfig[u].freightDeclaredCurrency,"onUpdate:modelValue":r=>n.transportConfig[u].freightDeclaredCurrency=r,class:"form-input pb-2",variant:"outlined",color:"primary","hide-details":"",items:Object.entries(n.Currency).map(([r,c])=>({title:r,value:c})),rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","items","rules"])])])])])])]),_:2},1032,["modelValue"]),s(V,{modelValue:n.secondSection,"onUpdate:modelValue":e[1]||(e[1]=r=>n.secondSection=r),title:"Pallet Configurations",class:"mb-3"},{default:a(()=>[t("table",Ae,[e[13]||(e[13]=t("thead",{class:"b-thead bg-surface_subtle"},[t("tr",null,[t("th",{class:"text-center"}),t("th",{class:"text-center"},[t("span",null," Width / Height / Length"),h(),t("span",{class:"text-text_muted"},"(inch)")]),t("th",{class:"text-center"},[t("span",null,"Weight"),h(),t("span",{class:"text-text_muted"},"(lbs)")]),t("th",{class:"text-center"},[t("span",null,"Stackable")]),t("th",{class:"text-center"},[t("span",null,"Pallet Count")]),t("th",{style:{width:"40px"}})])],-1)),t("tbody",Te,[(m(!0),b(D,null,k(n.transportConfig[u].palletInputs,(r,c)=>(m(),b("tr",{key:c},[t("td",Ee," # "+g(c+1),1),t("td",Ue,[t("div",Fe,[s(w,{modelValue:r.width,"onUpdate:modelValue":y=>r.width=y,class:"pallet-input width-height-length-input mr-2",variant:"outlined",rounded:"4",color:"primary","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"]),s(w,{modelValue:r.height,"onUpdate:modelValue":y=>r.height=y,class:"pallet-input width-height-length-input mr-2",variant:"outlined",rounded:"4",color:"primary","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"]),s(w,{modelValue:r.length,"onUpdate:modelValue":y=>r.length=y,class:"pallet-input width-height-length-input",variant:"outlined",rounded:"4",color:"primary","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])])]),t("td",qe,[s(w,{modelValue:r.weight,"onUpdate:modelValue":y=>r.weight=y,class:"pallet-input weight-count-input",variant:"outlined",rounded:"4",color:"primary","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])]),t("td",We,[s(fe,{modelValue:r.isStackable,"onUpdate:modelValue":y=>r.isStackable=y,style:{width:"40px"},class:"mx-auto align-self-center",density:"compact",color:"primary","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])]),t("td",Me,[s(w,{modelValue:r.qty,"onUpdate:modelValue":y=>r.qty=y,class:"pallet-input weight-count-input",variant:"outlined",rounded:"4",color:"primary","hide-details":"",rules:[o.rules.required]},null,8,["modelValue","onUpdate:modelValue","rules"])]),t("td",null,[n.transportConfig[u].palletInputs.length>1?(m(),v(d,{key:0,icon:"mdi-delete-outline",onClick:y=>o.removePalletLine(u,c)},null,8,["onClick"])):P("",!0)])]))),128))])]),t("div",ze,[s(N,{class:"mx-auto",height:"32pxs",color:"secondary",variant:"outlined","prepe
1nd-icon":"mdi-plus",rounded:"4",onClick:r=>o.addPalletLine(u)},{default:a(()=>e[14]||(e[14]=[h(" Add Configuration ")])),_:2},1032,["onClick"])])]),_:2},1032,["modelValue"])],64)):P("",!0),t("div",Re,[s(N,{variant:"outlined",height:"40px",color:"secondary",class:"mr-3 text-capitalize",rounded:"4",onClick:o.closeDialog},{default:a(()=>e[16]||(e[16]=[h(" Cancel ")])),_:1},8,["onClick"]),s(N,{color:"primary",height:"40px",class:"text-capitalize",rounded:"4",type:"submit"},{default:a(()=>[h(g(n.currentIndex<i.shipments.length-1?"Next Shipment":"Finish"),1)]),_:1})])]),_:2},1032,["onSubmit"])]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}const Be=M(Oe,[["render",je],["__scopeId","data-v-790162f8"]]),Ge={name:"NListerShipmentNonAmazonCarriersDialog",components:{BPrimarySecondaryBtnGroup:De,BCard:z},props:{placementOptionName:{type:String,required:!0},placementOptionId:{type:String,required:!0},shipment:{type:Object,required:!0}},emits:["close","select"],data(){return{dialog:!0,carrier:null,deliveryWindowId:null}},watch:{dialog(l){l||this.$emit("close")}},methods:{formatEpocDate:ee,textCapitalize:H,formatMoney:A,selectValue(){const l=JSON.parse(JSON.stringify(this.carrier));l.deliveryWindowId=this.deliveryWindowId,this.$emit("select",{placementOptionId:this.placementOptionId,shipmentId:this.shipment.idStr,value:l}),this.dialog=!1}}},Qe={class:"d-flex flex-column ga-6"},Je={class:"text-body-small-2 text-text_muted"},Ze={class:"d-flex flex-column ga-2"},He={class:"d-flex justify-space-between w-100"},Ye={class:"text-truncate"},Ke={class:"text-body-1 mr-3"},Xe={class:"text-body-1 font-weight-600 pl-2"},$e={class:"d-flex py-2 justify-space-between"},et={class:"text-truncate"},tt={class:"text-body-1 mr-3"},nt={class:"text-body-1 font-weight-600 pl-2"},lt={class:"d-flex flex-column ga-2"},st={class:"d-flex align-items-center ga-2"},it={class:"d-flex ga-4 w-100"},ot={class:"text-truncate"},at={class:"d-flex py-2 ga-4 w-100"},rt={class:"text-truncate"};function dt(l,e,i,f,n,o){const p=x("b-primary-secondary-btn-group"),V=x("b-card");return m(),v(te,{modelValue:n.dialog,"onUpdate:modelValue":e[3]||(e[3]=d=>n.dialog=d),width:"512"},{default:a(()=>[s(V,{title:"Select Carrier","title-class":"mb-2",onOnCloseClick:e[2]||(e[2]=d=>n.dialog=!1)},{default:a(()=>[t("div",Qe,[t("p",Je,[h(g(i.placementOptionName),1),e[4]||(e[4]=t("br",null,null,-1)),h(" "+g(`${o.textCapitalize(i.shipment.destinationAddress?.city)}, ${i.shipment.destinationAddress?.stateOrProvinceCode}`),1),e[5]||(e[5]=t("br",null,null,-1)),h(" "+g(i.shipment.boxQty?`${i.shipment.boxQty} Box${i.shipment.boxQty>1?"es":""}`:""),1)]),t("div",Ze,[e[6]||(e[6]=t("label",null,"Non-AMZ Partners",-1)),s(L,{modelValue:n.carrier,"onUpdate:modelValue":e[0]||(e[0]=d=>n.carrier=d),items:i.shipment.transportationOptions?.filter(d=>d.shippingSolution!=="AMAZON_PARTNERED_CARRIER"),variant:"outlined",density:"compact",style:{"max-width":"300px"},placeholder:"Select carrier",class:"carrier-input",color:"primary","menu-props":{width:"300"},"return-object":"","hide-details":""},{selection:a(({item:d})=>[t("div",He,[t("div",Ye,[t("span",Ke,g(d.raw.carrierName),1)]),t("div",Xe,g(o.formatMoney(d.raw.quoteCostAmount,!1,!1,"n/a",d.raw.quoteCostCurrency)),1)])]),item:a(({item:d,index:I,props:C})=>[s(O,{density:"compact",class:j({"border-b":I!==(i.shipment.deliveryWindows||[]).length-1}),onClick:C.onClick},{default:a(()=>[t("div",$e,[t("div",et,[t("span",tt,g(d.raw.carrierName),1)]),t("div",nt,g(o.formatMoney(d.raw.quoteCostAmount,!1,!1,"n/a",d.raw.quoteCostCurrency)),1)])]),_:2},1032,["class","onClick"])]),_:1},8,["modelValue","items"])]),t("div",lt,[t("div",st,[e[8]||(e[8]=t("label",null,"FC Delivery Window",-1)),s(ge,{width:"288",location:"bottom",opacity:"1",text:"Tooltip"},{activator:a(({props:d})=>[s(T,E(d,{icon:"mdi-information-outline"}),null,16)]),default:a(()=>e[7]||(e[7]=[t("div",{class:"d-flex flex-column text-body-1 py-2 ga-2"},[t("p",{class:"font-weight-600"}," Fulfillment Center Delivery Window "),t("p",{style:{color:"rgb(var(--v-theme-border_strong))"}}," This isn’t tied to your carrier. Select the time slot when the fulfillment center can receive your shipment. ")],-1)])),_:1})]),s(L,{modelValue:n.deliveryWindowId,"onUpdate:modelValue":e[1]||(e[1]=d=>n.deliveryWindowId=d),items:i.shipment.deliveryWindows,variant:"outlined",style:{"max-width":"300
1px"},placeholder:"Select delivery window",class:"carrier-input",color:"primary","item-value":"idStr","menu-props":{width:"300"},"hide-details":""},{selection:a(({item:d})=>[t("div",it,[s(T,{icon:"mdi-calendar-blank-outline"}),t("div",ot,[h(g(o.formatEpocDate(d.raw.startDate))+" ",1),e[9]||(e[9]=t("span",{class:"mx-2"},"-",-1)),h(" "+g(o.formatEpocDate(d.raw.endDate)),1)])])]),item:a(({item:d,index:I,props:C})=>[s(O,{density:"compact",class:j({"border-b":I!==(i.shipment.deliveryWindows||[]).length-1}),onClick:C.onClick},{default:a(()=>[t("div",at,[s(T,{icon:"mdi-calendar-blank-outline"}),t("div",rt,[h(g(o.formatEpocDate(d.raw.startDate))+" ",1),e[10]||(e[10]=t("span",{class:"mx-2"},"-",-1)),h(" "+g(o.formatEpocDate(d.raw.endDate)),1)])])]),_:2},1032,["class","onClick"])]),_:1},8,["modelValue","items"])]),e[11]||(e[11]=t("p",{class:"text-warning_solid font-weight-medium"}," Selecting a non-AMZ partner requires completing your shipment in Seller Central. If a carrier shows no price, you can still choose it. ",-1)),s(p,{"primary-text":"confirm","secondary-text":"cancel","primary-disabled":!n.carrier,"secondary-action":()=>n.dialog=!1,"primary-action":o.selectValue},null,8,["primary-disabled","secondary-action","primary-action"])])]),_:1})]),_:1},8,["modelValue"])}const ut=M(Ge,[["render",dt]]),ct={name:"NListerPlacementShippingOptions",components:{NListerShipmentNonAmazonCarriersDialog:ut,IconButton:X,NListerShipmentDialog:Be,BCard:z,BStepper:ie,LoadingIndicator:se},data(){return{session:null,loading:!1,tab:0,selectedOption:null,shipmentLoading:{},timeoutId:null,timeoutDuration:1e4,selectedOptionPayload:{},shipmentDialog:{model:!1,shipments:[],placementOption:null,placementOptionId:null,sessionId:null,destination:null},contentFileLoading:!1,refreshLoading:!1,nonAmazonSelectionDialog:{model:!1,placementOptionId:null,placementOptionName:null,shipment:null}}},computed:{...ye(["nListerShipmentsPlacementOptions","nListerShipmentsSession"])},mounted(){this.initialFetch()},beforeUnmount(){this.timeoutId&&clearTimeout(this.timeoutId)},methods:{...K(["fetchNListerPlacementOptions","nListerSelectPlacementOption"]),formatMoney:A,formatDate:Y,textCapitalize:H,async initialFetch(){this.loading=!0,await this.get
1Session(),this.loading=!1},async getSession(){const{sessionId:l}=this.$route.params;if(await this.fetchNListerPlacementOptions(l)){if(this.nListerShipmentsSession?.status===Se.SELLER_PACKING){this.$router.push({name:U.N_LISTER_FBA_SESSIONS});return}const f=this.nListerShipmentsSession?.status?.startsWith("PENDING")||this.nListerShipmentsSession?.status?.startsWith("WAITING");this.nListerShipmentsPlacementOptions?.find(o=>!!o.shipments?.find(p=>p.internalStatus?.startsWith("PENDING")||p.internalStatus?.startsWith("WAITING")))||f?this.timeoutId=setTimeout(this.getSession,this.timeoutDuration):clearTimeout(this.timeoutId)}else clearTimeout(this.timeoutId)},getFee(l){const e=l?.fees?.find(n=>n.type==="FEE"),i=e?.amount,f=e?.currency;return A(i,!1,!1,"-",f)},isShipmentLoading(l){return l.internalStatus?.startsWith("PENDING")||l.internalStatus?.startsWith("WAITING")},getEstimatedShippingCost(l){const e={price:null,currency:null};return e.price=l.previewPriceSpd||l.previewPriceLtl||null,e.currency=l.previewPriceSpdCurrency||l.previewPriceLtlCurrency||null,e},getEstimatedShippingCostText(l){const e=this.getEstimatedShippingCost(l);return`<span class='text-text_muted'>Estimated cost: ${e.price?A(e.price,!1,!1,"n/a",e.currency):"n/a"}</span>`},getTotalCost(l){const e=l?.fees?.find(f=>f.type==="FEE")?.amount;let i=0;return i+=e,(l?.shipments||[]).forEach(f=>{if(this.selectedOptionPayload[l.idStr]?.[f.idStr]){const n=this.selectedOptionPayload[l.idStr]?.[f.idStr]?.quoteCostAmount||null;i!==null&&n!==null?i+=n:i=null}else{const n=this.getEstimatedShippingCost(f).price;i!==null&&n!==null?i+=n:i=null}}),i},toggleShipmentDialog(l,e){this.shipmentDialog.shipments=l.shipments,this.shipmentDialog.placementOption=l,this.shipmentDialog.placementOptionId=e+1,this.shipmentDialog.sessionId=this.$route.params.sessionId,this.shipmentDialog.model=!!l.shipments},setSelectedOptionPayload(l,e,i){this.selectedOptionPayload[e]?this.selectedOptionPayload[e][i]=l:this.selectedOptionPayload[e]={[i]:{...l}}},isConfirmEnabled(l){const e=l.shipments.map(n=>n.idStr),i=l.idStr,f=this.selectedOptionPayload[i];return!(!f||Object.values(f).length!==e.length)},async selectPlacementOption(l){const{sessionId:e}=this.$route.params,i=l.idStr,f=this.selectedOptionPayload[i],n={placementOptionId:i,shipmentSelections:Object.entries(f).map(([p,V])=>({shipmentId:p,transportationOptionId:V.idStr,deliveryWindowId:V.deliveryWindowId||null}))};if(await this.nListerSelectPlacementOption({sessionId:e,payload:n})){G("Shipments confirmed.",Q.SUCCESS);const p=this;setTimeout(()=>{p.$router.push({name:U.N_LISTER_FBA_SESSIONS})},1500)}},isPlacementOptionDisabled(l){const e=l.idStr,i=this.nListerShipmentsSession?.placementOptionRelaySuccess,f=this.nListerShipmentsSession?.placementOptionIdStr;return!i||!f?!1:e!==f},async downloadContentFile(){this.contentFileLoading=!0;const{sessionId:l}=this.$route.params,e=await B.downloadContentFile(l);if(e?.data?.success){const{url:i}=e.data.data;i&&window.open(i,"_blank")}this.contentFileLoading=!1},async refreshPlacementOptions(){this.refreshLoading=!0;const{sessionId:l}=this.$route.params;(await B.refreshPlacementOptions(l))?.data?.success&&(G("Placement options are being regenerated.",Q.SUCCESS),this.$router.push({name:U.N_LISTER_FBA_SESSIONS})),this.refreshLoading=!1},toggleNonAmazonSelectionDialog(l,e,i){this.nonAmazonSelectionDialog.placementOptionId=l,this.nonAmazonSelectionDialog.placementOptionName=i,this.nonAmazonSelectionDialog.shipment=e,this.nonAmazonSelectionDialog.model=!!e&&!!l}}},mt={class:"d-block align-center"},pt={class:"text-text_muted text-center",style:{"padding-top":"2px","min-height":"23px"}},ht={key:1,class:"d-flex flex-column mx-auto ga-6 px-4 pt-2 pb-4",style:{"max-width":"1000px"}},ft={key:0,class:"d-flex flex-column ga-4"},gt=["innerHTML"],yt={class:"d-flex justify-end"},St={class:"d-flex align-items-center py-3",style:{"border-bottom":"1px solid rgb(var(--v-theme-border_control))"}},_t={class:"text-body-0 font-weight-600 font-weight-bold"},bt={class:"text-body-0"},xt={class:"font-weight-medium text-body-0 mr-2"},Ct={class:"text-text_secondary text-body-1"},wt={key:0,class:"pa-2"},vt={key:1,class:"d-flex ga-2 justify-end"},Vt={class:"d-flex justify-space-between w-100"},Dt={class:"text-truncate"},It={class:"text-body-1 mr-3"},Ot={class:"text-body-1 font-weight-600 pl-2"},Pt={class:"d-flex justify-space-between"},Lt={class:"text-truncate"},Nt={class:"text-body-1 mr-3"},kt={class:"text-body-1 font-weight-600 pl-2"},At={class:"d-flex justify-space-between"},Tt={key:1,class:"text-warning"},Et={key:2,class:"d-flex justify-end align-items-center ga-2"},Ut=["innerHTML"],Ft={class:"text-body-0 font-weight-bold"},qt={class:"d-flex justify-end"};function Wt(l,e,i,f,n,o){const p=x("b-stepper"),V=x("loading-indicator"),d=x("v-list"),I=x("icon-button"),C=x("b-card"),u=x("n-lister-shipment-dialog"),r=x("n-lister-shipment-non-amazon-carriers-dialog");return m(),b(D,null,[t("div",mt,[e[3]||(e[3]=t("h2",{class:"text-capitalize text-center"}," Confirm Shipments ",-1)),t("div",pt,g(l.nListerShipmentsSession?.name),1)]),s(p,{class:"my-7","active-step-index":3,steps:["Scan Items","Select Packing Options","Pack Items","Confirm Shipments","Print Labels"]}),n.loading?(m(),b(D,{key:0},[n.loading?(m(),v(V,{key:0})):P("",!0)],64)):(m(),b("div",ht,[l.nListerShipmentsSession?.indicators?.length?(m(),b("div",ft,[(m(!0),b(D,null,k(l.nListerShipmentsSession?.indicators,(c,y)=>(m(),v(_e,{key:y,variant:"tonal",class:"pa-4",density:"compact",rounded:"lg",border:"start","border-color":c.level?.toLowerCase(),type:c.level?.toLowerCase()},{default:a(()=>[t("span",{innerHTML:c.message},null,8,gt)]),_:2},1032,["border-color","type"]))),128))])):P("",!0),t("div",yt,[s(q,{location:"bottom"},{activator:a(({props:c})=>[s(N,E(c,{class:"text-capitalize","append-icon":"mdi-pencil-box-multiple-outline",rounded:"4",height:"32",color:"secondary",variant:"outlined",text:"actions",loading:n.contentFileLoading||n.refreshLoading}),null,16,["loading"])]),default:a(()=>[s(d,null,{default:a(()=>[s(O,{onClick:o.refreshPlacementOptions},{default:a(()=>[s(J,null,{default:a(()=>e[4]||(e[4]=[h("Refresh Placement Options")])),_:1})]),_:1},8,["onClick"]),s(O,{onClick:o.downloadContentFile},{default:a(()=>[s(J,null,{default:a(()=>e[5]||(e[5]=[h("Download Content File")])),_:1})]),_:1},8,["onClick"])]),_:1})]),_:1})]),(m(!0),b(D,null,k(l.nListerShipmentsPlacementOptions,(c,y)=>(m(),v(C,{key:y,class:"default-little-shadow"},{default:a(()=>[s(be,{opacity:"0.2",persistent:"",contained:"","model-value":o.isPlacementOptionDisabled(c)},null,8,["model-value"]),t("div",St,[t("span",_t,g(`Placement Option ${y+1}`),1),s(xe),e[6]||(e[6]=t("span",{class:"text-body-1 text-text_muted mr-3"},"Placement Fee",-1)),t("span",bt,g(o.getFee(c)),1)]),e[12]||(e[12]=t("div",{class:"divider"},null,-1)),s(Ce,{fluid:""},{default:a(()=>[(m(!0),b(D,null,k(c.shipments||[],(S,ne)=>(m(),v(Z,{key:ne,justify:"center",align:"center","align-content":"center",style:{"border-bottom":"thin solid rgb(var(--v-theme-surface_muted))"}},{default:a(()=>[s(F,{cols:"12",md:"5",style:{padding:"30px 0"}},{default:a(()=>[t("span",xt,g(`${o.textCapitalize(S.destinationAddress?.city)}, ${S.destinationAddress?.stateOrProvinceCode}`),1),t("span",Ct,g(S.boxQty?`${S.boxQty} Box${S.boxQty>1?"es":""}`:""),1)]),_:2},1024),s(F,{cols:"12",md:"7",class:"px-0 py-4 text-end justify-end"},{default:a(()=>[o.isShipmentLoading(S)?(m(),b("div",wt,[s(we,{color:"primary",size:"28",width:"3",indeterminate:""})])):S?.internalStatus==="SELLER_SELECT"?(m(),b("div",vt,[S.transportationOptions?.length?(m(),v(L,{key:0,"model-value":n.selectedOptionPayload[c.idStr]?.[S.idStr]||null,items:S.transportationOptions?.filter(_=>_.shippingSolution==="AMAZON_PARTNERED_CARRIER")||[],style:{"max-width":"200px"},placeholder:"Select carrier",class:"carrier-input",variant:"outlined",color:"primary","menu-props":{width:"260"},density:"compact","return-object":"","hide-details":"","onUpdate:modelValue":_=>o.setSelectedOptionPayload(_,c.idStr,S.idStr)},{selection:a(({item:_})=>[t("div",Vt,[t("div",Dt,[t("span",It,g(_.raw.carrierName),1)]),t("div",Ot,g(o.formatMoney(_.raw.quoteCostAmount,!1,!1,"n/a",_.raw.quoteCostCurrency)),1)])]),item:a(({item:_,props:le})=>[s(O,{density:"compact",disabled:!S.deliveryWindows?.length,onClick:le.onClick},{default:a(()=>[t("div",Pt,[t("div",Lt,[t("span",Nt,g(_.raw.carrierName),1),e[7]||(e[7]=t("span",{class:"text-body-small-2 text-text_muted"},"Amz Partnered",-1))]),t("div",kt,g(o.formatMoney(_.raw.quoteCostAmount,!1,!1,"n/a",_.raw.quoteCostCurrency)),1)])]),_:2},1032,["disabled","onClick"])]),"append-item":a(()=>[s(O,{density:"compact",onClick:_=>o.toggleNonAmazonSelectionDialog(c.idStr,S,`Placement Option ${y+1}`)},{default:a(()=>[t("div",At,[e[8]||(e[8]=t("div",{class:"text-truncate"},[t("span",{class:"text-body-1 mr-3"},"Non-AMZ-Partnered")],-1)),s(T,{icon:"mdi-chevron-right"})])]),_:2},1032,["onClick"])]),_:2},1032,["model-value","items","onUpdate:modelValue"])):(m(),b("span",Tt,"Please continue the process in seller central")),s(q,{location:"left"},{activator:a(({props:_})=>[s(I,E({ref_for:!0},_,{icon:"mdi-dots-vertical"}),null,16)]),default:a(()=>[s(d,null,{default:a(()=>[s(O,{title:"Update Shipping Quote",onClick:_=>o.toggleShipmentDialog(c,y)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)])):(m(),b("div",Et,[t("div",{innerHTML:o.getEstimatedShippingCostText(S)},null,8,Ut),s(N,{class:"text-capitalize px-3 text-body-2",variant:"outlined",color:"secondary",rounded:"4",height:"32",onClick:_=>o.toggleShipmentDialog(c,y)},{default:a(()=>e[9]||(e[9]=[h(" Get Shipping Quote ")])),_:2},1032,["onClick"])]))]),_:2},1024)]),_:2},1024))),128)),s(Z,{justify:"end",align:"end","align-content":"end"},{default:a(()=>[s(F,{cols:"12",md:"3",class:"px-0 pt-6 pb-0 text-end"},{default:a(()=>
1[e[10]||(e[10]=t("span",{class:"text-body-1 mr-2"},"Total",-1)),t("span",Ft,g(o.formatMoney(o.getTotalCost(c),!1,!1,"n/a")),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),t("div",qt,[s(N,{class:"text-capitalize",color:"primary",rounded:"4",height:"40","append-icon":"mdi-chevron-right",flat:"",disabled:!o.isConfirmEnabled(c),onClick:S=>o.selectPlacementOption(c)},{default:a(()=>e[11]||(e[11]=[h(" Select placement ")])),_:2},1032,["disabled","onClick"])])]),_:2},1024))),128))])),n.shipmentDialog.model?(m(),v(u,{key:2,shipment:n.shipmentDialog.shipment,shipments:n.shipmentDialog.shipments,"placement-option":n.shipmentDialog.placementOption,"placement-option-id":n.shipmentDialog.placementOptionId,"session-id":n.shipmentDialog.sessionId,destination:n.shipmentDialog.destination,onOnSuccess:o.getSession,onCloseNlisterShipmentDialog:e[0]||(e[0]=()=>n.shipmentDialog.model=!1)},null,8,["shipment","shipments","placement-option","placement-option-id","session-id","destination","onOnSuccess"])):P("",!0),n.nonAmazonSelectionDialog.model?(m(),v(r,{key:3,"placement-option-id":n.nonAmazonSelectionDialog.placementOptionId,"placement-option-name":n.nonAmazonSelectionDialog.placementOptionName,shipment:n.nonAmazonSelectionDialog.shipment,items:n.nonAmazonSelectionDialog.items,onSelect:e[1]||(e[1]=({placementOptionId:c,shipmentId:y,value:S})=>o.setSelectedOptionPayload(S,c,y)),onClose:e[2]||(e[2]=c=>o.toggleNonAmazonSelectionDialog(null,null,null))},null,8,["placement-option-id","placement-option-name","shipment","items"])):P("",!0)],64)}const Yt=M(ct,[["render",Wt],["__scopeId","data-v-96095c10"]]);export{Yt as default};

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.