PageSourceSearch

https://sellwild.com/_next/static/chunks/pages/account/shipping-507d72cd3bac0a24.js

js sellwild.com collected 2026-09-29 05:42:54 UTC 11,932 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8454],{16126:(e,t,a)=>{"use strict";a.d(t,{Ot:()=>s,QY:()=>c,RJ:()=>p,VH:()=>r,YS:()=>d,Z5:()=>h,Zd:()=>l,eq:()=>g,jV:()=>o});let i=[{token:"USPS_FlatRateEnvelope",name:"Flat Rate Envelope",group:"envelope",fits:"Documents, cards, thin items",length:12.5,width:9.5,height:.75,offered:!0,display:{width:"12 1/2",height:"9 1/2",depth:"3/4"},flatRate:!0,image:"flatrate-envelope.svg"},{token:"USPS_FlatRateLegalEnvelope",name:"Flat Rate Legal Envelope",group:"envelope",fits:"Legal-size paper, long thin items",length:15,width:9.5,height:.75,offered:!0,display:{width:"15",height:"9 1/2",depth:"3/4"},flatRate:!0,image:"flatrate-legal-envelope.svg"},{token:"USPS_FlatRatePaddedEnvelope",name:"Flat Rate Padded Envelope",group:"envelope",fits:"Clothing, soft goods, small electronics",length:12.5,width:9.5,height:1,offered:!0,display:{width:"12 1/2",height:"9 1/2",depth:"1"},flatRate:!0,image:"flatrate-padded-envelope.svg"},{token:"USPS_FlatRateCardboardEnvelope",name:"Flat Rate Cardboard Envelope",group:"envelope",fits:"Photos, prints, anything that must stay flat",length:12.5,width:9.5,height:.75,offered:!0,display:{width:"12 1/2",height:"9 1/2",depth:"3/4"},flatRate:!0,image:"flatrate-cardboard-envelope.svg"},{token:"USPS_FlatRateWindowEnvelope",name:"Flat Rate Window Envelope",group:"envelope",fits:"Documents with the address showing through",length:10,width:5,height:.75,offered:!0,display:{width:"10",height:"5",depth:"3/4"},flatRate:!0,image:"flatrate-window-envelope.svg"},{token:"USPS_SmallFlatRateEnvelope",name:"Small Flat Rate Envelope",group:"envelope",fits:"Jewelry, cards, very small items",length:10,width:6,height:.8,offered:!0,display:{width:"10",height:"6",depth:"3/4"},flatRate:!0,image:"flatrate-small-envelope.svg"},{token:"USPS_SmallFlatRateBox",name:"Small Flat Rate Box",group:"box",fits:"Jewelry, electronics, tickets, small items",length:8.6875,width:5.4375,height:1.75,offered:!0,image:"flatrate-small-box.svg",display:{width:"8 5/8",height:"5 3/8",depth:"1 5/8"},flatRate:!0},{token:"USPS_MediumFlatRateBox1",name:"Medium Flat Rate Box 1",group:"box",fits:"Top-loading. Shoes, clothes, game consoles",length:11.25,width:8.75,height:6,offered:!0,image:"flatrate-medium-box-1.svg",display:{width:"11 1/4",height:"8 3/4",depth:"6"},flatRate:!0},{token:"USPS_MediumFlatRateBox2",name:"Medium Flat Rate Box 2",group:"box",fits:"Side-loading. Laptops, books, gifts",length:14,width:12,height:3.5,offered:!0,image:"flatrate-medium-box-2.svg",display:{width:"14",height:"12",depth:"3 1/2"},flatRate:!0},{token:"USPS_LargeFlatRateBox",name:"Large Flat Rate Box",group:"box",fits:"Tools, large decor, jackets",length:12.25,width:12.25,height:6,offered:!0,image:"flatrate-large-box.svg",display:{width:"12 1/4",height:"12 1/4",depth:"6"},flatRate:!0},{token:"USPS_APOFlatRateBox",name:"APO/FPO/DPO Flat Rate Box",group:"box",fits:"Military addresses only",length:12.25,width:12,height:6,offered:!1,image:"flatrate-large-box.svg",flatRate:!0},{token:"USPS_SoftPack",name:"Soft Pack (poly mailer)",group:"other",fits:"Clothing and soft goods in your own mailer",length:0,width:0,height:0,offered:!0,flatRate:!1,image:"softpack.svg"},{token:"USPS_IrregularParcel",name:"Irregular Parcel",group:"other",fits:"Tubes, rolls, odd shapes",length:4,width:4,height:4,offered:!0,display:{width:"4",height:"4",depth:"4"},flatRate:!1,image:"irregular-parcel.svg"},{token:"USPS_LargeVideoFlatRateBox",name:"Large Video Flat Rate Box",group:"other",fits:"International only",length:9.6,width:6.4,height:2.2,offered:!1,flatRate:!0},{token:"USPS_Card",name:"Card",group:"other",fits:"Postcards",length:6,width:4.25,height:.01,offered:!1,flatRate:!1}],l=["USPS_SmallFlatRateBox","USPS_MediumFlatRateBox1","USPS_MediumFlatRateBox2","USPS_LargeFlatRateBox"],s="",n=new Map(i.map(e=>[e.token,e]));function o(e){return e?n.get(e)??null:null}function d(e){return o(e)?.offered===!0}function r(){return i.filter(e=>e.offered)}function h(){return r().filter(e=>!l.includes(e.token))}function c(e){return d(e)&&!l.includes(e)}function g(e){let t=o(e);return t&&t.length>0&&t.width>0&&t.height>0?{depth:Math.ceil(t.length),width:Math.ceil(t.width),height:Math.ceil(t.height)}:null}let p={envelope:"USPS Flat Rate envelopes",box:"USPS Flat Rate boxes",other:"Other USPS packaging"}},25189:(e,t,a)=>{"use strict";a.d(t,{N:()=>n});var i=a(14232),l=a(89099),s=a(60685);function n(){let e=(0,l.useRouter)(),{loggedIn:t,isLoading:a}=(0,s.Jd)();return(0,i.useEffect)(()=>
1{if(a||t||!1===e.isReady)return;let i=encodeURIComponent(e.asPath);e.replace(`/login?returnTo=${i}`)},[a,t,e,e.isReady,e.asPath]),{isLoading:a,loggedIn:t}}},40284:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>A});var i=a(37876),l=a(48230),s=a.n(l),n=a(25189),o=a(93867),d=a(98800),r=a(44276),h=a(9349),c=a(14232);let g=[{value:"PDF_2.3x7.5",label:"2.3 x 7.5 inch PDF",size:"59 x 191 mm",dimensions:"2.3 x 7.5 inch"},{value:"PNG_2.3x7.5",label:"2.3 x 7.5 inch PNG",size:"59 x 191 mm",dimensions:"2.3 x 7.5 inch"},{value:"PDF_4x8",label:"4 x 8 inch PDF",size:"100 x 200 mm",dimensions:"4 x 8 inch"},{value:"PDF_4x6",label:"4 x 6 inch PDF",size:"102 x 153 mm",dimensions:"4 x 6 inch"},{value:"PDF",label:"8.5 x 11 inch PDF",size:"210 x 279 mm",dimensions:"8.5 x 11 inch"},{value:"PDF_A4",label:"A4 PDF",size:"210 x 297 mm",dimensions:"8.3 x 11.7 inch"},{value:"PDF_A5",label:"A5 PDF",size:"148 x 210 mm",dimensions:"5.8 x 8.3 inch"},{value:"PDF_A6",label:"A6 PDF",size:"105 x 148 mm",dimensions:"4.1 x 5.8 inch"},{value:"ZPLII",label:"ZPL II",size:"",dimensions:""},{value:"PNG",label:"PNG",size:"",dimensions:""}],p=({value:e,onChange:t,className:a="",onFocus:l,onBlur:s})=>(0,i.jsx)("select",{id:"label-size-select",value:e,onChange:e=>t(e.target.value),onFocus:l,onBlur:s,className:`form-select ${a}`,children:g.map(e=>(0,i.jsxs)("option",{value:e.value,children:[e.label,e.dimensions&&!e.label.includes(e.dimensions)&&` (${e.dimensions})`]},e.value))});var u=a(78018),m=a(12310),f=a(12855),x=a(58965),v=a(3962);let{saveSuccessMsg:P,saveErrorMsg:S}=v.A.account.shipping,b="PDF_4x6",{pageTitle:w,labelFormatHeading:F,labelFormatExplain:_,labelFormatLabel:R,saveButtonLabel:y,savingLabel:N,addressesHeading:j,addressesExplain:k,addressesLinkLabel:U,packagingHeading:B,packagingExplain:C,packagingLabel:D,packagingNoneOption:E}=v.A.account.shipping,A=()=>{(0,n.N)();let{labelFormat:e,setLabelFormat:t,loading:a,saving:l,dirty:g,save:v,defaultParcelTemplate:A,setDefaultParcelTemplate:z,packagingDirty:O,savingPackaging:L,savePackaging:T}=function(){let[e,t]=(0,c.useState)(b),[a,i]=(0,c.useState)(b),[l,s]=(0,c.useState)(""),[n,o]=(0,c.useState)(""),[d,r]=(0,c.useState)(!0),[h,g]=(0,c.useState)(!1),[p,u]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=!1;return(async()=>{try{let a=await fetch("/api/user/profile"),l=x.Nu.safeParse(await a.json());if(e)return;if(l.success&&l.data.success){let e=l.data.profile.shippingFormat||b;t(e),i(e);let a=l.data.profile.defaultParcelTemplate||"";s(a),o(a)}}catch(t){e||(0,f.Oz)(t,void 0,{action:"load_shipping_settings",component:"ShippingPage"})}finally{e||r(!1)}})(),()=>{e=!0}},[]);let v=(0,c.useCallback)(async()=>{g(!0);try{let t=await fetch("/api/user/profile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shippingFormat:e})}),a=x.Nu.safeParse(await t.json());a.success&&a.data.success?(i(a.data.profile.shippingFormat||e),(0,m.createNotification)({dismissed:!1,type:"success",msg:P})):(0,m.createNotification)({dismissed:!1,type:"error",msg:S})}catch(e){(0,f.Oz)(e,void 0,{action:"save_shipping_settings",component:"ShippingPage"}),(0,m.createNotification)({dismissed:!1,type:"error",msg:S})}finally{g(!1)}},[e]),w=(0,c.useCallback)(async()=>{u(!0);try{let e=await fetch("/api/user/profile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultParcelTemplate:l||null})}),t=x.Nu.safeParse(await e.json());t.success&&t.data.success?(o(t.data.profile.defaultParcelTemplate||""),(0,m.createNotification)({dismissed:!1,type:"success",msg:P})):(0,m.createNotification)({dismissed:!1,type:"error",msg:S})}catch(e){(0,f.Oz)(e,void 0,{action:"save_shipping_packaging",component:"ShippingPage"}),(0,m.createNotification)({dismissed:!1,type:"error",msg:S})}finally{u(!1)}},[l]);return{labelFormat:e,setLabelFormat:t,loading:d,saving:h,dirty:e!==a,save:v,defaultParcelTemplate:l,setDefaultParcelTemplate:s,packagingDirty:l!==n,savingPackaging:p,savePackaging:w}}();return(0,i.jsxs)(d.A,{needsLogin:!0,header:!0,showAd:!0,account:!0,headerTitle:w,children:[(0,i.jsx)(o.A,{title:w}),(0,i.jsxs)("article",{className:"page account-page same-color","data-testid":"shipping-page",children:[(0,i.jsx)(r.A,{title:w,subtitle:"Your label format, default packaging and where you ship from."}),(0,i.jsx)("div",{className:"page-inner",children:(0,i.jsxs)("div",{className:"shipping-settings-page",children:[(0,i.jsxs)(h.f,{className:"label-format",heading:F,explain:void 0,children:[(0,i.jsx)("p",{children:_}),a?(0,i.jsx)("p",{className:"loading-label","data-testid":"shipping-format-loading",children:"Loading…"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("label",{className:"input-label filled",htmlFor:"label-size-select",children:[(0,i.jsx)("span",{className:"input-placeholder",children:R}
1),(0,i.jsx)(p,{value:e,onChange:t})]}),(0,i.jsx)("button",{type:"button",className:"greenButton","data-testid":"save-shipping-button",onClick:()=>void v(),disabled:!g||l,children:l?N:y})]})]}),(0,i.jsxs)(h.f,{className:"default-packaging",heading:B,explain:void 0,children:[(0,i.jsx)("p",{children:C}),a?(0,i.jsx)("p",{className:"loading-label","data-testid":"shipping-packaging-loading",children:"Loading…"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("label",{className:"input-label filled",htmlFor:"parcel-template-select",children:[(0,i.jsx)("span",{className:"input-placeholder",children:D}),(0,i.jsx)(u.A,{value:A,onChange:z,customLabel:E})]}),(0,i.jsx)("button",{type:"button",className:"greenButton","data-testid":"save-packaging-button",onClick:()=>void T(),disabled:!O||L,children:L?N:y})]})]}),(0,i.jsxs)(h.f,{className:"ship-from",heading:j,explain:void 0,children:[(0,i.jsx)("p",{children:k}),(0,i.jsx)(s(),{href:"/account/addresses",className:"link-button","data-testid":"shipping-addresses-link",children:U})]})]})})]})]})}},44276:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var i=a(37876);function l({title:e,subtitle:t,action:a,testId:s="account-page-header"}){return(0,i.jsxs)("header",{className:"account-page-header","data-testid":s,children:[(0,i.jsxs)("div",{className:"account-page-header__text",children:[(0,i.jsx)("h1",{className:"account-page-header__title",children:e}),t&&(0,i.jsx)("p",{className:"account-page-header__subtitle",children:t})]}),a&&(0,i.jsx)("div",{className:"account-page-header__action",children:a})]})}},78018:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var i=a(37876);a(14232);var l=a(16126);let s=["envelope","box","other"],n=({value:e,onChange:t,customLabel:a,only:n,id:o="parcel-template-select",className:d="",disabled:r=!1,ariaLabel:h})=>{let c=(0,l.VH)().filter(e=>!n||n.includes(e.token));return(0,i.jsxs)("select",{id:o,name:o,"data-testid":o,className:`form-select ${d}`,value:e,disabled:r,"aria-label":h,onChange:e=>t(e.target.value),children:[void 0!==a&&(0,i.jsx)("option",{value:l.Ot,children:a}),s.map(e=>{let t=c.filter(t=>t.group===e);return 0===t.length?null:(0,i.jsx)("optgroup",{label:l.RJ[e],children:t.map(e=>{let t=e.length>0&&e.width>0&&e.height>0?`${e.length} \xd7 ${e.width} \xd7 ${e.height} in`:"";return(0,i.jsxs)("option",{value:e.token,children:[e.name,t?` (${t})`:""]},e.token)})},e)})]})}},94604:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/shipping",function(){return a(40284)}])}},e=>{e.O(0,[8239,8644,5310,8230,8372,4883,8800,636,6593,8792],()=>e(e.s=94604)),_N_E=e.O()}]);
2//# sourceMappingURL=shipping-507d72cd3bac0a24.js.map

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.