1"use strict";(self.webpackChunk_termly_web_dashboard=self.webpackChunk_termly_web_dashboard||[]).push([[5984],{10449(e,t,n){n.d(t,{A:()=>h});var r=n(53241),s=n(26826),a=n.n(s),o=n(52030),i=n(61421),l=n(10430),c=n(11954),d=n(14121);const u=(0,n(28216).YK)({consentPreferences:{defaultMessage:"Consent Preferences",id:"footer.consent-preferences"},doNotSell:{defaultMessage:"Do not sell or share my personal information",id:"footer.do-not-sell"},limitUse:{defaultMessage:"Limit the use of my sensitive personal information",id:"footer.limit-use"},ourCookiePolicy:{defaultMessage:"Cookie Policy",id:"footer.cookie-policy"},ourDisclaimer:{defaultMessage:"Disclaimer",id:"footer.disclaimer"},ourPrivacyPolicy:{defaultMessage:"Privacy Policy",id:"footer.privacy-policy"},ourTOU:{defaultMessage:"Terms Of Use",id:"footer.terms-of-use"},support:{defaultMessage:"Support",id:"footer.support"}}),m="styles-link-d63d43",p=[{url:"https://termly.io/our-privacy-policy/",text:u.ourPrivacyPolicy},{url:"https://termly.io/our-terms-of-use/",text:u.ourTOU},{url:"https://termly.io/our-disclaimer/",text:u.ourDisclaimer},{url:"https://termly.io/our-cookie-policy/",text:u.ourCookiePolicy}],f="https://app.termly.io/notify/05f55d8a-a00b-45d4-8053-55f6d8637f46",g=[{url:l.A.supportURL(),text:u.support},{LinkComponent:c.A,url:f,text:u.limitUse},{LinkComponent:c.A,url:f,text:u.doNotSell}];function y(e){let{isGuest:t=!1}=e;const n=(0,r.useRef)(),s=(0,r.useMemo)(()=>function(e){return e?p:[...p,...g]}(t),[t]);return r.createElement("footer",{className:"styles-root-c8b941"},r.createElement("ul",{className:"styles-links-dd56f1"},s.map(e=>{let{LinkComponent:t=d.A,url:n,text:s}=e;return r.createElement("li",{key:s.id},r.createElement(t,{className:m,showIcon:!1,url:n},r.createElement(o.A,s)))}),function(e){if(!window.displayPreferenceModal)return e.current||(console.debug("Not rendering the Consent Preferences footer link: window.displayPreferenceModal() was not found"),e.current=!0),null;const t=`${m} t-displayPreferencesLink`;return r.createElement("li",null,r.createElement(i.$n,{className:t,handleClick:window.displayPreferenceModal,type:"text"},r.createElement(o.A,u.consentPreferences)))}(n)))}y.propTypes={isGuest:a().bool};const h=y},21615(e,t,n){n.d(t,{A:()=>c});var r=n(53241),s=n(26826),a=n.n(s),o=n(52030),i=n(37011);function l(e){let{className:t,title:n,values:s}=e;const a={...n,values:{...n.values,...s}};return r.createElement(i.A,{className:t},r.createElement(o.A,a))}l.propTypes={className:a().string,title:a().shape(o.A.propTypes),values:a().shape({})};const c=l},22862(e,t,n){n.d(t,{A:()=>a});var r=n(46222),s=n(20441);const a=function(e,t){let{endpoint:n,queryKey:a}=e;const o=Array.from([a]).flat(),{data:i={},...l}=(0,r.I)({queryFn:()=>s.A.get(n),queryKey:o,...t});return{...l,responseData:i?.data||{}}}},25709(e,t,n){n.d(t,{A:()=>l});var r=n(53241),s=n(26826),a=n.n(s),o=n(61421);function i(e){let{"data-testid":t}=e;return r.createElement("div",{className:"styles-root-fc9ff7","data-testid":t},r.createElement("div",{className:"styles-sizer-e92952"},r.createElement(o.Rh,null)))}i.propTypes={"data-testid":a().string};const l=i}
1,27341(e,t,n){n.d(t,{A:()=>u});var r=n(53241),s=n(26826),a=n.n(s),o=n(14712),i=n.n(o);const l=n.p+"logo-3afe8e.svg",c="/";function d(e){let{className:t,href:n=c}=e;const s=i()("styles-logo-b5a7a0 t-logoLink",t),a=r.createElement("img",{alt:"Termly",className:s,src:l});return n?r.createElement("a",{href:n},a):a}d.propTypes={className:a().string,href:a().string};const u=d},37011(e,t,n){n.d(t,{A:()=>c});var r=n(53241),s=n(26826),a=n.n(s),o=n(14712),i=n.n(o);function l(e){let{className:t,children:n}=e;const s=i()("styles-root-e4dbec",t);return r.createElement("h1",{className:s},n)}l.propTypes={children:a().node.isRequired,className:a().string};const c=l},61197(e,t,n){n.d(t,{A:()=>u,r:()=>d});var r=n(22771),s=n(53241),a=n(26826),o=n.n(a),i=n(28216);const l={day:"2-digit",month:"long",year:"numeric"};function c(e){let{options:t,timeZone:n,value:a}=e;if(!function(e){return null!=e&&!Number.isNaN(new Date(e).getTime())}(a))return null;const o={...l,...t},c=n||"America/New_York";return s.createElement(i.XU,(0,r.A)({timeZone:c,value:a},o))}c.propTypes={options:o().shape({day:o().string,month:o().string,year:o().string}),timeZone:o().string,value:o().oneOfType([o().string,o().number,o().instanceOf(Date)])};const d={year:"numeric",month:"short",day:"2-digit"},u=c},62805(e,t,n){n.d(t,{A:()=>r});const r=n(25709).A},64408(e,t,n){n.r(t),n.d(t,{default:()=>V});var r=n(53241),s=n(18840),a=n(80297),o=n(76891),i=n(22771),l=n(52030);const c="printWindow";function d({level:e="error",messages:t,suppressErrors:n=!1}){n||("error"===e?console.error(t):"warning"===e?console.warn(t):console.debug(t))}function u(e,t){if(t||!e){const e=document.getElementById(c);e&&document.body.removeChild(e)}}function m(e){return e instanceof Error?e:new Error("Unknown Error")}function p(e,t){const{documentTitle:n,onAfterPrint:r,onPrintError:s,preserveAfterPrint:a,print:o,suppressErrors:i}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),u(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{s?s("print",m(e)):d({messages:["An error was thrown by the specified `print` function"],suppressErrors:i})});else{if(e.contentWindow.print){const t=e.contentDocument?.title??"",r=e.ownerDocument.title,s="function"==typeof n?n():n;s&&(e.ownerDocument.title=s,e.contentDocument&&(e.contentDocument.title=s)),e.contentWindow.print(),s&&(e.ownerDocument.title=r,e.contentDocument&&(e.contentDocument.title=t))}else d({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:i});[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??("opera"in window&&window.opera)).match(e))?setTimeout(t,500):t()}}else d({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:i})},500)}function f(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null);let r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function g(e,t,n){const r=f(e),s=f(t);if(r.length===s.length)for(let e=0;e<r.length;e++){const t=r[e],a=s[e],o=t.shadowRoot;if(null!==o){const e=a.attachShadow({mode:o.mode});e.innerHTML=o.innerHTML,g(o,e,n)}}else d({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n})}function y(e,t,n){const{contentNode:r,clonedContentNode:s,clonedImgNodes:a,clonedVideoNodes:o,numResourcesToLoad:i,originalCanvasNodes:l}=t,{bodyClass:c,fonts:u,ignoreGlobalStyles:f,pageStyle:y,nonce:h,suppressErrors:b,copyShadowRoots:E}=n,v=[],N=[];function w(t,r){v.includes(t)?d({level:"debug",messages:["Tried to mark a resource that has already been handled",t],suppressErrors:b}):(r?(d({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...r],suppressErrors:b}),N.push(t)):v.push(t),v.length+N.length===i&&p(e,n))}e.onload=null;const A=e.contentDocument??e.contentWindow?.document;if(A){const t=A.body.appendChild(s);E&&g(r,t,!!b),u&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?u.forEach(t=>{const n=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});e.contentDocument.fonts.add(n),n.loaded.then(()=>{w(n)}).catch(e=>{w(n,["Failed loading the font:",n,"Load error:",m(e)])})}
1):(u.forEach(e=>{w(e)}),d({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:b})));const n=y??'\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */\n print-color-adjust: exact; /* Firefox/Safari */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n }\n }\n',i=A.createElement("style");h&&(i.setAttribute("nonce",h),A.head.setAttribute("nonce",h)),i.appendChild(A.createTextNode(n)),A.head.appendChild(i),c&&A.body.classList.add(...c.split(" "));const p=A.querySelectorAll("canvas");for(let e=0;e<l.length;++e){const t=l[e],n=p[e];if(void 0===n){d({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",t],suppressErrors:b});continue}const r=n.getContext("2d");r&&r.drawImage(t,0,0)}for(let e=0;e<a.length;e++){const t=a[e],n=t.getAttribute("src");if(n){const e=new Image;e.onload=()=>{w(t)},e.onerror=(e,n,r,s,a)=>{w(t,["Error loading <img>",t,"Error",a])},e.src=n}else w(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',t])}for(let e=0;e<o.length;e++){const t=o[e];t.preload="auto";const n=t.getAttribute("poster");if(n){const e=new Image;e.onload=()=>{w(t)},e.onerror=(e,r,s,a,o)=>{w(t,["Error loading video poster",n,"for video",t,"Error:",o])},e.src=n}else t.readyState>=2?w(t):t.src?(t.onloadeddata=()=>{w(t)},t.onerror=(e,n,r,s,a)=>{w(t,["Error loading video",t,"Error",a])},t.onstalled=()=>{w(t,["Loading video stalled, skipping",t])}):w(t,["Error loading video, `src` is empty",t])}const v="select",N=r.querySelectorAll(v),k=A.querySelectorAll(v);for(let e=0;e<N.length;e++)k[e].value=N[e].value;if(!f){const e=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let t=0,n=e.length;t<n;++t){const n=e[t];if("style"===n.tagName.toLowerCase()){const e=A.createElement(n.tagName),r=n.sheet;if(r){let s="";try{const e=r.cssRules.length;for(let t=0;t<e;++t)"string"==typeof r.cssRules[t].cssText&&(s+=`${r.cssRules[t].cssText}\r\n`)}catch(e){d({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n,`Original error: ${m(e).message}`],level:"warning"})}e.setAttribute("id",`react-to-print-${t}`),h&&e.setAttribute("nonce",h),e.appendChild(A.createTextNode(s)),A.head.appendChild(e)}}else if(n.getAttribute("href"))if(n.hasAttribute("disabled"))d({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],level:"warning"}),w(n);else{const e=A.createElement(n.tagName);for(let t=0,r=n.attributes.length;t<r;++t){const r=n.attributes[t];r&&e.setAttribute(r.nodeName,r.nodeValue??"")}e.onload=()=>{w(e)},e.onerror=(t,n,r,s,a)=>{w(e,["Failed to load",e,"Error:",a])},h&&e.setAttribute("nonce",h),A.head.appendChild(e)}else d({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],level:"warning"}),w(n)}}}0===i&&p(e,n)}function h({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:s,fonts:a,ignoreGlobalStyles:o,nonce:i,onAfterPrint:l,onBeforePrint:p,onPrintError:f,pageStyle:g,preserveAfterPrint:h,print:b,printIframeProps:E,suppressErrors:v}){return(0,r.useCallback)(r=>{function N(){const u={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:s,fonts:a,ignoreGlobalStyles:o,nonce:i,onAfterPrint:l,onPrintError:f,pageStyle:g,preserveAfterPrint:h,print:b,suppressErrors:v},m=function(e){const t=document.createElement("iframe");return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position="absolute",t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=c,t.srcdoc="<!DOCTYPE html>",e&&(e.allow&&(t.allow=e.allow),void 0!==e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),void 0!==e.sandbox&&(t.sandbox=e.sandbox)),t}(E),p=function(e,t){const{contentRef:n,fonts:r,ignoreGlobalStyles:s,suppressErrors:a}=t,o=function({contentRef:e,optionalContent:t,suppressErrors:n}){return t&&"function"==typeof t?(e&&d({level:"warning",messages:['"react-to-
1print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t()):e?e.current:void d({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}({contentRef:n,optionalContent:e,suppressErrors:a});if(!o)return;const i=o.cloneNode(!0),l=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),c=i.querySelectorAll("img"),u=i.querySelectorAll("video"),m=r?r.length:0;return{contentNode:o,clonedContentNode:i,clonedImgNodes:c,clonedVideoNodes:u,numResourcesToLoad:(s?0:l.length)+c.length+u.length+m,originalCanvasNodes:o.querySelectorAll("canvas")}}(r,u);p?function(e,t,n){e.onload=()=>{y(e,t,n)},document.body.appendChild(e)}(m,p,u):d({messages:["There is nothing to print"],suppressErrors:v})}u(h,!0),p?p().then(()=>{N()}).catch(e=>{f?.("onBeforePrint",m(e))}):N()},[e,t,n,s,a,o,i,l,p,f,g,h,E,b,v])}var b=n(61421),E=n(22862),v=n(65804),N=n(8609),w=n(62805),A=n(34193),k=n(28216),T=n(27341),C=n(26826),x=n.n(C),I=n(14712),P=n.n(I),S=n(61197);function D(e){return null!==e&&Number.isFinite(Number(e))}const M=(0,k.YK)({amountPaid:{id:"receipt-details.amount-paid",defaultMessage:"Amount paid"},amountDue:{id:"receipt-details.amount-due",defaultMessage:"Amount due"},balanceText:{id:"receipt-details.balance-text",defaultMessage:"Balance"},billTo:{id:"receipt-details.bill-to",defaultMessage:"Bill to"},discountText:{id:"receipt-details.discount",defaultMessage:"Discount"},fromTo:{id:"receipt-details.from-to",defaultMessage:"(from {start} to {end})"},itemsPriceText:{id:"receipt-details.items-price-text",defaultMessage:"Price"},itemsText:{id:"receipt-details.items-text",defaultMessage:"Items"},transactionId:{id:"receipt-details.transaction-id",defaultMessage:"Transaction ID: {id}"},receiptStatus:{id:"receipt-details.status",defaultMessage:"Status"},statusFailed:{id:"receipt-details.status-failed",defaultMessage:"failed"},statusPaid:{id:"receipt-details.status-paid",defaultMessage:"paid"},subtotalText:{id:"receipt-details.subtotal-text",defaultMessage:"Subtotal"},taxText:{id:"receipt-details.tax-text",defaultMessage:"Tax"},totalDue:{id:"receipt-details.total-due",defaultMessage:"Total"},unusedFromTo:{id:"receipt-details.unused-from-to",defaultMessage:"(unused from {start} to {end})"}}),B={root:"receipt-root-fab022",head:"receipt-head-e9a6f7",logo:"receipt-logo-dfac08",receiptStatus:"receipt-receiptStatus-e82631",status:"receipt-status-fb45b4",paid:"receipt-paid-a7e226",failed:"receipt-failed-a7a94b",receiptId:"receipt-receiptId-b3bb67",receiptInfo:"receipt-receiptInfo-b5facb",receiptDate:"receipt-receiptDate-d28922",itemDetails:"receipt-itemDetails-c27150",item:"receipt-item-cfc255",columnHeader:"receipt-columnHeader-c13665",itemName:"receipt-itemName-f73ed5",itemPrice:"receipt-itemPrice-ea705a",itemDate:"receipt-itemDate-be15c3",totals:"receipt-totals-d01300",amount:"receipt-amount-cdef67"},_="paid",R="usd",F=(0,r.forwardRef)(L);function L(e,t){const{amountInCents:n=0,balance:s=0,billingAddress:a,createdAt:o,currency:c=R,discountAmountInCents:d=0,email:u,firstName:m,grossInCents:p,isDiscounted:f,lastName:g,netInCents:y,pageview:h=[],status:b=_,stripeTransactionId:E,taxInCents:v,taxStatus:N,website:w=[]}=e,A=P()(B.items,B.pageView),C=P()(B.items,B.website),x=P()(B.columnHeader,B.itemName),I=P()(B.columnHeader,B.itemPrice),F={id:E},L=p??n,O=function(e){let{balance:t,totalInCents:n}=e;return t?(Number(n)+t)/100:n/100}({balance:s,totalInCents:L});return r.createElement("div",{className:B.root,ref:t},r.createElement("div",{className:B.head},r.createElement(T.A,{className:B.logo,href:null})),r.createElement("div",{className:B.receiptStatus},r.createElement("span",{className:B.receipt},r.createElement(l.A,M.receiptStatus),":"),function(e){const t=P()(B.status,{[B.failed]:"failed"===e,[B.paid]:"paid"===e}),n="paid"===e?M.statusPaid:M.statusFailed;return r.createElement("span",{className:t},r.createElement(l.A,n))}(b)),r.createElement("div",{className:B.receiptId},r.createElement(l.A,(0,i.A)({},M.transactionId,{values:F}))),r.createElement("div",{className:B.receiptInfo},r.createElement("div",{className:B.billTo},r.createElement(l.A,M.billTo),":"),function(e){let{firstName:t,lastName:n}=e;return t||n?r.createElement("div",{className:B.name},t," ",n):null}({firstName:m,lastName:g}),r.createElement("div",{className:B.email},u),function(e){if(!e)return null;const{city:t,country:n,line1:s,line2:a,postalCode:o,state:i}
1=e,l=[s,a,[[t,i].filter(Boolean).join(", "),o].filter(Boolean).join(" ")].filter(Boolean);return r.createElement(r.Fragment,null,l.map((e,t)=>r.createElement("div",{key:t},e)),n&&r.createElement("div",null,r.createElement(k.SY,{type:"region",value:n})))}(a)),r.createElement("div",{className:B.receiptDate},r.createElement(S.A,{value:o})),r.createElement("table",{className:B.itemDetails},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",{className:x,scope:"col"},r.createElement(l.A,M.itemsText)),r.createElement("th",{className:I,scope:"col"},r.createElement(l.A,M.itemsPriceText)))),r.createElement("tbody",{className:A},G({currency:c,items:h,key:"page-view"})),r.createElement("tbody",{className:C},G({currency:c,items:w,key:"website"}))),r.createElement("dl",{className:B.totals},function(e){let{currency:t,netInCents:n,taxInCents:s,taxStatus:a}=e;return a&&D(n)&&D(s)?r.createElement(r.Fragment,null,r.createElement("dt",null,r.createElement(l.A,M.subtotalText)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:t,style:"currency",value:n/100})),r.createElement("dt",null,r.createElement(l.A,M.taxText)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:t,style:"currency",value:s/100}))):null}({currency:c,netInCents:y,taxInCents:v,taxStatus:N}),r.createElement("dt",null,r.createElement(l.A,M.totalDue)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:c,style:"currency",value:L/100})),function(e){let{currency:t,isDiscounted:n,discountAmountInCents:s}=e;return n?r.createElement(r.Fragment,null,r.createElement("dt",null,r.createElement(l.A,M.discountText)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:t,style:"currency",value:s/-100}))):null}({currency:c,discountAmountInCents:d,isDiscounted:f}),function(e){let{balance:t,currency:n}=e;return t?r.createElement(r.Fragment,null,r.createElement("dt",null,r.createElement(l.A,M.balanceText)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:n,style:"currency",value:-t/100}))):null}({balance:s,currency:c}),r.createElement("dt",null,r.createElement(l.A,M.amountPaid)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:c,style:"currency",value:O})),r.createElement("dt",null,r.createElement(l.A,M.amountDue)),r.createElement("dd",{className:B.amount},r.createElement(k.Gr,{currency:c,style:"currency",value:0}))))}const O=x().arrayOf(x().shape({amount:x().number,description:x().string,periodStart:x().instanceOf(Date),periodEnd:x().instanceOf(Date),proration:x().bool}));function G(e){let{currency:t,items:n,key:s}=e;return n.map((e,n)=>function(e){let{currency:t,item:n,key:s}=e;const a=P()({[B.item]:!0,[B.subItem]:n.proration});return r.createElement("tr",{className:a,key:s},r.createElement("td",{className:B.itemName},r.createElement("span",{className:B.itemDescription},n.description),function(e){if(!e.periodStart||!e.periodEnd)return null;const t=e.amount>0?M.fromTo:M.unusedFromTo;return r.createElement("span",{className:B.itemDate},r.createElement(l.A,(0,i.A)({},t,{values:{start:r.createElement(S.A,{value:e.periodStart}),end:r.createElement(S.A,{value:e.periodEnd})}})))}(n)),r.createElement("td",{className:B.itemPrice},r.createElement(k.Gr,{currency:t,style:"currency",value:n.amount/100})))}({currency:t,item:e,key:`${s}-${n}`}))}L.propTypes={amountInCents:x().string,balance:x().number,billingAddress:x().shape({city:x().string,country:x().string,line1:x().string,line2:x().string,postalCode:x().string,state:x().string}),createdAt:x().instanceOf(Date),currency:x().string,discountAmountInCents:x().number,email:x().string,firstName:x().string,grossInCents:x().number,isDiscounted:x().bool,lastName:x().string,netInCents:x().number,pageview:O,status:x().string,stripeTransactionId:x().string,taxInCents:x().number,taxStatus:x().string,website:O};const W=F,H={printButton:"styles-printButton-e90f6c",head:"styles-head-d384c2"},q=(0,k.YK)({printInvoice:{id:"receipt.print-invoice",defaultMessage:"Print Invoice"}}),$=n.p+"print-icon-83d998.svg";function Y(e){if(e)return new Date(1e3*e)}const U=function(){const e=(0,r.useRef)(),{receiptID:t}=(0,s.g)(),{user:n}=(0,v.As)(),{isPending:a,responseData:o}=(0,E.A)({endpoint:(0,N.yI)(t),queryKey:["receipt",t]}),c=h({contentRef:e});if(a)return r.createElement(w.A,null);if(0===Object.keys(o).length)return r.createElement(A.A,{caption:"pageNotFoundCaption",title:"pageNotFoundTitle"});const d=function(e){let{receipt:t,user:n}=e;const{balance:r,billingAddress:s,pageview:a,website:o}=function(){let{balance:e,billing_address:t,items:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n?.pageview?.map(e=>({amount:e.amount,description:e.description,periodStart:Y(e.period?.start),periodEnd:Y(e.period?.end),proration:e.proration})),s=n?.website?.map(e=>({amount:e.amount,description:e.description,periodStart:Y(e.period?.start),periodEnd:Y(e.period?.end),proration:e.proration})),a=function(e){return e?{city:e.city,country:e.country,line1:e.line1,line2:e.line2,postalCode:e.postal_code,state:e.state}:null}(t);return{balance:e,billingAddress:a,pageview:r,website:s}}(t.invoice_info);return{amountInCents:t.amount_in_cents,balance:r,billingAddress:s,createdAt:Y(t.created_at),currency:t.currency,discountAmountInCents:t.discount_amount_in_cents,email:n.email,firstName:n.first_name,grossInCents:t.gross_in_cents,isDiscounted:t.is_discounted,lastName:n.last_name,netInCents:t.net_in_cents,pageview:a,status:t.status,stripeTransactionId:t.stripe_transaction_id,taxInCents:t.tax_in_cents,taxStatus:t.tax_status,website:o}}({receipt:o,user:n});return r.createElement("div",{className:H.root},r.createElement("div",{className:H.head},r.createElement(b.$n,{className:H.printButton,color:"primary",handleClick:c},r.createElement("img",{alt:"",src:$}),r.createElement(l.A,q.printInvoice))),r.createElement(W,(0,i.A)({},d,{ref:e})))},V=function(){const e=(0,s.Zp)(),t=(0,r.useCallback)(()=>{e(a.A.BILLING_HISTORY)},[e]);return r.createElement(o.A,{showBackButton:!0,handleBackButtonClick:t},r.createElement(U,null))}},65142(e,t,n){e.exports=n.p+"arrow-back-e81d08.svg"},76891(e,t,n){n.d(t,{A:()=>E});var r=n(53241),s=n(26826),a=n.n(s),o=n(14712),i=n.n(o),l=n(10449),c=n(65804),d=n(74945),u=n(21615),m=n(52030),p=n(61421),f=n(65142);const g=(0,n(28216).YK)({back:{id:"dashboard-content-layout.back",defaultMessage:"Back"}});function y(e){let{show:t,handleClick:n}=e;if(!t)return null;return r.createElement("div",{className:"styles-root-bbc964"},r.createElement(p.$n,{className:"styles-button-defc68 t-backButton",handleClick:n,type:"text"},r.createElement("img",{alt:"",className:"styles-icon-a3f0b8",src:f}),r.createElement(m.A,g.back)))}y.propTypes={handleClick:a().func,show:a().bool};const h=y;function b(e){const{children:t,className:n,right:s,showBackButton:a,handleBackButtonClick:o=d.A,title:m,titleValues:p,top:f}=e,{user:g}=(0,c.As)(),y=i()("styles-root-e375ea",n);return r.createElement("div",{className:y},r.createElement("div",{className:"styles-content-c18f79"},r.createElement(h,{handleClick:o,show:a}),function(e){let{title:t,titleValues:n}=e;return t?r.createElement(u.A,{title:t,values:n}):null}({title:m,titleValues:p}),(b=f)?r.createElement("div",{className:"styles-top-efc8f0"},b):null,r.createElement("div",{className:"styles-main-de3124"},r.createElement("div",{className:"styles-left-efdc18"},t),function(e){return e?r.createElement("div",{className:"styles-right-fdad5f"},e):null}(s))),r.createElement("div",{className:"styles-footer-ae8e4b"},r.createElement(l.A,{isGuest:g.guest})));var b}b.propTypes={children:a().node,className:a().string,handleBackButtonClick:h.propTypes.handleClick,right:a().node,showBackButton:h.propTypes.show,title:u.A.propTypes.title,titleValues:u.A.propTypes.values,top:a().node};const E=b}}]); 2//# sourceMappingURL=5984-ccc2fa.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.