PageSourceSearch

https://www.uspsoperationsanta.com/_next/static/chunks/1d3qcqpceain3.js

js uspsoperationsanta.com collected 2026-10-02 07:10:16 UTC 47,052 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,928099,e=>{"use strict";var t=e.i(843476),a=e.i(205329),s=e.i(657688),l=e.i(217255),i=e.i(271645),r=e.i(41122);e.i(937602);var d=e.i(579352),n=e.i(965537),o=e.i(520481);let c=[{id:1,title:"Please Shop Early",type:"copy",icon:"shop-early",description:"Sending your gift as soon as possible helps families plan for the holidays. Santa’s Gift Shoppe, our online catalog, makes it easy."},{id:2,title:"It’s Easy With Our Online Catalog",type:"cta",icon:"catalog",description:"Send the ideal gift with just a click using Santa’s Gift Shoppe, our online catalog powered by Toys“R”Us<sup>®</sup/>.",ctaText:"Learn More",ctaLink:"/ship#santas-gift-shoppe"},{id:3,title:"Pressed for Time?",type:"cta",icon:"sleigh",description:"Save a trip to a Post Office<sup>™</sup> location with Santa’s Gift Shoppe, our online catalog. It’s easy and can cross finding a gift off your to-do list today.",ctaText:"Learn More",ctaLink:"/ship#santas-gift-shoppe"},{id:4,title:"Looking to Save on Shipping?",type:"cta",icon:"shipping-gift",description:"Enjoy a single flat shipping rate on all orders in Santa’s Gift Shoppe, our online catalog powered by Toys“R”Us<sup>®</sup>.",ctaText:"Learn More",ctaLink:"/ship#santas-gift-shoppe"},{id:5,title:"Giving Is the Perfect Gift",type:"copy",icon:"gifts",description:"Anything under the tree from Santa will be magical. Please don’t feel pressure to get expensive items or all the things on someone’s list."},{id:6,title:"A New Puppy?",type:"copy",icon:"bear",description:"It’s really best to send a toy version, a book about animals, or even some puppy paintings."},{id:7,title:"Kids Dream Big ",type:"copy",icon:"holly-letter",description:"Don’t shy away from wishes that are a bit imaginative or unspecific. Have fun with it and do your best to get creative!"},{id:8,title:"Package Max",type:"copy",icon:"boxes",description:"Of course you can send as much cheer as you’d like! Just note USPS can ship up to 6 packages per adoption."},{id:9,title:"Plan for Postage Costs",type:"copy",icon:"postage",description:"Remember, gift packages need paid postage to make it to the sleigh."},{id:10,title:"Make a Family’s Holiday",type:"cta",icon:"letters",description:"When we receive several letters from the same household, we try to group them together. Now it’s easy to team up to adopt and fulfill the whole family together!",ctaText:"Learn More",ctaLink:"/#adoptAsATeam"},{id:11,title:"Share the Joy – And the Work",type:"cta",icon:"holly-team",description:"Join forces with friends, family, and coworkers to adopt and fulfill an entire family of letters.",ctaText:"Learn More",ctaLink:"/#adoptAsATeam"},{id:12,title:"Spread the Cheer",type:"resource",icon:"santa-bell",description:[{text:"Tell others about the program! Not sure what to post? "},{href:"/resources",text:"Look here"},{text:"."}]},{id:13,title:"Key Dates to Keep in Mind",type:"dates",icon:"holly-calendar",description:"",dates:[{date:"Dec. 06",description:"Last Day to Send a Letter to Santa"},{date:"Dec. 13",description:"Last Day to Adopt Letters"},{date:"Dec. 13",description:"Ship-By Date"}]}],h=(0,i.forwardRef)(function({tipId:e},a){let[s]=(0,i.useState)(()=>Math.floor(Math.random()*c.length)),l=(0,i.useMemo)(()=>{let t=e?c.findIndex(t=>t.id===e):s;return c[t]},[e,s]);if(!l)return null;let{title:h,type:u,icon:m,description:g,tag:p}=l,f="cta"===u?l.ctaText:null,y="cta"===u?l.ctaLink:null,S="dates"===u?l.dates:[];return(0,t.jsxs)("div",{className:`usps-tip-module ${u} usps-tip-module--bg(${m})`,ref:a,children:["cta"===u&&(0,t.jsxs)("div",{className:"tip-module",children:[!!p&&(0,t.jsx)("div",{className:"tag",children:p}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("h3",{className:"usps-tip-module__heading",children:h}),(0,t.jsx)("p",{children:(0,r.textToHtml)(g,!0)})]}),(0,t.jsx)("a",{href:y,children:f})]}),"dates"===u&&(0,t.jsxs)("div",{className:"tip-module",children:[!!p&&(0,t.jsx)("div",{className:"tag",children:p}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("h3",{className:"usps-tip-module__heading",children:h}),(0,t.jsx)("p",{children:(0,r.textToHtml)(g,!0)})]}),(0,t.jsx)("ul",{children:S.map((e,a)=>(0,t.jsx)("li",{children:(0,t.jsxs)("p",{children:[(0,t.jsxs)("strong",{children:[e.date,": "]}),e.description]})},`date-${a}`))})]}),"resource"===u&&(0,t.jsxs)("div",{className:"tip-module",children:[!!p&&(0,t.jsx)("div",{className:"tag",children:p}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("h3",{className:"usps-tip-module__heading",children:h}),(0,t.jsx)("p",{children:(0,r.textToHtml)(g,!0)})]}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)(n.Facebook,{customIconPath:"/images/icons/facebook.v1.svg",hideText:!0})}),(0,t.jsx)("li",{children:(0,t.jsx)(o.Twitter,{customIconPath:"/images/icons/x.v1.svg",hideText:!0})}),(0,t.jsx)("li",{children:(0,t.jsx)(d.Email,{customIconPath:"/images/icons/email.v1.svg",hideText:!0})})]})]}),"copy"===u&&(0,t.jsxs)("div",{className:"tip-module",children:[!!p&&(0,t.jsx)("div",{className:"tag",children:p}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("h3",{className:"usps-tip-module__heading",children:h}),(0,t.jsx)("p",{children:(0,r.textToHtml)(g)})]})]})]})});var u=e.i(457688),m=e.i(405071);function g(e){let[a,s]=(0,i.useState)({}),[l,r]=(0,i.useState)(!1),d=(0,m.useTeamAdoptionModeStore)(e=>e.teamAdoptionMode),n=(0,m.useTeamAdoptionModeStore)(e=>e.teamAdoptionType),o=(t,l)=>{e.setLetters([]);let i=t.target.name,d={...a},n=e.filterForm[i][l],o={...e.filterForm};o[i][l]=!n,!n&&o[i][l]&&(d[i]||(d[i]={}),d[i][l]=!0),e.setFilters({...o,letter:{households:e.filterForm.letter.households,individuals:e.filterForm.letter.individuals}}),r(!0),s(d)},c=()=>{r(!1),e.toggleFilter()};return(0,t.jsx)("div",{className:e.isFilterOpen?"show filters":"filters",children:(0,t.jsxs)("div",{className:"filters_inner",children:[(0,t.jsx)("a",{className:"filter_link cancel",href:"#",onClick:c,children:(0,t.jsx)("i",{"aria-hidden":"true",className:"filter_icon"})}),(0,t.jsx)("h2",{className:"mb-20 filters__headline",children:"Filter"}),!d&&(0,t.jsxs)("fieldset",{className:"filter_set first",children:[(0,t.jsx)("legend",{children:"Letter Type"}),(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.letter.individuals,className:"form-control"+(e.filterForm.letter.individuals?" not-empty":""),id:"individuals",name:"letter",onChange:e=>o(e,"individuals"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"individuals",children:"Individuals"})]}),(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.letter.households,className:"form-control"+(e.filterForm.letter.households?" not-empty":""),id:"households",name:"letter",onChange:e=>o(e,"households"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"households",children:"Families"})]})]})]}),e.filterForm.letter.households&&(0,t.jsxs)("fieldset",{className:"filter_set",children:[(0,t.jsx)("legend",{children:"Family Size"}),(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.fam
1ilySize.two,className:"form-control"+(e.filterForm.familySize.two?" not-empty":""),id:"size_2",name:"familySize",onChange:e=>o(e,"two"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"size_2",children:"2"})]}),(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.familySize.three,className:"form-control"+(e.filterForm.familySize.three?" not-empty":""),id:"size_3",name:"familySize",onChange:e=>o(e,"three"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"size_3",children:"3"})]}),(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.familySize.four,className:"form-control"+(e.filterForm.familySize.four?" not-empty":""),id:"size_4",name:"familySize",onChange:e=>o(e,"four"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"size_4",children:"4"})]}),(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.familySize.five,className:"form-control"+(e.filterForm.familySize.five?" not-empty":""),id:"size_5",name:"familySize",onChange:e=>o(e,"five"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"size_5",children:"5+"})]})]})]}),(0,t.jsxs)("fieldset",{className:"filter_set first",children:[(0,t.jsx)("legend",{children:"Letters in"}),(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.language.en,className:"form-control"+(e.filterForm.language.en?" not-empty":""),id:"english",name:"language",onChange:e=>o(e,"en"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"english",children:"English"})]}),(0,t.jsxs)("li",{tabIndex:"0",children:[(0,t.jsx)("input",{checked:e.filterForm.language.es,className:"form-control"+(e.filterForm.language.es?" not-empty":""),id:"espanol",name:"language",onChange:e=>o(e,"es"),tabIndex:"-1",type:"checkbox"}),(0,t.jsx)("label",{htmlFor:"espanol",children:"Spanish"})]})]})]}),(0,t.jsxs)("fieldset",{className:"filter_drop",children:[(0,t.jsx)("legend",{children:"Select a State"}),(0,t.jsxs)("select",{className:"filter_locations",onChange:t=>{e.setLetters([]),e.setFilterLocation(t.target.value),r(!0)},value:e.filterLocation,children:[(0,t.jsx)("option",{value:"all",children:"Select one"}),(0,t.jsx)("option",{value:"all",children:"All States"}),e?.locations?.map(e=>(0,t.jsx)("option",{disabled:0===e.Current,value:e.State,children:e.Name},e.Id))]}),(0,t.jsx)("p",{className:"filter_drop__note",children:"Shipping fees vary by distance. "})]}),(0,t.jsx)("a",{className:`btn ${!l?"disabled":""}`,href:"#",onClick:e=>{l?c():e.preventDefault()},children:(0,t.jsx)("span",{children:"Apply Filters"})}),(0,t.jsx)("a",{className:"btn outline",href:"#",onClick:t=>{e.setLetters([]),d?("individual"===n&&e.setFilters({type:{gifts:!0,requests:!0},letter:{individuals:!0,households:!1},language:{en:!0,es:!0},familySize:{two:!1,three:!1,four:!1,five:!1},location:"all"}),"family"===n&&e.setFilters({type:{gifts:!0,requests:!0},letter:{individuals:!1,households:!0},language:{en:!0,es:!0},familySize:{two:!0,three:!0,four:!0,five:!0},location:"all"})):e.setFilters({type:{gifts:!0,requests:!0},letter:{individuals:!0,households:!0},language:{en:!0,es:!0},familySize:{two:!0,three:!0,four:!0,five:!0},location:"all"})},children:(0,t.jsx)("span",{children:"Clear Filters"})})]})})}var p=e.i(109536);function f(e){return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"modal_padding modal_padding--deep-gutter",children:[(0,t.jsx)("h4",{children:"Still browsing?"}),(0,t.jsx)("p",{children:"New letters go quickly. Refreshing the page will help ensure the letters you’re viewing are still available to adopt."}),(0,t.jsx)("button",{className:"btn ",id:"btn-refresh-letters-continue",onClick:()=>e.setShowLettersRefreshModal(!1),type:"button",children:(0,t.jsx)("span",{children:"Continue"})}),(0,t.jsx)("br",{}),(0,t.jsxs)("button",{className:"btn white",id:"btn-refresh-letters-refresh",onClick:()=>{window.scrollTo(0,0),window.location.reload()},type:"button",children:[(0,t.jsx)("i",{"aria-hidden":"true",className:"ui-icon ui-icon--refresh"}),(0,t.jsx)("span",{children:"Refresh Letters"})]})]})})}var y=e.i(823258),S=e.i(592415),N=e.i(6007),L=e.i(324530),I=e.i(10510),x=e.i(618566),j=e.i(781572),T=e.i(421984),A=e.i(953739),E=e.i(494355);let _=(0,i.forwardRef)(({session:e},a)=>{let[l,r]=(0,i.useState)(!1),[d,n]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[h,u]=(0,i.useState)(null),[g,p]=(0,i.useState)(""),[f,y]=(0,i.useState)(""),[N,L]=(0,i.useState)(!1),[I,_]=(0,i.useState)(null),[v,P]=(0,i.useState)(),[O,b]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),k=(0,m.useTeamAdoptionModeStore)(e=>e.selectedTeam),F=(0,x.useRouter)(),D="This family can’t be adopted right now. Please try again later.",{actions:{apiRequest:M},values:{error:H,loading:G}}=(0,E.default)(),R=()=>{r(!1),z()};(0,i.useImperativeHandle)(a,()=>({handleClose:()=>R(),handleOpen:e=>{n(e),r(!0)}}));let z=()=>{M(A.default.CANCEL_PRE_ADOPTION.url,A.default.CANCEL_PRE_ADOPTION.method,{userid:e?.user?.Id,letterids:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{c(!1)}).catch(e=>{})};(0,i.useEffect)(()=>{d&&e&&l&&M(A.default.PRE_ADOPT_LETTER.url,A.default.PRE_ADOPT_LETTER.method,{userid:e.user.Id,letterids:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{e?.success?(p(d?.letterGroup?.[0].LetterNames?.[0].Name),y(d?.locations.filter(e=>e.Id===d?.locationId)[0]?.Name||""),c(!1)):P(D)}).catch(e=>{})},[d,e,l]);let B=(0,t.jsxs)("div",{className:"title",children:[(0,t.jsx)("div",{className:"title-icon",children:(0,t.jsx)(s.default,{alt:"Clock Icon",height:22,src:"/images/icons/clock-icon.svg",width:22})}),(0,t.jsxs)("div",{className:"text",children:[(0,t.jsx)("p",{className:"time-paragraph",children:"Time Left"}),(0,t.jsx)("p",{className:"timer",children:o?"10:00":(0,t.jsx)(({endTimerFunc:e})=>{let[a,s]=(0,i.useState)(600),l=(0,i.useRef)(null);(0,i.useEffect)(()=>(l.current=setInterval(()=>{s(t=>t<=1?(clearInterval(l.current),e?.(),0):t-1)},1e3),()=>clearInterval(l.current)),[]);let r=Math.floor(a/60);return(0,t.jsxs)("span",{className:r<=2?"warning":"",children:[r,":",(a%60).toString().padStart(2,"0")]})},{endTimerFunc:()=>{z(),R()}})})]})]});return(0,t.jsxs)(S.default,{ariaDescribedBy:"adoptFamilyLetterTeamModalDescription",ariaLabelledBy:"adoptFamilyLetterTeamModalTitle",classes:"modal-lg adopt-family-letter-team-modal",closeModal:R,isOpen:l,title:B,children:[(0,t.jsxs)("div",{className:"adopt-family-letter-team-modal-contents",children:[v&&(0,t.jsx)("div",{className:"adopt-family-letter-errors",children:(0,t.jsx)("p",{children:v})}),(0,t.jsxs)("div",{className:"content-row",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:`img-container${!d?.letters?.length?" default":""}`,children:[!d?.letters?.length&&(0,t.jsx)(s.default,{alt:"",className:"card-img default",height:270,src:"/images/team/creation-wizard/no-letter.svg",width:270}),d?.letters?.length===1&&(0,t.jsx)(s.default,{alt:"",className:"card-img",height:521,src:"https://usps-op-santa-share-sftp-prod.s3.amazonaws.com/"+userSelectedLetters[0].FileName,width:397}),d?.letters?.length>1&&(0,t.jsx)(j.default,{counterLocation:f,counterText:`${g}'s Family`,theme:"dark",children:d?.letters?.map(e=>(0,t.jsx)(s.default,{alt:"",className:"card-img",height:521,src:"https://usps-op-santa-share-sftp-prod.s3.amazonaws.com/"+e.FileName,width:397},e.Id))})]}),(0,t.jsxs)("div",{className:"text-container",children:[(0,t.jsx)("h3",{children:d?`Adopt ${g}'s Family of Letters as a team. `:"You are not adopting a letter right now."}),(0,t.jsx)("p",{className:"subtitle",children:"We’ve made it easy to brighten the holiday of a whole family by working together. Are you ready to bring the magic?"}),(0,t.jsxs)("div",{className:"info-card-container",children:[(0,t.jsxs)("div",{className:"info-card",children:[(0,t.jsx)(s.default,{alt:"","aria-hidden":"true",className:"info-card-img",height:96,src:"/images/team/adopt-family-to-team-modal/adopt-family-to-team.svg",width:96}),(0,t.jsxs)("div",{className:"info-card-text-container",children:[(0,t.jsx)("h4",{className:"info-card-heading",children:"Join forces to fulfill the whole crew"}),(0,t.jsx)("p",{className:"info-card-copy",children:"You'll create the team and invite friends, family or coworkers to fulfill the family with you."})]})]}),(0,t.jsxs)("div",{className:"info-card",children:[(0,t.jsx)(s.default,{alt:"","aria-hidden":"true",className:"info-card-img",height:96,src:"/images/team/adopt-family-to-team-modal/adopt-family-to-team-page.svg",width:96}),(0,t.jsxs)("div",{className:"info-card-text-container",children:[(0,t.jsx)("h4",{className:"info-card-heading",children:"Each take a page"}),(0,t.jsx)("p",{className:"info-card-copy",children:"Claim the letter from the family that speaks to you and invite your teammates to adopt the rest."})]})]}),(0,t.jsxs)("div",{className:"info-card",children:[(0,t.jsx)(s.default,{alt:"","aria-hidden":"true",className:"info-card-img",height:96,src:"/images/team/adopt-family-to-team-modal/adopt-family-to-team-admin.svg",width:96}),(0,t.jsxs)("div",{className:"info-card-text-container",children:[(0,t.jsx)("h4",{className:"info-card-heading",children:"You're in charge"}),(0,t.jsx)("p",{className:"info-card-copy",children:"All letters in the family have to be adopted. As the team admin, any unclaimed letters will be yours to fulfill."})]})]})]}),(0,t.jsxs)("div",{className:"btn-container",children:[(0,t.jsx)("button",{className:"btn skip",onClick:R,type:"button",children:"Cancel"}),(0,t.jsx)("button",{className:"btn continue",onClick:()=>{d&&M(A.default.TEAM_PRE_ADOPTION.url,A.default.TEAM_PRE_ADOPTION.method,{adopterId:e?.user?.Id,teamHash:k.id,letterIds:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{e?.success?F.push(`/team/${k.id}?success=true`):P(D)}).catch(e=>{P("Sorry, there was an issue. Please try again later.")}).finally(()=>{w(!1)})},children:"Confirm and Continue"})]})]})]})]}),(0,t.jsx)(T.default,{closeModal:()=>R(),isOpen:N})]})});_.displayName="AdoptFamilyLetterTeamModal";var v=e.i(782521);let P=(0,i.forwardRef)(({session:e},a)=>{let[l,r]=(0,i.useState)(!1),[d,n]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[h,u]=(0,i.useState)(null),[g,p]=(0,i.useState)(""),[f,y]=(0,i.useState)(""),[N,L]=(0,i.useState)(!1),[I,j]=(0,i.useState)(null),[_,P]=(0,i.useState)(),[O,b]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),k=(0,m.useTeamAdoptionModeStore)(e=>e.selectedTeam),F=(0,x.useRouter)(),D="Sorry, there was an issue. Please try again later.",M="This letter can’t be adopted right now. Please try again later.",H=[{text:"Sorry, there was an issue adopting this letter. Please check "},{element:"strong",href:"/your-letters",text:"Your Letters"},{text:" page to see if your adoption went through or try again later."}],{actions:{apiRequest:G},values:{error:R,loading:z}}=(0,E.default)(),B=()=>{r(!1),$()};(0,i.useImperativeHandle)(a,()=>({handleClose:()=>B(),handleOpen:e=>{n(e),r(!0)}}));let $=()=>{G(A.default.CANCEL_PRE_ADOPTION.url,A.default.CANCEL_PRE_ADOPTION.method,{userid:e?.user?.Id,letterids:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{c(!1)}).catch(e=>{})};(0,i.useEffect)(()=>{d&&e&&l&&G(A.default.PRE_ADOPT_LETTER.url,A.default.PRE_ADOPT_LETTER.method,{userid:e.user.Id,letterids:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{e?.success?(p(d?.letterGroup?.[0].LetterNames?.[0].Name),y(d?.locations.filter(e=>e.Id===d?.locationId)[0]?.Name||""),c(!1)):P("This letter can’t be adopted right now. Please try again later.")}).catch(e=>{})},[d,e,l]);let J=(0,t.jsxs)("div",{className:"title",children:[(0,t.jsx)("div",{className:"title-icon",children:(0,t.jsx)(s.default,{alt:"Clock Icon",height:22,src:"/images/icons/clock-icon.svg",width:22})}),(0,t.jsxs)("div",{className:"text",children:[(0,t.jsx)("p",{className:"time-paragraph",children:"Time Left"}),(0,t.jsx)("p",{className:"timer",children:o?"5:00":(0,t.jsx)(({endTimerFunc:e})=>{let[a,s]=(0,i.useState)(300),l=(0,i.useRef)(null);(0,i.useEffect)(()=>(l.current=setInterval(()=>{s(t=>t<=1?(clearInterval(l.current),e?.(),0):t-1)},1e3),()=>clearInterval(l.current)),[]);let r=Math.floor(a/60);return(0,t.jsxs)("span",{className:r<=2?"warning":"",children:[r,":",(a%60).toString().padStart(2,"0")]})},{endTimerFunc:()=>{$()}})})]})]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(S.default,{ariaDescribedBy:"adoptIndividualLetterTeamModalDescription",ariaLabelledBy:"adoptIndividualLetterTeamModalTitle",classes:"modal-lg adopt-individual-letter-team-modal",closeModal:B,isOpen:l,title:J,children:[(0,t.jsxs)("div",{className:"adopt-individual-letter-team-modal-contents",children:[_&&(0,t.jsx)("div",{className:"adopt-individual-letter-errors",children:(0,t.jsx)("p",{children:_})}),(0,t.jsxs)("div",{className:"contain-it",children:[(0,t.jsxs)("p",{className:"family-info mobile-only",children:[(0,t.jsxs)("span",{className:"bold",children:[g,"'s Letter"]}),(0,t.jsx)("span",{className:"pipe"}),f]}),(0,t.jsxs)("div",{className:"heading-row",children:[(0,t.jsx)("h2",{className:"title",children:"Review & Confirm"}),(0,t.jsxs)("p",{className:"family-info",children:[(0,t.jsxs)("span",{className:"bold",children:[g,"'s Letter"]}),(0,t.jsx)("span",{className:"pipe"}),f]})]})]}),(0,t.jsxs)("div",{className:"content-row",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:`img-container${!d?" default":""}`,children:[!d&&(0,t.jsx)(s.default,{alt:"",className:"card-img default",height:270,src:"/images/team/creation-wizard/no-letter.svg",width:270}),d&&(0,t.jsx)(s.default,{alt:"",className:"card-img",height:521,src:"https://usps-op-santa-share-sftp-prod.s3.amazonaws.com/"+d.letterImage,width:397})]}),(0,t.jsxs)("div",{className:"text-container",children:[(0,t.jsx)("h3",{children:d?`You're adopting ${g}'s letter for ${k.name}. `:"You are not adopting a letter right now."}),(0,t.jsx)("p",{className:"subtitle",children:d?"We’ll send you an email with instructions, but here are two ways you can send a gift:":"You can select the letter or letters you’d like to fulfill from the team page at any time. Keep in mind, there are two ways you can send a gift:"}),(0,t.jsxs)("div",{className:"info-card",children:[(0,t.jsx)(s.default,{alt:"","aria-hidden":"true",className:"info-card-img",height:40,src:"/images/team/creation-wizard/icons/shopping-cart.svg",width:40}),(0,t.jsxs)("div",{className:"info-card-text-container",children:[(0,t.jsx)("h4",{className:"info-card-heading",children:"Online in Santa's Gift Shoppe"}),(0,t.jsxs)("p",{className:"info-card-copy",children:["Find the ideal gift fast in Santa's Gift Shoppe, our online catalog powered by Toys“R”Us",(0,t.jsx)("sup",{children:"®"}),". Enjoy a single flat shipping rate on all orders."]})]})]}),(0,t.jsxs)("div",{className:"info-card",children:[(0,t.jsx)(s.default,{alt:"","aria-hidden":"true",className:"info-card-img",height:40,src:"/images/team/creation-wizard/icons/shipped-present.svg",width:40}),(0,t.jsxs)("div",{className:"info-card-text-container",children:[(0,t.jsx)("h4",{className:"info-card-heading",children:"Ship a Personalized Package with USPS"}),(0,t.jsx)("p",{className:"info-card-copy",children:"Shop on your own and send your gift at a Post Office location. Regular shipping fees apply. Package size, weight and shipping distance will all affect shipping costs."})]})]}),(0,t.jsxs)("p",{className:"note",children:[(0,t.jsx)("span",{className:"bold",children:"Send your gift by December 13."})," ","Earlier is even better, so families know their needs have been met!"]})]})]}),(0,t.jsx)("div",{className:"buttons",children:(0,t.jsx)("div",{className:"btn-container",children:(0,t.jsx)("button",{className:"btn continue",disabled:C,onClick:()=>{d&&(w(!0),G(A.default.CREATE_ADOPTION.url,A.default.CREATE_ADOPTION.method,{userid:e?.user?.Id,letterids:d.letterGroup.map(e=>e.Id)}).then(({data:t})=>{t?.success&&t?.payload?(b(!0),G(A.default.REASSIGN_LETTER_ADOPTIONS.url,A.default.REASSIGN_LETTER_ADOPTIONS.method,{userid:e?.user?.Id,teamHash:k.id,letterid:d.letterGroup.map(e=>e.Id)}).then(({data:e})=>{e?.success&&e?.payload?(r(!1),F.push(`/team/${k.id}?success=true`)):P(D)}).catch(e=>{P(D)}
1)):P(M)}).catch(e=>{504===e.status?P(H):500===e.status?P("Sorry, there was an issue adopting this letter. Please try again later."):P(M)}).finally(()=>{w(!1)}))},children:"Finish"})})})]}),(0,t.jsx)(T.default,{closeModal:()=>B(),isOpen:N})]}),(0,t.jsx)(v.default,{isOpen:C})]})});P.displayName="AdoptIndividualLetterTeamModal";var O=e.i(703538),b=e.i(688250),C=e.i(804362),w=e.i(576335),k=e.i(366029),F=e.i(807031);let D=[1.5,2,3,4],M=[[{Id:1001,LetterHash:"e64e933b",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Alicia_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5001,LetterNames:[{Name:"Alicia"}],LetterPackages:[]}],[{Id:1002,LetterHash:"f110063e",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Amanda_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5002,LetterNames:[{Name:"Amanda"}],LetterPackages:[]}],[{Id:1003,LetterHash:"9a032c81",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Amelia_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5003,LetterNames:[{Name:"Amelia"}],LetterPackages:[]}],[{Id:1004,LetterHash:"9a032c81",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Arlette_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5004,LetterNames:[{Name:"Arlette"}],LetterPackages:[]}],[{Id:1005,LetterHash:"bf6c5f92",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Breeze_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5005,LetterNames:[{Name:"Breeze"}],LetterPackages:[]}],[{Id:1006,LetterHash:"b5c3c2cc",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Cayden_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5006,LetterNames:[{Name:"Cayden"}],LetterPackages:[]}],[{Id:1007,LetterHash:"2acc1a7f",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Clara_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5007,LetterNames:[{Name:"Clara"}],LetterPackages:[]}],[{Id:1008,LetterHash:"c169ee58",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Ellie_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5008,LetterNames:[{Name:"Ellie"}],LetterPackages:[]}],[{Id:1009,LetterHash:"78a30b25",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Emma_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5009,LetterNames:[{Name:"Emma"}],LetterPackages:[]}],[{Id:1010,LetterHash:"3f654a5c",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Faith_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5010,LetterNames:[{Name:"Faith"}],LetterPackages:[]}],[{Id:1011,LetterHash:"2044d814",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Hazel_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5011,LetterNames:[{Name:"Hazel"}],LetterPackages:[]}],[{Id:1012,LetterHash:"4a7c8cf2",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Isabella_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5012,LetterNames:[{Name:"Isabella"}],LetterPackages:[]}],[{Id:1013,LetterHash:"4a7c8cf2",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Isabella_2_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5013,LetterNames:[{Name:"Isabella"}],LetterPackages:[]}],[{Id:1014,LetterHash:"06c66f9e",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Jemma_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5014,LetterNames:[{Name:"Jemma"}],LetterPackages:[]}],[{Id:1015,LetterHash:"627a25e3",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Jessie_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5015,LetterNames:[{Name:"Jessie"}],LetterPackages:[]}],[{Id:1016,LetterHash:"ac173547",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Jonathan_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5016,LetterNames:[{Name:"Jonathan"}],LetterPackages:[]}],[{Id:1017,LetterHash:"aec01fba",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Jose_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5017,LetterNames:[{Name:"Jose"}],LetterPackages:[]}],[{Id:1018,LetterHash:"53854b3b",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Kassandra_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5018,LetterNames:[{Name:"Kassandra"}],LetterPackages:[]}],[{Id:1019,LetterHash:"2038fcac",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Laila_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5019,LetterNames:[{Name:"Laila"}],LetterPackages:[]}],[{Id:1020,LetterHash:"2038fcac",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Leo_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5020,LetterNames:[{Name:"Leo"}],LetterPackages:[]}],[{Id:1021,LetterHash:"005c1c53",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Leslie_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5021,LetterNames:[{Name:"Leslie"}],LetterPackages:[]}],[{Id:1022,LetterHash:"4133173b",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Lili_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5022,LetterNames:[{Name:"Lili"}],LetterPackages:[]}],[{Id:1023,LetterHash:"22b5a28d",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Madison_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5023,LetterNames:[{Name:"Madison"}],LetterPackages:[]}],[{Id:1024,LetterHash:"e44f62be",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Maria_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5024,LetterNames:[{Name:"Maria"}],LetterPackages:[]}],[{Id:1025,LetterHash:"e44f62be",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Mayhem_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5025,LetterNames:[{Name:"Mayhem"}],LetterPackages:[]}],[{Id:1026,LetterHash:"02bd786f",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Meghan_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5026,LetterNames:[{Name:"Meghan"}],LetterPackages:[]}],[{Id:1027,LetterHash:"74e0eba3",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Melody_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5027,LetterNames:[{Name:"Melody"}],LetterPackages:[]}],[{Id:1028,LetterHash:"dddfb30c",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Monserrat_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5028,LetterNames:[{Name:"Monserrat"}],LetterPackages:[]}],[{Id:1029,LetterHash:"f069e1b1",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Sadie_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5029,LetterNames:[{Name:"Sadie"}],LetterPackages:[]}],[{Id:1030,LetterHash:"f069e1b1",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Savy_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5030,LetterNames:[{Name:"Savy"}],LetterPackages:[]}],[{Id:1031,LetterHash:"f069e1b1",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Scarlett_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5031,LetterNames:[{Name:"Scarlett"}],LetterPackages:[]}],[{Id:1032,LetterHash:"a1edef70",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Serenity_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5032,LetterNames:[{Name:"Serenity"}],LetterPackages:[]}],[{Id:1033,LetterHash:"fc534402",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Sloan_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5033,LetterNames:[{Name:"Sloan"}],LetterPackages:[]}],[{Id:1034,LetterHash:"a1f2feed",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Tatum_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5034,LetterNames:[{Name:"Tatum"}],LetterPackages:[]}],[{Id:1035,LetterHash:"a1f2feed",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Troy_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5035,LetterNames:[{Name:"Troy"}],LetterPackages:[]}],[{Id:1036,LetterHash:"21d65493",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Valentina_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5036,LetterNames:[{Name:"Valentina"}],LetterPackages:[]}],[{Id:1037,LetterHash:"21d65493",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Victoria_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5037,LetterNames:[{Name:"Victoria"}],LetterPackages:[]}],[{Id:1038,LetterHash:"2dcecfcf",Language:"English",Status:"Approved",Type:"Single",AddressType:"Household",Category:"Gift",PageCount:1,FileName:"Will_Page_01.jpg",LocationId:1,AdopterId:null,AddressId:5038,LetterNames:[{Name:"Will"}],LetterPackages:[]}]];e.s(["default",0,function(){let{hasSiteMode:e,siteMode:r}=(0,C.useSiteMode)(),{actions:{apiRequest:d},values:{error:n,loading:o}}=(0,E.default)(),{data:c,update:x}=(0,l.useSession)(),{scrollRef:j,scroll:T}=(0,F.default)(),v=(0,i.useRef)(null),H=(0,i.useRef)(null),G=(0,i.useRef)(null),[R,z]=(0,i.useState)(!1),[B,$]=(0,i.useState)(!1),[J,U]=(0,i.useState)(""),[Y,K]=(0,i.useState)([]),[q,V]=(0,i.useState)([]),[W,Q]=(0,i.useState)([]),[X,Z]=(0,i.useState)(),[ee,et]=(0,i.useState)(null),[ea,es]=(0,i.useState)(!1),[el,ei]=(0,i.useState)(!1),[er,ed]=(0,i.useState)(!1),[en,eo]=(0,i.useState)(!1),[ec,eh]=(0,i.useState)(0),[eu,em]=(0,i.useState)(0),[eg,ep]=(0,i.useState)(!1),[ef,ey]=(0,i.useState)(0),eS=(0,i.useRef)(null),eN=[],eL=(0,m.useTeamAdoptionModeStore)(e=>e.teamAdoptionMode),eI=(0,m.useTeamAdoptionModeStore)(e=>e.teamAdoptionType),ex=(0,m.useTeamAdoptionModeStore)(e=>e.selectedTeam),ej=(0,w.formatDate)(O.SITE_MODES.ADOPTIONS_OPEN.date),eT=(0,w.formatDate)(O.SITE_MODES.ADOPTIONS_END.date),[eA,eE]=(0,i.useState)(null),e_=e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name);(0,i.useEffect)(()=>{eE((0,w.formatDate)(O.SITE_MODES.ADOPTIONS_OPEN.date.clone().add(1,"year"),"YYYY"))},[]);let ev=(0,i.useCallback)(()=>{eS.current.handleOpen()},[]);(0,i.useEffect)(()=>{let e=[];
1return eN.forEach(t=>{t&&(t?.querySelectorAll('a[href="/#adoptAsATeam"]')).forEach(t=>{let a=e=>{e.preventDefault(),ev()};t.addEventListener("click",a),e.push(()=>t.removeEventListener("click",a))})}),()=>e.forEach(e=>e())},[eN]);let eP=window.sessionStorage.getItem("letterLocations");(0,k.default)(["mailroom",r,eL&&"team-adoption-mode"]),(0,i.useEffect)(()=>{let e=window.devicePixelRatio,t=()=>{document.body.classList.remove(...D.map(e=>`zoom-${100*e}`))},a=()=>{t();let a=window.devicePixelRatio/e;D.filter(e=>a>=e).forEach(e=>{document.body.classList.add(`zoom-${100*e}`)})};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),t()}},[]);let eO=()=>{z(!R),R?document.body.classList.remove("filter-open"):document.body.classList.add("filter-open")},eb=(0,i.useCallback)(e=>{v.current.handleOpen(e)},[]),eC=(0,i.useCallback)(e=>{H.current.handleOpen(e)},[]),ew=(0,i.useCallback)(e=>{G.current.handleOpen(e)},[]),ek=()=>{let e=O.SITE_MODES.ADOPTIONS_OPEN.date.toDate()-new Date;return e<=0?{days:0,hours:0,minutes:0,seconds:0}:{days:Math.floor(e/864e5),hours:Math.floor(e/36e5%24),minutes:Math.floor(e/1e3/60%60),seconds:Math.floor(e/1e3%60)}},[eF,eD]=(0,i.useState)(ek()),eM=(e,t)=>{es(!0),Q(e),Z(t)},eH=(e,t)=>{ei(!0),Q(e),Z(t)},eG={zero:0,one:1,two:2,three:3,four:4,five:5},eR=(0,m.useFilterStore)(e=>e.filter),ez=(0,m.useFilterStore)(e=>e.setFilter),eB=eR.location,e$=(0,i.useCallback)(e=>{ez({...eR,location:e})},[eR,ez]);(0,i.useEffect)(()=>{if(eR){let e=0;eR.letter.individuals&&(e+=1),eR.letter.households&&(e+=Object.values(eR.familySize).filter(e=>!0===e).length),"all"!==eR.location&&(e+=1),eR.language&&(e+=Object.values(eR.language).filter(e=>!0===e).length),ey(e)}},[eR]);let[eJ,eU]=(0,i.useState)(!1);(0,i.useEffect)(()=>{eR&&!eJ&&eU(!0)},[eJ]);let eY={LetterStatusAdopted:!1,LetterTypeSingle:eR.letter.individuals,LetterTypeHousehold:eR.letter.households,LetterFamilySize:eR.familySize,LetterLanguageEnglish:eR.language.en,LetterLanguageSpanish:eR.language.es,LetterCategoryFeelGood:eR.type.gifts,LetterCategoryGift:eR.type.gifts,LetterCategoryNeedsService:eR.type.requests,LetterLocation:eR.location,LettersLimit:50};if((eR.letter.individuals||eR.letter.households)&&(eY.LetterTypeSingle=eR.letter.individuals,eY.LetterTypeHousehold=eR.letter.households),(eR.language.en||eR.language.es)&&(eY.LetterLanguageEnglish=eR.language.en,eY.LetterLanguageSpanish=eR.language.es),(eR.type.gifts||eR.type.requests)&&(eY.LetterCategoryFeelGood=eR.type.gifts,eY.LetterCategoryGift=eR.type.gifts,eY.LetterCategoryNeedsService=eR.type.requests),eR.letter.households){let e=[];for(let t in eR.familySize)!0===eR.familySize[t]&&e.push(eG[t]);eY.LetterFamilySize=e.length?e.join(","):0}else eY.LetterFamilySize=0;let eK=(0,i.useCallback)(t=>{(e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name))&&($(!0),d("letters/location/"+eY.LetterLocation+"/single/"+eY.LetterTypeSingle.toString()+"/family/"+eY.LetterTypeHousehold.toString()+"/familysize/"+eY.LetterFamilySize+"/spanish/"+eY.LetterLanguageSpanish.toString()+"/english/"+eY.LetterLanguageEnglish.toString()+"/gift/"+eY.LetterCategoryGift.toString()+"/needsservice/"+eY.LetterCategoryNeedsService.toString()+"/feelgood/"+eY.LetterCategoryFeelGood.toString()+"/limit/"+eY.LettersLimit.toString(),A.default.GET_ADOPTER_LETTER.method).then(({data:e})=>{let a=q.map(e=>e[0].Id),s=e.payload.filter(e=>!a.includes(e[0].Id));V(q.concat(s)),$(!1),e?.payload?.length===0?U(!0):U(!1),"function"==typeof t&&t()}).catch(e=>{et(e),"function"==typeof t&&t()}).finally(()=>$(!1))),(e(O.SITE_MODES.LETTER_INTAKE.name)||e(O.SITE_MODES.PRE_LAUNCH.name)||e(O.SITE_MODES.EVERGREEN.name))&&($(!0),(e=>{let t=e.length-1;for(;t>0;t--){let a=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[a],e[a]=s}})(M),V(M),$(!1))},[eY]),eq=(0,i.useCallback)(e=>{if(!en){let e=window.innerHeight+window.pageYOffset;em(e),e>=document.body.offsetHeight&&(e>ec?(ep(!0),eo(!0),eK(()=>{eo(!1),eh(e)})):ep(!1))}},[eK,en,ec,eu]);(0,i.useEffect)(()=>{eJ&&eK()},[eR,eJ]),(0,i.useEffect)(()=>{if(a.default.init(),e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name)){let e=setTimeout(()=>(J||null!==window.sessionStorage.getItem("hasPageRefreshed")||(window.sessionStorage.setItem("hasPageRefreshed","true"),ed(!0)),()=>clearTimeout(e)),9e5)}(e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name))&&(null===eP?d(A.default.GET_LOCATIONS.url,A.default.GET_LOCATIONS.method).then(({data:e})=>{let t=e.payload.filter(e=>"00"!==e.State);window.sessionStorage.setItem("letterLocations",JSON.stringify(t)),K(t)}
1).catch(e=>{et(e.error)}):K(JSON.parse(eP)))},[]),(0,i.useEffect)(()=>{if(e(O.SITE_MODES.REGISTRATION_OPEN)){let e=setInterval(()=>{let t=ek();eD(t),0===t.days&&0===t.hours&&0===t.minutes&&0===t.seconds&&(clearInterval(e),window.location.reload())},1e3);return()=>clearInterval(e)}},[]);let eV=Object.keys(eF).filter(e=>"seconds"!==e).map(e=>(0,t.jsxs)("div",{className:"countdown-timer__item",children:[(0,t.jsx)("span",{children:"minutes"===e?eF[e]+1<10?`0${eF[e]+1}`:eF[e]+1:eF[e]<10?`0${eF[e]}`:eF[e]})," ",1===eF[e]&&"minutes"!==e?e.slice(0,-1):e," "]},e));return(0,i.useEffect)(()=>{eg&&window.scrollBy(0,eu)},[eg]),(0,i.useEffect)(()=>(window.removeEventListener("scroll",eq),window.addEventListener("scroll",eq,{passive:!0}),()=>window.removeEventListener("scroll",eq)),[eq]),(0,t.jsxs)("div",{className:"letters_wrap read-letters-page"+(null!==ee?" server_error ":""),children:[(e(O.SITE_MODES.EVERGREEN.name)||e(O.SITE_MODES.PRE_LAUNCH.name)||e(O.SITE_MODES.LETTER_INTAKE.name)||e(O.SITE_MODES.REGISTRATION_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name)||e(O.SITE_MODES.ADOPTIONS_END.name))&&(0,t.jsxs)("div",{className:"mailroom_wrap",children:[(0,t.jsx)("div",{className:"bkg floor floor_piles"}),(0,t.jsx)("div",{className:"bear"}),(0,t.jsx)("div",{className:"santa_static"})]}),ee&&(0,t.jsx)("div",{className:"home_wrap_adopter home_wrap_adopter--error",children:(0,t.jsxs)("div",{className:"intro",children:[(0,t.jsx)("h2",{children:"Server error."}),(0,t.jsx)("p",{children:(0,b.findGlobalErrorMessage)(b.GlobalErrorType.SERVER_ERROR)})]})}),!ee&&eJ&&(0,t.jsxs)("div",{className:"home_wrap_adopter",children:[eL&&(0,t.jsx)(y.default,{className:"alert-warning",icon:(0,t.jsx)(s.default,{alt:"",className:"bg",height:"44",src:"/images/write-letters/alert.svg",width:"44"}),iconClass:"sunset-alert__icon",message:(0,t.jsxs)(t.Fragment,{children:["individual"===eI?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("span",{className:"message",children:["You’re browsing for another letter for"," ",(0,t.jsx)("strong",{children:ex.name}),". Any letter adopted will be added to this team."]})}):null,"family"===eI?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("span",{className:"message",children:["You’re browsing for a new family letter for"," ",(0,t.jsx)("strong",{children:ex.name}),". Any letter adopted will be added to this team."]})}):null]}),showBanner:[O.SITE_MODES.ADOPTIONS_OPEN.name,O.SITE_MODES.ADOPTIONS_CLOSING.name].includes(r)}),e_&&(0,t.jsx)(g,{filterForm:eR,filterLocation:eB,isFilterOpen:R,locations:Y,setFilterLocation:e$,setFilters:ez,setLetters:V,toggleFilter:eO}),(0,t.jsxs)("div",{className:"letters_container"+(B||!eJ?" loading-letters":""),children:[(0,t.jsxs)("div",{className:"intro",children:[(e(O.SITE_MODES.PRE_LAUNCH.name)||e(O.SITE_MODES.LETTER_INTAKE.name))&&(0,t.jsxs)("div",{className:"letters-intro",children:[(0,t.jsxs)("h1",{className:"info_page_header",children:["Read Past ",(0,t.jsx)("br",{}),"Letters to Santa"]}),(0,t.jsxs)("p",{children:["See letters from past years of the USPS Operation Santa program. Check back on ",ej," to adopt your own."]})]}),e(O.SITE_MODES.EVERGREEN.name)&&(0,t.jsxs)("div",{className:"letters-intro",children:[(0,t.jsxs)("h1",{className:"info_page_header",children:["Read Past ",(0,t.jsx)("br",{}),"Letters to Santa"]}),(0,t.jsxs)("p",{children:["See letters from past years of the USPS Operation Santa program. Check back in the ",eA," holiday season to adopt your own."]})]}),e(O.SITE_MODES.REGISTRATION_OPEN.name)&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"info_page_header",children:"The letters are in the mail!"}),(0,t.jsxs)("p",{children:["We're helping Santa gather letters and getting ready to spread more holiday cheer! Check back"," ",ej," to adopt your letter with the USPS Operation Santa",(0,t.jsx)("sup",{children:"®"})," program."]}),(0,t.jsx)("div",{className:"countdown-timer",children:eV.length?eV:(0,t.jsx)("span",{children:"Time's up!"})})]}),(e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name))&&(0,t.jsxs)("div",{className:"letters-intro",children:[(0,t.jsx)(s.default,{alt:"",height:59,src:"/images/read-letters/read-letters-letter.svg",width:77}),(0,t.jsx)("h1",{className:"info_page_header",children:"Read and Adopt"}),(0,t.jsxs)("p",{children:["Select a family of letters, or choose an individual to adopt. Adoption ends on"," ",(0,t.jsx)("strong",{children:eT}),"."]})]}),e(O.SITE_MODES.ADOPTIONS_END.name)&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"info_page_header",children:"Thank y
1ou for making holiday wishes come true!"}),(0,t.jsxs)("p",{children:["Adoption has ended for this year. The USPS Operation Santa",(0,t.jsx)("sup",{children:"®"})," program will be back next year, and we hope you’ll join us."]})]}),(e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name))&&(0,t.jsx)("div",{className:T?"sticky-under-nav":"",id:"tabs",ref:j,children:(0,t.jsx)("ul",{className:"navigation__tabs",children:(0,t.jsx)("li",{className:"tab",children:(0,t.jsxs)("button",{className:R?"open filter_link":"filter_link",onClick:eO,children:[(0,t.jsx)("i",{"aria-hidden":"true",className:"filter_icon"}),(0,t.jsx)("em",{children:"Filter"}),ef>0&&(0,t.jsx)("span",{className:"filter-count",children:ef})]})})})})]}),(0,t.jsxs)("div",{className:"no-results letter_wrap"+(J&&!B?" show":""),children:[(0,t.jsx)(s.default,{alt:"",height:141,src:"/images/read-letters/no-letters-available.svg",width:212}),(0,t.jsx)("h2",{children:"There are no letters based on your selection"}),eR.letter.individuals||eR.letter.households?(0,t.jsxs)("p",{children:["Try adjusting your filters or check out"," ",eR.letter.individuals?"families":"individuals"]}):(0,t.jsx)("p",{children:"Try adjusting your filters"})]}),q.length>0&&(0,t.jsx)("ul",{className:"letters_list",children:q.map((a,s)=>(0,t.jsxs)(i.Fragment,{children:[(0,t.jsx)("li",{children:(0,t.jsx)(p.default,{letterCount:a.length,letterGroup:a,letterId:a[0].Id,letterImage:a[0].FileName,letterNames:a[0].LetterNames,letterStatus:a[0].Status,letterType:a[0].Type,letters:a,locationId:a[0].LocationId,locations:Y,openAdoptAsAGroup:eb,openAdoptFamilyLetterTeam:ew,openAdoptIndividualLetterTeam:eC,openLetterDetail:eM,openSignInModal:eH,pageCount:a[0].PageCount},a[0].Id)}),(s+1)%5==0&&(e(O.SITE_MODES.ADOPTIONS_OPEN.name)||e(O.SITE_MODES.ADOPTIONS_CLOSING.name)||e(O.SITE_MODES.ADOPTIONS_END.name))&&(0,t.jsx)("div",{"data-aos":"zoom-in-up","data-aos-duration":"600","data-aos-easing":"ease-in-out-back","data-aos-offset":"90",children:(0,t.jsx)(h,{ref:e=>{eN[s]=e},tipId:s+1===5?2:null},s)},s)]},a[0].Id))})]})]}),(0,t.jsx)(S.default,{ariaDescribedBy:"modalContent",ariaLabelledBy:"modalTitle",classes:"modal-xl letter-detail",closeModal:()=>es(!1),isOpen:ea,minimalist:!0,children:(0,t.jsx)(u.default,{currentLetter:W,letters:W,startingIndex:X})}),(0,t.jsx)(S.default,{ariaDescribedBy:"modalContent",ariaLabelledBy:"modalTitle",classes:"modal-sm signin-modal",closeModal:()=>{ei(!1),Q([])},isOpen:el,minimalist:!0,children:(0,t.jsx)(N.default,{currentLetter:W,setShowSignInModal:ei,showSignInModal:el})}),(0,t.jsx)(S.default,{ariaDescribedBy:"modalContent",ariaLabelledBy:"modalTitle",classes:"modal-sm letters-refresh-modal",closeModal:()=>ed(!1),isOpen:er,minimalist:!0,children:(0,t.jsx)(f,{setShowLettersRefreshModal:ed})}),(0,t.jsx)(_,{ref:G,session:c}),(0,t.jsx)(P,{ref:H,session:c}),(0,t.jsx)(L.default,{ref:v}),(0,t.jsx)(I.default,{ref:eS})]})}],928099)}]);

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.