1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7d951b97-1998-41fd-8518-837c1810cd65",e._sentryDebugIdIdentifier="sentry-dbid-7d951b97-1998-41fd-8518-837c1810cd65")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3299],{40046:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/event/[eventSlug]/payment",function(){return t(1498)}])},1498:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return eJ},default:function(){return eQ}});var i,r,o=t(52322),a=t(2784),l=t(12866),s=t(53660),d=t(32636),c=t(64827),u=t(13920),m=t(22472),p=t(56267),f=t(31383),g=t(5045),y=t(27358),_=t(56140);let h=(0,f.iv)(["",""],e=>{let{canceled:n}=e;return n&&(0,f.iv)(["text-decoration:line-through;"])}),v=(0,l.ZP)(y.Z).withConfig({displayName:"styles__LineTitle",componentId:"sc-2e2833e4-0"})(["display:flex;align-items:center;font-size:14px;font-weight:",";color:",";"," ",""],e=>{let{bold:n}=e;return n?600:400},e=>{let{theme:n}=e;return n.colors.text.base},h,_.n),x=l.ZP.div.withConfig({displayName:"styles__LineWrapper",componentId:"sc-2e2833e4-1"})(["display:flex;justify-content:space-between;align-items:center;width:100%;gap:",";"],e=>{let{theme:n}=e;return n.spacing[2]}),C=(0,l.ZP)(g.Z).withConfig({displayName:"styles__InclusiveTaxLabel",componentId:"sc-2e2833e4-2"})(["align-self:flex-end;color:",";"],e=>{let{theme:n}=e;return n.colors.surface.onDisabled}),T=l.ZP.p.withConfig({displayName:"money-value__Value",componentId:"sc-800f1a94-0"})(["font-size:14px;font-weight:",";color:",";",";"],e=>{let{bold:n}=e;return n?600:400},e=>{let{theme:n,color:t}=e;switch(t){case"green":return n.colors.success.base;case"red":return n.colors.danger.base;default:return n.colors.text.base}},h);function I(e){let{currency:n,value:t,bold:i,color:r="default",negative:a=!1,canceled:l=!1,...s}=e,d=(0,p.n)();return n?(0,o.jsxs)(T,{...s,bold:i,color:r,canceled:l,children:[a?"- ":"",d(t,n)]}):null}var D=t(83106),P=t(46448);(i=r||(r={})).CANCELED="CANCELED",i.FAILED="FAILED",i.PARTIAL_REFUND="PARTIAL_REFUND",i.PENDING="PENDING",i.SUCCEEDED="SUCCEEDED",i.UNKNOWN="UNKNOWN";var b=t(66519),N=t(12905),E=t(62265);let j=l.ZP.div.withConfig({displayName:"status__PendingTooltipMessageWrapper",componentId:"sc-28d6b4a-0"})(["max-width:284px;text-align:center;"]);function w(e){let{transaction:n}=e,t=(0,u.T_)();if("REFUND"!==n.kind)return null;switch(n.status){case r.CANCELED:return(0,o.jsx)(b.ZP,{children:t.canceled});case r.FAILED:return(0,o.jsx)(b.ZP,{type:N.Z.DANGER,children:t.failed});case r.PENDING:return(0,o.jsx)(E.ZP,{position:"RIGHT",node:(0,o.jsx)(b.ZP,{type:N.Z.WARNING,children:t.pending}),children:(0,o.jsx)(j,{children:t.refundPendingTooltip})});default:return null}}let A=l.ZP.span.withConfig({displayName:"details__DetailsWrapper",componentId:"sc-eda4d2bf-0"})(["color:",";white-space:pre;text-decoration:none !important;"],e=>{let{theme:n}=e;return n.colors.surface.on});function O(e){let{brand:n,cardLast4:t}=e;return(0,o.jsxs)(A,{children:[" - ",n.charAt(0).toUpperCase()+n.slice(1)," \xb7\xb7\xb7\xb7 ",t]})}function S(e){var n,t;let{transaction:i,transactions:r}=e;if("PAYMENT"===i.kind&&(null===(n=i.paymentMethod)||void 0===n?void 0:n.kind)==="CREDIT_CARD")return(0,o.jsx)(O,{brand:i.paymentMethod.brand,cardLast4:i.paymentMethod.cardLast4});if("REFUND"===i.kind){let e=null==r?void 0:r.find(e=>"PAYMENT"===e.kind&&e.id===i.paymentId);if((null==e?void 0:e.kind)==="PAYMENT"&&(null===(t=e.paymentMethod)||void 0===t?void 0:t.kind)==="CREDIT_CARD")return(0,o.jsx)(O,{brand:e.paymentMethod.brand,cardLast4:e.paymentMethod.cardLast4})}return null}let M=l.ZP.div.withConfig({displayName:"transaction__TransactionLineTitleWrapper",componentId:"sc-6e82f01-0"})(["display:flex;align-items:center;gap:",";"],e=>{let{theme:n}=e;return n.spacing[2]}),Z=l.ZP.span.withConfig({displayName:"transaction__TransactionLineTitleSpan",componentId:"sc-6e82f01-1"})(["",";font-weight:500;"],h),R=l.ZP.div.withConfig({displayName:"transaction__Wrapper",componentId:"sc-6e82f01-2"})(["display:flex;justify-content:space-between;gap:",";font-size:12px;padding-block:",";margin-inline:-",";padding-inline:",";",""],e=>{let{theme:n}=e;return n.spacing[2]},e=>{let{theme:n}=e;return n.spacing[2]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{$viewable:n}=e;return n&&(0,f.iv)(["transition:background 150ms ease;&:hover{background:",";}"],e=>{let{theme:n}=e;return(0,D.Z)(n.colors.tertiary.base,.05)})}),k=l.ZP.div.withConfig({displayName:"transaction__DetailsWrapper",componentId:"sc-6e82f01-3"})(["display:flex;align-items:center;gap:",";"],e=>{let{theme:n}=e;return n.spacing[4]}),L=(0,l.ZP)(g.Z).withConfig({displayName:"transaction__TransactionDate",componentId:"sc-6e82f01-4"})(["font-size:12px;"]),F=e=>"REFUND"===e.kind&&e.status===r.CANCELED,U=(e,n)=>"REFUND"===e.kind?n.Refund:n.Payment,W=e=>"REFUND"===e.kind?e.createdAt:"PAYMENT"===e.kind?e.paidAt:null;function z(e){let{transaction:n,transactions:t,currency:i,formatDate:r,viewPaymentDetails:a}=e,l=(0,u.T_)(),s=F(n),d=U(n,l),c=W(n),p=!!a&&"PAYMENT"===n.kind;return(0,o.jsxs)(R,{$viewable:p,...(0,m.o)("transactions-table-transaction",{kind:n.kind}),children:[(0,o.jsxs)(k,{children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)(M,{canceled:s,children:[(0,o.jsxs)(v,{as:"p",children:[(0,o.jsx)(Z,{canceled:s,children:d}),(0,o.jsx)(S,{transaction:n,transactions:t})]}),(0,o.jsx)(w,{transaction:n})]}),c&&(0,o.jsx)(L,{marginTop:1,children:r(c)})]}),p&&(0,o.jsx)(P.ZP,{size:"SMALL",variant:"OUTLINED",onClick:()=>a(n),...(0,m.o)("transactions-table-view-payment-details-button"),children:l.viewPaymentDetails})]}),(0,o.jsx)(I,{value:n.amountCents,currency:i,negative:"PAYMENT"===n.kind,canceled:s})]},n.id)}var H=t(38466);let Y=l.ZP.div.withConfig({displayName:"tax-item__TaxItemWrapper",componentId:"sc-65a6b315-0"})(["display:flex;flex-direction:column;"]),G=(0,l.ZP)(g.Z).withConfig({displayName:"tax-item__TaxRate",componentId:"sc-65a6b315-1"})(["font-size:12px;"]);function K(e){var n;let{currency:t,taxItem:i,showTaxKindLabel:r}=e,a=(0,u.T_)(),l=(0,H.e)(),s=null!==(n=i.label)&&void 0!==n?n:a.tax,d=i.inclusive?a.taxInclusiveLabel:a.taxExclusiveLabel;return(0,o.jsxs)(Y,{children:[(0,o.jsxs)(x,{children:[(0,o.jsx)(v,{...(0,m.o)("transactions-table-tax-item-label"),children:r?"".concat(s," ").concat(d):s}),(0,o.jsx)(I,{currency:t,value:i.amountCents,...(0,m.o)("transactions-table-tax-item-amount")})]}),!!i.percentageDecimal&&(0,o.jsx)(G,{...(0,m.o)("transactions-table-tax-item-rate"),children:function(e){try{return new Intl.NumberFormat(l,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:4}).format(e/100)}catch(n){return"".concat(e,"%")}}(i.percentageDecimal)})]})}let q=l.ZP.div.withConfig({displayName:"order-item__Wrapper",componentId:"sc-8a1f30-0"})(["display:flex;flex-direction:column;gap:",";"],e=>{let{theme:n}=e;return n.spacing[2]});function $(e){var n;let{item:t,currency:i}=e,r=(0,u.T_)(),a=(0,p.n)();return(0,o.jsxs)(q,{children:[(0,o.jsxs)(x,{children:[(0,o.jsx)(v,{truncate:1,children:t.label}),(0,o.jsx)(I,{currency:i,value:t.unitPriceCents})]}),!!t.inclusiveTaxCents&&(0,o.jsx)(C,{size:"medium",children:r.taxIncluded(a(t.inclusiveTaxCents,i))}),null===(n=t.taxItems)||void 0===n?void 0:n.map(e=>e.amountCents?(0,o.jsx)(K,{taxItem:e,currency:i},e.id):null)]})}var X=function(e){return(0,o.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 25",fill:"none",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.962 3.143c-.095 0-.19.01-.283.03l-.023.005A1.49 1.49 0 002.5 4.642v8.997c0 .097.01.194.029.29l.005.023a1.47 1.47 0 001.428 1.186h16.076c.095 0 .19-.01.283-.03.008 0 .015-.003.023-.005a1.49 1.49 0 001.156-1.464V4.642c0-.097-.01-.194-.029-.29l-.005-.023a1.47 1.47 0 00-1.428-1.186H3.962zm1.461 1.5h13.154c0 .828.654 1.499 1.461 1.499v5.997c-.807 0-1.461.672-1.461 1.5H5.423c0-.828-.654-1.5-1.461-1.5V6.142c.807 0 1.461-.671 1.461-1.5zM12 6.141c-1.614 0-2.923 1.51-2.923 3.373 0 1.066.437 2.006 1.106 2.624h3.634c.67-.618 1.106-1.557 1.106-2.624 0-1.863-1.309-3.373-2.923-3.373zM6.154 8.39a.74.74 0 00-.73.75c0 .414.326.75.73.75a.74.74 0 00.73-.75.74.74 0 00-.73-.75zm11.692 0a.74.74 0 00-.73.75c0 .414.327.75.73.75a.74.74 0 00.73-.75.74.74 0 00-.73-.75zm2.181 8.236a.706.706 0 00-.106.01h-.613v1.5a1.46 1.46 0 00-1.353.936 32.784 32.784 0 00-2.704-.908c-2.654-.76
15-6.465-1.527-11.29-1.527a.727.727 0 00-.641.371.767.767 0 000 .756.727.727 0 00.642.372c4.675 0 8.346.737 10.894 1.471 1.274.368 2.265.733 2.966 1.01.35.137.628.253.84.338.107.042.195.077.28.107.075.026.127.058.306.067.02.002.04.013.06.013.786 0 1.415-.638 1.454-1.43a.759.759 0 00.007-.106v-2.97h-.618a.708.708 0 00-.124-.01z",fill:"currentColor"})})};let B=(0,l.ZP)(g.Z).withConfig({displayName:"amount-due__PaymentLinkSentAtWrapper",componentId:"sc-c244d8f9-0"})(["display:flex;flex-direction:column;font-size:14px;font-weight:500;"]),V=l.ZP.span.withConfig({displayName:"amount-due__LinkDate",componentId:"sc-c244d8f9-1"})(["font-size:12px;font-weight:400;"]),Q=l.ZP.div.withConfig({displayName:"amount-due__Wrapper",componentId:"sc-c244d8f9-2"})(["display:flex;align-items:center;gap:",";flex-wrap:wrap;"],e=>{let{theme:n}=e;return n.spacing[4]});function J(e){let{currency:n,formatDate:t,amountDue:i,sendPaymentLink:r,loadingPaymentLink:a,paymentLinkSentAt:l}=e,s=(0,u.T_)();return(0,o.jsxs)(x,{children:[(0,o.jsxs)(Q,{children:[(0,o.jsx)(v,{bold:!0,children:s.amountDueTitle}),r&&i>0&&(0,o.jsx)(P.ZP,{variant:"OUTLINED",size:"SMALL",icon:(0,o.jsx)(X,{}),loading:a,onClick:r,children:s.sendPaymentRequest}),l&&i>0&&(0,o.jsxs)(B,{children:[s.lastRequestSentOn,(0,o.jsx)(V,{children:t(l)})]})]}),(0,o.jsx)(I,{bold:!0,currency:n,value:i,color:(()=>{switch(!0){case i>0:return"red";case i<=0:return"green";default:return"default"}})()})]})}let ee=(0,l.ZP)(c.Z).withConfig({displayName:"transactions-table__Divider",componentId:"sc-7a78b5b1-0"})(["margin:0;"]),en=l.ZP.div.withConfig({displayName:"transactions-table__Wrapper",componentId:"sc-7a78b5b1-1"})(["display:flex;flex-direction:column;gap:",";padding:",";border-radius:",";border:1px solid ",";"],e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.radius.md},e=>{let{theme:n}=e;return n.colors.outline.base}),et=l.ZP.div.withConfig({displayName:"transactions-table__TransactionsWrapper",componentId:"sc-7a78b5b1-2"})(["display:grid;grid-gap:",";"],e=>{let{theme:n}=e;return n.spacing[2]}),ei=(0,l.ZP)(d.Z).attrs({size:21}).withConfig({displayName:"transactions-table__LabelPlaceholder",componentId:"sc-7a78b5b1-3"})(["width:100px;"]);function er(e){var n,t,i;let{transactions:r,formatDate:a,viewPaymentDetails:l,orderSummary:s,...d}=e,c=(0,u.T_)(),p=s.currency,f=!!(null===(n=s.taxItems)||void 0===n?void 0:n.some(e=>!!e.amountCents&&e.inclusive)),g=!!(null===(t=s.taxItems)||void 0===t?void 0:t.some(e=>!!e.amountCents&&!e.inclusive)),y=f&&g;return p?(0,o.jsxs)(en,{children:[s.items.map(e=>(0,o.jsx)($,{item:e,currency:p},e.id)),!!s.promoCode&&!!s.amountDiscountedCents&&(0,o.jsxs)(x,{children:[(0,o.jsx)(v,{children:c.promoCodeName(s.promoCode)}),(0,o.jsx)(I,{negative:!0,currency:p,value:s.amountDiscountedCents})]}),null===(i=s.taxItems)||void 0===i?void 0:i.map(e=>e.amountCents?(0,o.jsx)(K,{taxItem:e,currency:p,showTaxKindLabel:y},e.id):null),(0,o.jsx)(ee,{}),(0,o.jsxs)(x,{children:[(0,o.jsx)(v,{bold:!0,children:c.totalCost}),(0,o.jsx)(I,{bold:!0,currency:p,value:s.totalCostCents,...(0,m.o)("transactions-table-total-cost")})]}),!!(null==r?void 0:r.length)&&(0,o.jsx)(et,{children:r.map(e=>(0,o.jsx)(z,{transaction:e,transactions:r,currency:p,formatDate:a,viewPaymentDetails:l},e.id))}),!!(null==s?void 0:s.totalAmountPaidCents)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{}),(0,o.jsxs)(x,{children:[(0,o.jsx)(v,{bold:!0,children:c.totalPayment}),(0,o.jsx)(I,{bold:!0,currency:p,value:s.totalAmountPaidCents,...(0,m.o)("transactions-table-total-amount-paid")})]})]}),void 0!==d.amountDue&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{}),(0,o.jsx)(J,{...d,amountDue:d.amountDue,formatDate:a,currency:p})]})]}):null}function eo(){return(0,o.jsxs)(en,{children:[(0,o.jsxs)(x,{children:[(0,o.jsx)(ei,{}),(0,o.jsx)(ei,{})]}),(0,o.jsx)(ee,{}),(0,o.jsxs)(x,{children:[(0,o.jsx)(ei,{}),(0,o.jsx)(ei,{})]}),(0,o.jsx)(ee,{}),(0,o.jsxs)(x,{children:[(0,o.jsx)(ei,{}),(0,o.jsx)(ei,{})]})]})}var ea=t(44243),el=t(89333),es=t(67862),ed=t(81548),ec=t(33379),eu=t(82778),em=t(76235);function ep(){let e=(0,es._)(["\n mutation ConfirmZeroAmountOrderMutation(\n $input: Core_ConfirmZeroAmountOrderInput!\n ) {\n confirmZeroAmountOrder: Core_confirmZeroAmountOrder(input: $input) {\n errors {\n message\n code\n subCode\n }\n order {\n id\n }\n }\n }\n"]);return ep=function(){return e},e}let ef=(0,ed.Ps)(ep());var eg=t(86292),ey=t(26621),e_=t(14086);function eh(){let e=(0,es._)(["\n fragment PaymentFragment on Core_Payment {\n id\n amountCents\n applicationFeeCents\n paidAt\n currency\n paymentMethod {\n ... on Core_CreditCardPaymentMethod {\n id\n cardLast4\n brand\n }\n }\n }\n"]);return eh=function(){return e},e}function ev(){let e=(0,es._)(["\n fragment RefundFragment on Core_Refund {\n id\n amountCents\n paymentId\n status\n createdAt\n }\n"]);return ev=function(){return e},e}function ex(){let e=(0,es._)(["\n fragment TransactionsFragment on Core_OrderTransaction {\n ... on Core_Payment {\n ...PaymentFragment\n }\n ... on Core_Refund {\n ...RefundFragment\n }\n }\n\n ","\n ","\n"]);return ex=function(){return e},e}function eC(){let e=(0,es._)(["\n fragment OrderTransactionFragment on Core_Order {\n id\n currency\n totalAmountCents\n totalAmountPaid\n orderItems {\n id\n quantity\n unitPriceCents\n amountIncludingTaxCents\n taxAmountCents\n ticketType {\n id\n name\n }\n orderItemTaxes {\n id\n rate\n description\n amountCents\n inclusive\n ticketTypeId\n }\n }\n transactions {\n ...TransactionsFragment\n }\n }\n\n ","\n"]);return eC=function(){return e},e}function eT(){let e=(0,es._)(["\n fragment RegistrationPriceDetailsFragment on Core_RegistrationPriceDetails {\n totalCostCents\n amountDiscountedCents\n totalAmountPaidCents\n promotionCode\n ticketPrice\n currency\n taxItems {\n taxAmountCents\n type\n pourcentageDecimal\n }\n }\n"]);return eT=function(){return e},e}function eI(){let e=(0,es._)(["\n mutation CreatePaymentIntentForOrder(\n $input: Core_CreatePaymentIntentForOrderInput!\n ) {\n createPaymentIntentForOrder: Core_createPaymentIntentForOrder(\n input: $input\n ) {\n paymentIntentId\n paymentIntentSecret\n isPromoCodeModifiable\n errors {\n message\n subCode\n code\n }\n email\n totalAmountCents\n registrationPriceDetails {\n ...RegistrationPriceDetailsFragment\n }\n order {\n id\n ...OrderTransactionFragment\n registrations {\n id\n eventPerson {\n id\n email\n firstName\n lastName\n }\n ticketType {\n id\n }\n }\n }\n }\n }\n ","\n ","\n"]);return eI=function(){return e},e}let eD=["PAYMENT_LINK_EXPIRED","NO_AMOUNT_DUE","REGISTRATION_NOT_FOUND"],eP=(0,ed.Ps)(eh()),eb=(0,ed.Ps)(ev()),eN=(0,ed.Ps)(ex(),eP,eb),eE=(0,ed.Ps)(eC(),eN),ej=(0,ed.Ps)(eT()),ew=(0,ed.Ps)(eI(),ej,eE);var eA=t(99787);let eO=l.ZP.span.withConfig({displayName:"user-consent__Wrapper",componentId:"sc-925ffaa-0"})(["font-size:12px;line-height:150%;color:",";"],e=>{let{theme:n}=e;return n.colors.surface.on});function eS(e){let{applicationTerms:n,applicationPrivacyPolicy:t}=e;return(0,o.jsx)(eO,{children:(0,o.jsx)(e_.cC,{i18nKey:"registration_user_consent",components:{policy:(0,o.jsx)(P.ZP,{as:"a",target:"_blank",variant:"LINK",href:null!=t?t:"https://www.swapcard.com/legal/privacy-policy",size:"SMALL"}),terms:(0,o.jsx)(P.ZP,{as:"a",target:"_blank",variant:"LINK",href:null!=n?n:"https://www.swapcard.com/legal/terms-user",size:"SMALL"})}})})}var eM=t(28021),eZ=t(44014),eR=t(27250),ek=t(73413);let eL=l.ZP.div.withConfig({displayName:"payment-link-promo-code__ButtonWrapper",componentId:"sc-774afb0b-0"})(["display:flex;justify-content:flex-start;"]);function eF(e){let{onApply:n,onRemove:t,loading:i=!1,appliedDiscount:r,isModifiable:l=!0}=e,{t:s}=(0,e_.$G)(),d=(0,ey.zX)(),c=(null==d?void 0:d.codeExpanded)&&(null==d?void 0:d.isPromoCodeActive),[u,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),g=(0,eM.Gl)({initialState:{value:""}});return(null==r?void 0:r.promoCode)?(0,o.jsx)(eR.n,{onRemove:()=>{g.setState({value:""}),f(!1),m(!1),t()},activeDiscount:r,removeDisabled:!l,disabledTooltipMessage:s("payment_link_promo_code_not_modifiable_tooltip")}):l?c||u?(0,o.jsx)(eZ.J,{variant:c?"extended":"simple",inputProps:g,invali
1dPromoCode:p,setInvalidPromoCode:f,onSubmit:n,loading:i}):(0,o.jsx)(eL,{children:(0,o.jsx)(ek.T,{onClick:()=>m(!0)})}):null}let eU=l.ZP.div.withConfig({displayName:"balance-due-payment__TitleWrapper",componentId:"sc-5ee12677-0"})(["display:flex;flex-direction:column;gap:",";"],e=>{let{theme:n}=e;return n.spacing[2]}),eW=l.ZP.div.withConfig({displayName:"balance-due-payment__PaymentWrapper",componentId:"sc-5ee12677-1"})(["display:flex;flex-direction:column;gap:",";"],e=>{let{theme:n}=e;return n.spacing[4]}),ez=l.ZP.div.withConfig({displayName:"balance-due-payment__Wrapper",componentId:"sc-5ee12677-2"})(["box-sizing:border-box;padding:",";width:100%;display:flex;flex-direction:column;gap:",";overflow-y:auto;height:calc(100vh - 80px);@media screen and (min-width:","px){height:90vh;max-height:750px;}"],e=>{let{theme:n}=e;return"".concat(n.spacing[8]," ").concat(n.spacing[10])},e=>{let{theme:n}=e;return n.spacing[6]},e=>{let{theme:n}=e;return n.breakPoints.xs}),eH=l.ZP.div.withConfig({displayName:"balance-due-payment__EventCardWrapper",componentId:"sc-5ee12677-3"})(["min-height:fit-content;"]),eY=(e,n)=>n?"".concat(e,"?email=").concat(encodeURIComponent(n)):e;function eG(e){var n,t,i,r;let{orderId:l,orderSecret:d,successUrl:c,onSuccess:u,applicationTerms:m,applicationPrivacyPolicy:f}=e,{t:_}=(0,e_.$G)(),h=(0,eg.m)(),[v,x]=(0,a.useState)(!1),[C,T]=(0,a.useState)(),[I,D]=(0,a.useState)(),b=(0,ey.zX)(),N=(0,p.n)(),E=null==b?void 0:null===(n=b.paymentSettings)||void 0===n?void 0:n.paymentProviders,{createPaymentIntentForOrder:j,loading:w,intentSecret:A,eventPerson:O,email:S,errorCode:M,totalAmountCents:Z,orderSummary:R,orderTransactions:k,isPromoCodeModifiable:L}=function(){var e,n,t,i,r,o,a,l,s,d,c,u,m,p,f;let{onCompleted:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},y=(0,eu.h)(),{showToast:_}=(0,em.pm)(),[h,{loading:v,data:x}]=(0,ec.D)(ew,{onError:y,onCompleted:e=>{var n;let{createPaymentIntentForOrder:t}=e,{errors:i,registrationPriceDetails:r}=t;(null==i?void 0:i.length)&&i.forEach(e=>{let{message:n,subCode:t}=e;eD.includes(t)||_(n,{type:em.wD.ERROR})}),null==g||g({promoCode:null!==(n=null==r?void 0:r.promotionCode)&&void 0!==n?n:null})}}),C=null==x?void 0:null===(e=x.createPaymentIntentForOrder)||void 0===e?void 0:e.order,T=null==C?void 0:null===(t=C.registrations)||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.eventPerson,I=null==x?void 0:null===(i=x.createPaymentIntentForOrder)||void 0===i?void 0:i.paymentIntentSecret,D=null==x?void 0:null===(a=x.createPaymentIntentForOrder)||void 0===a?void 0:null===(o=a.errors)||void 0===o?void 0:null===(r=o[0])||void 0===r?void 0:r.subCode,P=null==x?void 0:null===(l=x.createPaymentIntentForOrder)||void 0===l?void 0:l.totalAmountCents;return{createPaymentIntentForOrder:h,loading:v,order:C,intentSecret:I,eventPerson:T,email:null==x?void 0:null===(s=x.createPaymentIntentForOrder)||void 0===s?void 0:s.email,errorCode:D,totalAmountCents:P,isPromoCodeModifiable:null===(u=null==x?void 0:null===(d=x.createPaymentIntentForOrder)||void 0===d?void 0:d.isPromoCodeModifiable)||void 0===u||u,orderSummary:function(e,n){var t,i;if(!e)return null;let r=function(e){let n=new Map;for(let i of e)for(let e of i.orderItemTaxes){var t;if(!e.inclusive||!e.amountCents||!e.ticketTypeId)continue;let i=null!==(t=n.get(e.ticketTypeId))&&void 0!==t?t:0;n.set(e.ticketTypeId,i+e.amountCents)}return n}(e.orderItems),o=(function(e){let n=new Map;for(let a of e){var t,i,r,o;let e=null!==(i=null===(t=a.ticketType)||void 0===t?void 0:t.id)&&void 0!==i?i:a.id,l=n.get(e);l?(l.quantity+=a.quantity,l.totalPriceCents+=a.unitPriceCents*a.quantity):n.set(e,{id:e,name:null!==(o=null===(r=a.ticketType)||void 0===r?void 0:r.name)&&void 0!==o?o:"",quantity:a.quantity,totalPriceCents:a.unitPriceCents*a.quantity})}return Array.from(n.values())})(e.orderItems).map(e=>({id:e.id,label:e.quantity>1?"x".concat(e.quantity," ").concat(e.name):e.name,unitPriceCents:e.totalPriceCents,inclusiveTaxCents:r.get(e.id)}));return{currency:e.currency,items:o,taxItems:function(e){let n=new Map;for(let t of e)for(let e of t.orderItemTaxes){if(e.inclusive||!e.amountCents)continue;let t="".concat(e.rate,":").concat(e.description),i=n.get(t);i?i.amountCents+=e.amountCents:n.set(t,{id:e.id,label:e.description,rate:e.rate,amountCents:e.amountCents})}return Array.from(n.values()).map(e=>{let{id:n,label:t,rate:i,amountCents:r}=e;
1return{id:n,label:t,percentageDecimal:i,amountCents:r,inclusive:!1}})}(e.orderItems),totalCostCents:e.totalAmountCents,totalAmountPaidCents:e.totalAmountPaid,amountDiscountedCents:null!==(t=null==n?void 0:n.amountDiscountedCents)&&void 0!==t?t:0,promoCode:null!==(i=null==n?void 0:n.promotionCode)&&void 0!==i?i:null}}(C,null!==(m=null==x?void 0:null===(c=x.createPaymentIntentForOrder)||void 0===c?void 0:c.registrationPriceDetails)&&void 0!==m?m:null),orderTransactions:null!==(f=null==(p=null==C?void 0:C.transactions)?void 0:p.reduce((e,n)=>{if("Core_Payment"===n.__typename){var t;e.push({kind:"PAYMENT",...n,paymentMethod:(null===(t=n.paymentMethod)||void 0===t?void 0:t.__typename)==="Core_CreditCardPaymentMethod"?{kind:"CREDIT_CARD",...n.paymentMethod}:null})}else"Core_Refund"===n.__typename&&e.push({kind:"REFUND",...n,status:n.status});return e},[]))&&void 0!==f?f:[]}}({onCompleted:e=>{let{promoCode:n}=e;n&&T(n)}}),F=(0,a.useCallback)(()=>{j({variables:{input:{orderId:l,orderSecret:d}}})},[j,l,d]),{updateBilling:U,taxI
1dError:W,loading:z}=(0,el.Vb)({saveCostSummary:D}),H=(null!==(t=null==I?void 0:I.amountDueCents)&&void 0!==t?t:null==I?void 0:I.totalAmountCents)===0,{confirmZeroAmountOrder:Y,loading:G}=function(e){let{onSuccess:n}=e,t=(0,eu.h)(),{showToast:i}=(0,em.pm)(),[r,{loading:o}]=(0,ec.D)(ef,{onError:t,onCompleted:e=>{let{confirmZeroAmountOrder:{errors:t}}=e;if(null==t?void 0:t.length){t.forEach(e=>{let{message:n}=e;i(n,{type:em.wD.ERROR})});return}n()}});return{confirmZeroAmountOrder:r,loading:o}}({onSuccess:()=>u(S)}),K=(0,a.useCallback)(()=>{Y({variables:{input:{orderId:l,orderSecret:d,promoCode:C}}})},[Y,l,d,C]),q=(0,a.useCallback)(e=>U({billing:(0,el.Cc)(e),orderId:l,orderSecret:d,promoCode:C}),[U,l,d,C]);(0,a.useEffect)(()=>{F()},[F]);let $=(0,a.useMemo)(()=>{var e;return R?I?{...R,promoCode:I.promoCode,amountDiscountedCents:I.discountAmountCents,totalCostCents:I.totalAmountCents,taxItems:null===(e=I.taxes)||void 0===e?void 0:e.map((e,n)=>({id:"tax-item-".concat(n),label:e.type,percentageDecimal:e.percentageDecimal,amountCents:e.amountCents}))}:R:null},[R,I]),X=(0,a.useMemo)(()=>{if((null==I?void 0:I.promoCode)&&(null==R?void 0:R.currency))return{promoCode:{__typename:"Core_TicketTypeDiscount",code:I.promoCode,percentageOff:null,amountOffCents:I.discountAmountCents,amountOffCentsFormatted:N(I.discountAmountCents,R.currency)}};if(!I&&(null==R?void 0:R.promoCode)&&R.currency){var e;let n=null!==(e=R.amountDiscountedCents)&&void 0!==e?e:0;return{promoCode:{__typename:"Core_TicketTypeDiscount",code:R.promoCode,percentageOff:null,amountOffCents:n,amountOffCentsFormatted:N(n,R.currency)}}}return null},[I,R,N]);return M?(0,o.jsx)(eA.Z,{errorCode:M}):!w&&A&&(null==E?void 0:E.length)&&k&&$?(0,o.jsxs)(ez,{children:[(0,o.jsxs)(eU,{children:[(0,o.jsx)(y.Z,{children:_("balance_due_payment_hello",{name:null==O?void 0:O.firstName})}),(0,o.jsx)(g.Z,{children:_("balance_due_payment_description")})]}),b&&(0,o.jsx)(eH,{children:(0,o.jsx)(s.ZP,{event:b,layout:"LITE_LIST_ROUNDED",extendedDate:!0})}),(0,o.jsx)(er,{orderSummary:$,amountDue:null!==(r=null!==(i=null==I?void 0:I.amountDueCents)&&void 0!==i?i:Z)&&void 0!==r?r:0,formatDate:e=>{var n;let t=null!==(n=null==b?void 0:b.timezone)&&void 0!==n?n:Intl.DateTimeFormat().resolvedOptions().timeZone,i="string"==typeof e?/[+-]\d{2}:?\d{2}$/.test(e)||e.endsWith("Z")?new Date(e).toISOString():new Date(e+"Z").toISOString():new Date(e.getTime()).toISOString();return"".concat(h(i,{formatOptions:eg.y.LONG_DATE_NO_WEEKDAY,timezone:t})," ").concat(h(i,{formatOptions:eg.y.SHORT_TIME,timezone:t}))},transactions:k}),(0,o.jsx)(eF,{onApply:e=>{T(e),U({billing:{},orderId:l,orderSecret:d,promoCode:e})},onRemove:()=>{T(void 0),U({billing:{},orderId:l,orderSecret:d,promoCode:void 0})},loading:z,appliedDiscount:X,isModifiable:L}),(0,o.jsxs)(eW,{children:[!H&&(0,o.jsx)(ea.ZP,{stripeKey:E[0].stripePublishableKey,stripeAccountId:E[0].stripeAccountId,stripeSecret:A,successUrl:eY(c,S),onSuccess:()=>u(S),taxIdError:W,onLoadingChange:x,onBillingChange:q,email:null==O?void 0:O.email,firstName:null==O?void 0:O.firstName,lastName:null==O?void 0:O.lastName,stripeTranslations:{taxId:_("tax_id"),taxIdType:_("tax_id_type"),taxIdTypePlaceholder:_("tax_id_type_placeholder"),billingInformation:_("billing_information"),cardInformation:_("card_information"),billingEmailAddress:_("billing_email_address"),emailPlaceholder:_("billing_email_address_placeholder"),companyNameLabel:_("company_name_label"),companyNamePlaceholder:_("company_name_placeholder"),skipTaxIdConfirmation:_("skip_tax_id_confirmation")}}),(0,o.jsx)(eS,{applicationTerms:m,applicationPrivacyPolicy:f}),(0,o.jsx)(P.W4,{align:"END",children:H?(0,o.jsx)(P.ZP,{onClick:K,disabled:z,loading:G,children:_("pay")}):(0,o.jsx)(P.ZP,{type:"submit",form:ea.HY,disabled:!!W||z,loading:v,children:_("pay")})})]})]}):(0,o.jsx)(eK,{})}function eK(){return(0,o.jsxs)(ez,{children:[(0,o.jsxs)(eU,{children:[(0,o.jsx)(y.h,{}),(0,o.jsx)(g.T,{lines:2})]}),(0,o.jsx)(s.Bg,{layout:"LITE_LIST"}),(0,o.jsx)(eo,{}),(0,o.jsxs)(eW,{children:[(0,o.jsx)(y.h,{}),(0,o.jsx)(ea.Cx,{})]})]})}var eq=t(5632),e$=t(5978),eX=t(60251);t(66945),t(6265),t(50972);
1var eB=t(70492),eV=t(83086),eQ=(0,eX.g)(function(e){let n=(0,eV.zX)(),{push:t}=(0,eq.useRouter)(),i=(0,eB.I)(),{i18n:{language:r}}=(0,e$.$)();return n?(0,o.jsx)(eG,{successUrl:"https://".concat(i.appWebDomain,"/login/").concat(r,"/event/").concat(null==n?void 0:n.slug,"/payment-success"),onSuccess:e=>{t("/event/".concat(null==n?void 0:n.slug,"/payment-success?email=").concat(e))},applicationTerms:i.termsOfUseUrl,applicationPrivacyPolicy:i.privacyPolicyUrl,...e}):null},{forceWidth:660}),eJ=!0},99787:function(e,n,t){"use strict";t.d(n,{Q:function(){return s},Z:function(){return u}});var i=t(52322),r=t(5045),o=t(27358),a=t(12866),l=t(14086);let s=a.ZP.div.withConfig({displayName:"error__BalanceDuePaymentPageWrapper",componentId:"sc-7fa3ff31-0"})(["display:flex;flex-direction:column;gap:",";box-sizing:border-box;padding:",";align-items:center;"],e=>{let{theme:n}=e;return n.spacing[6]},e=>{let{theme:n}=e;return n.spacing[10]}),d=a.ZP.div.withConfig({displayName:"error__TextWrapper",componentId:"sc-7fa3ff31-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";text-align:center;"],e=>{let{theme:n}=e;return n.spacing[2]}),c=a.ZP.img.withConfig({displayName:"error__Image",componentId:"sc-7fa3ff31-2"})(["width:100%;max-width:235px;"]);function u(e){let{errorCode:n}=e;return(0,i.jsxs)(s,{children:[(0,i.jsx)(c,{src:"https://static.swapcard.com/public/images/00808959b2ab4f17bf5f283b7ce5a774.svg",alt:""}),(0,i.jsx)(d,{children:(0,i.jsx)(m,{errorCode:n})})]})}function m(e){let{errorCode:n}=e,{t}=(0,l.$G)();return"PAYMENT_LINK_EXPIRED"===n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{children:t("payment_link_expired_title")}),(0,i.jsx)(r.Z,{children:t("payment_link_expired_description")})]}):"NO_AMOUNT_DUE"===n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{children:t("no_amount_due_title")}),(0,i.jsx)(r.Z,{children:t("no_amount_due_description")})]}):"REGISTRATION_NOT_FOUND"===n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{children:t("registration_not_found_title")}),(0,i.jsx)(r.Z,{children:t("registration_not_found_description")})]}):null}},363:function(e,n,t){"use strict";t.d(n,{Hg:function(){return r},m2:function(){return d},p6:function(){return s},yQ:function(){return o}});let i={formatOptions:{}};function r(e){var n;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return new Intl.DateTimeFormat(t.language,{timeZone:null!==(n=t.timezone)&&void 0!==n?n:"UTC",...t.formatOptions}).format(e instanceof Date?e:new Date(e))}let o={FULL_DATE_TIME:{weekday:"long",month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"},FULL_DATE:{weekday:"long",month:"long",day:"numeric",year:"numeric"},FULL_TIME:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},FULL_TIME_WITH_SECONDS:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},TINY_DATE_TIME:{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},SHORT_DATE_TIME:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},SHORT_DATE_TIME_WITH_SECONDS:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},SHORT_DATE:{weekday:"short",year:"numeric",month:"short",day:"numeric"},SHORT_DATE_NO_WEEKDAY:{year:"numeric",month:"short",day:"numeric"},LONG_DATE:{weekday:"long",year:"numeric",month:"long",day:"numeric"},LONG_DATE_NO_WEEKDAY:{year:"numeric",month:"long",day:"numeric"},LONG_DATE_TIME_NO_WEEKDAY:{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"},LONG_DATE_TIME:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},LONG_DATE_TIME_WITH_SECONDS:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},SHORT_TIME:{timeStyle:"short"},SHORT_TIME_SECONDS:{timeStyle:"medium"},NUMERIC_DATE:{year:"numeric",month:"2-digit",day:"2-digit"},NUMERIC_DATE_TIME:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},NUMERIC_DATE_TIME_WITH_SECONDS:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},SHORT_WEEKDAY_TIME:{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},SHORT_WEEKDAY_DATE_TIME:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},SHORT_MONTH_DAY:{month:"short",day:"2-digit"},SHORT_MONTH:{month:"short"},DAY:{day:"2-digit"},MONTH_YEAR:{month:"long",year:"numeric"}};function a(e){return e.toString().padStart(2,"0")}let l=["YEAR","MONTH","DAY"];function s(e){var n;let t=arguments.length>
11&&void 0!==arguments[1]?arguments[1]:d.ISO,i=new Date(new Date(e instanceof Date?e.getTime():e).toLocaleDateString("en-US",{timeZone:t.timezone,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:t.seconds?"numeric":void 0})),r={DAY:a(i.getDate()),MONTH:a(i.getMonth()+1),YEAR:i.getFullYear().toString()},o={h:a(i.getHours()),m:a(i.getMinutes()),s:t.seconds?":"+a(i.getSeconds()):""},l=-i.getTimezoneOffset(),s=Math.floor(Math.abs(l/60)).toString().padStart(2,"0"),c=Math.abs(l%60).toString().padStart(2,"0");return t.format.map(e=>r[e]).join(t.dateSeparator||"-")+(t.time?"".concat(null!==(n=t.dateTimeSeparator)&&void 0!==n?n:" ").concat(o.h,":").concat(o.m).concat(o.s):"")+(t.showTimezoneOffset?"".concat(l>=0?"+":"-").concat(s,":").concat(c):"")}let d={ISO:{format:l,time:!0,seconds:!0,dateTimeSeparator:"T",showTimezoneOffset:!0},ISO_NO_TZ:{format:l,time:!0,seconds:!0,dateTimeSeparator:"T"},ISO_NO_TIME:{format:l,time:!1,seconds:!1},NO_TZ_NO_SECONDS:{format:l,time:!0,seconds:!1},FULL_DATE:{format:l,time:!0,seconds:!0,dateTimeSeparator:" "},DAY_MONTH:{format:["DAY","MONTH"],dateSeparator:"."}}},86292:function(e,n,t){"use strict";t.d(n,{m:function(){return o},y:function(){return i.yQ}});var i=t(363),r=t(38466);function o(){let e=(0,r.e)();return function(n){let{formatOptions:t,timezone:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Hg)(n,{language:e,formatOptions:t,timezone:r})}}}},function(e){e.O(0,[947,3661,6425,2302,1991,2473,2264,851,2290,6337,4576,2042,6592,9843,7933,544,6945,8749,2888,9774,179],function(){return e(e.s=40046)}),_N_E=e.O()}]);
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.