@saasquatch/mint-components 1.16.0-8 → 1.16.0-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +6 -8
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +0 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +2 -2
- package/dist/esm/sqm-banking-info-form_17.entry.js +6 -8
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-7fe7e515.entry.js → p-609613e8.entry.js} +4 -4
- package/dist/mint-components/p-ddcf4a9e.system.entry.js +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-ba42732b.system.entry.js +0 -1
|
@@ -128,7 +128,7 @@ import{h as e,r as a,c as t,g as i}from"./p-f708da7b.js";import{m as n,k as o,f
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
`;function we(e){const a=Number.parseInt(e);if(!isNaN(a))return a.toString()}const Te=class{constructor(e){a(this,e),this.ignored=!0,this.formStep="Step {step} of {count}",this.taxAndPayouts="Payouts",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.directlyToBankAccount="Directly to my bank account",this.toPayPalAccount="PayPal (2% processing fee capped to {feeCap})",this.paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold",this.paymentScheduleFixedDay="Pay me on a fixed day of the month",this.paymentDaySelectLabel="Payment Day",this.paymentThresholdSelectLabel="Payment Threshold",this.paymentDayFirstOfMonthLabelText="1st of the month",this.paymentDayFifteenthOfMonthLabelText="15th of the month",this.paymentMethod="Payment method",this.paymentSchedule="Payment schedule",this.paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.",this.payPalInputLabel="PayPal email",this.bankLocationLabel="Bank country location",this.beneficiaryAccountNameLabel="Account holder name",this.beneficiaryAccountNameDescription="The beneficiary name of your bank account. Ensure this matches the name on your tax form.",this.bankAccountTypeLabel="Bank account type",this.checkingSelectItemLabel="Checking",this.savingsSelectItemLabel="Savings",this.bankAccountNumberLabel="Bank account number",this.ibanLabel="IBAN",this.swiftCodeLabel="SWIFT code",this.routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }",this.bankNameLabel="Bank Name",this.classificationEntityLabel="Classification Entity",this.businessSelectItemLabel="Business",this.individualSelectItemLabel="Individual",this.foreignSelectItemLabel="Foreign",this.classificationCPFLabel="Classification CPF",this.patronymicNameLabel="Patronymic name",this.voCodeLabel="VO code",this.agencyCodeLabel="Agency code",this.branchCodeLabel="Branch code",this.classificationLabel="Classification",this.taxPayerIdLabel="{country, select, AR {CUIT/CUIL} KR {Classification ID} other { Beneficiary INN } }",this.bankAddressLabel="Bank address",this.bankCityLabel="Bank city",this.bankStateLabel="Bank province/state",this.bankPostalCodeLabel="Bank postal code",this.eftWithdrawalLabel="EFT withdrawal (free)",this.fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)",this.searchForCountryText="Search for country..",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.verifyEmailHeaderText="Verify your email",this.verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.fieldRequiredError="{fieldName} is required",this.fieldInvalidError="{fieldName} is invalid",this.supportLink="support team",this.continueButton="Save",this.backButton="Back",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact Support.",this.modalTitle="Important Note",this.modalDescription="Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.",this.modalButtonText="I understand, update my information",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,loadingErrorAlertDescription:e.loadingErrorAlertDescription,loadingErrorAlertHeader:e.loadingErrorAlertHeader}}}render(){var a,i,l,s,d,c,u,m,w,T,I,k,P,N,E,D,R,B,q,F,L,U,O,W,V;const j=C()?function(e){var a,t,i,n,l,s,d,c,u,m,h,v,y,g;const f=null===(i=null===(t=null===(a=e.demoData)||void 0===a?void 0:a.states)||void 0===t?void 0:t.formState)||void 0===i?void 0:i.paymentMethodChecked,b=null===(s=null===(l=null===(n=e.demoData)||void 0===n?void 0:n.states)||void 0===l?void 0:l.formState)||void 0===s?void 0:s.paymentScheduleChecked,x=null===(c=null===(d=e.demoData)||void 0===d?void 0:d.states)||void 0===c?void 0:c.currency,C=null===(h=null===(m=null===(u=e.demoData)||void 0===u?void 0:u.states)||void 0===m?void 0:m.formState)||void 0===h?void 0:h.bankCountry,w=S("sq:tax-and-cash"),[T,I]=o(void 0),[k,P]=o(void 0),[_,N]=o(x),[E,M]=o(C),D=null===(v=ye[_])||void 0===v?void 0:v.find((e=>e.countryCode===E)),R=(null==D?void 0:D.withdrawalSettingId)||(null===(g=null===(y=e.demoData)||void 0===y?void 0:y.states)||void 0===g?void 0:g.bitset)||0;r((()=>{f!==T&&I(f),b!==k&&P(b),x!==_&&N(x),C!==E&&M(C)}),[f,x,C]);const B=xe[_]||"",q={ACH:e.eftWithdrawalLabel,WIRE:p.formatMessage({id:"fxWireText",defaultMessage:e.fxWireProcessingFeeLabel},{currency:_,defaultFxFee:(null==D?void 0:D.defaultFxFee)||"0"})};return A({states:{step:"4",isPartner:!1,disabled:!1,loading:!1,saveLoading:!1,hideSteps:!1,hideBackButton:!1,feeCap:B,thresholds:[],paymentMethodFeeLabel:q[null==D?void 0:D.defaultFinancePaymentMethodId],formState:{paymentMethodChecked:T,paymentScheduleChecked:k,errors:{general:!1,beneficiaryAccountName:!1,bankAccountType:!1,bankAccountNumber:!1,iban:!1,swiftCode:!1,routingCode:!1,bankName:!1,beneficiaryClassification:!1,patronymicName:!1,voCode:!1,agencyCode:!1,bankAddress:!1,bankCity:!1,bankState:!1,bankPostalCode:!1,branchCode:!1,paymentThreshold:!1,paymentDay:!1}},bitset:R,bankCountry:E,currency:_,setCurrency:N,hasPayPal:!0,showModal:!1},callbacks:{onVerificationHide:()=>{},onSubmit:async()=>{w("/dashboard")},setBankCountry:M,setPaymentMethodChecked:I,setPaymentScheduleChecked:P,setCountrySearch:()=>{},onBack:async()=>w("/dashboard"),onVerification:()=>{},onModalOpen:()=>{},onModalClose:()=>{}},text:e.getTextProps(),refs:{formRef:{current:null}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l,s,d,c,u,m;const C=h(),S=v(),w=y(),[T,I]=g("sq:tax-and-cash"),k=f("sq:tax-form-context"),P=f("sq:countries:sorted"),A=n(null),{data:N,errors:E}=b("sq:finance-network-settings"),{data:M,refetch:D,errors:R}=b("sq:user-info-query"),[B]=x(Ce),[q]=x(Se),[F,L]=o(!1),[U,O]=o(null),[W,V]=o({}),[j,z]=o(null),[G,H]=o(!1),[K,$]=o({}),[Y,Z]=o(void 0),[J,X]=o(void 0),[Q,ee]=o(""),[ae,te]=o(P||[]),[ne,oe]=o(!1),re=(null===(i=null===(t=null===(a=null==M?void 0:M.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher)||void 0===i?void 0:i.currency)||"",se=!!(null===(d=null===(s=null===(l=null==M?void 0:M.user)||void 0===l?void 0:l.impactConnection)||void 0===s?void 0:s.publisher)||void 0===d?void 0:d.withdrawalSettings),de=xe[re]||"",ce=null===(c=null==N?void 0:N.impactFinanceNetworkSettings)||void 0===c?void 0:c.data,ue={3:e.eftWithdrawalLabel,5:p.formatMessage({id:"fxWireText",defaultMessage:e.fxWireProcessingFeeLabel},{currency:re,defaultFxFee:(null==j?void 0:j.defaultFxFee)||0})}[null==j?void 0:j.defaultFinancePaymentMethodId],pe=!!(null==ce?void 0:ce.find((e=>7===e.defaultFinancePaymentMethodId))),me=pe?Y:"toBankAccount";r((()=>{var e,a,t,i,n,o,r,l,s;if(!M)return;if(!ce)return;const d=null===(t=null===(a=null===(e=null==M?void 0:M.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.countryCode,c=null===(o=null===(n=null===(i=null==M?void 0:M.user)||void 0===i?void 0:i.impactConnection)||void 0===n?void 0:n.publisher)||void 0===o?void 0:o.withdrawalSettings;let u={bankCountry:(null==c?void 0:c.bankCountry)||d,paymentMethod:"BANK_TRANSFER"};c&&(null===(s=null===(l=null===(r=M.user)||void 0===r?void 0:r.impactConnection)||void 0===l?void 0:l.publisher)||void 0===s?void 0:s.brandedSignup)&&(u={...u,paymentMethod:c.paymentMethod,paypalEmailAddress:c.paypalEmailAddress,paymentSchedulingType:c.paymentSchedulingType,paymentThreshold:we(c.paymentThreshold),paymentDay:c.paymentDay});const p=null==ce?void 0:ce.find((e=>{if("PAYPAL"===u.paymentMethod){if(7===e.defaultFinancePaymentMethodId)return!0}else if(e.countryCode===u.bankCountry)return!0;return!1}));"PAYPAL"!==u.paymentMethod&&he(null==p?void 0:p.countryCode),ye("PAYPAL"===u.paymentMethod?"toPayPalAccount":"toBankAccount"),z(p),X(u.paymentSchedulingType),V(u)}),[ce,M,z,V]),r((()=>{(null==P?void 0:P.length)&&(""===Q.trim()?te(P||[]):te(P.filter((e=>e.displayName.toLowerCase().includes(Q.toLowerCase())))||[]))}),[Q,P]);const he=e=>{const a=null==ce?void 0:ce.find((a=>a.countryCode===e));V((a=>({...a,bankCountry:e}))),z(a)},ve=async e=>{C.dispatchEvent(new CustomEvent(ie,{detail:{token:e},bubbles:!1}))};function ye(e){if(Z(e),"toPayPalAccount"===e){const e=null==ce?void 0:ce.find((e=>7===e.defaultFinancePaymentMethodId));z(e)}else if("toBankAccount"===e){const e=null==ce?void 0:ce.find((e=>e.countryCode===W.bankCountry));z(e)}}return{text:e.getTextProps(),callbacks:{onSubmit:async e=>{let a,t={},i={};e.target.getFormControls().forEach((e=>{if(!e.name||!e.id)return;const a=e.name,n=e.value;_.set(t,a,n),e.required&&!n&&_.set(i,a,{type:"required"})})),$({inputErrors:i}),Object.keys(i).length||(se&&(oe(!1),L(!0),a=await new Promise((e=>{const a=t=>{t.stopPropagation(),C.removeEventListener(ie,a),e(t.detail.token)};C.addEventListener(ie,a)})),L(!1)),await(async(e,a)=>{var t,i,n,o,r,l,s,d,c,u;H(!0);try{if(!j)throw new Error("No currentPaymentOption");const p={user:{id:w.id,accountId:w.accountId},...e,paymentMethod:(u=j,3===u.defaultFinancePaymentMethodId||5===u.defaultFinancePaymentMethodId?"BANK_TRANSFER":7===u.defaultFinancePaymentMethodId?"PAYPAL":""),paymentSchedulingType:J};let m=null,h=null,v=null;if(se){if(!a)return;m=await q({updateImpactPublisherWithdrawalSettingsInput:{...p,accessKey:a}}),h=null===(i=null===(t=m)||void 0===t?void 0:t.updateImpactPublisherWithdrawalSettings)||void 0===i?void 0:i.success,v=null===(o=null===(n=m)||void 0===n?void 0:n.updateImpactPublisherWithdrawalSettings)||void 0===o?void 0:o.validationErrors}else m=await B({setImpactPublisherWithdrawalSettingsInput:{...p}}),h=null===(l=null===(r=m)||void 0===r?void 0:r.setImpactPublisherWithdrawalSettings)||void 0===l?void 0:l.success,v=null===(d=null===(s=m)||void 0===s?void 0:s.setImpactPublisherWithdrawalSettings)||void 0===d?void 0:d.validationErrors;if(!m||(null===(c=m)||void 0===c?void 0:c.message))throw new Error;if(!h){console.error("Validation failed: ",v);const e=null==v?void 0:v.reduce(((e,a)=>({...e,[a.field]:{type:"invalid"}})),{});return void $({inputErrors:{...e},general:!0})}window.dispatchEvent(new Event(le)),window.location.hash="",await D(),I("/dashboard")}catch(e){console.error(e),$({general:!0})}finally{H(!1)}})(t,a)),oe(!1)},setBankCountry:he,setPaymentMethodChecked:ye,setPaymentScheduleChecked:X,onBack:()=>I("/dashboard"),setCountrySearch:ee,onVerification:ve,onVerificationHide:()=>ve(null),onModalClose:()=>oe(!1),onModalOpen:()=>oe(!0)},states:{showVerification:F,step:null==T?void 0:T.replace("/",""),hideSteps:!!k.hideSteps,saveDisabled:!me||!J,locale:S,isPartner:se,feeCap:de,paymentMethodFeeLabel:ue,disabled:G,hideBackButton:!k.overrideBackStep,loading:!ce,saveLoading:G,hideBanking:"toBankAccount"!==me||!me,hidePayPal:"toPayPalAccount"!==me||!me,loadingError:!!(null==R?void 0:R.message)||!!(null==E?void 0:E.message),formState:{...W,paymentMethodChecked:me,paymentScheduleChecked:J,errors:K},currentPaymentOption:j,bitset:(null==j?void 0:j.withdrawalSettingId)||0,currency:re,thresholds:(null===(u=null==j?void 0:j.thresholdOptions)||void 0===u?void 0:u.split(","))||[],countries:ae,allCountries:P,hasPayPal:pe,bankCountry:W.bankCountry,countrySearch:Q,email:null===(m=null==M?void 0:M.user)||void 0===m?void 0:m.email,showModal:ne},refs:{formRef:A}}}(this),{errors:z}=j.states.formState,G=this.fieldRequiredError,H=this.fieldInvalidError;function K({type:e,label:a}){return"required"===e?p.formatMessage({id:`requiredText-${a}`,defaultMessage:G},{fieldName:a}):"invalid"===e?p.formatMessage({id:`invalidText-${a}`,defaultMessage:H},{fieldName:a}):""}const $=function({props:a,getValidationErrorMessage:t,bankCountry:i}){var n,o,r,l,s,d,c,u,m,h,v,y,g,f,b,x,C,S,w,T,I,k,P,_,A,N,E,M,D,R,B,q,F,L,U,O,W,V,j,z,G,H,K,$,Y,Z,J,X,Q,ee,ae,te,ie,ne,oe,re,le;const{errors:se,...de}=a.states.formState;return{0:{input:e("sl-input",Object.assign({required:!0,label:a.text.beneficiaryAccountNameLabel,name:"/beneficiaryAccountName",id:"beneficiaryAccountName",key:"beneficiaryAccountName",type:"text","help-text":a.text.beneficiaryAccountNameDescription},(null===(n=null==se?void 0:se.inputErrors)||void 0===n?void 0:n.beneficiaryAccountName)&&{class:"error-input",helpText:t({type:null===(r=null===(o=null==se?void 0:se.inputErrors)||void 0===o?void 0:o.beneficiaryAccountName)||void 0===r?void 0:r.type,label:a.text.beneficiaryAccountNameLabel})}))},1:{input:e("sl-select",Object.assign({required:!0,label:a.text.bankAccountTypeLabel,name:"/bankAccountType",id:"bankAccountType",key:"bankAccountType"},(null===(l=null==se?void 0:se.inputErrors)||void 0===l?void 0:l.bankAccountType)&&{class:"error-input",helpText:t({type:null===(d=null===(s=null==se?void 0:se.inputErrors)||void 0===s?void 0:s.bankAccountType)||void 0===d?void 0:d.type,label:a.text.bankAccountTypeLabel})}),e("sl-menu-item",{value:"CHECKING"},a.text.checkingSelectItemLabel),e("sl-menu-item",{value:"SAVINGS"},a.text.savingsSelectItemLabel))},2:{input:e("sl-input",Object.assign({required:!0,label:a.text.bankAccountNumberLabel,name:"/bankAccountNumber",id:"bankAccountNumber",key:"bankAccountNumber",value:de.bankAccountNumber,type:"text"},(null===(c=null==se?void 0:se.inputErrors)||void 0===c?void 0:c.bankAccountNumber)&&{class:"error-input",helpText:t({type:null===(m=null===(u=null==se?void 0:se.inputErrors)||void 0===u?void 0:u.bankAccountNumber)||void 0===m?void 0:m.type,label:a.text.bankAccountNumberLabel})}))},3:{input:e("sl-input",Object.assign({required:!0,label:a.text.ibanLabel,name:"/bankAccountNumber",id:"iban",key:"iban",type:"text",value:de.bankAccountNumber},(null===(h=null==se?void 0:se.inputErrors)||void 0===h?void 0:h.bankAccountNumber)&&{class:"error-input",helpText:t({type:null===(y=null===(v=null==se?void 0:se.inputErrors)||void 0===v?void 0:v.bankAccountNumber)||void 0===y?void 0:y.type,label:a.text.ibanLabel})}))},4:{input:e("sl-input",Object.assign({required:!0,label:a.text.swiftCodeLabel,name:"/swiftCode",id:"swiftCode",key:"swiftCode",type:"text"},(null===(g=null==se?void 0:se.inputErrors)||void 0===g?void 0:g.swiftCode)&&{class:"error-input",helpText:t({type:null===(b=null===(f=null==se?void 0:se.inputErrors)||void 0===f?void 0:f.swiftCode)||void 0===b?void 0:b.type,label:a.text.swiftCodeLabel})}))},5:{input:e("sl-input",Object.assign({required:!0,label:p.formatMessage({id:"routingCodeText",defaultMessage:a.text.routingCodeLabel},{bankCountry:i}),name:"/routingCode",id:"routingCode",key:"routingCode",type:"text"},(null===(x=null==se?void 0:se.inputErrors)||void 0===x?void 0:x.routingCode)&&{class:"error-input",helpText:t({type:null===(S=null===(C=null==se?void 0:se.inputErrors)||void 0===C?void 0:C.routingCode)||void 0===S?void 0:S.type,label:p.formatMessage({id:"routingCodeErrorText",defaultMessage:a.text.routingCodeLabel},{bankCountry:i})})}))},6:{input:e("sl-input",Object.assign({required:!0,label:a.text.bankNameLabel,name:"/bankName",id:"bankName",key:"bankName",type:"text"},(null===(w=null==se?void 0:se.inputErrors)||void 0===w?void 0:w.bankName)&&{class:"error-input",helpText:t({type:null===(I=null===(T=null==se?void 0:se.inputErrors)||void 0===T?void 0:T.bankName)||void 0===I?void 0:I.type,label:a.text.bankNameLabel})}))},7:{input:[e("sl-select",Object.assign({required:!0,label:a.text.classificationLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(k=null==se?void 0:se.inputErrors)||void 0===k?void 0:k.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(_=null===(P=null==se?void 0:se.inputErrors)||void 0===P?void 0:P.beneficiaryClassification)||void 0===_?void 0:_.type,label:a.text.classificationLabel})}),e("sl-menu-item",{value:"BUSINESS"},a.text.businessSelectItemLabel),e("sl-menu-item",{value:"INDIVIDUAL"},a.text.individualSelectItemLabel),e("sl-menu-item",{value:"FOREIGN"},a.text.foreignSelectItemLabel)),e("sl-input",Object.assign({required:!0,label:p.formatMessage({id:"fxWireText",defaultMessage:a.text.taxPayerIdLabel},{bankCountry:i}),type:"text",name:"/taxPayerId",id:"taxPayerId",key:"taxPayerId"},(null===(A=null==se?void 0:se.inputErrors)||void 0===A?void 0:A.taxPayerId)&&{class:"error-input",helpText:t({type:null===(E=null===(N=null==se?void 0:se.inputErrors)||void 0===N?void 0:N.taxPayerId)||void 0===E?void 0:E.type,label:a.text.taxPayerIdLabel})}))]},8:{input:e("sl-select",Object.assign({required:!0,label:a.text.classificationCPFLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(M=null==se?void 0:se.inputErrors)||void 0===M?void 0:M.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(R=null===(D=null==se?void 0:se.inputErrors)||void 0===D?void 0:D.beneficiaryClassification)||void 0===R?void 0:R.type,label:a.text.classificationCPFLabel})}),e("sl-menu-item",{value:"CPF"},"CPF"),e("sl-menu-item",{value:"CNPJ"},"CNPJ"))},9:{input:e("sl-input",Object.assign({key:"patronymicName",required:!0,label:a.text.patronymicNameLabel,name:"/patronymicName",id:"patronymicName",type:"text"},(null===(B=null==se?void 0:se.inputErrors)||void 0===B?void 0:B.patronymicName)&&{class:"error-input",helpText:t({type:null===(F=null===(q=null==se?void 0:se.inputErrors)||void 0===q?void 0:q.patronymicName)||void 0===F?void 0:F.type,label:a.text.patronymicNameLabel})}))},10:{input:e("sl-input",Object.assign({key:"voCode",label:a.text.voCodeLabel,name:"/voCode",id:"voCode",type:"text"},(null===(L=null==se?void 0:se.inputErrors)||void 0===L?void 0:L.voCode)&&{class:"error-input",helpText:t({type:null===(O=null===(U=null==se?void 0:se.inputErrors)||void 0===U?void 0:U.voCode)||void 0===O?void 0:O.type,label:a.text.voCodeLabel})}))},11:{input:e("sl-input",Object.assign({required:!0,label:a.text.agencyCodeLabel,name:"/agencyCode",id:"agencyCode",key:"agencyCode",type:"text"},(null===(W=null==se?void 0:se.inputErrors)||void 0===W?void 0:W.agencyCode)&&{class:"error-input",helpText:t({type:null===(j=null===(V=null==se?void 0:se.inputErrors)||void 0===V?void 0:V.agencyCode)||void 0===j?void 0:j.type,label:a.text.agencyCodeLabel})}))},12:{input:[e("sl-input",Object.assign({required:!0,label:a.text.bankAddressLabel,name:"/bankAddress",id:"bankAddress",key:"bankAddress",type:"text"},(null===(z=null==se?void 0:se.inputErrors)||void 0===z?void 0:z.bankAddress)&&{class:"error-input",helpText:t({type:null===(H=null===(G=null==se?void 0:se.inputErrors)||void 0===G?void 0:G.bankAddress)||void 0===H?void 0:H.type,label:a.text.bankAddressLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankCityLabel,name:"/bankCity",id:"bankCity",key:"bankCity",type:"text"},(null===(K=null==se?void 0:se.inputErrors)||void 0===K?void 0:K.bankCity)&&{class:"error-input",helpText:t({type:null===(Y=null===($=null==se?void 0:se.inputErrors)||void 0===$?void 0:$.bankCity)||void 0===Y?void 0:Y.type,label:a.text.bankCityLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankStateLabel,name:"/bankState",id:"bankState",key:"bankState",type:"text"},(null===(Z=null==se?void 0:se.inputErrors)||void 0===Z?void 0:Z.bankState)&&{class:"error-input",helpText:t({type:null===(X=null===(J=null==se?void 0:se.inputErrors)||void 0===J?void 0:J.bankState)||void 0===X?void 0:X.type,label:a.text.bankStateLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankPostalCodeLabel,name:"/bankPostalCode",id:"bankPostalCode",key:"bankPostalCode",type:"text"},(null===(Q=null==se?void 0:se.inputErrors)||void 0===Q?void 0:Q.bankPostalCode)&&{class:"error-input",helpText:t({type:null===(ae=null===(ee=null==se?void 0:se.inputErrors)||void 0===ee?void 0:ee.bankPostalCode)||void 0===ae?void 0:ae.type,label:a.text.bankPostalCodeLabel})}))]},13:{input:e("sl-input",Object.assign({required:!0,label:a.text.branchCodeLabel,name:"/branchCode",id:"branchCode",key:"branchCode",type:"text"},(null===(te=null==se?void 0:se.inputErrors)||void 0===te?void 0:te.branchCode)&&{class:"error-input",helpText:t({type:null===(ne=null===(ie=null==se?void 0:se.inputErrors)||void 0===ie?void 0:ie.branchCode)||void 0===ne?void 0:ne.type,label:a.text.branchCodeLabel})}))},14:{input:e("sl-select",Object.assign({required:!0,label:a.text.classificationLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(oe=null==se?void 0:se.inputErrors)||void 0===oe?void 0:oe.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(le=null===(re=null==se?void 0:se.inputErrors)||void 0===re?void 0:re.beneficiaryClassification)||void 0===le?void 0:le.type,label:a.text.classificationLabel})}),e("sl-menu-item",{value:"BUSINESS"},a.text.businessSelectItemLabel),e("sl-menu-item",{value:"INDIVIDUAL"},a.text.individualSelectItemLabel),e("sl-menu-item",{value:"FOREIGN"},a.text.foreignSelectItemLabel))}}}({props:j,getValidationErrorMessage:K,bankCountry:j.states.bankCountry}),Y=function({bitset:e,formMap:a}){return[...e.toString(2).padStart(Object.keys(a).length,"0")].reverse().reduce(((e,t,i)=>Number(t)&&a[i]?[...e,a[i]]:e),[])}({bitset:j.states.bitset,formMap:$}),Z=M({Dialog:{position:"relative","&::part(panel)":{maxWidth:"420px"},"&::part(title)":{padding:"var(--sl-spacing-large) var(--sl-spacing-large) 0 var(--sl-spacing-large)"},"&::part(base)":{position:"absolute"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-large)"},"&::part(body)":{padding:"0 var(--sl-spacing-large) 0 var(--sl-spacing-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},SearchInput:{padding:"var(--sl-spacing-x-small)"}}),J=Z.toString(),X=p.formatMessage({id:"codeResentSuccessfully",defaultMessage:j.text.verifyEmailDescriptionText},{email:j.states.email});return e(t,null,e("style",{type:"text/css"},J),j.states.isPartner&&j.states.showVerification?e("sl-dialog",{class:Z.classes.Dialog,open:!0,"onSl-hide":j.callbacks.onVerificationHide,label:j.text.verifyEmailHeaderText},e("sqm-code-verification",{verifyCodeHeaderText:X,reverifyCodeHeaderText:X,onVerification:j.callbacks.onVerification})):null,e(be,{callbacks:j.callbacks,text:j.text,states:j.states,refs:j.refs,slots:{formInputsSlot:null==Y?void 0:Y.map((({input:e})=>e)),countryInputSlot:e("sl-select",Object.assign({label:j.text.bankLocationLabel,disabled:j.states.saveLoading,required:!0,name:"/bankCountry",id:"bankCountry",value:j.states.formState.bankCountry||"","onSl-select":e=>{var a,t;return j.callbacks.setBankCountry(null===(t=null===(a=e.detail)||void 0===a?void 0:a.item)||void 0===t?void 0:t.value)}},(null===(a=null==z?void 0:z.inputErrors)||void 0===a?void 0:a.bankCountry)&&{class:"error-input",helpText:K({type:null===(l=null===(i=null==z?void 0:z.inputErrors)||void 0===i?void 0:i.bankCountry)||void 0===l?void 0:l.type,label:j.text.bankLocationLabel})}),e("sl-input",{disabled:j.states.saveLoading,class:Z.classes.SearchInput,placeholder:this.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{j.callbacks.setCountrySearch(e.target.value)}}),null===(s=j.states.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(c=null===(d=j.states)||void 0===d?void 0:d.allCountries)||void 0===c?void 0:c.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),paymentMethodSlot:e("sl-input",{key:"paymentMethod",label:j.text.paymentMethod,placeholder:j.states.paymentMethodFeeLabel,disabled:!0}),paymentThresholdSelectSlot:e("sl-select",Object.assign({required:!0,disabled:j.states.saveLoading,label:j.text.paymentThresholdSelectLabel,name:"/paymentThreshold",id:"paymentThreshold",value:(null===(m=null===(u=j.states)||void 0===u?void 0:u.formState)||void 0===m?void 0:m.paymentThreshold)||""},(null===(w=null==z?void 0:z.inputErrors)||void 0===w?void 0:w.paymentThreshold)&&{class:"error-input",helpText:K({type:null===(I=null===(T=null==z?void 0:z.inputErrors)||void 0===T?void 0:T.paymentThreshold)||void 0===I?void 0:I.type,label:j.text.paymentThresholdSelectLabel})}),j.states.thresholds.map((a=>e("sl-menu-item",{value:a},`${j.states.currency}${a}`)))),paymentFixedDaySelectSlot:e("sl-select",Object.assign({required:!0,disabled:j.states.saveLoading,label:j.text.paymentDaySelectLabel,value:(null===(P=null===(k=j.states)||void 0===k?void 0:k.formState)||void 0===P?void 0:P.paymentDay)||"",name:"/paymentDay",id:"paymentDay"},(null===(N=null==z?void 0:z.inputErrors)||void 0===N?void 0:N.paymentDay)&&{class:"error-input",helpText:K({type:null===(D=null===(E=null==z?void 0:z.inputErrors)||void 0===E?void 0:E.paymentDay)||void 0===D?void 0:D.type,label:j.text.paymentDaySelectLabel})}),e("sl-menu-item",{value:"1"},j.text.paymentDayFirstOfMonthLabelText),e("sl-menu-item",{value:"15"},j.text.paymentDayFifteenthOfMonthLabelText)),paypalInputSlot:e("sl-input",Object.assign({required:!0,disabled:j.states.saveLoading,value:(null===(B=null===(R=j.states)||void 0===R?void 0:R.formState)||void 0===B?void 0:B.paypalEmailAddress)||"",label:j.text.payPalInputLabel,key:"paypalEmailAddress",name:"/paypalEmailAddress",id:"paypalEmailAddress",type:"text"},(null===(L=null===(F=null===(q=j.states.formState)||void 0===q?void 0:q.errors)||void 0===F?void 0:F.inputErrors)||void 0===L?void 0:L.paypalEmailAddress)&&{class:"error-input",helpText:K({type:null===(V=null===(W=null===(O=null===(U=j.states.formState)||void 0===U?void 0:U.errors)||void 0===O?void 0:O.inputErrors)||void 0===W?void 0:W.paypalEmailAddress)||void 0===V?void 0:V.type,label:j.text.payPalInputLabel})}))}}))}},Ie={Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"550px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:{...D,maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},ErrorText:{color:"var(--sl-color-danger-500)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}},ke=M(Ie),Pe=ke.toString();function _e(a){const{states:t,refs:i,callbacks:n,text:o}=a,r=p.formatMessage({id:"resendCodeText",defaultMessage:o.resendCodeText},{resendCodeLink:e("a",{href:"",style:{textDecoration:"none"},onClick:e=>{e.preventDefault(),n.resendEmail()}},o.resendCodeLabel)}),l=p.formatMessage({id:"codeResentSuccessfully",defaultMessage:o.codeResentSuccessfullyText},{email:t.email}),s=t.verifyFailed?ke.classes.CodeInputError:ke.classes.CodeInput;return e("div",{part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n",Pe),e("div",{class:ke.classes.Wrapper},e("div",{class:ke.classes.HeaderContainer},e(O,{type:"p"},p.formatMessage({id:"emailHeaderText",defaultMessage:t.verifyFailed?o.reverifyCodeHeaderText:o.verifyCodeHeaderText},{email:t.email}))),t.emailResent&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("b",null,l)),e("div",{class:ke.classes.InputsContainer},e("div",{ref:i.codeWrapperRef,class:ke.classes.CodeInputContainer},e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"})),t.verifyFailed&&e("p",{class:ke.classes.ErrorText},o.invalidCodeText),e("sl-button",{class:ke.classes.ContinueButton,onClick:n.submitCode,disabled:t.loading||t.initialiseLoading,loading:t.loading||t.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},o.verifyText)),e("div",{class:ke.classes.FooterContainer},e(O,{type:"p"},r))))}m.gql`
|
|
131
|
+
`;function we(e){const a=Number.parseInt(e);if(!isNaN(a))return a.toString()}const Te=class{constructor(e){a(this,e),this.ignored=!0,this.formStep="Step {step} of {count}",this.taxAndPayouts="Payouts",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.directlyToBankAccount="Directly to my bank account",this.toPayPalAccount="PayPal (2% processing fee capped to {feeCap})",this.paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold",this.paymentScheduleFixedDay="Pay me on a fixed day of the month",this.paymentDaySelectLabel="Payment Day",this.paymentThresholdSelectLabel="Payment Threshold",this.paymentDayFirstOfMonthLabelText="1st of the month",this.paymentDayFifteenthOfMonthLabelText="15th of the month",this.paymentMethod="Payment method",this.paymentSchedule="Payment schedule",this.paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.",this.payPalInputLabel="PayPal email",this.bankLocationLabel="Bank country location",this.beneficiaryAccountNameLabel="Account holder name",this.beneficiaryAccountNameDescription="The beneficiary name of your bank account. Ensure this matches the name on your tax form.",this.bankAccountTypeLabel="Bank account type",this.checkingSelectItemLabel="Checking",this.savingsSelectItemLabel="Savings",this.bankAccountNumberLabel="Bank account number",this.ibanLabel="IBAN",this.swiftCodeLabel="SWIFT code",this.routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }",this.bankNameLabel="Bank Name",this.classificationEntityLabel="Classification Entity",this.businessSelectItemLabel="Business",this.individualSelectItemLabel="Individual",this.foreignSelectItemLabel="Foreign",this.classificationCPFLabel="Classification CPF",this.patronymicNameLabel="Patronymic name",this.voCodeLabel="VO code",this.agencyCodeLabel="Agency code",this.branchCodeLabel="Branch code",this.classificationLabel="Classification",this.taxPayerIdLabel="{country, select, AR {CUIT/CUIL} KR {Classification ID} other { Beneficiary INN } }",this.bankAddressLabel="Bank address",this.bankCityLabel="Bank city",this.bankStateLabel="Bank province/state",this.bankPostalCodeLabel="Bank postal code",this.eftWithdrawalLabel="EFT withdrawal (free)",this.fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)",this.searchForCountryText="Search for country..",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.verifyEmailHeaderText="Verify your email",this.verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.fieldRequiredError="{fieldName} is required",this.fieldInvalidError="{fieldName} is invalid",this.supportLink="support team",this.continueButton="Save",this.backButton="Back",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact Support.",this.modalTitle="Important Note",this.modalDescription="Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.",this.modalButtonText="I understand, update my information",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,loadingErrorAlertDescription:e.loadingErrorAlertDescription,loadingErrorAlertHeader:e.loadingErrorAlertHeader}}}render(){var a,i,l,s,d,c,u,m,w,T,I,k,P,N,E,D,R,B,q,F,L,U,O,W,V;const j=C()?function(e){var a,t,i,n,l,s,d,c,u,m,h,v,y,g;const f=null===(i=null===(t=null===(a=e.demoData)||void 0===a?void 0:a.states)||void 0===t?void 0:t.formState)||void 0===i?void 0:i.paymentMethodChecked,b=null===(s=null===(l=null===(n=e.demoData)||void 0===n?void 0:n.states)||void 0===l?void 0:l.formState)||void 0===s?void 0:s.paymentScheduleChecked,x=null===(c=null===(d=e.demoData)||void 0===d?void 0:d.states)||void 0===c?void 0:c.currency,C=null===(h=null===(m=null===(u=e.demoData)||void 0===u?void 0:u.states)||void 0===m?void 0:m.formState)||void 0===h?void 0:h.bankCountry,w=S("sq:tax-and-cash"),[T,I]=o(void 0),[k,P]=o(void 0),[_,N]=o(x),[E,M]=o(C),D=null===(v=ye[_])||void 0===v?void 0:v.find((e=>e.countryCode===E)),R=(null==D?void 0:D.withdrawalSettingId)||(null===(g=null===(y=e.demoData)||void 0===y?void 0:y.states)||void 0===g?void 0:g.bitset)||0;r((()=>{f!==T&&I(f),b!==k&&P(b),x!==_&&N(x),C!==E&&M(C)}),[f,x,C]);const B=xe[_]||"",q={ACH:e.eftWithdrawalLabel,WIRE:p.formatMessage({id:"fxWireText",defaultMessage:e.fxWireProcessingFeeLabel},{currency:_,defaultFxFee:(null==D?void 0:D.defaultFxFee)||"0"})};return A({states:{step:"4",isPartner:!1,disabled:!1,loading:!1,saveLoading:!1,hideSteps:!1,hideBackButton:!1,feeCap:B,thresholds:[],paymentMethodFeeLabel:q[null==D?void 0:D.defaultFinancePaymentMethodId],formState:{paymentMethodChecked:T,paymentScheduleChecked:k,errors:{general:!1,beneficiaryAccountName:!1,bankAccountType:!1,bankAccountNumber:!1,iban:!1,swiftCode:!1,routingCode:!1,bankName:!1,beneficiaryClassification:!1,patronymicName:!1,voCode:!1,agencyCode:!1,bankAddress:!1,bankCity:!1,bankState:!1,bankPostalCode:!1,branchCode:!1,paymentThreshold:!1,paymentDay:!1}},bitset:R,bankCountry:E,currency:_,setCurrency:N,hasPayPal:!0,showModal:!1},callbacks:{onVerificationHide:()=>{},onSubmit:async()=>{w("/dashboard")},setBankCountry:M,setPaymentMethodChecked:I,setPaymentScheduleChecked:P,setCountrySearch:()=>{},onBack:async()=>w("/dashboard"),onVerification:()=>{},onModalOpen:()=>{},onModalClose:()=>{}},text:e.getTextProps(),refs:{formRef:{current:null}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l,s,d,c,u,m;const C=h(),S=v(),w=y(),[T,I]=g("sq:tax-and-cash"),k=f("sq:tax-form-context"),P=f("sq:countries:sorted"),A=n(null),{data:N,errors:E}=b("sq:finance-network-settings"),{data:M,refetch:D,errors:R}=b("sq:user-info-query"),[B]=x(Ce),[q]=x(Se),[F,L]=o(!1),[U,O]=o(null),[W,V]=o({}),[j,z]=o(null),[G,H]=o(!1),[K,$]=o({}),[Y,Z]=o(void 0),[J,X]=o(void 0),[Q,ee]=o(""),[ae,te]=o(P||[]),[ne,oe]=o(!1),re=(null===(i=null===(t=null===(a=null==M?void 0:M.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher)||void 0===i?void 0:i.currency)||"",se=!!(null===(d=null===(s=null===(l=null==M?void 0:M.user)||void 0===l?void 0:l.impactConnection)||void 0===s?void 0:s.publisher)||void 0===d?void 0:d.withdrawalSettings),de=xe[re]||"",ce=null===(c=null==N?void 0:N.impactFinanceNetworkSettings)||void 0===c?void 0:c.data,ue={3:e.eftWithdrawalLabel,5:p.formatMessage({id:"fxWireText",defaultMessage:e.fxWireProcessingFeeLabel},{currency:re,defaultFxFee:(null==j?void 0:j.defaultFxFee)||0})}[null==j?void 0:j.defaultFinancePaymentMethodId],pe=!!(null==ce?void 0:ce.find((e=>7===e.defaultFinancePaymentMethodId))),me=pe?Y:"toBankAccount";r((()=>{var e,a,t,i,n,o,r,l,s;if(!M)return;if(!ce)return;const d=null===(t=null===(a=null===(e=null==M?void 0:M.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.countryCode,c=null===(o=null===(n=null===(i=null==M?void 0:M.user)||void 0===i?void 0:i.impactConnection)||void 0===n?void 0:n.publisher)||void 0===o?void 0:o.withdrawalSettings;let u={bankCountry:(null==c?void 0:c.bankCountry)||d,paymentMethod:"BANK_TRANSFER"};c&&(null===(s=null===(l=null===(r=M.user)||void 0===r?void 0:r.impactConnection)||void 0===l?void 0:l.publisher)||void 0===s?void 0:s.brandedSignup)&&(u={...u,paymentMethod:c.paymentMethod,paypalEmailAddress:c.paypalEmailAddress,paymentSchedulingType:c.paymentSchedulingType,paymentThreshold:we(c.paymentThreshold),paymentDay:c.paymentDay});const p=null==ce?void 0:ce.find((e=>{if("PAYPAL"===u.paymentMethod){if(7===e.defaultFinancePaymentMethodId)return!0}else if(e.countryCode===u.bankCountry)return!0;return!1}));"PAYPAL"!==u.paymentMethod&&he(null==p?void 0:p.countryCode),ye("PAYPAL"===u.paymentMethod?"toPayPalAccount":"toBankAccount"),z(p),X(u.paymentSchedulingType),V(u)}),[ce,M,z,V]),r((()=>{(null==P?void 0:P.length)&&(""===Q.trim()?te(P||[]):te(P.filter((e=>e.displayName.toLowerCase().includes(Q.toLowerCase())))||[]))}),[Q,P]);const he=e=>{const a=null==ce?void 0:ce.find((a=>a.countryCode===e));V((a=>({...a,bankCountry:e}))),z(a)},ve=async e=>{C.dispatchEvent(new CustomEvent(ie,{detail:{token:e},bubbles:!1}))};function ye(e){if(Z(e),"toPayPalAccount"===e){const e=null==ce?void 0:ce.find((e=>7===e.defaultFinancePaymentMethodId));z(e)}else if("toBankAccount"===e){const e=null==ce?void 0:ce.find((e=>e.countryCode===W.bankCountry));z(e)}}return{text:e.getTextProps(),callbacks:{onSubmit:async e=>{let a,t={},i={};e.target.getFormControls().forEach((e=>{if(!e.name||!e.id)return;const a=e.name,n=e.value;_.set(t,a,n),e.required&&!n&&_.set(i,a,{type:"required"})})),$({inputErrors:i}),Object.keys(i).length||(se&&(oe(!1),L(!0),a=await new Promise((e=>{const a=t=>{t.stopPropagation(),C.removeEventListener(ie,a),e(t.detail.token)};C.addEventListener(ie,a)})),L(!1)),await(async(e,a)=>{var t,i,n,o,r,l,s,d,c,u;H(!0);try{if(!j)throw new Error("No currentPaymentOption");const p={user:{id:w.id,accountId:w.accountId},...e,paymentMethod:(u=j,3===u.defaultFinancePaymentMethodId||5===u.defaultFinancePaymentMethodId?"BANK_TRANSFER":7===u.defaultFinancePaymentMethodId?"PAYPAL":""),paymentSchedulingType:J};let m=null,h=null,v=null;if(se){if(!a)return;m=await q({updateImpactPublisherWithdrawalSettingsInput:{...p,accessKey:a}}),h=null===(i=null===(t=m)||void 0===t?void 0:t.updateImpactPublisherWithdrawalSettings)||void 0===i?void 0:i.success,v=null===(o=null===(n=m)||void 0===n?void 0:n.updateImpactPublisherWithdrawalSettings)||void 0===o?void 0:o.validationErrors}else m=await B({setImpactPublisherWithdrawalSettingsInput:{...p}}),h=null===(l=null===(r=m)||void 0===r?void 0:r.setImpactPublisherWithdrawalSettings)||void 0===l?void 0:l.success,v=null===(d=null===(s=m)||void 0===s?void 0:s.setImpactPublisherWithdrawalSettings)||void 0===d?void 0:d.validationErrors;if(!m||(null===(c=m)||void 0===c?void 0:c.message))throw new Error;if(!h){console.error("Validation failed: ",v);const e=null==v?void 0:v.reduce(((e,a)=>({...e,[a.field]:{type:"invalid"}})),{});return void $({inputErrors:{...e},general:!0})}window.dispatchEvent(new Event(le)),await D(),I("/dashboard"),window.location.hash=""}catch(e){console.error(e),$({general:!0})}finally{H(!1)}})(t,a)),oe(!1)},setBankCountry:he,setPaymentMethodChecked:ye,setPaymentScheduleChecked:X,onBack:()=>I("/dashboard"),setCountrySearch:ee,onVerification:ve,onVerificationHide:()=>ve(null),onModalClose:()=>oe(!1),onModalOpen:()=>oe(!0)},states:{showVerification:F,step:null==T?void 0:T.replace("/",""),hideSteps:!!k.hideSteps,saveDisabled:!me||!J,locale:S,isPartner:se,feeCap:de,paymentMethodFeeLabel:ue,disabled:G,hideBackButton:!k.overrideBackStep,loading:!ce,saveLoading:G,hideBanking:"toBankAccount"!==me||!me,hidePayPal:"toPayPalAccount"!==me||!me,loadingError:!!(null==R?void 0:R.message)||!!(null==E?void 0:E.message),formState:{...W,paymentMethodChecked:me,paymentScheduleChecked:J,errors:K},currentPaymentOption:j,bitset:(null==j?void 0:j.withdrawalSettingId)||0,currency:re,thresholds:(null===(u=null==j?void 0:j.thresholdOptions)||void 0===u?void 0:u.split(","))||[],countries:ae,allCountries:P,hasPayPal:pe,bankCountry:W.bankCountry,countrySearch:Q,email:null===(m=null==M?void 0:M.user)||void 0===m?void 0:m.email,showModal:ne},refs:{formRef:A}}}(this),{errors:z}=j.states.formState,G=this.fieldRequiredError,H=this.fieldInvalidError;function K({type:e,label:a}){return"required"===e?p.formatMessage({id:`requiredText-${a}`,defaultMessage:G},{fieldName:a}):"invalid"===e?p.formatMessage({id:`invalidText-${a}`,defaultMessage:H},{fieldName:a}):""}const $=function({props:a,getValidationErrorMessage:t,bankCountry:i}){var n,o,r,l,s,d,c,u,m,h,v,y,g,f,b,x,C,S,w,T,I,k,P,_,A,N,E,M,D,R,B,q,F,L,U,O,W,V,j,z,G,H,K,$,Y,Z,J,X,Q,ee,ae,te,ie,ne,oe,re,le;const{errors:se,...de}=a.states.formState;return{0:{input:e("sl-input",Object.assign({required:!0,label:a.text.beneficiaryAccountNameLabel,name:"/beneficiaryAccountName",id:"beneficiaryAccountName",key:"beneficiaryAccountName",type:"text","help-text":a.text.beneficiaryAccountNameDescription},(null===(n=null==se?void 0:se.inputErrors)||void 0===n?void 0:n.beneficiaryAccountName)&&{class:"error-input",helpText:t({type:null===(r=null===(o=null==se?void 0:se.inputErrors)||void 0===o?void 0:o.beneficiaryAccountName)||void 0===r?void 0:r.type,label:a.text.beneficiaryAccountNameLabel})}))},1:{input:e("sl-select",Object.assign({required:!0,label:a.text.bankAccountTypeLabel,name:"/bankAccountType",id:"bankAccountType",key:"bankAccountType"},(null===(l=null==se?void 0:se.inputErrors)||void 0===l?void 0:l.bankAccountType)&&{class:"error-input",helpText:t({type:null===(d=null===(s=null==se?void 0:se.inputErrors)||void 0===s?void 0:s.bankAccountType)||void 0===d?void 0:d.type,label:a.text.bankAccountTypeLabel})}),e("sl-menu-item",{value:"CHECKING"},a.text.checkingSelectItemLabel),e("sl-menu-item",{value:"SAVINGS"},a.text.savingsSelectItemLabel))},2:{input:e("sl-input",Object.assign({required:!0,label:a.text.bankAccountNumberLabel,name:"/bankAccountNumber",id:"bankAccountNumber",key:"bankAccountNumber",value:de.bankAccountNumber,type:"text"},(null===(c=null==se?void 0:se.inputErrors)||void 0===c?void 0:c.bankAccountNumber)&&{class:"error-input",helpText:t({type:null===(m=null===(u=null==se?void 0:se.inputErrors)||void 0===u?void 0:u.bankAccountNumber)||void 0===m?void 0:m.type,label:a.text.bankAccountNumberLabel})}))},3:{input:e("sl-input",Object.assign({required:!0,label:a.text.ibanLabel,name:"/bankAccountNumber",id:"iban",key:"iban",type:"text",value:de.bankAccountNumber},(null===(h=null==se?void 0:se.inputErrors)||void 0===h?void 0:h.bankAccountNumber)&&{class:"error-input",helpText:t({type:null===(y=null===(v=null==se?void 0:se.inputErrors)||void 0===v?void 0:v.bankAccountNumber)||void 0===y?void 0:y.type,label:a.text.ibanLabel})}))},4:{input:e("sl-input",Object.assign({required:!0,label:a.text.swiftCodeLabel,name:"/swiftCode",id:"swiftCode",key:"swiftCode",type:"text"},(null===(g=null==se?void 0:se.inputErrors)||void 0===g?void 0:g.swiftCode)&&{class:"error-input",helpText:t({type:null===(b=null===(f=null==se?void 0:se.inputErrors)||void 0===f?void 0:f.swiftCode)||void 0===b?void 0:b.type,label:a.text.swiftCodeLabel})}))},5:{input:e("sl-input",Object.assign({required:!0,label:p.formatMessage({id:"routingCodeText",defaultMessage:a.text.routingCodeLabel},{bankCountry:i}),name:"/routingCode",id:"routingCode",key:"routingCode",type:"text"},(null===(x=null==se?void 0:se.inputErrors)||void 0===x?void 0:x.routingCode)&&{class:"error-input",helpText:t({type:null===(S=null===(C=null==se?void 0:se.inputErrors)||void 0===C?void 0:C.routingCode)||void 0===S?void 0:S.type,label:p.formatMessage({id:"routingCodeErrorText",defaultMessage:a.text.routingCodeLabel},{bankCountry:i})})}))},6:{input:e("sl-input",Object.assign({required:!0,label:a.text.bankNameLabel,name:"/bankName",id:"bankName",key:"bankName",type:"text"},(null===(w=null==se?void 0:se.inputErrors)||void 0===w?void 0:w.bankName)&&{class:"error-input",helpText:t({type:null===(I=null===(T=null==se?void 0:se.inputErrors)||void 0===T?void 0:T.bankName)||void 0===I?void 0:I.type,label:a.text.bankNameLabel})}))},7:{input:[e("sl-select",Object.assign({required:!0,label:a.text.classificationLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(k=null==se?void 0:se.inputErrors)||void 0===k?void 0:k.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(_=null===(P=null==se?void 0:se.inputErrors)||void 0===P?void 0:P.beneficiaryClassification)||void 0===_?void 0:_.type,label:a.text.classificationLabel})}),e("sl-menu-item",{value:"BUSINESS"},a.text.businessSelectItemLabel),e("sl-menu-item",{value:"INDIVIDUAL"},a.text.individualSelectItemLabel),e("sl-menu-item",{value:"FOREIGN"},a.text.foreignSelectItemLabel)),e("sl-input",Object.assign({required:!0,label:p.formatMessage({id:"fxWireText",defaultMessage:a.text.taxPayerIdLabel},{bankCountry:i}),type:"text",name:"/taxPayerId",id:"taxPayerId",key:"taxPayerId"},(null===(A=null==se?void 0:se.inputErrors)||void 0===A?void 0:A.taxPayerId)&&{class:"error-input",helpText:t({type:null===(E=null===(N=null==se?void 0:se.inputErrors)||void 0===N?void 0:N.taxPayerId)||void 0===E?void 0:E.type,label:a.text.taxPayerIdLabel})}))]},8:{input:e("sl-select",Object.assign({required:!0,label:a.text.classificationCPFLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(M=null==se?void 0:se.inputErrors)||void 0===M?void 0:M.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(R=null===(D=null==se?void 0:se.inputErrors)||void 0===D?void 0:D.beneficiaryClassification)||void 0===R?void 0:R.type,label:a.text.classificationCPFLabel})}),e("sl-menu-item",{value:"CPF"},"CPF"),e("sl-menu-item",{value:"CNPJ"},"CNPJ"))},9:{input:e("sl-input",Object.assign({key:"patronymicName",required:!0,label:a.text.patronymicNameLabel,name:"/patronymicName",id:"patronymicName",type:"text"},(null===(B=null==se?void 0:se.inputErrors)||void 0===B?void 0:B.patronymicName)&&{class:"error-input",helpText:t({type:null===(F=null===(q=null==se?void 0:se.inputErrors)||void 0===q?void 0:q.patronymicName)||void 0===F?void 0:F.type,label:a.text.patronymicNameLabel})}))},10:{input:e("sl-input",Object.assign({key:"voCode",label:a.text.voCodeLabel,name:"/voCode",id:"voCode",type:"text"},(null===(L=null==se?void 0:se.inputErrors)||void 0===L?void 0:L.voCode)&&{class:"error-input",helpText:t({type:null===(O=null===(U=null==se?void 0:se.inputErrors)||void 0===U?void 0:U.voCode)||void 0===O?void 0:O.type,label:a.text.voCodeLabel})}))},11:{input:e("sl-input",Object.assign({required:!0,label:a.text.agencyCodeLabel,name:"/agencyCode",id:"agencyCode",key:"agencyCode",type:"text"},(null===(W=null==se?void 0:se.inputErrors)||void 0===W?void 0:W.agencyCode)&&{class:"error-input",helpText:t({type:null===(j=null===(V=null==se?void 0:se.inputErrors)||void 0===V?void 0:V.agencyCode)||void 0===j?void 0:j.type,label:a.text.agencyCodeLabel})}))},12:{input:[e("sl-input",Object.assign({required:!0,label:a.text.bankAddressLabel,name:"/bankAddress",id:"bankAddress",key:"bankAddress",type:"text"},(null===(z=null==se?void 0:se.inputErrors)||void 0===z?void 0:z.bankAddress)&&{class:"error-input",helpText:t({type:null===(H=null===(G=null==se?void 0:se.inputErrors)||void 0===G?void 0:G.bankAddress)||void 0===H?void 0:H.type,label:a.text.bankAddressLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankCityLabel,name:"/bankCity",id:"bankCity",key:"bankCity",type:"text"},(null===(K=null==se?void 0:se.inputErrors)||void 0===K?void 0:K.bankCity)&&{class:"error-input",helpText:t({type:null===(Y=null===($=null==se?void 0:se.inputErrors)||void 0===$?void 0:$.bankCity)||void 0===Y?void 0:Y.type,label:a.text.bankCityLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankStateLabel,name:"/bankState",id:"bankState",key:"bankState",type:"text"},(null===(Z=null==se?void 0:se.inputErrors)||void 0===Z?void 0:Z.bankState)&&{class:"error-input",helpText:t({type:null===(X=null===(J=null==se?void 0:se.inputErrors)||void 0===J?void 0:J.bankState)||void 0===X?void 0:X.type,label:a.text.bankStateLabel})})),e("sl-input",Object.assign({required:!0,label:a.text.bankPostalCodeLabel,name:"/bankPostalCode",id:"bankPostalCode",key:"bankPostalCode",type:"text"},(null===(Q=null==se?void 0:se.inputErrors)||void 0===Q?void 0:Q.bankPostalCode)&&{class:"error-input",helpText:t({type:null===(ae=null===(ee=null==se?void 0:se.inputErrors)||void 0===ee?void 0:ee.bankPostalCode)||void 0===ae?void 0:ae.type,label:a.text.bankPostalCodeLabel})}))]},13:{input:e("sl-input",Object.assign({required:!0,label:a.text.branchCodeLabel,name:"/branchCode",id:"branchCode",key:"branchCode",type:"text"},(null===(te=null==se?void 0:se.inputErrors)||void 0===te?void 0:te.branchCode)&&{class:"error-input",helpText:t({type:null===(ne=null===(ie=null==se?void 0:se.inputErrors)||void 0===ie?void 0:ie.branchCode)||void 0===ne?void 0:ne.type,label:a.text.branchCodeLabel})}))},14:{input:e("sl-select",Object.assign({required:!0,label:a.text.classificationLabel,name:"/beneficiaryClassification",id:"beneficiaryClassification",key:"beneficiaryClassification"},(null===(oe=null==se?void 0:se.inputErrors)||void 0===oe?void 0:oe.beneficiaryClassification)&&{class:"error-input",helpText:t({type:null===(le=null===(re=null==se?void 0:se.inputErrors)||void 0===re?void 0:re.beneficiaryClassification)||void 0===le?void 0:le.type,label:a.text.classificationLabel})}),e("sl-menu-item",{value:"BUSINESS"},a.text.businessSelectItemLabel),e("sl-menu-item",{value:"INDIVIDUAL"},a.text.individualSelectItemLabel),e("sl-menu-item",{value:"FOREIGN"},a.text.foreignSelectItemLabel))}}}({props:j,getValidationErrorMessage:K,bankCountry:j.states.bankCountry}),Y=function({bitset:e,formMap:a}){return[...e.toString(2).padStart(Object.keys(a).length,"0")].reverse().reduce(((e,t,i)=>Number(t)&&a[i]?[...e,a[i]]:e),[])}({bitset:j.states.bitset,formMap:$}),Z=M({Dialog:{position:"relative","&::part(panel)":{maxWidth:"420px"},"&::part(title)":{padding:"var(--sl-spacing-large) var(--sl-spacing-large) 0 var(--sl-spacing-large)"},"&::part(base)":{position:"absolute"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-large)"},"&::part(body)":{padding:"0 var(--sl-spacing-large) 0 var(--sl-spacing-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},SearchInput:{padding:"var(--sl-spacing-x-small)"}}),J=Z.toString(),X=p.formatMessage({id:"codeResentSuccessfully",defaultMessage:j.text.verifyEmailDescriptionText},{email:j.states.email});return e(t,null,e("style",{type:"text/css"},J),j.states.isPartner&&j.states.showVerification?e("sl-dialog",{class:Z.classes.Dialog,open:!0,"onSl-hide":j.callbacks.onVerificationHide,label:j.text.verifyEmailHeaderText},e("sqm-code-verification",{verifyCodeHeaderText:X,reverifyCodeHeaderText:X,onVerification:j.callbacks.onVerification})):null,e(be,{callbacks:j.callbacks,text:j.text,states:j.states,refs:j.refs,slots:{formInputsSlot:null==Y?void 0:Y.map((({input:e})=>e)),countryInputSlot:e("sl-select",Object.assign({label:j.text.bankLocationLabel,disabled:j.states.saveLoading,required:!0,name:"/bankCountry",id:"bankCountry",value:j.states.formState.bankCountry||"","onSl-select":e=>{var a,t;return j.callbacks.setBankCountry(null===(t=null===(a=e.detail)||void 0===a?void 0:a.item)||void 0===t?void 0:t.value)}},(null===(a=null==z?void 0:z.inputErrors)||void 0===a?void 0:a.bankCountry)&&{class:"error-input",helpText:K({type:null===(l=null===(i=null==z?void 0:z.inputErrors)||void 0===i?void 0:i.bankCountry)||void 0===l?void 0:l.type,label:j.text.bankLocationLabel})}),e("sl-input",{disabled:j.states.saveLoading,class:Z.classes.SearchInput,placeholder:this.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{j.callbacks.setCountrySearch(e.target.value)}}),null===(s=j.states.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(c=null===(d=j.states)||void 0===d?void 0:d.allCountries)||void 0===c?void 0:c.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),paymentMethodSlot:e("sl-input",{key:"paymentMethod",label:j.text.paymentMethod,placeholder:j.states.paymentMethodFeeLabel,disabled:!0}),paymentThresholdSelectSlot:e("sl-select",Object.assign({required:!0,disabled:j.states.saveLoading,label:j.text.paymentThresholdSelectLabel,name:"/paymentThreshold",id:"paymentThreshold",value:(null===(m=null===(u=j.states)||void 0===u?void 0:u.formState)||void 0===m?void 0:m.paymentThreshold)||""},(null===(w=null==z?void 0:z.inputErrors)||void 0===w?void 0:w.paymentThreshold)&&{class:"error-input",helpText:K({type:null===(I=null===(T=null==z?void 0:z.inputErrors)||void 0===T?void 0:T.paymentThreshold)||void 0===I?void 0:I.type,label:j.text.paymentThresholdSelectLabel})}),j.states.thresholds.map((a=>e("sl-menu-item",{value:a},`${j.states.currency}${a}`)))),paymentFixedDaySelectSlot:e("sl-select",Object.assign({required:!0,disabled:j.states.saveLoading,label:j.text.paymentDaySelectLabel,value:(null===(P=null===(k=j.states)||void 0===k?void 0:k.formState)||void 0===P?void 0:P.paymentDay)||"",name:"/paymentDay",id:"paymentDay"},(null===(N=null==z?void 0:z.inputErrors)||void 0===N?void 0:N.paymentDay)&&{class:"error-input",helpText:K({type:null===(D=null===(E=null==z?void 0:z.inputErrors)||void 0===E?void 0:E.paymentDay)||void 0===D?void 0:D.type,label:j.text.paymentDaySelectLabel})}),e("sl-menu-item",{value:"1"},j.text.paymentDayFirstOfMonthLabelText),e("sl-menu-item",{value:"15"},j.text.paymentDayFifteenthOfMonthLabelText)),paypalInputSlot:e("sl-input",Object.assign({required:!0,disabled:j.states.saveLoading,value:(null===(B=null===(R=j.states)||void 0===R?void 0:R.formState)||void 0===B?void 0:B.paypalEmailAddress)||"",label:j.text.payPalInputLabel,key:"paypalEmailAddress",name:"/paypalEmailAddress",id:"paypalEmailAddress",type:"text"},(null===(L=null===(F=null===(q=j.states.formState)||void 0===q?void 0:q.errors)||void 0===F?void 0:F.inputErrors)||void 0===L?void 0:L.paypalEmailAddress)&&{class:"error-input",helpText:K({type:null===(V=null===(W=null===(O=null===(U=j.states.formState)||void 0===U?void 0:U.errors)||void 0===O?void 0:O.inputErrors)||void 0===W?void 0:W.paypalEmailAddress)||void 0===V?void 0:V.type,label:j.text.payPalInputLabel})}))}}))}},Ie={Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"550px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:{...D,maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},ErrorText:{color:"var(--sl-color-danger-500)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}},ke=M(Ie),Pe=ke.toString();function _e(a){const{states:t,refs:i,callbacks:n,text:o}=a,r=p.formatMessage({id:"resendCodeText",defaultMessage:o.resendCodeText},{resendCodeLink:e("a",{href:"",style:{textDecoration:"none"},onClick:e=>{e.preventDefault(),n.resendEmail()}},o.resendCodeLabel)}),l=p.formatMessage({id:"codeResentSuccessfully",defaultMessage:o.codeResentSuccessfullyText},{email:t.email}),s=t.verifyFailed?ke.classes.CodeInputError:ke.classes.CodeInput;return e("div",{part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n",Pe),e("div",{class:ke.classes.Wrapper},e("div",{class:ke.classes.HeaderContainer},e(O,{type:"p"},p.formatMessage({id:"emailHeaderText",defaultMessage:t.verifyFailed?o.reverifyCodeHeaderText:o.verifyCodeHeaderText},{email:t.email}))),t.emailResent&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("b",null,l)),e("div",{class:ke.classes.InputsContainer},e("div",{ref:i.codeWrapperRef,class:ke.classes.CodeInputContainer},e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"}),e("sl-input",{class:s,name:"code"})),t.verifyFailed&&e("p",{class:ke.classes.ErrorText},o.invalidCodeText),e("sl-button",{class:ke.classes.ContinueButton,onClick:n.submitCode,disabled:t.loading||t.initialiseLoading,loading:t.loading||t.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},o.verifyText)),e("div",{class:ke.classes.FooterContainer},e(O,{type:"p"},r))))}m.gql`
|
|
132
132
|
mutation submitImpactPublisherEmail2FACode(
|
|
133
133
|
$user: UserIdInput!
|
|
134
134
|
$code: String!
|
|
@@ -154,7 +154,7 @@ import{h as e,r as a,c as t,g as i}from"./p-f708da7b.js";import{m as n,k as o,f
|
|
|
154
154
|
success
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
`,Me=["exception","decline","cancel","fax_pending"],De=["ttl_expired","session_timeout"];const Re=M({DocusignStatusContainer:{width:"100%",minHeight:"600px",height:"900px",display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",gap:"10px",margin:"auto",textAlign:"center",border:"1px solid var(--sl-color-gray-200)",justifyContent:"center"},MessageContainer:{maxWidth:"400px"},IFrameContainer:{"@media screen and (max-width: 440px)":{position:"absolute",width:"100vw",left:"-30px",zIndex:"9999"}}}),Be=Re.toString(),qe=a=>{const{classes:t}=Re,{text:i}=a;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:t.DocusignStatusContainer},e("sl-icon",{style:{width:"50px",height:"50px",color:"var(--sl-color-neutral-500)"},name:"clock"}),e("div",{class:t.MessageContainer},e("p",{style:{margin:"0"}},i.docusignExpired)),e("sl-button",{type:"primary",onClick:()=>window.location.reload()},i.refreshButton)))},Fe=a=>{const{classes:t}=Re,{text:i}=a;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:t.DocusignStatusContainer},e("sl-icon",{style:{width:"50px",height:"50px",color:"var(--sl-color-gray-500)"},name:"exclamation-octagon"}),e("div",{class:t.MessageContainer},e("p",{style:{margin:"0"}},i.docusignError)),e("sl-button",{type:"primary",onClick:()=>window.location.reload()},i.refreshButton)))},Le=()=>{const{classes:a}=Re;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:a.DocusignStatusContainer},e("sl-spinner",{style:{fontSize:"50px",margin:"40px"}})))},Ue=({states:a,data:t,callbacks:i,text:n})=>{const{classes:l}=Re,[s,d]=o("100%"),c=["referralsaasquatch.com","impacttech.complysandbox.com","impacttech.complytaxforms.com"],u=w((e=>{c.some((a=>{var t;return null===(t=e.origin)||void 0===t?void 0:t.includes(a)}))&&("number"==typeof e.data&&d(e.data+"px"),"Complyexchange Thank you page Load"===e.data&&i.completeDocument())}),[]);return r((()=>(window.addEventListener("message",u,!1),()=>{window.removeEventListener("message",u,!1)})),[s]),a.urlLoading?e(Le,null):Me.includes(a.status)?e(Fe,{text:n}):De.includes(a.status)?e(qe,{text:n}):e("div",{style:{height:s}},e("style",{type:"text/css"},Be),e("div",{class:l.IFrameContainer},e("iframe",{scrolling:"yes",frameBorder:"0",width:"100%",src:t.documentUrl,height:s})))},Oe=M({ModalTitleContainer:{display:"flex",gap:"var(--sl-spacing-small)",alignItems:"center"},FormWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},CheckboxContainer:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column",gap:"var(--sl-spacing-xx-small)"},TitleContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},DescriptionText:{color:"var(--sl-color-neutral-500)"},BoldText:{fontWeight:"bold"},SecondaryBtn:{"&::part(base)":{color:"var(--sl-color-gray-800) !important"},"&::part(label)":{padding:"0px",margin:"0px"}},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},InfoAlert:{"&::part(base)":{backgroundColor:"transparent",borderTop:"none",padding:"0px",marginBottom:"16px",border:"none"},"&::part(message)":{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"10px",height:"max-content"},"& sl-icon::part(base)":{color:"var(--sl-color-sky-500)"}},Container:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},Link:{color:"var(--sl-color-sky-500)",textDecoration:"none","&:visited":{color:"var(--sl-color-sky-500)"},"&:hover":{textDecoration:"underline"}},CheckboxWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},InfoIcon:{height:"24px",width:"24px"},RadioText:{fontSize:"var(--sl-font-size-small)"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)"},Dialog:{"&::part(panel)":{maxWidth:"420px"},"&::part(title)":{fontSize:"var(--sl-font-size-large)",fontWeight:"600"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},DialogButton:{margin:"auto",width:"100%"}}),We=Oe.toString(),Ve=a=>{var t;const{states:i,states:{formState:n,documentTypeString:o},callbacks:r,text:l,slots:s}=a,{classes:d}=Oe;return e("div",{class:d.Container},e("style",{type:"text/css"},We,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n\n a {\n cursor: pointer;\n }\n\n\n "),e("sl-dialog",{class:Oe.classes.Dialog,open:i.showModal,"onSl-hide":r.onModalClose},e("div",{class:d.ModalTitleContainer,slot:"label"},e("sl-icon",{name:"info-circle",style:{color:"var(--sl-color-info-500)"}}),e("h2",{style:{fontSize:"var(--sl-font-size-large)"}},l.modalTitle)),e("p",null,p.formatMessage({id:"modalText",defaultMessage:l.modalDescription},{br:e("br",null)})),e("sl-button",{slot:"footer",type:"primary",class:Oe.classes.DialogButton,onClick:r.onModalClose,exportparts:"base: primarybutton-base"},l.modalButtonText)),e("div",{class:d.TextContainer},e("div",null,!i.hideSteps&&e("p",null,p.formatMessage({id:"formStep",defaultMessage:l.formStep},{step:i.step,count:4})),e("h3",null,l.taxForm),e("p",{class:d.PageDescriptionText},l.taxAndPayoutsDescription))),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Oe.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,l.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:l.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},l.supportLink)}))),(null===(t=n.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Oe.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,l.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:l.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},l.supportLink)})),e("div",null,e("div",null,e("h5",{class:d.BoldText},p.formatMessage({id:"tax-form-label",defaultMessage:l.taxFormLabel},{documentType:o})),e("p",null,p.formatMessage({id:"tax-form-description",defaultMessage:"W9"===i.documentType?l.taxFormDescription:"individualParticipant"===n.participantType?l.taxFormDescriptionIndividualParticipant:l.taxFormDescriptionBusinessEntity},{documentType:o}))),e("div",null,s.docusignIframeSlot),e("div",{class:d.BtnContainer},i.showExitButton&&e("sl-button",{type:"primary",exportparts:"base: primarybutton-base",onClick:r.onExit},l.exitButton))))},je=class{constructor(e){a(this,e),this.ignored=!0,this.formStep="Step {step} of {count}",this.taxForm="Tax form",this.taxFormLabel="{documentType} Tax Form",this.taxFormDescription="Participants based in the US need to submit a {documentType} form.",this.supportLink="support team",this.taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.",this.taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.",this.docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.",this.docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.",this.participantType="Participant type",this.businessEntity="I represent a business",this.individualParticipant="I am an individual participant",this.docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.",this.refreshButton="Refresh Page",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.exitButton="Exit",this.modalTitle="Important Note",this.modalDescription="Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.",this.modalButtonText="I understand",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,participantType:e.participantType,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription}}}render(){const a=C(),i=a?function(e){const a=S("sq:tax-and-cash");return A({text:e.getTextProps(),states:{step:"4",disabled:!1,submitDisabled:!1,loading:!1,status:void 0,loadingError:!1,participantTypeDisabled:!1,formState:{completedTaxForm:!0,taxFormExpired:!0,errors:{}},documentType:"W9",showModal:!1},data:{taxForm:"W9",documentUrl:"https://example.com"},callbacks:{demo:{onSubmit:()=>a("/4"),onBack:()=>a("/3"),onModalOpen:()=>{},onModalClose:()=>{}},setParticipantType:e=>console.log({p:e}),setDocusignStatus:e=>console.log(e)}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i;const n=y(),l=f("sq:tax-form-context"),[s,d]=g("sq:tax-and-cash"),{data:c,loading:u}=b("sq:user-info-query"),p=null===(t=null===(a=null==c?void 0:c.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,[m,{loading:h,data:v,errors:C}]=x(Ne),[S,{loading:w}]=x(Ee),[T,I]=o(void 0),[k,P]=o(void 0),[_,A]=o({}),[N,E]=o(!1),[M,D]=o(!1),[R,B]=o(!0),q=j(null==p?void 0:p.requiredTaxDocumentType)&&(null==p?void 0:p.currentTaxDocument)?null==p?void 0:p.requiredTaxDocumentType:void 0,F=q||("businessEntity"===(L=k)?"W8BENE":"individualParticipant"===L?"W8BEN":void 0)||(null==p?void 0:p.requiredTaxDocumentType);var L;r((()=>{q&&("W8BEN"===q?P("individualParticipant"):"W8BENE"===q&&P("businessEntity"))}),[q]),r((()=>{n&&p&&(async()=>{try{const e=await m({vars:{provider:"COMPLY_EXCHANGE",user:{id:n.id,accountId:n.accountId},...k?{isBusinessEntity:"businessEntity"===k}:{}}});if(!e||e.message)throw new Error}catch(e){A({docusign:!0})}})()}),[n,p,k]);const U=u||h||N;return{states:{step:null==s?void 0:s.replace("/",""),hideSteps:l.hideSteps,disabled:U,participantTypeDisabled:U||!!q,loading:u||N||w,urlLoading:h,loadingError:!!(null==C?void 0:C.message),formState:{participantType:k,taxFormExpired:De.includes(T),errors:_},docusignStatus:T,documentType:F,documentTypeString:V(F),showExitButton:M,showModal:R},data:{taxForm:F,documentUrl:null===(i=null==v?void 0:v.createImpactPublisherTaxDocument)||void 0===i?void 0:i.documentUrl},callbacks:{setDocusignStatus:I,completeDocument:async()=>{if(n)try{E(!0);const e=await S({vars:{id:n.id,accountId:n.accountId}});if(!e||e.message)throw new Error;if(!e.completeImpactPublisherTaxDocument.success)throw new Error;window.dispatchEvent(new Event(le)),window.location.hash="",D(!0)}catch(e){A({general:!0})}finally{E(!1)}},onExit:()=>{d(l.overrideNextStep||(null==p?void 0:p.withdrawalSettings)||!(null==p?void 0:p.brandedSignup)?"/dashboard":"/4")},setParticipantType:P,onModalClose:()=>B(!1),onModalOpen:()=>B(!0)},text:e.getTextProps()}}(this),n=e(Ue,{states:{status:i.states.docusignStatus,loading:i.states.loading,urlLoading:i.states.urlLoading},data:{documentUrl:i.data.documentUrl},callbacks:{completeDocument:i.callbacks.completeDocument},text:i.text});return e(t,null,e(Ve,{callbacks:i.callbacks,states:i.states,text:i.text,slots:{docusignIframeSlot:a?ze({callbacks:i.callbacks}):n}}))}get el(){return i(this)}},ze=({callbacks:a})=>e("div",{style:{width:"100%",height:"600px",background:"#fafafa",display:"flex",justifyContent:"center",alignItems:"center"}},e("div",{style:{display:"flex",flexDirection:"column",gap:"12px",alignItems:"center"}},e("span",null,"Placeholder for docusign iframe"),e("div",{style:{display:"flex",gap:"8px"}},e("sl-button",{type:"primary",submit:!0,exportparts:"base: primarybutton-base",onClick:a.demo.onBack},"Back to Step 2"),e("sl-button",{type:"primary",submit:!0,exportparts:"base: primarybutton-base",onClick:a.demo.onSubmit},"Continue to Step 4")))),Ge=M({FormWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},RadioContainer:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column",gap:"var(--sl-spacing-medium)","& sl-radio::part(base)":{alignItems:"start"}},InnerRadioContainer:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",width:"100%"},RadioContent:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-small)",fontSize:"var(--sl-font-size-small)"},TitleContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"16px"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},DescriptionText:{color:"var(--sl-color-neutral-500)"},SecondaryBtn:{"&::part(base)":{color:"var(--sl-color-gray-800) !important"}},AlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},PartnerAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}},InfoAlert:{marginTop:"var(--sl-spacing-large)","&::part(base)":{backgroundColor:"transparent",borderTop:"none",padding:"0px",border:"none"},"&::part(message)":{alignItems:"center",padding:"var(--sl-spacing-small)",whiteSpace:"nowrap"},"& sl-icon::part(base)":{color:"var(--sl-color-yellow-500)"}},InfoWarningIcon:{height:"26px",width:"26px"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)",marginBottom:"var(--sl-spacing-small)"}}),He=Ge.toString(),Ke=a=>{var t;const{states:i,states:{formState:n},callbacks:o,text:r,refs:l,slots:s}=a,{classes:d}=Ge;return e("sl-form",{class:d.FormWrapper,"onSl-submit":o.onSubmit,ref:e=>l.formRef.current=e,novalidate:!0},e("style",{type:"text/css"},He,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n "),e("div",{class:d.TextContainer},e("div",null,!i.hideSteps&&e("p",null," ",p.formatMessage({id:"formStep",defaultMessage:r.formStep},{step:i.step,count:4})),e("h3",null,r.indirectTax),e("p",{class:d.PageDescriptionText},r.taxAndPayoutsDescription),e("p",{class:d.DescriptionText},r.indirectTaxDescription)),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Ge.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,r.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:r.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}))),(null===(t=n.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Ge.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,r.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:r.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),i.isPartner&&e("sl-alert",{type:"primary",open:!0,class:Ge.classes.PartnerAlertContainer,exportparts:"base: alert-base, icon:alert-icon"},e("sl-icon",{slot:"icon",name:"info-circle"}),e("strong",null,r.isPartnerAlertHeader),e("br",null),p.formatMessage({id:"isPartnerAlertDescription",defaultMessage:r.isPartnerAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),e("div",null,e("h4",null,r.indirectTaxDetails))),i.loading?e("sl-spinner",{style:{fontSize:"50px",margin:"40px"}}):e("div",null,e("div",{class:d.RadioContainer},e("div",{class:d.InnerRadioContainer},e("sl-radio",{exportparts:"base: radio-base",name:"/checked",value:"notRegistered",id:"notRegistered",checked:"notRegistered"===n.checked,onInput:()=>o.onChange("notRegistered"),disabled:i.disabled||i.isPartner},e("div",{class:d.RadioContent},r.notRegistered,e("p",{class:d.DescriptionText},r.notRegisteredSubtext))),e("sl-radio",{exportparts:"base: radio-base",name:"/checked",value:"otherRegion",id:"otherRegion",checked:"otherRegion"===n.checked,onInput:()=>o.onChange("otherRegion"),disabled:i.disabled||i.isPartner},e("div",{class:d.RadioContent},r.otherRegion,e("p",{class:d.DescriptionText},r.otherRegionSubtext))),s.registeredInDifferentCountryDetailsSlot)),e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"primary",open:!0,class:d.InfoAlert},e("sl-icon",{class:d.InfoWarningIcon,slot:"icon",name:"exclamation-triangle"}),p.formatMessage({id:"cannotChangeInfoAlert",defaultMessage:r.cannotChangeInfoAlert},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),e("div",{class:d.BtnContainer},e("sl-button",{type:"primary",disabled:i.disabled,submit:!0,exportparts:"base: primarybutton-base"},r.continueButton),e("sl-button",{class:d.SecondaryBtn,type:"text",disabled:i.disabled,onClick:o.onBack,exportparts:"base: secondarybutton-base"},r.backButton))))},$e=m.gql`
|
|
157
|
+
`,Me=["exception","decline","cancel","fax_pending"],De=["ttl_expired","session_timeout"];const Re=M({DocusignStatusContainer:{width:"100%",minHeight:"600px",height:"900px",display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",gap:"10px",margin:"auto",textAlign:"center",border:"1px solid var(--sl-color-gray-200)",justifyContent:"center"},MessageContainer:{maxWidth:"400px"},IFrameContainer:{"@media screen and (max-width: 440px)":{position:"absolute",width:"100vw",left:"-30px",zIndex:"9999"}}}),Be=Re.toString(),qe=a=>{const{classes:t}=Re,{text:i}=a;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:t.DocusignStatusContainer},e("sl-icon",{style:{width:"50px",height:"50px",color:"var(--sl-color-neutral-500)"},name:"clock"}),e("div",{class:t.MessageContainer},e("p",{style:{margin:"0"}},i.docusignExpired)),e("sl-button",{type:"primary",onClick:()=>window.location.reload()},i.refreshButton)))},Fe=a=>{const{classes:t}=Re,{text:i}=a;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:t.DocusignStatusContainer},e("sl-icon",{style:{width:"50px",height:"50px",color:"var(--sl-color-gray-500)"},name:"exclamation-octagon"}),e("div",{class:t.MessageContainer},e("p",{style:{margin:"0"}},i.docusignError)),e("sl-button",{type:"primary",onClick:()=>window.location.reload()},i.refreshButton)))},Le=()=>{const{classes:a}=Re;return e("div",null,e("style",{type:"text/css"},Be),e("div",{class:a.DocusignStatusContainer},e("sl-spinner",{style:{fontSize:"50px",margin:"40px"}})))},Ue=({states:a,data:t,callbacks:i,text:n})=>{const{classes:l}=Re,[s,d]=o("100%"),c=["referralsaasquatch.com","impacttech.complysandbox.com","impacttech.complytaxforms.com"],u=w((e=>{c.some((a=>{var t;return null===(t=e.origin)||void 0===t?void 0:t.includes(a)}))&&("number"==typeof e.data&&d(e.data+"px"),"Complyexchange Thank you page Load"===e.data&&i.completeDocument())}),[]);return r((()=>(window.addEventListener("message",u,!1),()=>{window.removeEventListener("message",u,!1)})),[s]),a.urlLoading?e(Le,null):Me.includes(a.status)?e(Fe,{text:n}):De.includes(a.status)?e(qe,{text:n}):e("div",{style:{height:s}},e("style",{type:"text/css"},Be),e("div",{class:l.IFrameContainer},e("iframe",{scrolling:"yes",frameBorder:"0",width:"100%",src:t.documentUrl,height:s})))},Oe=M({ModalTitleContainer:{display:"flex",gap:"var(--sl-spacing-small)",alignItems:"center"},FormWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},CheckboxContainer:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column",gap:"var(--sl-spacing-xx-small)"},TitleContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},DescriptionText:{color:"var(--sl-color-neutral-500)"},BoldText:{fontWeight:"bold"},SecondaryBtn:{"&::part(base)":{color:"var(--sl-color-gray-800) !important"},"&::part(label)":{padding:"0px",margin:"0px"}},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},InfoAlert:{"&::part(base)":{backgroundColor:"transparent",borderTop:"none",padding:"0px",marginBottom:"16px",border:"none"},"&::part(message)":{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"10px",height:"max-content"},"& sl-icon::part(base)":{color:"var(--sl-color-sky-500)"}},Container:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},Link:{color:"var(--sl-color-sky-500)",textDecoration:"none","&:visited":{color:"var(--sl-color-sky-500)"},"&:hover":{textDecoration:"underline"}},CheckboxWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},InfoIcon:{height:"24px",width:"24px"},RadioText:{fontSize:"var(--sl-font-size-small)"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)"},Dialog:{"&::part(panel)":{maxWidth:"420px"},"&::part(title)":{fontSize:"var(--sl-font-size-large)",fontWeight:"600"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},DialogButton:{margin:"auto",width:"100%"}}),We=Oe.toString(),Ve=a=>{var t;const{states:i,states:{formState:n,documentTypeString:o},callbacks:r,text:l,slots:s}=a,{classes:d}=Oe;return e("div",{class:d.Container},e("style",{type:"text/css"},We,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n\n a {\n cursor: pointer;\n }\n\n\n "),e("sl-dialog",{class:Oe.classes.Dialog,open:i.showModal,"onSl-hide":r.onModalClose},e("div",{class:d.ModalTitleContainer,slot:"label"},e("sl-icon",{name:"info-circle",style:{color:"var(--sl-color-info-500)"}}),e("h2",{style:{fontSize:"var(--sl-font-size-large)"}},l.modalTitle)),e("p",null,p.formatMessage({id:"modalText",defaultMessage:l.modalDescription},{br:e("br",null)})),e("sl-button",{slot:"footer",type:"primary",class:Oe.classes.DialogButton,onClick:r.onModalClose,exportparts:"base: primarybutton-base"},l.modalButtonText)),e("div",{class:d.TextContainer},e("div",null,!i.hideSteps&&e("p",null,p.formatMessage({id:"formStep",defaultMessage:l.formStep},{step:i.step,count:4})),e("h3",null,l.taxForm),e("p",{class:d.PageDescriptionText},l.taxAndPayoutsDescription))),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Oe.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,l.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:l.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},l.supportLink)}))),(null===(t=n.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Oe.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,l.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:l.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},l.supportLink)})),e("div",null,e("div",null,e("h5",{class:d.BoldText},p.formatMessage({id:"tax-form-label",defaultMessage:l.taxFormLabel},{documentType:o})),e("p",null,p.formatMessage({id:"tax-form-description",defaultMessage:"W9"===i.documentType?l.taxFormDescription:"individualParticipant"===n.participantType?l.taxFormDescriptionIndividualParticipant:l.taxFormDescriptionBusinessEntity},{documentType:o}))),e("div",null,s.docusignIframeSlot),e("div",{class:d.BtnContainer},i.showExitButton&&e("sl-button",{type:"primary",exportparts:"base: primarybutton-base",onClick:r.onExit},l.exitButton))))},je=class{constructor(e){a(this,e),this.ignored=!0,this.formStep="Step {step} of {count}",this.taxForm="Tax form",this.taxFormLabel="{documentType} Tax Form",this.taxFormDescription="Participants based in the US need to submit a {documentType} form.",this.supportLink="support team",this.taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.",this.taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.",this.docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.",this.docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.",this.participantType="Participant type",this.businessEntity="I represent a business",this.individualParticipant="I am an individual participant",this.docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.",this.refreshButton="Refresh Page",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.exitButton="Exit",this.modalTitle="Important Note",this.modalDescription="Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.",this.modalButtonText="I understand",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,participantType:e.participantType,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription}}}render(){const a=C(),i=a?function(e){const a=S("sq:tax-and-cash");return A({text:e.getTextProps(),states:{step:"4",disabled:!1,submitDisabled:!1,loading:!1,status:void 0,loadingError:!1,participantTypeDisabled:!1,formState:{completedTaxForm:!0,taxFormExpired:!0,errors:{}},documentType:"W9",showModal:!1},data:{taxForm:"W9",documentUrl:"https://example.com"},callbacks:{demo:{onSubmit:()=>a("/4"),onBack:()=>a("/3"),onModalOpen:()=>{},onModalClose:()=>{}},setParticipantType:e=>console.log({p:e}),setDocusignStatus:e=>console.log(e)}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i;const n=y(),l=f("sq:tax-form-context"),[s,d]=g("sq:tax-and-cash"),{data:c,loading:u}=b("sq:user-info-query"),p=null===(t=null===(a=null==c?void 0:c.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,[m,{loading:h,data:v,errors:C}]=x(Ne),[S,{loading:w}]=x(Ee),[T,I]=o(void 0),[k,P]=o(void 0),[_,A]=o({}),[N,E]=o(!1),[M,D]=o(!1),[R,B]=o(!0),q=j(null==p?void 0:p.requiredTaxDocumentType)&&(null==p?void 0:p.currentTaxDocument)?null==p?void 0:p.requiredTaxDocumentType:void 0,F=q||("businessEntity"===(L=k)?"W8BENE":"individualParticipant"===L?"W8BEN":void 0)||(null==p?void 0:p.requiredTaxDocumentType);var L;r((()=>{q&&("W8BEN"===q?P("individualParticipant"):"W8BENE"===q&&P("businessEntity"))}),[q]),r((()=>{n&&p&&(async()=>{try{const e=await m({vars:{provider:"COMPLY_EXCHANGE",user:{id:n.id,accountId:n.accountId},...k?{isBusinessEntity:"businessEntity"===k}:{}}});if(!e||e.message)throw new Error}catch(e){A({docusign:!0})}})()}),[n,p,k]);const U=u||h||N;return{states:{step:null==s?void 0:s.replace("/",""),hideSteps:l.hideSteps,disabled:U,participantTypeDisabled:U||!!q,loading:u||N||w,urlLoading:h,loadingError:!!(null==C?void 0:C.message),formState:{participantType:k,taxFormExpired:De.includes(T),errors:_},docusignStatus:T,documentType:F,documentTypeString:V(F),showExitButton:M,showModal:R},data:{taxForm:F,documentUrl:null===(i=null==v?void 0:v.createImpactPublisherTaxDocument)||void 0===i?void 0:i.documentUrl},callbacks:{setDocusignStatus:I,completeDocument:async()=>{if(n)try{E(!0);const e=await S({vars:{id:n.id,accountId:n.accountId}});if(!e||e.message)throw new Error;if(!e.completeImpactPublisherTaxDocument.success)throw new Error;window.dispatchEvent(new Event(le)),D(!0)}catch(e){A({general:!0})}finally{E(!1)}},onExit:()=>{d(l.overrideNextStep||(null==p?void 0:p.withdrawalSettings)||!(null==p?void 0:p.brandedSignup)?"/dashboard":"/4")},setParticipantType:P,onModalClose:()=>B(!1),onModalOpen:()=>B(!0)},text:e.getTextProps()}}(this),n=e(Ue,{states:{status:i.states.docusignStatus,loading:i.states.loading,urlLoading:i.states.urlLoading},data:{documentUrl:i.data.documentUrl},callbacks:{completeDocument:i.callbacks.completeDocument},text:i.text});return e(t,null,e(Ve,{callbacks:i.callbacks,states:i.states,text:i.text,slots:{docusignIframeSlot:a?ze({callbacks:i.callbacks}):n}}))}get el(){return i(this)}},ze=({callbacks:a})=>e("div",{style:{width:"100%",height:"600px",background:"#fafafa",display:"flex",justifyContent:"center",alignItems:"center"}},e("div",{style:{display:"flex",flexDirection:"column",gap:"12px",alignItems:"center"}},e("span",null,"Placeholder for docusign iframe"),e("div",{style:{display:"flex",gap:"8px"}},e("sl-button",{type:"primary",submit:!0,exportparts:"base: primarybutton-base",onClick:a.demo.onBack},"Back to Step 2"),e("sl-button",{type:"primary",submit:!0,exportparts:"base: primarybutton-base",onClick:a.demo.onSubmit},"Continue to Step 4")))),Ge=M({FormWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},RadioContainer:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column",gap:"var(--sl-spacing-medium)","& sl-radio::part(base)":{alignItems:"start"}},InnerRadioContainer:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",width:"100%"},RadioContent:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-small)",fontSize:"var(--sl-font-size-small)"},TitleContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"16px"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},DescriptionText:{color:"var(--sl-color-neutral-500)"},SecondaryBtn:{"&::part(base)":{color:"var(--sl-color-gray-800) !important"}},AlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},PartnerAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}},InfoAlert:{marginTop:"var(--sl-spacing-large)","&::part(base)":{backgroundColor:"transparent",borderTop:"none",padding:"0px",border:"none"},"&::part(message)":{alignItems:"center",padding:"var(--sl-spacing-small)",whiteSpace:"nowrap"},"& sl-icon::part(base)":{color:"var(--sl-color-yellow-500)"}},InfoWarningIcon:{height:"26px",width:"26px"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)",marginBottom:"var(--sl-spacing-small)"}}),He=Ge.toString(),Ke=a=>{var t;const{states:i,states:{formState:n},callbacks:o,text:r,refs:l,slots:s}=a,{classes:d}=Ge;return e("sl-form",{class:d.FormWrapper,"onSl-submit":o.onSubmit,ref:e=>l.formRef.current=e,novalidate:!0},e("style",{type:"text/css"},He,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n "),e("div",{class:d.TextContainer},e("div",null,!i.hideSteps&&e("p",null," ",p.formatMessage({id:"formStep",defaultMessage:r.formStep},{step:i.step,count:4})),e("h3",null,r.indirectTax),e("p",{class:d.PageDescriptionText},r.taxAndPayoutsDescription),e("p",{class:d.DescriptionText},r.indirectTaxDescription)),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Ge.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,r.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:r.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}))),(null===(t=n.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Ge.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,r.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:r.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),i.isPartner&&e("sl-alert",{type:"primary",open:!0,class:Ge.classes.PartnerAlertContainer,exportparts:"base: alert-base, icon:alert-icon"},e("sl-icon",{slot:"icon",name:"info-circle"}),e("strong",null,r.isPartnerAlertHeader),e("br",null),p.formatMessage({id:"isPartnerAlertDescription",defaultMessage:r.isPartnerAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),e("div",null,e("h4",null,r.indirectTaxDetails))),i.loading?e("sl-spinner",{style:{fontSize:"50px",margin:"40px"}}):e("div",null,e("div",{class:d.RadioContainer},e("div",{class:d.InnerRadioContainer},e("sl-radio",{exportparts:"base: radio-base",name:"/checked",value:"notRegistered",id:"notRegistered",checked:"notRegistered"===n.checked,onInput:()=>o.onChange("notRegistered"),disabled:i.disabled||i.isPartner},e("div",{class:d.RadioContent},r.notRegistered,e("p",{class:d.DescriptionText},r.notRegisteredSubtext))),e("sl-radio",{exportparts:"base: radio-base",name:"/checked",value:"otherRegion",id:"otherRegion",checked:"otherRegion"===n.checked,onInput:()=>o.onChange("otherRegion"),disabled:i.disabled||i.isPartner},e("div",{class:d.RadioContent},r.otherRegion,e("p",{class:d.DescriptionText},r.otherRegionSubtext))),s.registeredInDifferentCountryDetailsSlot)),e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"primary",open:!0,class:d.InfoAlert},e("sl-icon",{class:d.InfoWarningIcon,slot:"icon",name:"exclamation-triangle"}),p.formatMessage({id:"cannotChangeInfoAlert",defaultMessage:r.cannotChangeInfoAlert},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)})),e("div",{class:d.BtnContainer},e("sl-button",{type:"primary",disabled:i.disabled,submit:!0,exportparts:"base: primarybutton-base"},r.continueButton),e("sl-button",{class:d.SecondaryBtn,type:"text",disabled:i.disabled,onClick:o.onBack,exportparts:"base: secondarybutton-base"},r.backButton))))},$e=m.gql`
|
|
158
158
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
159
159
|
createImpactConnection(impactConnectionInput: $vars) {
|
|
160
160
|
success
|
|
@@ -179,7 +179,7 @@ import{h as e,r as a,c as t,g as i}from"./p-f708da7b.js";import{m as n,k as o,f
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
`,Ye=class{constructor(e){a(this,e),this.formStep="Step {step} of {count}",this.indirectTax="Indirect Tax",this.indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.",this.indirectTaxDetails="Indirect tax details",this.otherRegion="Registered for indirect tax",this.otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.",this.notRegistered="Not registered for indirect tax",this.notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.",this.selectedRegion="Country / region of indirect tax",this.province="Province",this.indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}",this.qstNumber="QST number",this.isRegisteredQST="I am registered for QST Tax",this.isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",this.subRegion="Sub-region",this.subRegionTaxNumberLabel="Income tax number",this.backButton="Back",this.cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.",this.indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required",this.searchForCountryText="Search for country..",this.fieldRequiredError="{fieldName} is required",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.continueButton="Continue",this.supportLink="support team",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,fieldRequiredError:e.fieldRequiredError,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription},slotText:{isRegisteredQST:e.isRegisteredQST,isRegisteredSubRegionIncomeTax:e.isRegisteredSubRegionIncomeTax,qstNumber:e.qstNumber,subRegion:e.subRegion,subRegionTaxNumberLabel:e.subRegionTaxNumberLabel,selectedRegion:e.selectedRegion,province:e.province,indirectTaxNumber:e.indirectTaxNumber,error:{indirectTaxNumber:e.indirectTaxNumberError,fieldRequiredError:e.fieldRequiredError},searchForCountryText:e.searchForCountryText}}}render(){const a=C()?function(e){const a=S("sq:tax-and-cash"),[t,i]=o(null),[n,r]=o({});return A({states:{step:"2",disabled:!1,loading:!1,isPartner:!1,loadingError:!1,errors:{},formState:{checked:t,errors:{general:!1}}},callbacks:{onFormChange:(e,a)=>{var t,i;const n=null===(i=null===(t=a.detail)||void 0===t?void 0:t.item)||void 0===i?void 0:i.__value;n||console.error("Could not detect select change"),r((a=>({...a,[e]:n})))},onBack:()=>{a("/1")},onSubmit:async()=>{a("/3")},onQstToggle:()=>r((e=>({...e,hasQst:!e.hasQst}))),onSpainToggle:()=>r((e=>({...e,hasSubRegionTaxNumber:!e.hasSubRegionTaxNumber}))),onChange:i,setCountrySearch:e=>console.log(e)},data:{esRegions:z,countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],provinces:G},text:e.getTextProps(),refs:{formRef:{current:null}},slotProps:{formState:{...n,errors:{selectedRegion:!1,province:!1,subRegion:!1,qstNumber:!1,subRegionTaxNumber:!1,indirectTaxNumber:!1}}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l,s;const c=y(),u=v(),p=n(null),m=f("sq:tax-form-context"),[h,C]=g("sq:tax-and-cash"),[S,{loading:w}]=x($e),T=f("sq:user-form-context"),{data:I,refetch:k,errors:P}=b("sq:user-info-query"),{data:A,loading:N}=b("sq:countries:query"),E=(null==u?void 0:u.replace("_","-"))||"en",M=d((()=>{var e,a;return null===(a=null===(e=null==A?void 0:A.impactPayoutCountries)||void 0===e?void 0:e.data)||void 0===a?void 0:a.map((e=>H({countryCode:e.countryCode,locale:E})))}),[null===(a=null==A?void 0:A.impactPayoutCountries)||void 0===a?void 0:a.data]),[D,R]=o(!1),[B,q]=o({}),[F,L]=o({}),[U,O]=o(""),[W,V]=o(M||[]),[K,$]=o("notRegistered"),Y=null===(i=null===(t=null==I?void 0:I.user)||void 0===t?void 0:t.impactConnection)||void 0===i?void 0:i.publisher;return r((()=>{var e;if(!(null===(e=null==Y?void 0:Y.taxInformation)||void 0===e?void 0:e.indirectTaxCountryCode))return;const a=function(e,a){if(e)return e.find((e=>e.countryCode===a))?"otherRegion":"notRegistered"}(M,Y.taxInformation.indirectTaxCountryCode);$(a)}),[Y,M]),r((()=>{""===U.trim()?V(M||[]):V((null==M?void 0:M.filter((e=>e.displayName.toLowerCase().includes(U.toLowerCase()))))||[])}),[U,M]),r((()=>{var e,a;const t=null==I?void 0:I.user;t&&((null===(a=null===(e=t.impactConnection)||void 0===e?void 0:e.publisher)||void 0===a?void 0:a.taxInformation)?q({province:t.impactConnection.publisher.taxInformation.indirectTaxRegion,subRegion:t.impactConnection.publisher.taxInformation.indirectTaxRegion,hasQst:!!t.impactConnection.publisher.taxInformation.additionalTaxId,qstNumber:t.impactConnection.publisher.taxInformation.additionalTaxId,hasSubRegionTaxNumber:!!t.impactConnection.publisher.taxInformation.withholdingTaxId,subRegionTaxNumber:t.impactConnection.publisher.taxInformation.withholdingTaxId,selectedRegion:t.impactConnection.publisher.taxInformation.indirectTaxCountryCode,indirectTaxNumber:t.impactConnection.publisher.taxInformation.indirectTaxId}):q({selectedRegion:(null==t?void 0:t.countryCode)||(null==T?void 0:T.countryCode)}))}),[I,T]),{states:{step:null==h?void 0:h.replace("/",""),hideSteps:m.hideSteps,disabled:D||N||w,loading:D||w||N,isPartner:!!(null===(s=null===(l=null==I?void 0:I.user)||void 0===l?void 0:l.impactConnection)||void 0===s?void 0:s.publisher),loadingError:!!(null==P?void 0:P.message),formState:{checked:K,errors:F}},callbacks:{onBack:()=>{C(m.overrideBackStep||"/1")},onSubmit:async e=>{var a,t,i,n,o;if(!K)return void L({taxDetails:!0});let r={taxOption:K},l={};if(e.target.getFormControls().forEach((e=>{if(!e.name||!e.id)return;if("notRegistered"===K)return;const a=e.name,t=e.value;_.set(r,a,t),e.required&&!t&&_.set(l,a,!0)})),L(l),!Object.keys(l).length){R(!0);try{const e={user:{id:c.id,accountId:c.accountId},firstName:T.firstName,lastName:T.lastName,countryCode:T.countryCode,currency:T.currency,address:T.address,city:T.city,state:T.state,postalCode:T.postalCode,phoneNumber:T.phoneNumber,phoneNumberCountryCode:T.phoneNumberCountryCode,indirectTaxCountryCode:r.selectedRegion,indirectTaxRegion:r.province||r.subRegion,indirectTaxId:r.indirectTaxNumber,additionalTaxId:r.qstNumber,withholdingTaxId:r.subRegionTaxNumber},l=await S({vars:e});if(!l||(null===(a=l)||void 0===a?void 0:a.message))throw new Error;if(!(null===(t=l.createImpactConnection)||void 0===t?void 0:t.success))throw console.error("Failed to create Impact connection: ",l.createImpactConnection.validationErrors),new Error;await k();const s=null===(o=null===(n=null===(i=l.createImpactConnection)||void 0===i?void 0:i.user)||void 0===n?void 0:n.impactConnection)||void 0===o?void 0:o.publisher,d=j(null==s?void 0:s.requiredTaxDocumentType)&&(null==s?void 0:s.currentTaxDocument);window.dispatchEvent(new Event(le)),
|
|
182
|
+
`,Ye=class{constructor(e){a(this,e),this.formStep="Step {step} of {count}",this.indirectTax="Indirect Tax",this.indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.",this.indirectTaxDetails="Indirect tax details",this.otherRegion="Registered for indirect tax",this.otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.",this.notRegistered="Not registered for indirect tax",this.notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.",this.selectedRegion="Country / region of indirect tax",this.province="Province",this.indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}",this.qstNumber="QST number",this.isRegisteredQST="I am registered for QST Tax",this.isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",this.subRegion="Sub-region",this.subRegionTaxNumberLabel="Income tax number",this.backButton="Back",this.cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.",this.indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required",this.searchForCountryText="Search for country..",this.fieldRequiredError="{fieldName} is required",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.continueButton="Continue",this.supportLink="support team",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,fieldRequiredError:e.fieldRequiredError,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription},slotText:{isRegisteredQST:e.isRegisteredQST,isRegisteredSubRegionIncomeTax:e.isRegisteredSubRegionIncomeTax,qstNumber:e.qstNumber,subRegion:e.subRegion,subRegionTaxNumberLabel:e.subRegionTaxNumberLabel,selectedRegion:e.selectedRegion,province:e.province,indirectTaxNumber:e.indirectTaxNumber,error:{indirectTaxNumber:e.indirectTaxNumberError,fieldRequiredError:e.fieldRequiredError},searchForCountryText:e.searchForCountryText}}}render(){const a=C()?function(e){const a=S("sq:tax-and-cash"),[t,i]=o(null),[n,r]=o({});return A({states:{step:"2",disabled:!1,loading:!1,isPartner:!1,loadingError:!1,errors:{},formState:{checked:t,errors:{general:!1}}},callbacks:{onFormChange:(e,a)=>{var t,i;const n=null===(i=null===(t=a.detail)||void 0===t?void 0:t.item)||void 0===i?void 0:i.__value;n||console.error("Could not detect select change"),r((a=>({...a,[e]:n})))},onBack:()=>{a("/1")},onSubmit:async()=>{a("/3")},onQstToggle:()=>r((e=>({...e,hasQst:!e.hasQst}))),onSpainToggle:()=>r((e=>({...e,hasSubRegionTaxNumber:!e.hasSubRegionTaxNumber}))),onChange:i,setCountrySearch:e=>console.log(e)},data:{esRegions:z,countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],provinces:G},text:e.getTextProps(),refs:{formRef:{current:null}},slotProps:{formState:{...n,errors:{selectedRegion:!1,province:!1,subRegion:!1,qstNumber:!1,subRegionTaxNumber:!1,indirectTaxNumber:!1}}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l,s;const c=y(),u=v(),p=n(null),m=f("sq:tax-form-context"),[h,C]=g("sq:tax-and-cash"),[S,{loading:w}]=x($e),T=f("sq:user-form-context"),{data:I,refetch:k,errors:P}=b("sq:user-info-query"),{data:A,loading:N}=b("sq:countries:query"),E=(null==u?void 0:u.replace("_","-"))||"en",M=d((()=>{var e,a;return null===(a=null===(e=null==A?void 0:A.impactPayoutCountries)||void 0===e?void 0:e.data)||void 0===a?void 0:a.map((e=>H({countryCode:e.countryCode,locale:E})))}),[null===(a=null==A?void 0:A.impactPayoutCountries)||void 0===a?void 0:a.data]),[D,R]=o(!1),[B,q]=o({}),[F,L]=o({}),[U,O]=o(""),[W,V]=o(M||[]),[K,$]=o("notRegistered"),Y=null===(i=null===(t=null==I?void 0:I.user)||void 0===t?void 0:t.impactConnection)||void 0===i?void 0:i.publisher;return r((()=>{var e;if(!(null===(e=null==Y?void 0:Y.taxInformation)||void 0===e?void 0:e.indirectTaxCountryCode))return;const a=function(e,a){if(e)return e.find((e=>e.countryCode===a))?"otherRegion":"notRegistered"}(M,Y.taxInformation.indirectTaxCountryCode);$(a)}),[Y,M]),r((()=>{""===U.trim()?V(M||[]):V((null==M?void 0:M.filter((e=>e.displayName.toLowerCase().includes(U.toLowerCase()))))||[])}),[U,M]),r((()=>{var e,a;const t=null==I?void 0:I.user;t&&((null===(a=null===(e=t.impactConnection)||void 0===e?void 0:e.publisher)||void 0===a?void 0:a.taxInformation)?q({province:t.impactConnection.publisher.taxInformation.indirectTaxRegion,subRegion:t.impactConnection.publisher.taxInformation.indirectTaxRegion,hasQst:!!t.impactConnection.publisher.taxInformation.additionalTaxId,qstNumber:t.impactConnection.publisher.taxInformation.additionalTaxId,hasSubRegionTaxNumber:!!t.impactConnection.publisher.taxInformation.withholdingTaxId,subRegionTaxNumber:t.impactConnection.publisher.taxInformation.withholdingTaxId,selectedRegion:t.impactConnection.publisher.taxInformation.indirectTaxCountryCode,indirectTaxNumber:t.impactConnection.publisher.taxInformation.indirectTaxId}):q({selectedRegion:(null==t?void 0:t.countryCode)||(null==T?void 0:T.countryCode)}))}),[I,T]),{states:{step:null==h?void 0:h.replace("/",""),hideSteps:m.hideSteps,disabled:D||N||w,loading:D||w||N,isPartner:!!(null===(s=null===(l=null==I?void 0:I.user)||void 0===l?void 0:l.impactConnection)||void 0===s?void 0:s.publisher),loadingError:!!(null==P?void 0:P.message),formState:{checked:K,errors:F}},callbacks:{onBack:()=>{C(m.overrideBackStep||"/1")},onSubmit:async e=>{var a,t,i,n,o;if(!K)return void L({taxDetails:!0});let r={taxOption:K},l={};if(e.target.getFormControls().forEach((e=>{if(!e.name||!e.id)return;if("notRegistered"===K)return;const a=e.name,t=e.value;_.set(r,a,t),e.required&&!t&&_.set(l,a,!0)})),L(l),!Object.keys(l).length){R(!0);try{const e={user:{id:c.id,accountId:c.accountId},firstName:T.firstName,lastName:T.lastName,countryCode:T.countryCode,currency:T.currency,address:T.address,city:T.city,state:T.state,postalCode:T.postalCode,phoneNumber:T.phoneNumber,phoneNumberCountryCode:T.phoneNumberCountryCode,indirectTaxCountryCode:r.selectedRegion,indirectTaxRegion:r.province||r.subRegion,indirectTaxId:r.indirectTaxNumber,additionalTaxId:r.qstNumber,withholdingTaxId:r.subRegionTaxNumber},l=await S({vars:e});if(!l||(null===(a=l)||void 0===a?void 0:a.message))throw new Error;if(!(null===(t=l.createImpactConnection)||void 0===t?void 0:t.success))throw console.error("Failed to create Impact connection: ",l.createImpactConnection.validationErrors),new Error;await k();const s=null===(o=null===(n=null===(i=l.createImpactConnection)||void 0===i?void 0:i.user)||void 0===n?void 0:n.impactConnection)||void 0===o?void 0:o.publisher,d=j(null==s?void 0:s.requiredTaxDocumentType)&&(null==s?void 0:s.currentTaxDocument);window.dispatchEvent(new Event(le)),C((null==s?void 0:s.requiredTaxDocumentType)&&!d?"/3":(null==s?void 0:s.brandedSignup)?"/4":"/dashboard"),window.location.hash=""}catch(e){L({general:!0})}finally{R(!1)}}},onFormChange:(e,a)=>{var t,i;const n=null===(i=null===(t=a.detail)||void 0===t?void 0:t.item)||void 0===i?void 0:i.__value;n||console.error("Could not detect select change"),q((a=>({...a,[e]:n})))},onChange:$,setCountrySearch:O,onQstToggle:()=>q((e=>({...e,hasQst:!e.hasQst}))),onSpainToggle:()=>q((e=>({...e,hasSubRegionTaxNumber:!e.hasSubRegionTaxNumber})))},data:{esRegions:z,countries:W,allCountries:M,provinces:G},text:e.getTextProps(),refs:{formRef:p},slotProps:{formState:{...B,errors:F}}}}(this),i=e(K,{states:{hide:"otherRegion"!==a.states.formState.checked,disabled:a.states.disabled||a.states.isPartner,formState:a.slotProps.formState,loading:a.states.loading,isPartner:a.states.isPartner},callbacks:a.callbacks,data:{esRegions:a.data.esRegions,countries:a.data.countries,provinces:a.data.provinces,allCountries:a.data.allCountries},text:a.text.slotText});return e(t,null,e(Ke,{callbacks:a.callbacks,states:a.states,refs:a.refs,text:a.text,slots:{registeredInDifferentCountryDetailsSlot:i}}))}},Ze=c("sq:useInvoiceTable"),Je=m.gql`
|
|
183
183
|
query getUserTaxInfo($limit: Int!, $offset: Int!) {
|
|
184
184
|
user: viewer {
|
|
185
185
|
... on User {
|
|
@@ -202,4 +202,4 @@ import{h as e,r as a,c as t,g as i}from"./p-f708da7b.js";import{m as n,k as o,f
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
`;async function Xe(a,t){const i=a.tagName.toLowerCase();let n;await customElements.whenDefined(i);try{n=t()}catch(a){return Ze("label promise failed",a),e("span",null)}try{return await n}catch(a){Ze("Error rendering label",a);const t=U(a);return e("details",null,e("summary",null,"Error"),t)}}const Qe=class{constructor(e){a(this,e),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,this.header="Invoices",this.description="View and download your invoices to report your earnings and stay tax compliant.",this.emptyStateHeader="View your invoice details",this.emptyStateText="Refer a friend to view the status of your invoices and rewards earned",l(this)}disconnectedCallback(){}render(){const a=e(ea,{emptyStateHeader:this.emptyStateHeader,emptyStateText:this.emptyStateText}),t=e(aa,null),{states:i,data:n,callbacks:o,elements:l}=C()?function(e,a,t){const[i,n]=u(((e,a)=>({...e,...a})),{columns:[],rows:[],loading:!1,page:0}),o=B(),l=d((()=>{var a;return(null===(a=e.demoData)||void 0===a?void 0:a.mockData)||((e=4)=>({data:[...Array(e)].map((()=>(()=>{const e=L.DateTime.now(),a=Math.random().toString(36).slice(2,12),t=Math.floor(100*Math.random())+1,i=Math.round(.2*t);return{downloadUrl:"https://example.com",dateCreated:e.toMillis(),invoiceId:a,program:"my-program",earnings:`$${t}.00`,indirectTax:`$${i}.00`,netEarnings:`$${t-i}.00`}})()))}))(e.perPage)}),[e.perPage]),s=F();return r((()=>{n({loading:!0}),(null==l?void 0:l.data)&&async function(a){const t=l.data.slice(0,e.perPage),i=a.filter((e=>{var a,t;return"loading"!==e.slot&&"empty"!==e.slot&&"loading"!==(null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot"))&&"empty"!==(null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot"))})),o=null==i?void 0:i.map((async(e,a)=>{var t;const i=null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==i&&"empty"!==i){e.setAttribute("slot","column-"+a),e.style.position="absolute";const t=e.firstElementChild.childNodes[1];return t.innerHTML="+",t.style.lineHeight="20px",Xe(e,(()=>e.renderLabel(a)))}return Xe(e,(()=>e.renderLabel()))})),r=null==t?void 0:t.map((async e=>{const a=null==i?void 0:i.map((async a=>Xe(a,(()=>a.renderCell(e,{})))));return await Promise.all(a)})),s=(await Promise.all(r)).filter((e=>e));n({rows:s});const d=o&&await Promise.all(o);n({columns:d,loading:!1,page:0})}(s)}),[null==l?void 0:l.data,s,o]),A({states:{hasPrev:!1,hasNext:!1,loading:!1,show:"rows"},callbacks:{prevPage:()=>console.log("Prev"),nextPage:()=>console.log("Next")},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},hiddenColumns:e.hiddenColumns,invoiceData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:i.columns,rows:i.rows,emptyElement:a,loadingElement:t}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this,a,t):function(a,t,i){var n;const o=y(),l=v(),[s,d]=u(((e,a)=>({...e,...a})),{columns:[],rows:[],loading:!1,page:0}),{envelope:c,states:p,callbacks:m}=T(Je,(e=>{var a,t,i;return null===(i=null===(t=null===(a=null==e?void 0:e.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher)||void 0===i?void 0:i.invoices}),{limit:a.perPage,offset:0},{},!(null==o?void 0:o.jwt)),h=B(),g=F(),f=null==c?void 0:c.data;r((()=>{d({loading:!0}),c&&async function(a){const t=a.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),i=null==t?void 0:t.map((async e=>Xe(e,(()=>e.renderLabel())))),n=null==f?void 0:f.map((async a=>{var i,n,o;const r={earnings:`${a.currency}${(null===(i=a.totalAmount)||void 0===i?void 0:i.toFixed(2))||"0.00"}`,indirectTax:`${a.currency}${(null===(n=a.totalVatAmount)||void 0===n?void 0:n.toFixed(2))||"0.00"}`,dateCreated:a.dateCreated,invoiceId:a.id,netEarnings:`${a.currency}${(null===(o=a.totalAmount-a.totalVatAmount)||void 0===o?void 0:o.toFixed(2))||"0.00"}`,downloadUrl:a.downloadUrl},s=null==t?void 0:t.map((async a=>Xe(a,(()=>a.renderCell(r,{locale:l},e)))));return await Promise.all(s)})),o=n&&(await Promise.all(n)).filter((e=>e));d({rows:o});const r=i&&await Promise.all(i);d({columns:r,loading:!1,page:p.currentPage})}(g)}),[c,g,h]);const b=!(null===(n=null==s?void 0:s.rows)||void 0===n?void 0:n.length)&&!(null==f?void 0:f.length);return{states:{hasNext:p.currentPage<p.pageCount-1,hasPrev:p.currentPage>0,show:p.loading||s.loading?"loading":b?"empty":"rows",namespace:"sqm-invoice-table"},data:{textOverrides:{showLabels:!a.hideLabels,prevLabel:a.prevLabel,moreLabel:a.moreLabel},hiddenColumns:a.hiddenColumns,smBreakpoint:a.smBreakpoint,mdBreakpoint:a.mdBreakpoint},elements:{columns:s.columns,rows:s.rows,emptyElement:t,loadingElement:i},callbacks:{nextPage:()=>{m.setCurrentPage(p.currentPage+1)},prevPage:()=>{m.setCurrentPage(p.currentPage-1)}}}}(this,a,t);return q([this.perPage]),e($,{header:this.header,description:this.description},e(R,{states:i,data:n,callbacks:o,elements:l}))}};function ea(a){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1710363322/squatch-assets/invoice-table-empty.png","empty-state-header":a.emptyStateHeader,"empty-state-text":a.emptyStateText}))}function aa(){return e("slot",{name:"loading"},e(ta,null),e(ta,null),e(ta,null),e(ta,null))}function ta(){return e("sqm-table-row",null,e("sqm-table-cell",{colspan:6},e("sl-skeleton",null)))}const ia=class{constructor(e){a(this,e),this.ignored=!0,l(this)}disconnectedCallback(){}render(){return this.data}},na=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a){return e("sqm-invoice-table-data-cell",{data:a[this.property]})}async renderLabel(){return Promise.resolve(this.columnTitle)}render(){return q([this.columnTitle,this.property]),e(t,{style:{display:"none"}},e("slot",null))}},oa=class{constructor(e){a(this,e),this.ignored=!0,this.locale="en",l(this)}disconnectedCallback(){}render(){var e,a;return this.date?null===(a=null===(e=L.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(E(this.locale)))||void 0===a?void 0:a.toLocaleString(L.DateTime.DATE_MED):"-"}},ra=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a,t){return e("sqm-invoice-table-date-cell",{date:a.dateCreated,locale:null==t?void 0:t.locale})}async renderLabel(){return this.columnTitle}render(){return q([this.columnTitle]),e(t,{style:{display:"none"}},e("slot",null))}},la=class{constructor(e){a(this,e),this.ignored=!0,l(this)}disconnectedCallback(){}render(){return e(t,null,e("style",null,"svg:hover, svg:hover * {\n cursor: pointer;\n }"),!!this.downloadUrl&&e("a",{href:this.downloadUrl,target:"_blank"},e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M0.625 12.4375C0.79076 12.4375 0.949732 12.5033 1.06694 12.6206C1.18415 12.7378 1.25 12.8967 1.25 13.0625V16.1875C1.25 16.519 1.3817 16.837 1.61612 17.0714C1.85054 17.3058 2.16848 17.4375 2.5 17.4375H17.5C17.8315 17.4375 18.1495 17.3058 18.3839 17.0714C18.6183 16.837 18.75 16.519 18.75 16.1875V13.0625C18.75 12.8967 18.8158 12.7378 18.9331 12.6206C19.0503 12.5033 19.2092 12.4375 19.375 12.4375C19.5408 12.4375 19.6997 12.5033 19.8169 12.6206C19.9342 12.7378 20 12.8967 20 13.0625V16.1875C20 16.8505 19.7366 17.4864 19.2678 17.9553C18.7989 18.4241 18.163 18.6875 17.5 18.6875H2.5C1.83696 18.6875 1.20107 18.4241 0.732233 17.9553C0.263392 17.4864 0 16.8505 0 16.1875V13.0625C0 12.8967 0.065848 12.7378 0.183058 12.6206C0.300269 12.5033 0.45924 12.4375 0.625 12.4375Z",fill:"#717179"}),e("path",{d:"M9.5575 14.88C9.61556 14.9382 9.68453 14.9844 9.76046 15.0159C9.83639 15.0474 9.91779 15.0636 10 15.0636C10.0822 15.0636 10.1636 15.0474 10.2395 15.0159C10.3155 14.9844 10.3844 14.9382 10.4425 14.88L14.1925 11.13C14.3099 11.0126 14.3758 10.8535 14.3758 10.6875C14.3758 10.5215 14.3099 10.3624 14.1925 10.245C14.0751 10.1276 13.916 10.0617 13.75 10.0617C13.584 10.0617 13.4249 10.1276 13.3075 10.245L10.625 12.9288V1.9375C10.625 1.77174 10.5592 1.61277 10.4419 1.49556C10.3247 1.37835 10.1658 1.3125 10 1.3125C9.83424 1.3125 9.67527 1.37835 9.55806 1.49556C9.44085 1.61277 9.375 1.77174 9.375 1.9375V12.9288L6.6925 10.245C6.57514 10.1276 6.41597 10.0617 6.25 10.0617C6.08403 10.0617 5.92486 10.1276 5.8075 10.245C5.69014 10.3624 5.62421 10.5215 5.62421 10.6875C5.62421 10.8535 5.69014 11.0126 5.8075 11.13L9.5575 14.88Z",fill:"#717179"}))))}},sa=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a){return e("sqm-invoice-table-download-cell",{downloadUrl:a.downloadUrl})}async renderLabel(){return e("span",null)}render(){return e(t,{style:{display:"none"}},e("slot",null))}},da=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"20",viewBox:"0 0 17 20",fill:"none"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.20649 4.55454H12.7877C15.7842 4.55454 16.9137 6.08577 16.7343 8.34231C16.4486 12.0629 14.2228 14.118 11.2728 14.118H9.78446C9.37916 14.118 9.10675 14.3866 9.00044 15.1254L8.36923 19.39C8.32937 19.6653 8.1832 19.8265 7.97058 19.8467H4.46242C4.13021 19.8467 4.01725 19.5915 4.10363 19.0408L6.23643 5.36045C6.32281 4.81646 6.61515 4.55454 7.20649 4.55454Z",fill:"#009EE3"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.71826 -0.15332H9.30607C10.8808 -0.15332 12.7478 -0.099593 13.9903 1.00853C14.8208 1.754 15.2593 2.936 15.1597 4.21203C14.8142 8.52364 12.2694 10.9347 8.84762 10.9347H6.09026C5.61852 10.9347 5.31288 11.2503 5.18 12.0965L4.40926 17.0461C4.35611 17.3685 4.22323 17.5566 3.97739 17.5767H0.53567C0.156948 17.5767 0.0174187 17.2879 0.117082 16.6432L2.59539 0.786908C2.69505 0.148896 3.04055 -0.15332 3.71826 -0.15332Z",fill:"#113984"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25973 11.5995L6.23643 5.36045C6.32281 4.81646 6.61515 4.54782 7.20649 4.54782H12.7877C13.7112 4.54782 14.4554 4.69557 15.0401 4.96421C14.4819 8.799 12.0236 10.9347 8.80775 10.9347H6.06368C5.6916 10.9347 5.42583 11.1227 5.25973 11.5995Z",fill:"#172C70"})),ca={CardContainer:{display:"grid",gridTemplateColumns:"1fr",gridGap:"var(--sl-spacing-large)",background:"var(--sl-color-neutral-0)",boxShadow:"0px 2px 4px rgba(28, 28, 33, 0.12)",borderRadius:"4px",padding:"var(--sl-spacing-large)",minHeight:"150px",border:"1px solid var(--sl-color-gray-200)",maxWidth:"450px"},StatusContainer:{display:"flex",justifyContent:"space-between",alignItems:"center"},MainCurrencyLabel:{fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-gray-500)"},MainCurrency:{margin:0,fontSize:"32px",width:"auto"},SubduedRegularText:{fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-gray-500)",margin:0,width:"auto"},PaypalEmail:{borderRight:"1px solid var(--sl-color-gray-200)",paddingRight:"var(--sl-spacing-small)","@media (max-width: 499px)":{borderRight:"none",paddingRight:"none"}},PaypalDetailsContainer:{color:"var(--sl-color-gray-500)",display:"flex",gap:"var(--sl-spacing-small)",justifyContent:"flex-start",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@media (max-width: 499px)":{flexDirection:"column",alignItems:"flex-start",gap:"var(--sl-spacing-x-small)","& span":{padding:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}},AccountDetailsContainer:{color:"var(--sl-color-gray-500)",display:"flex",gap:"var(--sl-spacing-small)",justifyContent:"flex-start",alignItems:"center"},CurrenciesContainer:{display:"grid",width:"auto",gridTemplateColumns:"1fr 1fr 1fr",gap:"var(--sl-spacing-xx-small) var(--sl-spacing-small)",paddingTop:"var(--sq-spacing-xx-small)","& > :not(:last-child)":{borderRight:"1px solid var(--sl-color-gray-200)"},"& > :nth-child(3)":{border:"none"}},CurrencyContainer:{paddingRight:"var(--sl-spacing-small)",gap:"var(--sl-spacing-small)"},SubCurrencyText:{fontWeight:"var(--sl-font-weight-bold)",fontSize:"var(--sl-font-size-large)",margin:"0"},W9Container:{paddingTop:"var(--sl-spacing-large)",borderTop:"1px solid var(--sl-color-gray-200)"},SkeletonOne:{width:"25%",height:"16px"},SkeletonTwo:{width:"25%",height:"24px"},SkeletonThree:{width:"50%",height:"34px"},Alert:{"&::part(base)":{backgroundColor:"var(--sl-color-warning-100)",border:"1px solid var(--sl-color-warning-200)",padding:"0 16px"},"& sl-icon":{margin:0},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)",margin:0}},AlertContent:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column"},Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-large)"}};function ua(a){const t=M(ca),i=t.toString(),{classes:n}=t,{states:o,text:r}=a,l=p.formatMessage({id:"thresholdText",defaultMessage:r.thresholdPayoutText},{thresholdBalance:o.thresholdBalance});return e("div",{class:n.Container},e("style",{type:"text/css"},i),o.loading?e("div",{class:n.CardContainer},e("div",{class:n.StatusContainer},e("sl-skeleton",{class:n.SkeletonOne}),e("sl-skeleton",{class:n.SkeletonTwo})),e("sl-skeleton",{class:n.SkeletonThree}),e("sl-skeleton",{class:n.SkeletonOne})):e("div",{class:n.CardContainer},e("div",{class:n.StatusContainer},e("p",{class:n.SubduedRegularText},"thresholdPayout"===o.badgeStatus?o.thresholdBalance?l:"":o.nextPayoutDate),"thresholdPayout"===o.badgeStatus?null:((a,t)=>{const i="nextPayout"===a?"success":"primary",n=p.formatMessage({id:"badgeText",defaultMessage:t},{badgeText:a});return e("sl-badge",{pill:!0,type:i},n)})(o.badgeStatus,r.statusBadgeText)),e("h1",{class:n.MainCurrency},o.balance),"PAYPAL"===o.payoutType?e("div",{class:n.PaypalDetailsContainer},e("span",{class:n.PaypalEmail},o.paypalEmailAddress),e(da,null)):e("div",{class:n.AccountDetailsContainer},e("span",null,o.cardNumberPreview?`${r.accountText} ${o.cardNumberPreview}`:r.payoutMissingInformationText))))}const pa=class{constructor(e){a(this,e),this.statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.accountText="Account",this.payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",l(this)}disconnectedCallback(){}getTextProps(){return{...N(this)}}render(){const a=C()?function(e){return A({states:{loading:!1,error:!1,thresholdBalance:"$50",mainCurrency:{currencyText:"USD",amountText:"100.00"},badgeStatus:"nextPayout",payoutType:"BANK_TRANSFER",nextPayoutDate:"March 14, 2024",paypalEmailAddress:"joesmith@example.com",otherCurrencies:!1,hasW9Pending:!1,hasDatePending:!0,cardNumberPreview:"XX2381",balance:"20.00 USD"},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,n,o,r,l,s,d,c,u;const{data:m,loading:h}=b("sq:user-info-query"),v=null===(t=null===(a=null==m?void 0:m.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,y=function(a){var t;const i=L.DateTime.now().day;return"1"===a?1===i?L.DateTime.now().toFormat("LLL dd, yyyy"):L.DateTime.now().plus({month:1}).startOf("month").toFormat("LLL dd, yyyy"):"15"===a?i<=15?L.DateTime.now().plus({day:15-i}).toFormat("LLL dd, yyyy"):L.DateTime.now().plus({month:1}).startOf("month").plus({day:14}).toFormat("LLL dd, yyyy"):void p.formatMessage({id:"nextPayoutBalance",defaultMessage:e.thresholdPayoutText},{thresholdBalance:null===(t=null==v?void 0:v.withdrawalSettings)||void 0===t?void 0:t.paymentThreshold})}(null===(i=null==v?void 0:v.withdrawalSettings)||void 0===i?void 0:i.paymentDay),g=L.DateTime.now().toFormat("LLL dd, yyyy")===y;return{states:{loading:h,thresholdBalance:(null===(n=null==v?void 0:v.withdrawalSettings)||void 0===n?void 0:n.paymentThreshold)?`${null==v?void 0:v.currency}${null===(o=null==v?void 0:v.withdrawalSettings)||void 0===o?void 0:o.paymentThreshold}`:void 0,balance:null===(r=null==v?void 0:v.payoutsAccount)||void 0===r?void 0:r.balance,badgeStatus:"FIXED_DAY"!==(null===(l=null==v?void 0:v.withdrawalSettings)||void 0===l?void 0:l.paymentSchedulingType)?"thresholdPayout":g?"payoutToday":"nextPayout",payoutType:null===(s=null==v?void 0:v.withdrawalSettings)||void 0===s?void 0:s.paymentMethod,error:null===(d=null==v?void 0:v.payoutsAccount)||void 0===d?void 0:d.hold,paypalEmailAddress:null===(c=null==v?void 0:v.withdrawalSettings)||void 0===c?void 0:c.paypalEmailAddress,cardNumberPreview:null===(u=null==v?void 0:v.withdrawalSettings)||void 0===u?void 0:u.bankAccountNumber,nextPayoutDate:y},text:e.getTextProps()}}(this);return e(t,null,e(ua,{text:a.text,states:a.states}))}},ma=class{constructor(e){a(this,e),this.colspan=1,this.padding="15px 10px"}render(){return e(t,{style:{display:"contents"}},e("td",{colSpan:this.colspan,style:{padding:this.padding}},e("slot",null)))}},ha=class{constructor(e){a(this,e),this.border="1px solid #EAEAEA"}render(){return e(t,{style:{display:"contents"}},e("tr",{style:{border:this.border}},e("slot",null)))}},va=class{constructor(e){a(this,e),this.step1_firstName="First name",this.step1_lastName="Last name",this.step1_email="Email",this.step1_country="Country",this.step1_phoneNumber="Phone number",this.step1_address="Address",this.step1_city="City",this.step1_state="State",this.step1_province="Province",this.step1_region="Region",this.step1_postalCode="Postal code",this.step1_currency="Currency",this.step1_currencyHelpText="Choose your preferred payout currency",this.step1_allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",this.step1_personalInformation="Personal Information",this.step1_termsAndConditionsLabel="terms and conditions",this.step1_termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.step1_searchForCurrencyText="Search for currency..",this.step2_indirectTax="Indirect Tax",this.step2_indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.",this.step2_indirectTaxDetails="Indirect tax details",this.step2_otherRegion="Registered for indirect tax",this.step2_otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.",this.step2_notRegistered="Not registered for indirect tax",this.step2_notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.",this.step2_selectedRegion="Country / region of indirect tax",this.step2_indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}",this.step2_province="Province",this.step2_indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required",this.step2_qstNumber="QST number",this.step2_isRegisteredQST="I am registered for QST Tax",this.step2_isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",this.step2_subRegion="Sub-region",this.step2_subRegionTaxNumberLabel="Income Tax Number",this.step2_cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.",this.step3_taxForm="Tax form",this.step3_taxFormLabel="{documentType} Tax Form",this.step3_participantType="Participant type",this.step3_businessEntity="I represent a business",this.step3_individualParticipant="I am an individual participant",this.step3_taxFormDescription="Participants based in the US need to submit a {documentType} form.",this.step3_taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.",this.step3_taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.",this.step3_docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.",this.step3_docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.",this.step3_docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.",this.step3_refreshButton="Refresh Page",this.step3_exitButton="Exit",this.step3_modalTitle="Important Note",this.step3_modalDescription="Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.",this.step3_modalButtonText="I understand",this.step4_taxAndPayouts="Payouts",this.step4_directlyToBankAccount="Directly to my bank account",this.step4_toPayPalAccount="PayPal (2% processing fee capped to {feeCap})",this.step4_paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold",this.step4_paymentScheduleFixedDay="Pay me on a fixed day of the month",this.step4_paymentDaySelectLabel="Payment Day",this.step4_paymentThresholdSelectLabel="Payment threshold",this.step4_paymentDayFirstOfMonthLabelText="1st of the month",this.step4_paymentDayFifteenthOfMonthLabelText="15th of the month",this.step4_paymentMethod="Payment method",this.step4_paymentSchedule="Payment schedule",this.step4_paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.",this.step4_payPalInputLabel="PayPal email",this.step4_bankLocationLabel="Bank country location",this.step4_beneficiaryAccountNameLabel="Account holder name",this.step4_beneficiaryAccountNameDescription="The beneficiary name of your bank account. Ensure this matches the name on your tax form.",this.step4_bankAccountTypeLabel="Bank account type",this.step4_checkingSelectItemLabel="Checking",this.step4_savingsSelectItemLabel="Savings",this.step4_bankAccountNumberLabel="Bank account number",this.step4_ibanLabel="IBAN",this.step4_swiftCodeLabel="SWIFT code",this.step4_routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }",this.step4_bankNameLabel="Bank name",this.step4_classificationEntityLabel="Classification entity",this.step4_businessSelectItemLabel="Business",this.step4_individualSelectItemLabel="Individual",this.step4_foreignSelectItemLabel="Foreign",this.step4_classificationCPFLabel="Classification CPF",this.step4_patronymicNameLabel="Patronymic name",this.step4_voCodeLabel="VO code",this.step4_agencyCodeLabel="Agency code",this.step4_branchCodeLabel="Branch code",this.step4_classificationLabel="Classification",this.step4_taxPayerIdLabel="Beneficiary INN",this.step4_bankAddressLabel="Bank address",this.step4_bankCityLabel="Bank city",this.step4_bankStateLabel="Bank Province / State",this.step4_bankPostalCodeLabel="Bank postal code",this.step4_eftWithdrawalLabel="EFT Withdrawal (free)",this.step4_fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)",this.step4_verifyEmailHeaderText="Verify your email",this.step4_verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.",this.step4_modalTitle="Important Note",this.step4_modalDescription="Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.",this.step4_modalButtonText="I understand, update my information",this.dashboard_statusTextActive="Active",this.dashboard_statusTextNotActive="Invalid Tax Form",this.dashboard_statusTextNotVerified="Not Verified",this.dashboard_statusTextRequired="Required",this.dashboard_requiredTaxForm="Your payouts are on hold until you submit a {taxFormType} tax form.",this.dashboard_badgeTextSubmittedOn="Submitted on {dateSubmitted}.",this.dashboard_badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.",this.dashboard_badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.",this.dashboard_taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile",this.dashboard_taxAlertHeaderNotActiveW8="{documentType} tax form is invalid",this.dashboard_taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.",this.dashboard_taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.",this.dashboard_invalidForm="Make sure your information is correct and submit new form.",this.dashboard_bankingInformationSectionHeader="Payout Information",this.dashboard_taxDocumentSectionHeader="Tax documents",this.dashboard_taxDocumentSectionSubHeader="{documentType} tax form",this.dashboard_noFormNeededSubtext="Tax documents are only required if you are based in the US or joining the referral program of a US based brand.",this.dashboard_indirectTaxInfoSectionHeader="Indirect tax",this.dashboard_indirectTaxInfoCanada="Registered in {province}, {country}",this.dashboard_indirectTaxInfoOtherCountry="Registered in {country}",this.dashboard_indirectTaxInfoSpain="Registered in {country}, {subRegion}",this.dashboard_indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our {supportLink}.",this.dashboard_indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}",this.dashboard_newFormButton="Submit new form",this.dashboard_editPaymentInformationButton="Edit Payout Information",this.dashboard_notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.",this.dashboard_qstNumber="QST number: {qstNumber}",this.dashboard_subRegionTaxNumber="Income tax number: {subRegionTaxNumber}",this.dashboard_statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.dashboard_thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.dashboard_accountText="Account",this.dashboard_invoiceColumnTitle="Invoice",this.dashboard_dateColumnTitle="Date",this.dashboard_earningsColumnTitle="Earnings",this.dashboard_indirectTaxColumnTitle="Indirect tax",this.dashboard_payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.",this.dashboard_earningsAfterTaxColumnTitle="Earnings after tax",this.dashboard_payoutHoldAlertHeader="Your payout is on hold",this.dashboard_payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.",this.dashboard_payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",this.dashboard_invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.",this.dashboard_invoicePrevLabel="Prev",this.dashboard_invoiceMoreLabel="Next",this.dashboard_invoiceHeader="Invoices",this.dashboard_invoiceEmptyStateHeader="View your invoice details",this.dashboard_invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned",this.dashboard_replaceTaxFormModalHeader="Replace existing tax form",this.dashboard_replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.",this.dashboard_verificationRequiredHeader="Verify your identity",this.dashboard_verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.dashboard_verificationRequiredInternalHeader="Identity Verification in Progress",this.dashboard_verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationReviewInternalHeader="Identity Verification Under Review",this.dashboard_verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationFailedInternalHeader="Identity Verification Unsuccessful",this.dashboard_verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationRequiredButtonText="Start Verification",this.dashboard_w9RequiredHeader="Your next payout is on hold",this.dashboard_w9RequiredDescription="You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.",this.dashboard_termsAndConditions="Terms and Conditions",this.dashboard_w9RequiredButtonText="Submit W9",this.formStep="Step {step} of {count}",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.fieldRequiredError="{fieldName} is required",this.invalidCharacterError="{fieldName} includes characters that aren't supported.",this.fieldInvalidError="{fieldName} is invalid",this.continueButton="Continue",this.backButton="Back",this.cancelButton="Cancel",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.searchForCountryText="Search for country..",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.supportLink="support team",this.termsAndConditions="Terms and Conditions",l(this)}disconnectedCallback(){}getGeneralStepTextProps(e){const a=N(this);return{...te(a,e),generalErrorTitle:a.generalErrorTitle,generalErrorDescription:a.generalErrorDescription,fieldRequiredError:a.fieldRequiredError,invalidCharacterError:a.invalidCharacterError,fieldInvalidError:a.fieldInvalidError,continueButton:a.continueButton,backButton:a.backButton,cancelButton:a.cancelButton,isPartnerAlertHeader:a.isPartnerAlertHeader,isPartnerAlertDescription:a.isPartnerAlertDescription,loadingErrorAlertHeader:a.loadingErrorAlertHeader,loadingErrorAlertDescription:a.loadingErrorAlertDescription,taxAndPayoutsDescription:a.taxAndPayoutsDescription,searchForCountryText:a.searchForCountryText,formStep:a.formStep,supportLink:a.supportLink}}render(){var a,t;const i=C()?function(e){const[a,t]=k({namespace:"sq:tax-and-cash",initialValue:"/1"});return A({step:a,setStep:t},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(){var e,a,t,i,n;const o=h(),l=y(),s=v(),[c,u]=k({namespace:"sq:tax-and-cash",initialValue:"/loading"}),[p,m]=k({namespace:"sq:tax-form-context",initialValue:{}}),[g,f]=k({namespace:"sq:user-form-context",initialValue:{firstName:void 0,lastName:void 0,email:void 0,countryCode:void 0,currency:void 0}}),[b,x]=k({namespace:"sq:currencies:list",initialValue:[]}),[C,S]=k({namespace:"sq:countries:list",initialValue:[]}),[w,T]=k({namespace:"sq:countries:sorted",initialValue:[]}),{data:_,errors:A}=P({namespace:"sq:user-info-query",query:pe,skip:!l,options:{batch:!1}}),N=(null===(t=null===(a=null===(e=null==_?void 0:_.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.countryCode)||g.countryCode;P({namespace:"sq:countries:query",query:me,skip:!l});const{data:E}=P({namespace:"sq:finance-network-settings",query:ve,skip:!l,variables:{filter:function(){var e,a,t;return"/1"===c?{}:"/4"===c?{currency_eq:null===(t=null===(a=null===(e=null==_?void 0:_.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.currency}:N?{countryCode_eq:N}:{}}()}}),{data:M}=P({namespace:"sq:currencies:query",query:he,skip:!l,variables:{locale:s}}),D=d((()=>{var e,a;return null===(a=null===(e=null==E?void 0:E.impactFinanceNetworkSettings)||void 0===e?void 0:e.data)||void 0===a?void 0:a.reduce(((e,a)=>{var t,i;const n=null===(i=null===(t=null==M?void 0:M.currencies)||void 0===t?void 0:t.data)||void 0===i?void 0:i.find((e=>e.currencyCode===a.currency));return n?e.find((e=>e.currencyCode===a.currency))||g.countryCode&&a.countryCode!==N?e:[...e,n]:e}),[])}),[E,N]),R=(null==s?void 0:s.replace("_","-"))||"en",B=(e,a)=>e.displayName<a.displayName?-1:1,q=null===(i=null==E?void 0:E.impactFinanceNetworkSettings)||void 0===i?void 0:i.data,F=d((()=>new Set(null==q?void 0:q.map((e=>e.countryCode)).filter((e=>e)))),[q]),L=["CA","GB","US"],U=d((()=>Array.from(F).map((e=>H({countryCode:e,locale:R}))).sort(B).reduce(((e,a)=>L.includes(a.countryCode)?[a,...e]:[...e,a]),[])),[F]);return r((()=>{U&&T(U)}),[U]),r((()=>{D&&x(D)}),[D]),r((()=>{if(A)u("/error");else if(o&&l&&_){const e=null==_?void 0:_.user;if(!e||"/loading"!==c)return;const a=function(e){var a,t;if(!(null===(a=e.impactConnection)||void 0===a?void 0:a.connected)||!(null===(t=e.impactConnection)||void 0===t?void 0:t.publisher))return"/1";const{requiredTaxDocumentType:i,currentTaxDocument:n,withdrawalSettings:o,brandedSignup:r,payoutsAccount:l}=e.impactConnection.publisher;return i&&!n?l.hold&&l.holdReasons.includes("NO_W9_DOCUMENT")?"/dashboard":"/3":!o&&r?"/4":"/dashboard"}(e);u(a)}}),[o,l,null===(n=null==_?void 0:_.user)||void 0===n?void 0:n.email,A]),{step:c,setStep:u,context:p,namespace:I("sq:tax-and-cash"),loading:"/loading"===c}}();if(null===(a=this.demoData)||void 0===a?void 0:a.showTextProps){const a=N(this);return e("div",null,null===(t=Object.keys(a))||void 0===t?void 0:t.map((a=>{if("demoData"!==a)return e("div",null,e("b",null,a,":")," ",this[a],e("hr",null))})))}switch(i.step){case"/1":return e("sqm-user-info-form",Object.assign({},this.getGeneralStepTextProps("step1_")));case"/2":return e("sqm-indirect-tax-form",Object.assign({},this.getGeneralStepTextProps("step2_")));case"/3":return e("sqm-docusign-form",Object.assign({},this.getGeneralStepTextProps("step3_")));case"/4":return e("sqm-banking-info-form",Object.assign({},this.getGeneralStepTextProps("step4_")));case"/dashboard":return e("sqm-tax-and-cash-dashboard",Object.assign({},this.getGeneralStepTextProps("dashboard_")));case"/error":return e(W,{loadingErrorAlertHeader:this.loadingErrorAlertHeader,loadingErrorAlertDescription:this.loadingErrorAlertDescription})}return e(Y,null)}},ya=M({ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},WarningAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none",maxWidth:"600px"},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)"}},WarningHoldAlertContainer:{marginLeft:"-20px","&::part(base)":{maxWidth:"850px",border:"none",backgroundColor:"transparent"},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)"}},ErrorHoldAlertContainer:{marginLeft:"-20px","&::part(base)":{maxWidth:"850px",border:"none",backgroundColor:"transparent"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},ExpiringSoonAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none"}},BankingInformationContainer:{maxWidth:"700px"},IndirectTaxPreviewContainer:{marginTop:"var(--sl-spacing-x-large)",borderTop:"1px solid var(--sl-color-neutral-200)"},IndirectTaxPreviewHeaderContainer:{marginTop:"var(--sl-spacing-large)",marginBottom:"var(--sl-spacing-xx-small)",margin:"0",display:"flex",gap:"var(--sl-spacing-x-small)","&::part(base)":{color:"var(--sl-color-green-500)"}},IndirectTaxPreviewDetails:{gap:"var(--sl-spacing-x-small)",display:"flex",flexDirection:"column",lineHeight:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)"},InvoiceTableContainer:{marginTop:"var(--sl-spacing-medium)"},NotRegisteredIndirectTaxText:{color:"var(--sl-color-gray-500)"},TaxDocumentsContainer:{marginTop:"var(--sl-spacing-xx-large)",borderTop:"1px solid var(--sl-color-neutral-200)"},TaxDocumentsSectionHeaderContainer:{marginTop:"var(--sl-spacing-x-large)",marginBottom:"var(--sl-spacing-xx-small)"},StatusContainer:{marginTop:"var(--sl-spacing-x-large)",display:"flex",flexDirection:"column",gap:"var(--sl-spacing-x-small)","& h3":{margin:"0"},"& p":{margin:"0",paddingTop:"2px",color:"var(--sl-color-gray-500)"}},StatusAlert:{fontSize:"var(--sl-font-size-small)"},TaxFormDetailsContainer:{display:"flex",gap:"var(--sl-spacing-small)",alignItems:"center"},NewFormButton:{marginTop:"var(--sl-spacing-large)",maxWidth:"300px"},EditBankDetailsButton:{marginTop:"var(--sl-spacing-large)"},SkeletonOne:{width:"15%",height:"10px"},SkeletonTwo:{width:"25%",height:"24px",top:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-x-small)"},TaxSectionSkeletonContainer:{display:"flex",flexDirection:"column",marginTop:"var(--sl-spacing-x-large)"},TaxDocSubtext:{margin:"0",color:"var(--sl-color-neutral-500)",lineHeight:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)",marginLeft:"1px"},TooltipContainer:{display:"flex",textAlign:"center",width:"250px"},ToolTip:{top:"6px",width:"16px",height:"16px"},TaxNumberContainer:{display:"flex",flexDirection:"column",gap:"6px"},DescriptionText:{color:"var(--sl-color-gray-500)",fontSize:"var(--sl-font-size-x-small)",marginBottom:"none",maxWidth:"492px"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)",marginTop:"0"},Dialog:{"&::part(panel)":{maxWidth:"420px"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-xx-large)"},"&::part(title)":{fontSize:"var(--sl-font-size-x-large)",fontWeight:"600",marginTop:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},DialogButton:{margin:"auto",width:"100%"}}),ga=ya.toString(),fa=a=>{var t;const{states:i,text:n,callbacks:o,slots:r}=a,l={NOT_VERIFIED:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"warning",pill:!0},n.statusTextNotVerified),e("p",null,p.formatMessage({id:"badgeTextAwaitingReview",defaultMessage:n.badgeTextAwaitingReview},{dateSubmitted:i.dateSubmitted}))),ACTIVE:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"success",pill:!0},n.statusTextActive),e("p",null,p.formatMessage({id:"badgeTextSubmittedOn",defaultMessage:"W9"===i.documentType?n.badgeTextSubmittedOn:n.badgeTextSubmittedOnW8},{dateSubmitted:i.dateSubmitted}))),INACTIVE:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"danger",pill:!0},n.statusTextNotActive),e("p",null,n.invalidForm)),undefined:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"danger",pill:!0},n.statusTextRequired),e("p",null,p.formatMessage({id:"requiredTaxForm",defaultMessage:n.requiredTaxForm},{taxFormType:i.documentType})))},s={INACTIVE:e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,p.formatMessage({id:"taxAlertHeaderNotActive",defaultMessage:"W9"===i.documentType?n.taxAlertHeaderNotActiveW9:n.taxAlertHeaderNotActiveW8},{documentType:i.documentTypeString})),e("br",null),p.formatMessage({id:"taxAlertMessage",defaultMessage:"W9"===i.documentType?n.taxAlertNotActiveMessageW9:n.taxAlertNotActiveMessageW8},{documentType:i.documentTypeString}))},d=function(a){switch(a){case"OVER_W9_THRESHOLD":return{header:n.w9RequiredHeader,description:p.formatMessage({id:"w9RequiredDescription",defaultMessage:n.w9RequiredDescription},{termsAndConditions:e("a",{target:"_blank",href:"https://terms.advocate.impact.com/PayoutTermsAndConditions.html"},n.termsAndConditions)}),button:e("sl-button",{style:{marginTop:"var(--sl-spacing-x-small)"},type:"default",onClick:o.onNewFormClick},n.w9RequiredButtonText),alertType:"info",icon:"info-circle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:REQUIRED":return{header:n.verificationRequiredHeader,description:p.formatMessage({id:"verificationRequiredDescription",defaultMessage:n.verificationRequiredDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),buttonText:n.verificationRequiredButtonText,alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:INTERNAL":return{header:n.verificationRequiredInternalHeader,description:p.formatMessage({id:"verificationRequiredInternalDescription",defaultMessage:n.verificationRequiredInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:REVIEW":return{header:n.verificationReviewInternalHeader,description:p.formatMessage({id:"verificationReviewInternalDescription",defaultMessage:n.verificationReviewInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:FAILED":return{header:n.verificationFailedInternalHeader,description:p.formatMessage({id:"verificationFailedInternalDescription",defaultMessage:n.verificationFailedInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"critical",icon:"exclamation-octagon",class:ya.classes.ErrorHoldAlertContainer};case"HOLD":return{header:n.payoutHoldAlertHeader,description:p.formatMessage({id:"payoutHoldAlertDescription",defaultMessage:n.payoutHoldAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};default:return}}(i.payoutStatus);return e("div",null,e("div",null,e("style",{type:"text/css"},ga),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,n.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:n.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}))),(null===(t=i.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,n.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:n.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)})),d&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",name:null==d?void 0:d.alertType,open:!0,class:null==d?void 0:d.class},e("sl-icon",{slot:"icon",name:null==d?void 0:d.icon}),e("strong",null,d.header),e("p",{style:{margin:"0"}},d.description),d.buttonText&&e("sl-button",{style:{marginTop:"var(--sl-spacing-x-small)"},type:"default",loading:i.veriffLoading,onClick:()=>o.onVerifyClick()},d.buttonText),d.button?d.button:e("div",{style:{display:"none"}})),e("sl-dialog",{label:n.replaceTaxFormModalHeader,class:ya.classes.Dialog,open:i.showNewFormDialog,"onSl-hide":o.onNewFormCancel},e("p",null,n.replaceTaxFormModalBodyText),e("sl-button",{slot:"footer",type:"primary",class:ya.classes.DialogButton,onClick:o.onNewFormClick},n.newFormButton),e("sl-button",{slot:"footer",type:"default",class:ya.classes.DialogButton,onClick:o.onNewFormCancel},n.cancelButton)),"INACTIVE"===i.status&&s[i.status],e("div",null,e("h3",{style:{marginBottom:"0"}},n.bankingInformationSectionHeader),e("p",{class:ya.classes.PageDescriptionText},n.taxAndPayoutsDescription),e("div",{class:ya.classes.BankingInformationContainer},r.payoutDetailsCardSlot,!i.loading&&e("p",{class:ya.classes.DescriptionText},n.payoutFromImpact),i.canEditPayoutInfo&&e("sl-button",{disabled:i.disabled||i.loading,type:"default",class:ya.classes.EditBankDetailsButton,onClick:o.onEditPayoutInfo},n.editPaymentInformationButton))),!i.noFormNeeded&&e("div",{class:ya.classes.TaxDocumentsContainer},e("div",null,i.loading?e("div",{class:ya.classes.TaxSectionSkeletonContainer},e("sl-skeleton",{class:ya.classes.SkeletonOne}),e("sl-skeleton",{class:ya.classes.SkeletonTwo})):e("div",null,e("div",null,e("span",{class:ya.classes.TaxFormDetailsContainer},e("div",{class:ya.classes.StatusContainer},e("h3",null,p.formatMessage({id:"section-subheader",defaultMessage:n.taxDocumentSectionSubHeader},{documentType:i.documentTypeString})),e("span",{class:ya.classes.StatusAlert},l[i.status]))),"NOT_VERIFIED"!==i.status&&e("sl-button",{disabled:i.disabled||i.loading,onClick:o.onClick,type:"default",class:ya.classes.NewFormButton,exportparts:"base: primarybutton-base"},n.newFormButton))))),e("div",{class:ya.classes.IndirectTaxPreviewContainer},i.loading?e("div",{class:ya.classes.TaxSectionSkeletonContainer},e("sl-skeleton",{class:ya.classes.SkeletonOne}),e("sl-skeleton",{class:ya.classes.SkeletonTwo})):e("div",null,e("h3",{class:ya.classes.IndirectTaxPreviewHeaderContainer},n.indirectTaxInfoSectionHeader,e("sl-tooltip",{trigger:"hover",placement:"right",content:n.indirectTaxTooltipSupport,class:ya.classes.TooltipContainer},e("sl-icon",{name:"info-circle",class:ya.classes.ToolTip}))),e("div",{class:ya.classes.IndirectTaxPreviewDetails},e("span",null,i.notRegistered?e("span",{class:ya.classes.NotRegisteredIndirectTaxText},p.formatMessage({id:"notRegisteredForTax",defaultMessage:n.notRegisteredForTax},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)})):i.province?p.formatMessage({id:"indirectTaxInfoCanada",defaultMessage:n.indirectTaxInfoCanada},{country:"Canada",province:i.province}):i.subRegion?p.formatMessage({id:"indirectTaxInfoSpain",defaultMessage:n.indirectTaxInfoSpain},{country:i.country,subRegion:i.subRegion}):p.formatMessage({id:"indirectTaxInfoOtherCountry",defaultMessage:n.indirectTaxInfoOtherCountry},{country:i.country})),!i.notRegistered&&e("div",{class:ya.classes.TaxNumberContainer},e("span",null,p.formatMessage({id:"indirectTaxDetails",defaultMessage:n.indirectTaxDetails},{indirectTaxType:i.indirectTaxType,indirectTaxNumber:i.indirectTaxNumber})),e("span",null,i.qstNumber&&p.formatMessage({id:"qstNumber",defaultMessage:n.qstNumber},{qstNumber:i.qstNumber}),i.subRegionTaxNumber&&p.formatMessage({id:"subRegionTaxNumber",defaultMessage:n.subRegionTaxNumber},{subRegionTaxNumber:i.subRegionTaxNumber}))),!i.notRegistered&&e("div",{class:ya.classes.InvoiceTableContainer},e("sqm-invoice-table",{description:n.invoiceDescription,"prev-label":n.invoicePrevLabel,"more-label":n.invoiceMoreLabel,header:n.invoiceHeader,"empty-state-header":n.invoiceEmptyStateHeader,"empty-state-text":n.invoiceEmptyStateText},e("sqm-invoice-table-download-column",null),e("sqm-invoice-table-date-column",{"column-title":n.dateColumnTitle}),e("sqm-invoice-table-data-column",{"column-title":n.invoiceColumnTitle,property:"invoiceId"}),e("sqm-invoice-table-data-column",{"column-title":n.earningsColumnTitle,property:"earnings"}),e("sqm-invoice-table-data-column",{"column-title":n.indirectTaxColumnTitle,property:"indirectTax"}),e("sqm-invoice-table-data-column",{"column-title":n.earningsAfterTaxColumnTitle,property:"netEarnings"}))))))))};function ba(e,a){if(e)return new Intl.DisplayNames([(null==a?void 0:a.replace("_","-"))||"en-US"],{type:"region"}).of([e])}function xa(e){var a;if(!e)return"";const t=e.replace("_","");return null===(a=[...G,...z].find((e=>e.regionCode===t)))||void 0===a?void 0:a.displayName}function Ca(e){var a;const t=[...G,...z];if(null==e?void 0:e.indirectTaxRegion){const i=e.indirectTaxRegion.replace("_",""),n=null===(a=t.find((e=>e.regionCode===i)))||void 0===a?void 0:a.taxType;if(n)return n}return(null==e?void 0:e.withholdingTaxCountryCode)?"VAT":(null==e?void 0:e.indirectTaxCountryCode)&&Z[e.indirectTaxCountryCode]||"Indirect Tax"}const Sa=class{constructor(e){a(this,e),this.statusTextActive="Active",this.statusTextNotActive="Invalid Tax Form",this.statusTextNotVerified="Not Verified",this.statusTextRequired="Required",this.requiredTaxForm="Your payouts are on hold until you submit a {taxFormType} tax form.",this.badgeTextSubmittedOn="Submitted on {dateSubmitted}.",this.badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.",this.badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.",this.taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile",this.taxAlertHeaderNotActiveW8="{documentType} tax form is invalid",this.taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.",this.taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.",this.invalidForm="Make sure your information is correct and submit new form.",this.bankingInformationSectionHeader="Payout information",this.taxDocumentSectionHeader="Tax documents",this.taxDocumentSectionSubHeader="{documentType} tax form",this.indirectTaxInfoSectionHeader="Indirect tax",this.indirectTaxInfoCanada="Registered in {province}, {country}",this.indirectTaxInfoOtherCountry="Registered in {country}",this.indirectTaxInfoSpain="Registered in {country}, {subRegion}",this.indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our Support team.",this.indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}",this.newFormButton="Submit new form",this.editPaymentInformationButton="Edit Payout Information",this.notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.",this.qstNumber="QST number: {qstNumber}",this.subRegionTaxNumber="Income tax number: {subRegionTaxNumber}",this.statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.accountText="Account",this.payoutHoldAlertHeader="Your payout is on hold",this.payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.",this.payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.verificationRequiredInternalHeader="Identity Verification in Progress",this.verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.verificationReviewInternalHeader="Identity Verification Under Review",this.verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.verificationFailedInternalHeader="Identity Verification Unsuccessful",this.verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.verificationRequiredButtonText="Start Verification",this.w9RequiredHeader="Your next payout is on hold",this.w9RequiredDescription="You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.",this.termsAndConditions="Terms and Conditions",this.w9RequiredButtonText="Submit W9",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.invoiceColumnTitle="Invoice",this.dateColumnTitle="Date",this.earningsColumnTitle="Earnings",this.indirectTaxColumnTitle="Indirect tax",this.earningsAfterTaxColumnTitle="Earnings after tax",this.invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.",this.invoicePrevLabel="Prev",this.invoiceMoreLabel="Next",this.invoiceHeader="Invoices",this.invoiceEmptyStateHeader="View your invoice details",this.invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.replaceTaxFormModalHeader="Replace existing tax form",this.replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.",this.supportLink="support team",this.cancelButton="Cancel",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalDescription:e.generalErrorDescription,generalTitle:e.generalErrorTitle,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription}}}render(){const a=C()?function(e){return A({states:{dateSubmitted:"today",documentType:"W9",documentTypeString:"W9",status:"ACTIVE",country:"United States",indirectTaxNumber:55555555,indirectTaxType:"Indirect Tax",noFormNeeded:!0,disabled:!1,loading:!1,showNewFormDialog:!1,hasHold:!1,showVerifyIdentity:!1,payoutStatus:"DONE",veriffLoading:!1},callbacks:{onClick:()=>console.debug("check step"),onEditPayoutInfo:()=>console.debug("payout info"),onNewFormCancel:()=>console.log("hide"),onNewFormClick:()=>console.log("show"),onVerifyClick:()=>console.log("verify")},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):(e=>{var a,t,i,n,l,s,d,c,u,p,m,h;const y=S("sq:tax-and-cash"),g=S("sq:tax-form-context"),[f,x]=o(!1),{render:C,loading:w}=se(),T=v();r((()=>{g({}),window.location.hash&&y(`/${window.location.hash.replace("#","")}`)}),[]);const{data:I,loading:k,errors:P,refetch:_}=b("sq:user-info-query"),A=null===(t=null===(a=null==I?void 0:I.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,N=null==A?void 0:A.requiredTaxDocumentType,E=null===(i=null==A?void 0:A.currentTaxDocument)||void 0===i?void 0:i.dateCreated,M=E?L.DateTime.fromMillis(E).toFormat("LLL dd, yyyy"):void 0,D=null===(n=G.find((e=>{var a;return e.regionCode===(null===(a=null==A?void 0:A.taxInformation)||void 0===a?void 0:a.indirectTaxRegion)})))||void 0===n?void 0:n.displayName,R=I?de(I):null;return r((()=>{const e=()=>_();return window.addEventListener(ce,e),()=>{window.removeEventListener(ce,e)}}),[]),{states:{dateSubmitted:M,documentType:N,canEditPayoutInfo:null==A?void 0:A.brandedSignup,documentTypeString:V(N),status:null===(l=null==A?void 0:A.currentTaxDocument)||void 0===l?void 0:l.status,subRegion:xa(null===(s=null==A?void 0:A.taxInformation)||void 0===s?void 0:s.indirectTaxRegion),subRegionTaxNumber:null===(d=null==A?void 0:A.taxInformation)||void 0===d?void 0:d.withholdingTaxId,qstNumber:null===(c=null==A?void 0:A.taxInformation)||void 0===c?void 0:c.additionalTaxId,indirectTaxType:Ca(null==A?void 0:A.taxInformation),indirectTaxNumber:null===(u=null==A?void 0:A.taxInformation)||void 0===u?void 0:u.indirectTaxId,isBusinessEntity:"W8BENE"===(null==A?void 0:A.requiredTaxDocumentType),province:D,country:ba(null===(p=null==A?void 0:A.taxInformation)||void 0===p?void 0:p.indirectTaxCountryCode,T),notRegistered:!(null===(m=null==A?void 0:A.taxInformation)||void 0===m?void 0:m.indirectTaxId),noFormNeeded:!N,disabled:k,loading:k,loadingError:!!(null==P?void 0:P.message),showNewFormDialog:f,hasHold:!!(null===(h=null==A?void 0:A.payoutsAccount)||void 0===h?void 0:h.hold),payoutStatus:R,veriffLoading:w},callbacks:{onClick:()=>x(!0),onVerifyClick:()=>C(),onEditPayoutInfo:()=>{g({overrideNextStep:"/dashboard",overrideBackStep:"/dashboard",hideSteps:!0}),y("/4")},onNewFormCancel:()=>x(!1),onNewFormClick:()=>{x(!1),g({overrideNextStep:"/dashboard",overrideBackStep:"/dashboard",hideSteps:!0}),y("/3")}},text:e.getTextProps()}})(this);return e(t,null,e(fa,{callbacks:a.callbacks,states:a.states,text:a.text,slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",Object.assign({},this.getTextProps()))}}))}},wa={AF:{name:"Afghanistan",dial_code:"+93"},AX:{name:"Aland Islands",dial_code:"+358"},AL:{name:"Albania",dial_code:"+355"},DZ:{name:"Algeria",dial_code:"+213"},AS:{name:"AmericanSamoa",dial_code:"+1684"},AD:{name:"Andorra",dial_code:"+376"},AO:{name:"Angola",dial_code:"+244"},AI:{name:"Anguilla",dial_code:"+1264"},AQ:{name:"Antarctica",dial_code:"+672"},AG:{name:"Antigua and Barbuda",dial_code:"+1268"},AR:{name:"Argentina",dial_code:"+54"},AM:{name:"Armenia",dial_code:"+374"},AW:{name:"Aruba",dial_code:"+297"},AU:{name:"Australia",dial_code:"+61"},AT:{name:"Austria",dial_code:"+43"},AZ:{name:"Azerbaijan",dial_code:"+994"},BS:{name:"Bahamas",dial_code:"+1242"},BH:{name:"Bahrain",dial_code:"+973"},BD:{name:"Bangladesh",dial_code:"+880"},BB:{name:"Barbados",dial_code:"+1246"},BY:{name:"Belarus",dial_code:"+375"},BE:{name:"Belgium",dial_code:"+32"},BZ:{name:"Belize",dial_code:"+501"},BJ:{name:"Benin",dial_code:"+229"},BM:{name:"Bermuda",dial_code:"+1441"},BT:{name:"Bhutan",dial_code:"+975"},BO:{name:"Bolivia, Plurinational State of",dial_code:"+591"},BA:{name:"Bosnia and Herzegovina",dial_code:"+387"},BW:{name:"Botswana",dial_code:"+267"},BR:{name:"Brazil",dial_code:"+55"},IO:{name:"British Indian Ocean Territory",dial_code:"+246"},BN:{name:"Brunei Darussalam",dial_code:"+673"},BG:{name:"Bulgaria",dial_code:"+359"},BF:{name:"Burkina Faso",dial_code:"+226"},BI:{name:"Burundi",dial_code:"+257"},KH:{name:"Cambodia",dial_code:"+855"},CM:{name:"Cameroon",dial_code:"+237"},CA:{name:"Canada",dial_code:"+1"},CV:{name:"Cape Verde",dial_code:"+238"},KY:{name:"Cayman Islands",dial_code:"+ 345"},CF:{name:"Central African Republic",dial_code:"+236"},TD:{name:"Chad",dial_code:"+235"},CL:{name:"Chile",dial_code:"+56"},CN:{name:"China",dial_code:"+86"},CX:{name:"Christmas Island",dial_code:"+61"},CC:{name:"Cocos (Keeling) Islands",dial_code:"+61"},CO:{name:"Colombia",dial_code:"+57"},KM:{name:"Comoros",dial_code:"+269"},CG:{name:"Congo",dial_code:"+242"},CD:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243"},CK:{name:"Cook Islands",dial_code:"+682"},CR:{name:"Costa Rica",dial_code:"+506"},CI:{name:"Cote d'Ivoire",dial_code:"+225"},HR:{name:"Croatia",dial_code:"+385"},CU:{name:"Cuba",dial_code:"+53"},CY:{name:"Cyprus",dial_code:"+357"},CZ:{name:"Czech Republic",dial_code:"+420"},DK:{name:"Denmark",dial_code:"+45"},DJ:{name:"Djibouti",dial_code:"+253"},DM:{name:"Dominica",dial_code:"+1767"},DO:{name:"Dominican Republic",dial_code:"+1849"},EC:{name:"Ecuador",dial_code:"+593"},EG:{name:"Egypt",dial_code:"+20"},SV:{name:"El Salvador",dial_code:"+503"},GQ:{name:"Equatorial Guinea",dial_code:"+240"},ER:{name:"Eritrea",dial_code:"+291"},EE:{name:"Estonia",dial_code:"+372"},ET:{name:"Ethiopia",dial_code:"+251"},FK:{name:"Falkland Islands (Malvinas)",dial_code:"+500"},FO:{name:"Faroe Islands",dial_code:"+298"},FJ:{name:"Fiji",dial_code:"+679"},FI:{name:"Finland",dial_code:"+358"},FR:{name:"France",dial_code:"+33"},GF:{name:"French Guiana",dial_code:"+594"},PF:{name:"French Polynesia",dial_code:"+689"},GA:{name:"Gabon",dial_code:"+241"},GM:{name:"Gambia",dial_code:"+220"},GE:{name:"Georgia",dial_code:"+995"},DE:{name:"Germany",dial_code:"+49"},GH:{name:"Ghana",dial_code:"+233"},GI:{name:"Gibraltar",dial_code:"+350"},GR:{name:"Greece",dial_code:"+30"},GL:{name:"Greenland",dial_code:"+299"},GD:{name:"Grenada",dial_code:"+1473"},GP:{name:"Guadeloupe",dial_code:"+590"},GU:{name:"Guam",dial_code:"+1671"},GT:{name:"Guatemala",dial_code:"+502"},GG:{name:"Guernsey",dial_code:"+44"},GN:{name:"Guinea",dial_code:"+224"},GW:{name:"Guinea-Bissau",dial_code:"+245"},GY:{name:"Guyana",dial_code:"+595"},HT:{name:"Haiti",dial_code:"+509"},VA:{name:"Holy See (Vatican City State)",dial_code:"+379"},HN:{name:"Honduras",dial_code:"+504"},HK:{name:"Hong Kong",dial_code:"+852"},HU:{name:"Hungary",dial_code:"+36"},IS:{name:"Iceland",dial_code:"+354"},IN:{name:"India",dial_code:"+91"},ID:{name:"Indonesia",dial_code:"+62"},IR:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98"},IQ:{name:"Iraq",dial_code:"+964"},IE:{name:"Ireland",dial_code:"+353"},IM:{name:"Isle of Man",dial_code:"+44"},IL:{name:"Israel",dial_code:"+972"},IT:{name:"Italy",dial_code:"+39"},JM:{name:"Jamaica",dial_code:"+1876"},JP:{name:"Japan",dial_code:"+81"},JE:{name:"Jersey",dial_code:"+44"},JO:{name:"Jordan",dial_code:"+962"},KZ:{name:"Kazakhstan",dial_code:"+77"},KE:{name:"Kenya",dial_code:"+254"},KI:{name:"Kiribati",dial_code:"+686"},KP:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850"},KR:{name:"Korea, Republic of South Korea",dial_code:"+82"},KW:{name:"Kuwait",dial_code:"+965"},KG:{name:"Kyrgyzstan",dial_code:"+996"},LA:{name:"Laos",dial_code:"+856"},LV:{name:"Latvia",dial_code:"+371"},LB:{name:"Lebanon",dial_code:"+961"},LS:{name:"Lesotho",dial_code:"+266"},LR:{name:"Liberia",dial_code:"+231"},LY:{name:"Libyan Arab Jamahiriya",dial_code:"+218"},LI:{name:"Liechtenstein",dial_code:"+423"},LT:{name:"Lithuania",dial_code:"+370"},LU:{name:"Luxembourg",dial_code:"+352"},MO:{name:"Macao",dial_code:"+853"},MK:{name:"Macedonia",dial_code:"+389"},MG:{name:"Madagascar",dial_code:"+261"},MW:{name:"Malawi",dial_code:"+265"},MY:{name:"Malaysia",dial_code:"+60"},MV:{name:"Maldives",dial_code:"+960"},ML:{name:"Mali",dial_code:"+223"},MT:{name:"Malta",dial_code:"+356"},MH:{name:"Marshall Islands",dial_code:"+692"},MQ:{name:"Martinique",dial_code:"+596"},MR:{name:"Mauritania",dial_code:"+222"},MU:{name:"Mauritius",dial_code:"+230"},YT:{name:"Mayotte",dial_code:"+262"},MX:{name:"Mexico",dial_code:"+52"},FM:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691"},MD:{name:"Moldova",dial_code:"+373"},MC:{name:"Monaco",dial_code:"+377"},MN:{name:"Mongolia",dial_code:"+976"},ME:{name:"Montenegro",dial_code:"+382"},MS:{name:"Montserrat",dial_code:"+1664"},MA:{name:"Morocco",dial_code:"+212"},MZ:{name:"Mozambique",dial_code:"+258"},MM:{name:"Myanmar",dial_code:"+95"},NA:{name:"Namibia",dial_code:"+264"},NR:{name:"Nauru",dial_code:"+674"},NP:{name:"Nepal",dial_code:"+977"},NL:{name:"Netherlands",dial_code:"+31"},AN:{name:"Netherlands Antilles",dial_code:"+599"},NC:{name:"New Caledonia",dial_code:"+687"},NZ:{name:"New Zealand",dial_code:"+64"},NI:{name:"Nicaragua",dial_code:"+505"},NE:{name:"Niger",dial_code:"+227"},NG:{name:"Nigeria",dial_code:"+234"},NU:{name:"Niue",dial_code:"+683"},NF:{name:"Norfolk Island",dial_code:"+672"},MP:{name:"Northern Mariana Islands",dial_code:"+1670"},NO:{name:"Norway",dial_code:"+47"},OM:{name:"Oman",dial_code:"+968"},PK:{name:"Pakistan",dial_code:"+92"},PW:{name:"Palau",dial_code:"+680"},PS:{name:"Palestinian Territory, Occupied",dial_code:"+970"},PA:{name:"Panama",dial_code:"+507"},PG:{name:"Papua New Guinea",dial_code:"+675"},PY:{name:"Paraguay",dial_code:"+595"},PE:{name:"Peru",dial_code:"+51"},PH:{name:"Philippines",dial_code:"+63"},PN:{name:"Pitcairn",dial_code:"+872"},PL:{name:"Poland",dial_code:"+48"},PT:{name:"Portugal",dial_code:"+351"},PR:{name:"Puerto Rico",dial_code:"+1939"},QA:{name:"Qatar",dial_code:"+974"},RO:{name:"Romania",dial_code:"+40"},RU:{name:"Russia",dial_code:"+7"},RW:{name:"Rwanda",dial_code:"+250"},RE:{name:"Reunion",dial_code:"+262"},BL:{name:"Saint Barthelemy",dial_code:"+590"},SH:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290"},KN:{name:"Saint Kitts and Nevis",dial_code:"+1869"},LC:{name:"Saint Lucia",dial_code:"+1758"},MF:{name:"Saint Martin",dial_code:"+590"},PM:{name:"Saint Pierre and Miquelon",dial_code:"+508"},VC:{name:"Saint Vincent and the Grenadines",dial_code:"+1784"},WS:{name:"Samoa",dial_code:"+685"},SM:{name:"San Marino",dial_code:"+378"},ST:{name:"Sao Tome and Principe",dial_code:"+239"},SA:{name:"Saudi Arabia",dial_code:"+966"},SN:{name:"Senegal",dial_code:"+221"},RS:{name:"Serbia",dial_code:"+381"},SC:{name:"Seychelles",dial_code:"+248"},SL:{name:"Sierra Leone",dial_code:"+232"},SG:{name:"Singapore",dial_code:"+65"},SK:{name:"Slovakia",dial_code:"+421"},SI:{name:"Slovenia",dial_code:"+386"},SB:{name:"Solomon Islands",dial_code:"+677"},SO:{name:"Somalia",dial_code:"+252"},ZA:{name:"South Africa",dial_code:"+27"},SS:{name:"South Sudan",dial_code:"+211"},GS:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500"},ES:{name:"Spain",dial_code:"+34"},LK:{name:"Sri Lanka",dial_code:"+94"},SD:{name:"Sudan",dial_code:"+249"},SR:{name:"Suriname",dial_code:"+597"},SJ:{name:"Svalbard and Jan Mayen",dial_code:"+47"},SZ:{name:"Swaziland",dial_code:"+268"},SE:{name:"Sweden",dial_code:"+46"},CH:{name:"Switzerland",dial_code:"+41"},SY:{name:"Syrian Arab Republic",dial_code:"+963"},TW:{name:"Taiwan",dial_code:"+886"},TJ:{name:"Tajikistan",dial_code:"+992"},TZ:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255"},TH:{name:"Thailand",dial_code:"+66"},TL:{name:"Timor-Leste",dial_code:"+670"},TG:{name:"Togo",dial_code:"+228"},TK:{name:"Tokelau",dial_code:"+690"},TO:{name:"Tonga",dial_code:"+676"},TT:{name:"Trinidad and Tobago",dial_code:"+1868"},TN:{name:"Tunisia",dial_code:"+216"},TR:{name:"Turkey",dial_code:"+90"},TM:{name:"Turkmenistan",dial_code:"+993"},TC:{name:"Turks and Caicos Islands",dial_code:"+1649"},TV:{name:"Tuvalu",dial_code:"+688"},UG:{name:"Uganda",dial_code:"+256"},UA:{name:"Ukraine",dial_code:"+380"},AE:{name:"United Arab Emirates",dial_code:"+971"},GB:{name:"United Kingdom",dial_code:"+44"},US:{name:"United States",dial_code:"+1"},UY:{name:"Uruguay",dial_code:"+598"},UZ:{name:"Uzbekistan",dial_code:"+998"},VU:{name:"Vanuatu",dial_code:"+678"},VE:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58"},VN:{name:"Vietnam",dial_code:"+84"},VG:{name:"Virgin Islands, British",dial_code:"+1284"},VI:{name:"Virgin Islands, U.S.",dial_code:"+1340"},WF:{name:"Wallis and Futuna",dial_code:"+681"},YE:{name:"Yemen",dial_code:"+967"},ZM:{name:"Zambia",dial_code:"+260"},ZW:{name:"Zimbabwe",dial_code:"+263"}},Ta=M({FormWrapper:{},ErrorInput:{"&::part(base)":{border:"1px solid var(--sl-color-danger-500)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sl-color-danger-500)"}},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"16px"},InputContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"36px",maxWidth:"450px"},SearchInput:{padding:"var(--sl-spacing-x-small)"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},CheckboxWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},DescriptionText:{color:"var(--sl-color-neutral-500)"},BoldText:{fontWeight:"bold"},RoundedCheckbox:{"&::part(control)":{borderRadius:"50%"}},AlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},PartnerAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)"},PhoneInputsSection:{display:"flex",flexDirection:"column",gap:"4px","& p":{fontSize:"var(--sl-font-size-small)",color:"var(--sl-input-label-color)",fontWeight:"var(--sl-font-weight-semibold)"}},PhoneInputsContainer:{display:"flex",gap:"4px",width:"100%","& #phoneNumber":{width:"100%",minWidth:"0px"}}}),Ia=Ta.toString(),ka=a=>{var t,i,n,o,r,l,s,d,c,u,m,h,v,y,g,f,b,x,C;const{states:S,states:{formState:w},callbacks:T,text:I,refs:k,data:P}=a,{classes:_}=Ta,A=p.formatMessage({id:"bankingCollectionText",defaultMessage:I.allowBankingCollection},{termsAndConditionsLink:e("a",{href:I.termsAndConditionsLink,target:"_blank"},I.termsAndConditionsLabel)});let N;switch(P.regionLabelEnum){case"STATE":N=I.state;break;case"PROVINCE":N=I.province;break;case"REGION":N=I.region;break;default:N=I.state}return e("sl-form",{class:_.FormWrapper,"onSl-submit":T.onSubmit,ref:e=>k.formRef.current=e,novalidate:!0},e("style",{type:"text/css"},Ia,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n\n sl-radio-group::part(base) {\n display: flex;\n flex-direction: column;\n }\n\n sl-select#phoneNumberCountryCode::part(menu) {\n min-width: 250px;\n }\n "),S.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Ta.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,I.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:I.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),e("br",null)),S.loading?e(J,null):e("div",null,e("div",{class:_.TextContainer},e("div",null,!S.hideSteps&&e("p",null,p.formatMessage({id:"formStep",defaultMessage:I.formStep},{step:S.step,count:4})),e("h3",null,I.personalInformation),e("p",{class:_.PageDescriptionText},I.taxAndPayoutsDescription))),(null===(t=w.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Ta.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,I.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:I.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),(S.isPartner||S.isUser)&&e("sl-alert",{type:"primary",open:!0,class:Ta.classes.PartnerAlertContainer,exportparts:"base: alert-base, icon:alert-icon"},e("sl-icon",{slot:"icon",name:"info-circle"}),e("strong",null,I.isPartnerAlertHeader),e("br",null),p.formatMessage({id:"isPartnerAlertDescription",defaultMessage:I.isPartnerAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),e("div",null,e("div",{class:_.InputContainer},e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",value:w.firstName,label:I.firstName,disabled:S.disabled||S.isUser||S.isPartner},(null===(i=w.errors)||void 0===i?void 0:i.firstName)?{class:_.ErrorInput,helpText:X(I.firstName,w.errors.firstName)}:{},{id:"firstName",name:"/firstName",required:!0})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",value:w.lastName,label:I.lastName,disabled:S.disabled||S.isUser||S.isPartner},(null===(n=w.errors)||void 0===n?void 0:n.lastName)?{class:_.ErrorInput,helpText:X(I.lastName,w.errors.lastName)}:{},{id:"lastName",name:"/lastName",required:!0})),e("sl-input",{exportparts:"label: input-label, base: input-base",value:w.email,label:I.email,disabled:!0,id:"email",name:"/email",required:!0}),e("sl-select",Object.assign({id:"countryCode",exportparts:"label: input-label, base: input-base",name:"/countryCode",label:I.country,value:w.countryCode,disabled:S.disabled||S.isPartner},(null===(o=w.errors)||void 0===o?void 0:o.countryCode)?{class:_.ErrorInput,helpText:X(I.country,w.errors.countryCode)}:{},{required:!0,"onSl-select":e=>T.onFormChange("countryCode",e)}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setCountrySearch(e.target.value)}}),null===(r=null==P?void 0:P.countries)||void 0===r?void 0:r.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(l=null==P?void 0:P.allCountries)||void 0===l?void 0:l.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),e("div",{class:_.PhoneInputsSection},e("p",null,I.phoneNumber),e("div",{class:_.PhoneInputsContainer},e("sl-select",Object.assign({id:"phoneNumberCountryCode",exportparts:"label: input-label, base: input-base",name:"/phoneNumberCountryCode",value:w.phoneNumberCountryCode,disabled:S.disabled||S.isPartner,ref:e=>k.phoneCountryRef.current=e},(null===(s=w.errors)||void 0===s?void 0:s.phoneNumberCountryCode)?{class:_.ErrorInput}:{},{required:!0,"onSl-select":e=>T.onFormChange("phoneCountry",e)}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setPhoneCountrySearch(e.target.value)}}),null===(d=null==P?void 0:P.phoneCountries)||void 0===d?void 0:d.map((a=>{var t,i;return e("sl-menu-item",{value:a.countryCode},e("div",{slot:"prefix"},`${null===(t=wa[a.countryCode])||void 0===t?void 0:t.name} `),null===(i=wa[a.countryCode])||void 0===i?void 0:i.dial_code)})),null===(c=null==P?void 0:P.allCountries)||void 0===c?void 0:c.map((a=>{var t,i;return e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},e("div",{slot:"prefix"},`${null===(t=wa[a.countryCode])||void 0===t?void 0:t.name} `),null===(i=wa[a.countryCode])||void 0===i?void 0:i.dial_code)}))),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",id:"phoneNumber",name:"/phoneNumber",value:w.phoneNumber,validationError:({value:e})=>{Q(/[a-zA-Z]+/,e)&&X(I.phoneNumber,I.error.fieldInvalidError)},disabled:S.disabled||S.isPartner},(null===(u=w.errors)||void 0===u?void 0:u.phoneNumber)?{class:_.ErrorInput,helpText:X(I.phoneNumber,w.errors.phoneNumber)}:{},{required:!0})))),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",label:I.address,id:"address",name:"/address",value:w.address,validationError:({value:e})=>!Q(/^[\x20-\xFF]+$/,e)&&X(I.address,I.error.invalidCharacterError),disabled:S.disabled||S.isPartner},(null===(m=w.errors)||void 0===m?void 0:m.address)?{class:_.ErrorInput,helpText:X(I.address,w.errors.address)}:{},{required:!0})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",label:I.city,id:"city",name:"/city",value:w.city,validationError:({value:e})=>!Q(/^[\x20-\xFF]+$/,e)&&X(I.city,I.error.invalidCharacterError),disabled:S.disabled||S.isPartner},(null===(h=w.errors)||void 0===h?void 0:h.city)?{class:_.ErrorInput,helpText:X(I.city,w.errors.city)}:{},{required:!0})),!S.hideState&&e("sl-select",Object.assign({label:N,exportparts:"label: input-label, base: input-base",id:"state",name:"/state",value:w.state,disabled:S.disabled||S.isPartner},(null===(v=w.errors)||void 0===v?void 0:v.state)?{class:_.ErrorInput,helpText:X(I.state,w.errors.state)}:{},{required:!0}),null===(y=P.regions)||void 0===y?void 0:y.map((a=>e("sl-menu-item",{value:a.value},a.label)))),e("sl-input",Object.assign({label:I.postalCode,exportparts:"label: input-label, base: input-base",id:"postalCode",name:"/postalCode",value:w.postalCode,disabled:S.disabled||S.isPartner},(null===(g=w.errors)||void 0===g?void 0:g.postalCode)?{class:_.ErrorInput,helpText:X(I.postalCode,w.errors.postalCode)}:{},{required:!0})),e("sl-select",Object.assign({id:"currency",exportparts:"label: input-label, base: input-base",name:"/currency",label:I.currency,menu:!0,value:w.currency,disabled:S.disabled||S.isPartner,helpText:I.currencyHelpText},(null===(f=w.errors)||void 0===f?void 0:f.currency)?{class:_.ErrorInput,helpText:X(I.currency,w.errors.currency)}:{},{required:!0,ref:e=>k.currencyRef.current=e}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCurrencyText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setCurrencySearch(e.target.value)}}),null===(b=null==P?void 0:P.currencies)||void 0===b?void 0:b.map((a=>e("sl-menu-item",{value:a.currencyCode},a.currencyCode," - ",a.displayName))),null===(x=null==P?void 0:P.allCurrencies)||void 0===x?void 0:x.map((a=>e("sl-menu-item",{value:a.currencyCode,style:{display:"none"}},a.currencyCode," - ",a.displayName)))),e("div",{class:_.CheckboxWrapper},e("sl-checkbox",{exportparts:"label: input-label, base: input-base",checked:!0===w.allowBankingCollection,"onSl-change":e=>{e.target.value=e.target.checked},disabled:!S.isPartner&&S.disabled,required:!0,value:w.allowBankingCollection,id:"allowBankingCollection",name:"/allowBankingCollection"},A),(null===(C=w.errors)||void 0===C?void 0:C.allowBankingCollection)&&e("p",{class:_.ErrorText},X(I.termsAndConditionsLabel,w.errors.allowBankingCollection)))),e("sl-button",{type:"primary",disabled:!S.isPartner&&S.disabled,submit:!0,exportparts:"base: primarybutton-base"},I.continueButton))))},Pa=class{constructor(e){a(this,e),this.ignored=!0,this.firstName="First name",this.lastName="Last name",this.email="Email",this.country="Country",this.phoneNumber="Phone number",this.address="Address",this.city="City",this.state="State",this.province="Province",this.region="Region",this.postalCode="Postal code",this.currency="Currency",this.currencyHelpText="Choose your preferred payout currency",this.formStep="Step {step} of {count}",this.personalInformation="Personal Information",this.continueButton="Continue",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",this.termsAndConditionsLabel="terms and conditions",this.termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.searchForCountryText="Search for country..",this.searchForCurrencyText="Search for currency..",this.fieldRequiredError="{fieldName} is required",this.fieldInvalidError="{fieldName} is invalid",this.invalidCharacterError="{fieldName} includes characters that aren't supported.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.supportLink="support team",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{fieldRequiredError:e.fieldRequiredError,fieldInvalidError:e.fieldInvalidError,generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription,invalidCharacterError:e.invalidCharacterError}}}render(){const a=C()?function(e){const a=S("sq:tax-and-cash");return A({setStep:a,onSubmit:()=>{a("/2")},onRadioClick:()=>{},text:e.getTextProps(),refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}},data:{currencies:[{currencyCode:"CAD",displayName:"CAD"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"}],countries:[{countryCode:"CA",displayName:"Canada"}],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],allCountries:[{countryCode:"CA",displayName:"Canada"}]},callbacks:{setCurrencySearch:e=>console.log(e),setCountrySearch:e=>console.log(e),setPhoneCountrySearch:e=>console.log(e),onFormChange:()=>{}},states:{step:"1",disabled:!1,loading:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{errors:{email:!1,firstName:!1,lastName:!1,countryCode:!1,currency:!1}}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l;const s=n(void 0),c=n(void 0),u=n(null),p=f("sq:tax-form-context"),m=f("sq:countries:sorted"),[h,v]=g("sq:tax-and-cash"),[y,x]=g("sq:user-form-context"),{data:C,loading:S,errors:w}=b("sq:user-info-query"),T=f("sq:currencies:list"),I=d((()=>[...T||[]].sort(((e,a)=>e.displayName.localeCompare(a.displayName)))),[T]),[k,P]=o(""),[A,N]=o(""),[E,M]=o(m||[]),[D,R]=o(m||[]),[B,q]=o(""),[F,L]=o(I||[]),[U,O]=o({});r((()=>{var e,a,t,i,n,o,r,l,s,d;const c=null==C?void 0:C.user;if(!c||"/1"!==h)return;if(ee(y))return;const u=(null===(e=c.managedIdentity)||void 0===e?void 0:e.emailVerified)?c.managedIdentity.email:c.email;(null===(a=c.impactConnection)||void 0===a?void 0:a.publisher)&&(null===(t=c.impactConnection)||void 0===t?void 0:t.user)?x({email:u,firstName:c.impactConnection.user.firstName,lastName:c.impactConnection.user.lastName,countryCode:c.impactConnection.publisher.countryCode,currency:c.impactConnection.publisher.currency,phoneNumberCountryCode:c.impactConnection.publisher.phoneNumberCountryCode,phoneNumber:c.impactConnection.publisher.phoneNumber,address:c.impactConnection.publisher.billingAddress,city:c.impactConnection.publisher.billingCity,state:c.impactConnection.publisher.billingState,postalCode:c.impactConnection.publisher.billingPostalCode}):(null==y?void 0:y.email)||x({email:u,firstName:c.firstName,lastName:c.lastName,countryCode:c.countryCode||"US",currency:null===(i=c.customFields)||void 0===i?void 0:i.currency,phoneNumberCountryCode:(null===(n=c.customFields)||void 0===n?void 0:n.phoneNumberCountryCode)||"US",phoneNumber:null===(o=c.customFields)||void 0===o?void 0:o.phoneNumber,address:null===(r=c.customFields)||void 0===r?void 0:r.address,city:null===(l=c.customFields)||void 0===l?void 0:l.city,state:null===(s=c.customFields)||void 0===s?void 0:s.state,postalCode:null===(d=c.customFields)||void 0===d?void 0:d.postalCode})}),[C,h,y]),r((()=>{(null==m?void 0:m.length)&&(""===k.trim()?M(m||[]):M(m.filter((e=>e.displayName.toLowerCase().includes(k.toLowerCase())))||[]))}),[k,m]),r((()=>{(null==m?void 0:m.length)&&(""===A.trim()?R(m||[]):R(m.filter((e=>e.displayName.toLowerCase().includes(A.toLowerCase())))||[]))}),[A,m]),r((()=>{(null==I?void 0:I.length)&&(""===B.trim()?L(I||[]):L(I.filter((e=>e.currencyCode.toLowerCase().includes(B.toLowerCase())))||[]))}),[B,I]);const W=["ES","AU","US","CA"].includes(y.countryCode),V=W?ae[null==y?void 0:y.countryCode]:{};return{setStep:v,onSubmit:async function(a){let t=a.target.getFormControls(),i={},n={};if(null==t||t.forEach((a=>{if(!a.name)return;const t=a.name,o=a.value;if("function"==typeof a.validationError){const e=(0,a.validationError)({control:a,key:t,value:o});e&&_.set(n,t,e)}a.required&&(!o||"string"==typeof o&&""===o.trim())&&_.set(n,t,e.fieldRequiredError),_.set(i,t,o)})),Object.keys(n).length)return void O(n);const{allowBankingCollection:o,...r}=i;x({...y,firstName:r.firstName,lastName:r.lastName,phoneNumberCountryCode:r.phoneNumberCountryCode,phoneNumber:r.phoneNumber,countryCode:r.countryCode,address:r.address,city:r.city,state:r.state,postalCode:r.postalCode,currency:r.currency}),window.location.hash="",v(p.overrideNextStep||"/2")},text:e.getTextProps(),callbacks:{setCurrencySearch:q,setCountrySearch:P,setPhoneCountrySearch:N,onFormChange:(e,a)=>{var t,i;const n=null===(i=null===(t=a.detail)||void 0===t?void 0:t.item)||void 0===i?void 0:i.__value;n||console.error("Could not detect select change"),x({...y,[e]:n}),"countryCode"===e&&(c.current.value=n,s.current.value="")}},refs:{formRef:u,currencyRef:s,phoneCountryRef:c},data:{currencies:F,countries:E,phoneCountries:D,allCurrencies:I,allCountries:m,regionLabelEnum:null==V?void 0:V.labelEnum,regions:(null==V?void 0:V.regions)||[]},states:{step:null==h?void 0:h.replace("/",""),hideState:!W,hideSteps:!!p.hideSteps,disabled:S,loadingError:!!(null==w?void 0:w.message),loading:S,isPartner:!!(null===(t=null===(a=null==C?void 0:C.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher),isUser:!!(null===(l=null===(i=null==C?void 0:C.user)||void 0===i?void 0:i.impactConnection)||void 0===l?void 0:l.user),formState:{...y,errors:U}}}}(this);return e(t,null,e(ka,{data:a.data,states:a.states,callbacks:{...a.callbacks,onSubmit:a.onSubmit},text:a.text,refs:a.refs}))}};export{Te as sqm_banking_info_form,Ae as sqm_code_verification,je as sqm_docusign_form,Ye as sqm_indirect_tax_form,Qe as sqm_invoice_table,ia as sqm_invoice_table_data_cell,na as sqm_invoice_table_data_column,oa as sqm_invoice_table_date_cell,ra as sqm_invoice_table_date_column,la as sqm_invoice_table_download_cell,sa as sqm_invoice_table_download_column,pa as sqm_payout_details_card,ma as sqm_table_cell,ha as sqm_table_row,va as sqm_tax_and_cash,Sa as sqm_tax_and_cash_dashboard,Pa as sqm_user_info_form}
|
|
205
|
+
`;async function Xe(a,t){const i=a.tagName.toLowerCase();let n;await customElements.whenDefined(i);try{n=t()}catch(a){return Ze("label promise failed",a),e("span",null)}try{return await n}catch(a){Ze("Error rendering label",a);const t=U(a);return e("details",null,e("summary",null,"Error"),t)}}const Qe=class{constructor(e){a(this,e),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,this.header="Invoices",this.description="View and download your invoices to report your earnings and stay tax compliant.",this.emptyStateHeader="View your invoice details",this.emptyStateText="Refer a friend to view the status of your invoices and rewards earned",l(this)}disconnectedCallback(){}render(){const a=e(ea,{emptyStateHeader:this.emptyStateHeader,emptyStateText:this.emptyStateText}),t=e(aa,null),{states:i,data:n,callbacks:o,elements:l}=C()?function(e,a,t){const[i,n]=u(((e,a)=>({...e,...a})),{columns:[],rows:[],loading:!1,page:0}),o=B(),l=d((()=>{var a;return(null===(a=e.demoData)||void 0===a?void 0:a.mockData)||((e=4)=>({data:[...Array(e)].map((()=>(()=>{const e=L.DateTime.now(),a=Math.random().toString(36).slice(2,12),t=Math.floor(100*Math.random())+1,i=Math.round(.2*t);return{downloadUrl:"https://example.com",dateCreated:e.toMillis(),invoiceId:a,program:"my-program",earnings:`$${t}.00`,indirectTax:`$${i}.00`,netEarnings:`$${t-i}.00`}})()))}))(e.perPage)}),[e.perPage]),s=F();return r((()=>{n({loading:!0}),(null==l?void 0:l.data)&&async function(a){const t=l.data.slice(0,e.perPage),i=a.filter((e=>{var a,t;return"loading"!==e.slot&&"empty"!==e.slot&&"loading"!==(null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot"))&&"empty"!==(null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot"))})),o=null==i?void 0:i.map((async(e,a)=>{var t;const i=null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==i&&"empty"!==i){e.setAttribute("slot","column-"+a),e.style.position="absolute";const t=e.firstElementChild.childNodes[1];return t.innerHTML="+",t.style.lineHeight="20px",Xe(e,(()=>e.renderLabel(a)))}return Xe(e,(()=>e.renderLabel()))})),r=null==t?void 0:t.map((async e=>{const a=null==i?void 0:i.map((async a=>Xe(a,(()=>a.renderCell(e,{})))));return await Promise.all(a)})),s=(await Promise.all(r)).filter((e=>e));n({rows:s});const d=o&&await Promise.all(o);n({columns:d,loading:!1,page:0})}(s)}),[null==l?void 0:l.data,s,o]),A({states:{hasPrev:!1,hasNext:!1,loading:!1,show:"rows"},callbacks:{prevPage:()=>console.log("Prev"),nextPage:()=>console.log("Next")},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},hiddenColumns:e.hiddenColumns,invoiceData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:i.columns,rows:i.rows,emptyElement:a,loadingElement:t}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this,a,t):function(a,t,i){var n;const o=y(),l=v(),[s,d]=u(((e,a)=>({...e,...a})),{columns:[],rows:[],loading:!1,page:0}),{envelope:c,states:p,callbacks:m}=T(Je,(e=>{var a,t,i;return null===(i=null===(t=null===(a=null==e?void 0:e.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher)||void 0===i?void 0:i.invoices}),{limit:a.perPage,offset:0},{},!(null==o?void 0:o.jwt)),h=B(),g=F(),f=null==c?void 0:c.data;r((()=>{d({loading:!0}),c&&async function(a){const t=a.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),i=null==t?void 0:t.map((async e=>Xe(e,(()=>e.renderLabel())))),n=null==f?void 0:f.map((async a=>{var i,n,o;const r={earnings:`${a.currency}${(null===(i=a.totalAmount)||void 0===i?void 0:i.toFixed(2))||"0.00"}`,indirectTax:`${a.currency}${(null===(n=a.totalVatAmount)||void 0===n?void 0:n.toFixed(2))||"0.00"}`,dateCreated:a.dateCreated,invoiceId:a.id,netEarnings:`${a.currency}${(null===(o=a.totalAmount-a.totalVatAmount)||void 0===o?void 0:o.toFixed(2))||"0.00"}`,downloadUrl:a.downloadUrl},s=null==t?void 0:t.map((async a=>Xe(a,(()=>a.renderCell(r,{locale:l},e)))));return await Promise.all(s)})),o=n&&(await Promise.all(n)).filter((e=>e));d({rows:o});const r=i&&await Promise.all(i);d({columns:r,loading:!1,page:p.currentPage})}(g)}),[c,g,h]);const b=!(null===(n=null==s?void 0:s.rows)||void 0===n?void 0:n.length)&&!(null==f?void 0:f.length);return{states:{hasNext:p.currentPage<p.pageCount-1,hasPrev:p.currentPage>0,show:p.loading||s.loading?"loading":b?"empty":"rows",namespace:"sqm-invoice-table"},data:{textOverrides:{showLabels:!a.hideLabels,prevLabel:a.prevLabel,moreLabel:a.moreLabel},hiddenColumns:a.hiddenColumns,smBreakpoint:a.smBreakpoint,mdBreakpoint:a.mdBreakpoint},elements:{columns:s.columns,rows:s.rows,emptyElement:t,loadingElement:i},callbacks:{nextPage:()=>{m.setCurrentPage(p.currentPage+1)},prevPage:()=>{m.setCurrentPage(p.currentPage-1)}}}}(this,a,t);return q([this.perPage]),e($,{header:this.header,description:this.description},e(R,{states:i,data:n,callbacks:o,elements:l}))}};function ea(a){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1710363322/squatch-assets/invoice-table-empty.png","empty-state-header":a.emptyStateHeader,"empty-state-text":a.emptyStateText}))}function aa(){return e("slot",{name:"loading"},e(ta,null),e(ta,null),e(ta,null),e(ta,null))}function ta(){return e("sqm-table-row",null,e("sqm-table-cell",{colspan:6},e("sl-skeleton",null)))}const ia=class{constructor(e){a(this,e),this.ignored=!0,l(this)}disconnectedCallback(){}render(){return this.data}},na=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a){return e("sqm-invoice-table-data-cell",{data:a[this.property]})}async renderLabel(){return Promise.resolve(this.columnTitle)}render(){return q([this.columnTitle,this.property]),e(t,{style:{display:"none"}},e("slot",null))}},oa=class{constructor(e){a(this,e),this.ignored=!0,this.locale="en",l(this)}disconnectedCallback(){}render(){var e,a;return this.date?null===(a=null===(e=L.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(E(this.locale)))||void 0===a?void 0:a.toLocaleString(L.DateTime.DATE_MED):"-"}},ra=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a,t){return e("sqm-invoice-table-date-cell",{date:a.dateCreated,locale:null==t?void 0:t.locale})}async renderLabel(){return this.columnTitle}render(){return q([this.columnTitle]),e(t,{style:{display:"none"}},e("slot",null))}},la=class{constructor(e){a(this,e),this.ignored=!0,l(this)}disconnectedCallback(){}render(){return e(t,null,e("style",null,"svg:hover, svg:hover * {\n cursor: pointer;\n }"),!!this.downloadUrl&&e("a",{href:this.downloadUrl,target:"_blank"},e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M0.625 12.4375C0.79076 12.4375 0.949732 12.5033 1.06694 12.6206C1.18415 12.7378 1.25 12.8967 1.25 13.0625V16.1875C1.25 16.519 1.3817 16.837 1.61612 17.0714C1.85054 17.3058 2.16848 17.4375 2.5 17.4375H17.5C17.8315 17.4375 18.1495 17.3058 18.3839 17.0714C18.6183 16.837 18.75 16.519 18.75 16.1875V13.0625C18.75 12.8967 18.8158 12.7378 18.9331 12.6206C19.0503 12.5033 19.2092 12.4375 19.375 12.4375C19.5408 12.4375 19.6997 12.5033 19.8169 12.6206C19.9342 12.7378 20 12.8967 20 13.0625V16.1875C20 16.8505 19.7366 17.4864 19.2678 17.9553C18.7989 18.4241 18.163 18.6875 17.5 18.6875H2.5C1.83696 18.6875 1.20107 18.4241 0.732233 17.9553C0.263392 17.4864 0 16.8505 0 16.1875V13.0625C0 12.8967 0.065848 12.7378 0.183058 12.6206C0.300269 12.5033 0.45924 12.4375 0.625 12.4375Z",fill:"#717179"}),e("path",{d:"M9.5575 14.88C9.61556 14.9382 9.68453 14.9844 9.76046 15.0159C9.83639 15.0474 9.91779 15.0636 10 15.0636C10.0822 15.0636 10.1636 15.0474 10.2395 15.0159C10.3155 14.9844 10.3844 14.9382 10.4425 14.88L14.1925 11.13C14.3099 11.0126 14.3758 10.8535 14.3758 10.6875C14.3758 10.5215 14.3099 10.3624 14.1925 10.245C14.0751 10.1276 13.916 10.0617 13.75 10.0617C13.584 10.0617 13.4249 10.1276 13.3075 10.245L10.625 12.9288V1.9375C10.625 1.77174 10.5592 1.61277 10.4419 1.49556C10.3247 1.37835 10.1658 1.3125 10 1.3125C9.83424 1.3125 9.67527 1.37835 9.55806 1.49556C9.44085 1.61277 9.375 1.77174 9.375 1.9375V12.9288L6.6925 10.245C6.57514 10.1276 6.41597 10.0617 6.25 10.0617C6.08403 10.0617 5.92486 10.1276 5.8075 10.245C5.69014 10.3624 5.62421 10.5215 5.62421 10.6875C5.62421 10.8535 5.69014 11.0126 5.8075 11.13L9.5575 14.88Z",fill:"#717179"}))))}},sa=class{constructor(e){a(this,e),l(this)}disconnectedCallback(){}async renderCell(a){return e("sqm-invoice-table-download-cell",{downloadUrl:a.downloadUrl})}async renderLabel(){return e("span",null)}render(){return e(t,{style:{display:"none"}},e("slot",null))}},da=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"20",viewBox:"0 0 17 20",fill:"none"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.20649 4.55454H12.7877C15.7842 4.55454 16.9137 6.08577 16.7343 8.34231C16.4486 12.0629 14.2228 14.118 11.2728 14.118H9.78446C9.37916 14.118 9.10675 14.3866 9.00044 15.1254L8.36923 19.39C8.32937 19.6653 8.1832 19.8265 7.97058 19.8467H4.46242C4.13021 19.8467 4.01725 19.5915 4.10363 19.0408L6.23643 5.36045C6.32281 4.81646 6.61515 4.55454 7.20649 4.55454Z",fill:"#009EE3"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.71826 -0.15332H9.30607C10.8808 -0.15332 12.7478 -0.099593 13.9903 1.00853C14.8208 1.754 15.2593 2.936 15.1597 4.21203C14.8142 8.52364 12.2694 10.9347 8.84762 10.9347H6.09026C5.61852 10.9347 5.31288 11.2503 5.18 12.0965L4.40926 17.0461C4.35611 17.3685 4.22323 17.5566 3.97739 17.5767H0.53567C0.156948 17.5767 0.0174187 17.2879 0.117082 16.6432L2.59539 0.786908C2.69505 0.148896 3.04055 -0.15332 3.71826 -0.15332Z",fill:"#113984"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25973 11.5995L6.23643 5.36045C6.32281 4.81646 6.61515 4.54782 7.20649 4.54782H12.7877C13.7112 4.54782 14.4554 4.69557 15.0401 4.96421C14.4819 8.799 12.0236 10.9347 8.80775 10.9347H6.06368C5.6916 10.9347 5.42583 11.1227 5.25973 11.5995Z",fill:"#172C70"})),ca={CardContainer:{display:"grid",gridTemplateColumns:"1fr",gridGap:"var(--sl-spacing-large)",background:"var(--sl-color-neutral-0)",boxShadow:"0px 2px 4px rgba(28, 28, 33, 0.12)",borderRadius:"4px",padding:"var(--sl-spacing-large)",minHeight:"150px",border:"1px solid var(--sl-color-gray-200)",maxWidth:"450px"},StatusContainer:{display:"flex",justifyContent:"space-between",alignItems:"center"},MainCurrencyLabel:{fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-gray-500)"},MainCurrency:{margin:0,fontSize:"32px",width:"auto"},SubduedRegularText:{fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-gray-500)",margin:0,width:"auto"},PaypalEmail:{borderRight:"1px solid var(--sl-color-gray-200)",paddingRight:"var(--sl-spacing-small)","@media (max-width: 499px)":{borderRight:"none",paddingRight:"none"}},PaypalDetailsContainer:{color:"var(--sl-color-gray-500)",display:"flex",gap:"var(--sl-spacing-small)",justifyContent:"flex-start",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@media (max-width: 499px)":{flexDirection:"column",alignItems:"flex-start",gap:"var(--sl-spacing-x-small)","& span":{padding:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}},AccountDetailsContainer:{color:"var(--sl-color-gray-500)",display:"flex",gap:"var(--sl-spacing-small)",justifyContent:"flex-start",alignItems:"center"},CurrenciesContainer:{display:"grid",width:"auto",gridTemplateColumns:"1fr 1fr 1fr",gap:"var(--sl-spacing-xx-small) var(--sl-spacing-small)",paddingTop:"var(--sq-spacing-xx-small)","& > :not(:last-child)":{borderRight:"1px solid var(--sl-color-gray-200)"},"& > :nth-child(3)":{border:"none"}},CurrencyContainer:{paddingRight:"var(--sl-spacing-small)",gap:"var(--sl-spacing-small)"},SubCurrencyText:{fontWeight:"var(--sl-font-weight-bold)",fontSize:"var(--sl-font-size-large)",margin:"0"},W9Container:{paddingTop:"var(--sl-spacing-large)",borderTop:"1px solid var(--sl-color-gray-200)"},SkeletonOne:{width:"25%",height:"16px"},SkeletonTwo:{width:"25%",height:"24px"},SkeletonThree:{width:"50%",height:"34px"},Alert:{"&::part(base)":{backgroundColor:"var(--sl-color-warning-100)",border:"1px solid var(--sl-color-warning-200)",padding:"0 16px"},"& sl-icon":{margin:0},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)",margin:0}},AlertContent:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column"},Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-large)"}};function ua(a){const t=M(ca),i=t.toString(),{classes:n}=t,{states:o,text:r}=a,l=p.formatMessage({id:"thresholdText",defaultMessage:r.thresholdPayoutText},{thresholdBalance:o.thresholdBalance});return e("div",{class:n.Container},e("style",{type:"text/css"},i),o.loading?e("div",{class:n.CardContainer},e("div",{class:n.StatusContainer},e("sl-skeleton",{class:n.SkeletonOne}),e("sl-skeleton",{class:n.SkeletonTwo})),e("sl-skeleton",{class:n.SkeletonThree}),e("sl-skeleton",{class:n.SkeletonOne})):e("div",{class:n.CardContainer},e("div",{class:n.StatusContainer},e("p",{class:n.SubduedRegularText},"thresholdPayout"===o.badgeStatus?o.thresholdBalance?l:"":o.nextPayoutDate),"thresholdPayout"===o.badgeStatus?null:((a,t)=>{const i="nextPayout"===a?"success":"primary",n=p.formatMessage({id:"badgeText",defaultMessage:t},{badgeText:a});return e("sl-badge",{pill:!0,type:i},n)})(o.badgeStatus,r.statusBadgeText)),e("h1",{class:n.MainCurrency},o.balance),"PAYPAL"===o.payoutType?e("div",{class:n.PaypalDetailsContainer},e("span",{class:n.PaypalEmail},o.paypalEmailAddress),e(da,null)):e("div",{class:n.AccountDetailsContainer},e("span",null,o.cardNumberPreview?`${r.accountText} ${o.cardNumberPreview}`:r.payoutMissingInformationText))))}const pa=class{constructor(e){a(this,e),this.statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.accountText="Account",this.payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",l(this)}disconnectedCallback(){}getTextProps(){return{...N(this)}}render(){const a=C()?function(e){return A({states:{loading:!1,error:!1,thresholdBalance:"$50",mainCurrency:{currencyText:"USD",amountText:"100.00"},badgeStatus:"nextPayout",payoutType:"BANK_TRANSFER",nextPayoutDate:"March 14, 2024",paypalEmailAddress:"joesmith@example.com",otherCurrencies:!1,hasW9Pending:!1,hasDatePending:!0,cardNumberPreview:"XX2381",balance:"20.00 USD"},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,n,o,r,l,s,d,c,u;const{data:m,loading:h}=b("sq:user-info-query"),v=null===(t=null===(a=null==m?void 0:m.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,y=function(a){var t;const i=L.DateTime.now().day;return"1"===a?1===i?L.DateTime.now().toFormat("LLL dd, yyyy"):L.DateTime.now().plus({month:1}).startOf("month").toFormat("LLL dd, yyyy"):"15"===a?i<=15?L.DateTime.now().plus({day:15-i}).toFormat("LLL dd, yyyy"):L.DateTime.now().plus({month:1}).startOf("month").plus({day:14}).toFormat("LLL dd, yyyy"):void p.formatMessage({id:"nextPayoutBalance",defaultMessage:e.thresholdPayoutText},{thresholdBalance:null===(t=null==v?void 0:v.withdrawalSettings)||void 0===t?void 0:t.paymentThreshold})}(null===(i=null==v?void 0:v.withdrawalSettings)||void 0===i?void 0:i.paymentDay),g=L.DateTime.now().toFormat("LLL dd, yyyy")===y;return{states:{loading:h,thresholdBalance:(null===(n=null==v?void 0:v.withdrawalSettings)||void 0===n?void 0:n.paymentThreshold)?`${null==v?void 0:v.currency}${null===(o=null==v?void 0:v.withdrawalSettings)||void 0===o?void 0:o.paymentThreshold}`:void 0,balance:null===(r=null==v?void 0:v.payoutsAccount)||void 0===r?void 0:r.balance,badgeStatus:"FIXED_DAY"!==(null===(l=null==v?void 0:v.withdrawalSettings)||void 0===l?void 0:l.paymentSchedulingType)?"thresholdPayout":g?"payoutToday":"nextPayout",payoutType:null===(s=null==v?void 0:v.withdrawalSettings)||void 0===s?void 0:s.paymentMethod,error:null===(d=null==v?void 0:v.payoutsAccount)||void 0===d?void 0:d.hold,paypalEmailAddress:null===(c=null==v?void 0:v.withdrawalSettings)||void 0===c?void 0:c.paypalEmailAddress,cardNumberPreview:null===(u=null==v?void 0:v.withdrawalSettings)||void 0===u?void 0:u.bankAccountNumber,nextPayoutDate:y},text:e.getTextProps()}}(this);return e(t,null,e(ua,{text:a.text,states:a.states}))}},ma=class{constructor(e){a(this,e),this.colspan=1,this.padding="15px 10px"}render(){return e(t,{style:{display:"contents"}},e("td",{colSpan:this.colspan,style:{padding:this.padding}},e("slot",null)))}},ha=class{constructor(e){a(this,e),this.border="1px solid #EAEAEA"}render(){return e(t,{style:{display:"contents"}},e("tr",{style:{border:this.border}},e("slot",null)))}},va=class{constructor(e){a(this,e),this.step1_firstName="First name",this.step1_lastName="Last name",this.step1_email="Email",this.step1_country="Country",this.step1_phoneNumber="Phone number",this.step1_address="Address",this.step1_city="City",this.step1_state="State",this.step1_province="Province",this.step1_region="Region",this.step1_postalCode="Postal code",this.step1_currency="Currency",this.step1_currencyHelpText="Choose your preferred payout currency",this.step1_allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",this.step1_personalInformation="Personal Information",this.step1_termsAndConditionsLabel="terms and conditions",this.step1_termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.step1_searchForCurrencyText="Search for currency..",this.step2_indirectTax="Indirect Tax",this.step2_indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.",this.step2_indirectTaxDetails="Indirect tax details",this.step2_otherRegion="Registered for indirect tax",this.step2_otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.",this.step2_notRegistered="Not registered for indirect tax",this.step2_notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.",this.step2_selectedRegion="Country / region of indirect tax",this.step2_indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}",this.step2_province="Province",this.step2_indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required",this.step2_qstNumber="QST number",this.step2_isRegisteredQST="I am registered for QST Tax",this.step2_isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",this.step2_subRegion="Sub-region",this.step2_subRegionTaxNumberLabel="Income Tax Number",this.step2_cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.",this.step3_taxForm="Tax form",this.step3_taxFormLabel="{documentType} Tax Form",this.step3_participantType="Participant type",this.step3_businessEntity="I represent a business",this.step3_individualParticipant="I am an individual participant",this.step3_taxFormDescription="Participants based in the US need to submit a {documentType} form.",this.step3_taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.",this.step3_taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.",this.step3_docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.",this.step3_docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.",this.step3_docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.",this.step3_refreshButton="Refresh Page",this.step3_exitButton="Exit",this.step3_modalTitle="Important Note",this.step3_modalDescription="Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.",this.step3_modalButtonText="I understand",this.step4_taxAndPayouts="Payouts",this.step4_directlyToBankAccount="Directly to my bank account",this.step4_toPayPalAccount="PayPal (2% processing fee capped to {feeCap})",this.step4_paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold",this.step4_paymentScheduleFixedDay="Pay me on a fixed day of the month",this.step4_paymentDaySelectLabel="Payment Day",this.step4_paymentThresholdSelectLabel="Payment threshold",this.step4_paymentDayFirstOfMonthLabelText="1st of the month",this.step4_paymentDayFifteenthOfMonthLabelText="15th of the month",this.step4_paymentMethod="Payment method",this.step4_paymentSchedule="Payment schedule",this.step4_paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.",this.step4_payPalInputLabel="PayPal email",this.step4_bankLocationLabel="Bank country location",this.step4_beneficiaryAccountNameLabel="Account holder name",this.step4_beneficiaryAccountNameDescription="The beneficiary name of your bank account. Ensure this matches the name on your tax form.",this.step4_bankAccountTypeLabel="Bank account type",this.step4_checkingSelectItemLabel="Checking",this.step4_savingsSelectItemLabel="Savings",this.step4_bankAccountNumberLabel="Bank account number",this.step4_ibanLabel="IBAN",this.step4_swiftCodeLabel="SWIFT code",this.step4_routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }",this.step4_bankNameLabel="Bank name",this.step4_classificationEntityLabel="Classification entity",this.step4_businessSelectItemLabel="Business",this.step4_individualSelectItemLabel="Individual",this.step4_foreignSelectItemLabel="Foreign",this.step4_classificationCPFLabel="Classification CPF",this.step4_patronymicNameLabel="Patronymic name",this.step4_voCodeLabel="VO code",this.step4_agencyCodeLabel="Agency code",this.step4_branchCodeLabel="Branch code",this.step4_classificationLabel="Classification",this.step4_taxPayerIdLabel="Beneficiary INN",this.step4_bankAddressLabel="Bank address",this.step4_bankCityLabel="Bank city",this.step4_bankStateLabel="Bank Province / State",this.step4_bankPostalCodeLabel="Bank postal code",this.step4_eftWithdrawalLabel="EFT Withdrawal (free)",this.step4_fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)",this.step4_verifyEmailHeaderText="Verify your email",this.step4_verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.",this.step4_modalTitle="Important Note",this.step4_modalDescription="Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.",this.step4_modalButtonText="I understand, update my information",this.dashboard_statusTextActive="Active",this.dashboard_statusTextNotActive="Invalid Tax Form",this.dashboard_statusTextNotVerified="Not Verified",this.dashboard_statusTextRequired="Required",this.dashboard_requiredTaxForm="Your payouts are on hold until you submit a {taxFormType} tax form.",this.dashboard_badgeTextSubmittedOn="Submitted on {dateSubmitted}.",this.dashboard_badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.",this.dashboard_badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.",this.dashboard_taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile",this.dashboard_taxAlertHeaderNotActiveW8="{documentType} tax form is invalid",this.dashboard_taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.",this.dashboard_taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.",this.dashboard_invalidForm="Make sure your information is correct and submit new form.",this.dashboard_bankingInformationSectionHeader="Payout Information",this.dashboard_taxDocumentSectionHeader="Tax documents",this.dashboard_taxDocumentSectionSubHeader="{documentType} tax form",this.dashboard_noFormNeededSubtext="Tax documents are only required if you are based in the US or joining the referral program of a US based brand.",this.dashboard_indirectTaxInfoSectionHeader="Indirect tax",this.dashboard_indirectTaxInfoCanada="Registered in {province}, {country}",this.dashboard_indirectTaxInfoOtherCountry="Registered in {country}",this.dashboard_indirectTaxInfoSpain="Registered in {country}, {subRegion}",this.dashboard_indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our {supportLink}.",this.dashboard_indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}",this.dashboard_newFormButton="Submit new form",this.dashboard_editPaymentInformationButton="Edit Payout Information",this.dashboard_notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.",this.dashboard_qstNumber="QST number: {qstNumber}",this.dashboard_subRegionTaxNumber="Income tax number: {subRegionTaxNumber}",this.dashboard_statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.dashboard_thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.dashboard_accountText="Account",this.dashboard_invoiceColumnTitle="Invoice",this.dashboard_dateColumnTitle="Date",this.dashboard_earningsColumnTitle="Earnings",this.dashboard_indirectTaxColumnTitle="Indirect tax",this.dashboard_payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.",this.dashboard_earningsAfterTaxColumnTitle="Earnings after tax",this.dashboard_payoutHoldAlertHeader="Your payout is on hold",this.dashboard_payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.",this.dashboard_payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",this.dashboard_invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.",this.dashboard_invoicePrevLabel="Prev",this.dashboard_invoiceMoreLabel="Next",this.dashboard_invoiceHeader="Invoices",this.dashboard_invoiceEmptyStateHeader="View your invoice details",this.dashboard_invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned",this.dashboard_replaceTaxFormModalHeader="Replace existing tax form",this.dashboard_replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.",this.dashboard_verificationRequiredHeader="Verify your identity",this.dashboard_verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.dashboard_verificationRequiredInternalHeader="Identity Verification in Progress",this.dashboard_verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationReviewInternalHeader="Identity Verification Under Review",this.dashboard_verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationFailedInternalHeader="Identity Verification Unsuccessful",this.dashboard_verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationRequiredButtonText="Start Verification",this.dashboard_w9RequiredHeader="Your next payout is on hold",this.dashboard_w9RequiredDescription="You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.",this.dashboard_termsAndConditions="Terms and Conditions",this.dashboard_w9RequiredButtonText="Submit W9",this.formStep="Step {step} of {count}",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.fieldRequiredError="{fieldName} is required",this.invalidCharacterError="{fieldName} includes characters that aren't supported.",this.fieldInvalidError="{fieldName} is invalid",this.continueButton="Continue",this.backButton="Back",this.cancelButton="Cancel",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.searchForCountryText="Search for country..",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.supportLink="support team",this.termsAndConditions="Terms and Conditions",l(this)}disconnectedCallback(){}getGeneralStepTextProps(e){const a=N(this);return{...te(a,e),generalErrorTitle:a.generalErrorTitle,generalErrorDescription:a.generalErrorDescription,fieldRequiredError:a.fieldRequiredError,invalidCharacterError:a.invalidCharacterError,fieldInvalidError:a.fieldInvalidError,continueButton:a.continueButton,backButton:a.backButton,cancelButton:a.cancelButton,isPartnerAlertHeader:a.isPartnerAlertHeader,isPartnerAlertDescription:a.isPartnerAlertDescription,loadingErrorAlertHeader:a.loadingErrorAlertHeader,loadingErrorAlertDescription:a.loadingErrorAlertDescription,taxAndPayoutsDescription:a.taxAndPayoutsDescription,searchForCountryText:a.searchForCountryText,formStep:a.formStep,supportLink:a.supportLink}}render(){var a,t;const i=C()?function(e){const[a,t]=k({namespace:"sq:tax-and-cash",initialValue:"/1"});return A({step:a,setStep:t},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(){var e,a,t,i,n;const o=h(),l=y(),s=v(),[c,u]=k({namespace:"sq:tax-and-cash",initialValue:"/loading"}),[p,m]=k({namespace:"sq:tax-form-context",initialValue:{}}),[g,f]=k({namespace:"sq:user-form-context",initialValue:{firstName:void 0,lastName:void 0,email:void 0,countryCode:void 0,currency:void 0}}),[b,x]=k({namespace:"sq:currencies:list",initialValue:[]}),[C,S]=k({namespace:"sq:countries:list",initialValue:[]}),[w,T]=k({namespace:"sq:countries:sorted",initialValue:[]}),{data:_,errors:A}=P({namespace:"sq:user-info-query",query:pe,skip:!l,options:{batch:!1}}),N=(null===(t=null===(a=null===(e=null==_?void 0:_.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.countryCode)||g.countryCode;P({namespace:"sq:countries:query",query:me,skip:!l});const{data:E}=P({namespace:"sq:finance-network-settings",query:ve,skip:!l,variables:{filter:function(){var e,a,t;return"/1"===c?{}:"/4"===c?{currency_eq:null===(t=null===(a=null===(e=null==_?void 0:_.user)||void 0===e?void 0:e.impactConnection)||void 0===a?void 0:a.publisher)||void 0===t?void 0:t.currency}:N?{countryCode_eq:N}:{}}()}}),{data:M}=P({namespace:"sq:currencies:query",query:he,skip:!l,variables:{locale:s}}),D=d((()=>{var e,a;return null===(a=null===(e=null==E?void 0:E.impactFinanceNetworkSettings)||void 0===e?void 0:e.data)||void 0===a?void 0:a.reduce(((e,a)=>{var t,i;const n=null===(i=null===(t=null==M?void 0:M.currencies)||void 0===t?void 0:t.data)||void 0===i?void 0:i.find((e=>e.currencyCode===a.currency));return n?e.find((e=>e.currencyCode===a.currency))||g.countryCode&&a.countryCode!==N?e:[...e,n]:e}),[])}),[E,N]),R=(null==s?void 0:s.replace("_","-"))||"en",B=(e,a)=>e.displayName<a.displayName?-1:1,q=null===(i=null==E?void 0:E.impactFinanceNetworkSettings)||void 0===i?void 0:i.data,F=d((()=>new Set(null==q?void 0:q.map((e=>e.countryCode)).filter((e=>e)))),[q]),L=["CA","GB","US"],U=d((()=>Array.from(F).map((e=>H({countryCode:e,locale:R}))).sort(B).reduce(((e,a)=>L.includes(a.countryCode)?[a,...e]:[...e,a]),[])),[F]);return r((()=>{U&&T(U)}),[U]),r((()=>{D&&x(D)}),[D]),r((()=>{if(A)u("/error");else if(o&&l&&_){const e=null==_?void 0:_.user;if(!e||"/loading"!==c)return;const a=function(e){var a,t;if(!(null===(a=e.impactConnection)||void 0===a?void 0:a.connected)||!(null===(t=e.impactConnection)||void 0===t?void 0:t.publisher))return"/1";const{requiredTaxDocumentType:i,currentTaxDocument:n,withdrawalSettings:o,brandedSignup:r,payoutsAccount:l}=e.impactConnection.publisher;return i&&!n?l.hold&&l.holdReasons.includes("NO_W9_DOCUMENT")?"/dashboard":"/3":!o&&r?"/4":"/dashboard"}(e);u(a)}}),[o,l,null===(n=null==_?void 0:_.user)||void 0===n?void 0:n.email,A]),{step:c,setStep:u,context:p,namespace:I("sq:tax-and-cash"),loading:"/loading"===c}}();if(null===(a=this.demoData)||void 0===a?void 0:a.showTextProps){const a=N(this);return e("div",null,null===(t=Object.keys(a))||void 0===t?void 0:t.map((a=>{if("demoData"!==a)return e("div",null,e("b",null,a,":")," ",this[a],e("hr",null))})))}switch(i.step){case"/1":return e("sqm-user-info-form",Object.assign({},this.getGeneralStepTextProps("step1_")));case"/2":return e("sqm-indirect-tax-form",Object.assign({},this.getGeneralStepTextProps("step2_")));case"/3":return e("sqm-docusign-form",Object.assign({},this.getGeneralStepTextProps("step3_")));case"/4":return e("sqm-banking-info-form",Object.assign({},this.getGeneralStepTextProps("step4_")));case"/dashboard":return e("sqm-tax-and-cash-dashboard",Object.assign({},this.getGeneralStepTextProps("dashboard_")));case"/error":return e(W,{loadingErrorAlertHeader:this.loadingErrorAlertHeader,loadingErrorAlertDescription:this.loadingErrorAlertDescription})}return e(Y,null)}},ya=M({ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},WarningAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none",maxWidth:"600px"},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)"}},WarningHoldAlertContainer:{marginLeft:"-20px","&::part(base)":{maxWidth:"850px",border:"none",backgroundColor:"transparent"},"& sl-icon::part(base)":{color:"var(--sl-color-warning-500)"}},ErrorHoldAlertContainer:{marginLeft:"-20px","&::part(base)":{maxWidth:"850px",border:"none",backgroundColor:"transparent"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},ExpiringSoonAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none"}},BankingInformationContainer:{maxWidth:"700px"},IndirectTaxPreviewContainer:{marginTop:"var(--sl-spacing-x-large)",borderTop:"1px solid var(--sl-color-neutral-200)"},IndirectTaxPreviewHeaderContainer:{marginTop:"var(--sl-spacing-large)",marginBottom:"var(--sl-spacing-xx-small)",margin:"0",display:"flex",gap:"var(--sl-spacing-x-small)","&::part(base)":{color:"var(--sl-color-green-500)"}},IndirectTaxPreviewDetails:{gap:"var(--sl-spacing-x-small)",display:"flex",flexDirection:"column",lineHeight:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)"},InvoiceTableContainer:{marginTop:"var(--sl-spacing-medium)"},NotRegisteredIndirectTaxText:{color:"var(--sl-color-gray-500)"},TaxDocumentsContainer:{marginTop:"var(--sl-spacing-xx-large)",borderTop:"1px solid var(--sl-color-neutral-200)"},TaxDocumentsSectionHeaderContainer:{marginTop:"var(--sl-spacing-x-large)",marginBottom:"var(--sl-spacing-xx-small)"},StatusContainer:{marginTop:"var(--sl-spacing-x-large)",display:"flex",flexDirection:"column",gap:"var(--sl-spacing-x-small)","& h3":{margin:"0"},"& p":{margin:"0",paddingTop:"2px",color:"var(--sl-color-gray-500)"}},StatusAlert:{fontSize:"var(--sl-font-size-small)"},TaxFormDetailsContainer:{display:"flex",gap:"var(--sl-spacing-small)",alignItems:"center"},NewFormButton:{marginTop:"var(--sl-spacing-large)",maxWidth:"300px"},EditBankDetailsButton:{marginTop:"var(--sl-spacing-large)"},SkeletonOne:{width:"15%",height:"10px"},SkeletonTwo:{width:"25%",height:"24px",top:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-x-small)"},TaxSectionSkeletonContainer:{display:"flex",flexDirection:"column",marginTop:"var(--sl-spacing-x-large)"},TaxDocSubtext:{margin:"0",color:"var(--sl-color-neutral-500)",lineHeight:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)",marginLeft:"1px"},TooltipContainer:{display:"flex",textAlign:"center",width:"250px"},ToolTip:{top:"6px",width:"16px",height:"16px"},TaxNumberContainer:{display:"flex",flexDirection:"column",gap:"6px"},DescriptionText:{color:"var(--sl-color-gray-500)",fontSize:"var(--sl-font-size-x-small)",marginBottom:"none",maxWidth:"492px"},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)",marginTop:"0"},Dialog:{"&::part(panel)":{maxWidth:"420px"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-xx-large)"},"&::part(title)":{fontSize:"var(--sl-font-size-x-large)",fontWeight:"600",marginTop:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",fontSize:"var(--sl-font-size-small)"},"&::part(footer)":{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-small)",marginBottom:"var(--sl-spacing-xx-small)",alignItems:"center",flex:"1"}},DialogButton:{margin:"auto",width:"100%"}}),ga=ya.toString(),fa=a=>{var t;const{states:i,text:n,callbacks:o,slots:r}=a,l={NOT_VERIFIED:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"warning",pill:!0},n.statusTextNotVerified),e("p",null,p.formatMessage({id:"badgeTextAwaitingReview",defaultMessage:n.badgeTextAwaitingReview},{dateSubmitted:i.dateSubmitted}))),ACTIVE:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"success",pill:!0},n.statusTextActive),e("p",null,p.formatMessage({id:"badgeTextSubmittedOn",defaultMessage:"W9"===i.documentType?n.badgeTextSubmittedOn:n.badgeTextSubmittedOnW8},{dateSubmitted:i.dateSubmitted}))),INACTIVE:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"danger",pill:!0},n.statusTextNotActive),e("p",null,n.invalidForm)),undefined:e("div",{class:ya.classes.TaxFormDetailsContainer},e("sl-badge",{type:"danger",pill:!0},n.statusTextRequired),e("p",null,p.formatMessage({id:"requiredTaxForm",defaultMessage:n.requiredTaxForm},{taxFormType:i.documentType})))},s={INACTIVE:e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,p.formatMessage({id:"taxAlertHeaderNotActive",defaultMessage:"W9"===i.documentType?n.taxAlertHeaderNotActiveW9:n.taxAlertHeaderNotActiveW8},{documentType:i.documentTypeString})),e("br",null),p.formatMessage({id:"taxAlertMessage",defaultMessage:"W9"===i.documentType?n.taxAlertNotActiveMessageW9:n.taxAlertNotActiveMessageW8},{documentType:i.documentTypeString}))},d=function(a){switch(a){case"OVER_W9_THRESHOLD":return{header:n.w9RequiredHeader,description:p.formatMessage({id:"w9RequiredDescription",defaultMessage:n.w9RequiredDescription},{termsAndConditions:e("a",{target:"_blank",href:"https://terms.advocate.impact.com/PayoutTermsAndConditions.html"},n.termsAndConditions)}),button:e("sl-button",{style:{marginTop:"var(--sl-spacing-x-small)"},type:"default",onClick:o.onNewFormClick},n.w9RequiredButtonText),alertType:"info",icon:"info-circle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:REQUIRED":return{header:n.verificationRequiredHeader,description:p.formatMessage({id:"verificationRequiredDescription",defaultMessage:n.verificationRequiredDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),buttonText:n.verificationRequiredButtonText,alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:INTERNAL":return{header:n.verificationRequiredInternalHeader,description:p.formatMessage({id:"verificationRequiredInternalDescription",defaultMessage:n.verificationRequiredInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:REVIEW":return{header:n.verificationReviewInternalHeader,description:p.formatMessage({id:"verificationReviewInternalDescription",defaultMessage:n.verificationReviewInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};case"VERIFICATION:FAILED":return{header:n.verificationFailedInternalHeader,description:p.formatMessage({id:"verificationFailedInternalDescription",defaultMessage:n.verificationFailedInternalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),alertType:"critical",icon:"exclamation-octagon",class:ya.classes.ErrorHoldAlertContainer};case"HOLD":return{header:n.payoutHoldAlertHeader,description:p.formatMessage({id:"payoutHoldAlertDescription",defaultMessage:n.payoutHoldAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle",class:ya.classes.WarningHoldAlertContainer};default:return}}(i.payoutStatus);return e("div",null,e("div",null,e("style",{type:"text/css"},ga),i.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,n.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:n.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)}))),(null===(t=i.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:ya.classes.ErrorAlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,n.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:n.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)})),d&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",name:null==d?void 0:d.alertType,open:!0,class:null==d?void 0:d.class},e("sl-icon",{slot:"icon",name:null==d?void 0:d.icon}),e("strong",null,d.header),e("p",{style:{margin:"0"}},d.description),d.buttonText&&e("sl-button",{style:{marginTop:"var(--sl-spacing-x-small)"},type:"default",loading:i.veriffLoading,onClick:()=>o.onVerifyClick()},d.buttonText),d.button?d.button:e("div",{style:{display:"none"}})),e("sl-dialog",{label:n.replaceTaxFormModalHeader,class:ya.classes.Dialog,open:i.showNewFormDialog,"onSl-hide":o.onNewFormCancel},e("p",null,n.replaceTaxFormModalBodyText),e("sl-button",{slot:"footer",type:"primary",class:ya.classes.DialogButton,onClick:o.onNewFormClick},n.newFormButton),e("sl-button",{slot:"footer",type:"default",class:ya.classes.DialogButton,onClick:o.onNewFormCancel},n.cancelButton)),"INACTIVE"===i.status&&s[i.status],e("div",null,e("h3",{style:{marginBottom:"0"}},n.bankingInformationSectionHeader),e("p",{class:ya.classes.PageDescriptionText},n.taxAndPayoutsDescription),e("div",{class:ya.classes.BankingInformationContainer},r.payoutDetailsCardSlot,!i.loading&&e("p",{class:ya.classes.DescriptionText},n.payoutFromImpact),i.canEditPayoutInfo&&e("sl-button",{disabled:i.disabled||i.loading,type:"default",class:ya.classes.EditBankDetailsButton,onClick:o.onEditPayoutInfo},n.editPaymentInformationButton))),!i.noFormNeeded&&e("div",{class:ya.classes.TaxDocumentsContainer},e("div",null,i.loading?e("div",{class:ya.classes.TaxSectionSkeletonContainer},e("sl-skeleton",{class:ya.classes.SkeletonOne}),e("sl-skeleton",{class:ya.classes.SkeletonTwo})):e("div",null,e("div",null,e("span",{class:ya.classes.TaxFormDetailsContainer},e("div",{class:ya.classes.StatusContainer},e("h3",null,p.formatMessage({id:"section-subheader",defaultMessage:n.taxDocumentSectionSubHeader},{documentType:i.documentTypeString})),e("span",{class:ya.classes.StatusAlert},l[i.status]))),"NOT_VERIFIED"!==i.status&&e("sl-button",{disabled:i.disabled||i.loading,onClick:o.onClick,type:"default",class:ya.classes.NewFormButton,exportparts:"base: primarybutton-base"},n.newFormButton))))),e("div",{class:ya.classes.IndirectTaxPreviewContainer},i.loading?e("div",{class:ya.classes.TaxSectionSkeletonContainer},e("sl-skeleton",{class:ya.classes.SkeletonOne}),e("sl-skeleton",{class:ya.classes.SkeletonTwo})):e("div",null,e("h3",{class:ya.classes.IndirectTaxPreviewHeaderContainer},n.indirectTaxInfoSectionHeader,e("sl-tooltip",{trigger:"hover",placement:"right",content:n.indirectTaxTooltipSupport,class:ya.classes.TooltipContainer},e("sl-icon",{name:"info-circle",class:ya.classes.ToolTip}))),e("div",{class:ya.classes.IndirectTaxPreviewDetails},e("span",null,i.notRegistered?e("span",{class:ya.classes.NotRegisteredIndirectTaxText},p.formatMessage({id:"notRegisteredForTax",defaultMessage:n.notRegisteredForTax},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},n.supportLink)})):i.province?p.formatMessage({id:"indirectTaxInfoCanada",defaultMessage:n.indirectTaxInfoCanada},{country:"Canada",province:i.province}):i.subRegion?p.formatMessage({id:"indirectTaxInfoSpain",defaultMessage:n.indirectTaxInfoSpain},{country:i.country,subRegion:i.subRegion}):p.formatMessage({id:"indirectTaxInfoOtherCountry",defaultMessage:n.indirectTaxInfoOtherCountry},{country:i.country})),!i.notRegistered&&e("div",{class:ya.classes.TaxNumberContainer},e("span",null,p.formatMessage({id:"indirectTaxDetails",defaultMessage:n.indirectTaxDetails},{indirectTaxType:i.indirectTaxType,indirectTaxNumber:i.indirectTaxNumber})),e("span",null,i.qstNumber&&p.formatMessage({id:"qstNumber",defaultMessage:n.qstNumber},{qstNumber:i.qstNumber}),i.subRegionTaxNumber&&p.formatMessage({id:"subRegionTaxNumber",defaultMessage:n.subRegionTaxNumber},{subRegionTaxNumber:i.subRegionTaxNumber}))),!i.notRegistered&&e("div",{class:ya.classes.InvoiceTableContainer},e("sqm-invoice-table",{description:n.invoiceDescription,"prev-label":n.invoicePrevLabel,"more-label":n.invoiceMoreLabel,header:n.invoiceHeader,"empty-state-header":n.invoiceEmptyStateHeader,"empty-state-text":n.invoiceEmptyStateText},e("sqm-invoice-table-download-column",null),e("sqm-invoice-table-date-column",{"column-title":n.dateColumnTitle}),e("sqm-invoice-table-data-column",{"column-title":n.invoiceColumnTitle,property:"invoiceId"}),e("sqm-invoice-table-data-column",{"column-title":n.earningsColumnTitle,property:"earnings"}),e("sqm-invoice-table-data-column",{"column-title":n.indirectTaxColumnTitle,property:"indirectTax"}),e("sqm-invoice-table-data-column",{"column-title":n.earningsAfterTaxColumnTitle,property:"netEarnings"}))))))))};function ba(e,a){if(e)return new Intl.DisplayNames([(null==a?void 0:a.replace("_","-"))||"en-US"],{type:"region"}).of([e])}function xa(e){var a;if(!e)return"";const t=e.replace("_","");return null===(a=[...G,...z].find((e=>e.regionCode===t)))||void 0===a?void 0:a.displayName}function Ca(e){var a;const t=[...G,...z];if(null==e?void 0:e.indirectTaxRegion){const i=e.indirectTaxRegion.replace("_",""),n=null===(a=t.find((e=>e.regionCode===i)))||void 0===a?void 0:a.taxType;if(n)return n}return(null==e?void 0:e.withholdingTaxCountryCode)?"VAT":(null==e?void 0:e.indirectTaxCountryCode)&&Z[e.indirectTaxCountryCode]||"Indirect Tax"}const Sa=class{constructor(e){a(this,e),this.statusTextActive="Active",this.statusTextNotActive="Invalid Tax Form",this.statusTextNotVerified="Not Verified",this.statusTextRequired="Required",this.requiredTaxForm="Your payouts are on hold until you submit a {taxFormType} tax form.",this.badgeTextSubmittedOn="Submitted on {dateSubmitted}.",this.badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.",this.badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.",this.taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile",this.taxAlertHeaderNotActiveW8="{documentType} tax form is invalid",this.taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.",this.taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.",this.invalidForm="Make sure your information is correct and submit new form.",this.bankingInformationSectionHeader="Payout information",this.taxDocumentSectionHeader="Tax documents",this.taxDocumentSectionSubHeader="{documentType} tax form",this.indirectTaxInfoSectionHeader="Indirect tax",this.indirectTaxInfoCanada="Registered in {province}, {country}",this.indirectTaxInfoOtherCountry="Registered in {country}",this.indirectTaxInfoSpain="Registered in {country}, {subRegion}",this.indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our Support team.",this.indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}",this.newFormButton="Submit new form",this.editPaymentInformationButton="Edit Payout Information",this.notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.",this.qstNumber="QST number: {qstNumber}",this.subRegionTaxNumber="Income tax number: {subRegionTaxNumber}",this.statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.accountText="Account",this.payoutHoldAlertHeader="Your payout is on hold",this.payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.",this.payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.verificationRequiredInternalHeader="Identity Verification in Progress",this.verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.verificationReviewInternalHeader="Identity Verification Under Review",this.verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.verificationFailedInternalHeader="Identity Verification Unsuccessful",this.verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.verificationRequiredButtonText="Start Verification",this.w9RequiredHeader="Your next payout is on hold",this.w9RequiredDescription="You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.",this.termsAndConditions="Terms and Conditions",this.w9RequiredButtonText="Submit W9",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.invoiceColumnTitle="Invoice",this.dateColumnTitle="Date",this.earningsColumnTitle="Earnings",this.indirectTaxColumnTitle="Indirect tax",this.earningsAfterTaxColumnTitle="Earnings after tax",this.invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.",this.invoicePrevLabel="Prev",this.invoiceMoreLabel="Next",this.invoiceHeader="Invoices",this.invoiceEmptyStateHeader="View your invoice details",this.invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.replaceTaxFormModalHeader="Replace existing tax form",this.replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.",this.supportLink="support team",this.cancelButton="Cancel",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{generalDescription:e.generalErrorDescription,generalTitle:e.generalErrorTitle,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription}}}render(){const a=C()?function(e){return A({states:{dateSubmitted:"today",documentType:"W9",documentTypeString:"W9",status:"ACTIVE",country:"United States",indirectTaxNumber:55555555,indirectTaxType:"Indirect Tax",noFormNeeded:!0,disabled:!1,loading:!1,showNewFormDialog:!1,hasHold:!1,showVerifyIdentity:!1,payoutStatus:"DONE",veriffLoading:!1},callbacks:{onClick:()=>console.debug("check step"),onEditPayoutInfo:()=>console.debug("payout info"),onNewFormCancel:()=>console.log("hide"),onNewFormClick:()=>console.log("show"),onVerifyClick:()=>console.log("verify")},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):(e=>{var a,t,i,n,l,s,d,c,u,p,m,h;const y=S("sq:tax-and-cash"),g=S("sq:tax-form-context"),[f,x]=o(!1),{render:C,loading:w}=se(),T=v();r((()=>{g({}),window.location.hash&&y(`/${window.location.hash.replace("#","")}`)}),[]);const{data:I,loading:k,errors:P,refetch:_}=b("sq:user-info-query"),A=null===(t=null===(a=null==I?void 0:I.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher,N=null==A?void 0:A.requiredTaxDocumentType,E=null===(i=null==A?void 0:A.currentTaxDocument)||void 0===i?void 0:i.dateCreated,M=E?L.DateTime.fromMillis(E).toFormat("LLL dd, yyyy"):void 0,D=null===(n=G.find((e=>{var a;return e.regionCode===(null===(a=null==A?void 0:A.taxInformation)||void 0===a?void 0:a.indirectTaxRegion)})))||void 0===n?void 0:n.displayName,R=I?de(I):null;return r((()=>{const e=()=>_();return window.addEventListener(ce,e),()=>{window.removeEventListener(ce,e)}}),[]),{states:{dateSubmitted:M,documentType:N,canEditPayoutInfo:null==A?void 0:A.brandedSignup,documentTypeString:V(N),status:null===(l=null==A?void 0:A.currentTaxDocument)||void 0===l?void 0:l.status,subRegion:xa(null===(s=null==A?void 0:A.taxInformation)||void 0===s?void 0:s.indirectTaxRegion),subRegionTaxNumber:null===(d=null==A?void 0:A.taxInformation)||void 0===d?void 0:d.withholdingTaxId,qstNumber:null===(c=null==A?void 0:A.taxInformation)||void 0===c?void 0:c.additionalTaxId,indirectTaxType:Ca(null==A?void 0:A.taxInformation),indirectTaxNumber:null===(u=null==A?void 0:A.taxInformation)||void 0===u?void 0:u.indirectTaxId,isBusinessEntity:"W8BENE"===(null==A?void 0:A.requiredTaxDocumentType),province:D,country:ba(null===(p=null==A?void 0:A.taxInformation)||void 0===p?void 0:p.indirectTaxCountryCode,T),notRegistered:!(null===(m=null==A?void 0:A.taxInformation)||void 0===m?void 0:m.indirectTaxId),noFormNeeded:!N,disabled:k,loading:k,loadingError:!!(null==P?void 0:P.message),showNewFormDialog:f,hasHold:!!(null===(h=null==A?void 0:A.payoutsAccount)||void 0===h?void 0:h.hold),payoutStatus:R,veriffLoading:w},callbacks:{onClick:()=>x(!0),onVerifyClick:()=>C(),onEditPayoutInfo:()=>{g({overrideNextStep:"/dashboard",overrideBackStep:"/dashboard",hideSteps:!0}),y("/4")},onNewFormCancel:()=>x(!1),onNewFormClick:()=>{x(!1),g({overrideNextStep:"/dashboard",overrideBackStep:"/dashboard",hideSteps:!0}),y("/3")}},text:e.getTextProps()}})(this);return e(t,null,e(fa,{callbacks:a.callbacks,states:a.states,text:a.text,slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",Object.assign({},this.getTextProps()))}}))}},wa={AF:{name:"Afghanistan",dial_code:"+93"},AX:{name:"Aland Islands",dial_code:"+358"},AL:{name:"Albania",dial_code:"+355"},DZ:{name:"Algeria",dial_code:"+213"},AS:{name:"AmericanSamoa",dial_code:"+1684"},AD:{name:"Andorra",dial_code:"+376"},AO:{name:"Angola",dial_code:"+244"},AI:{name:"Anguilla",dial_code:"+1264"},AQ:{name:"Antarctica",dial_code:"+672"},AG:{name:"Antigua and Barbuda",dial_code:"+1268"},AR:{name:"Argentina",dial_code:"+54"},AM:{name:"Armenia",dial_code:"+374"},AW:{name:"Aruba",dial_code:"+297"},AU:{name:"Australia",dial_code:"+61"},AT:{name:"Austria",dial_code:"+43"},AZ:{name:"Azerbaijan",dial_code:"+994"},BS:{name:"Bahamas",dial_code:"+1242"},BH:{name:"Bahrain",dial_code:"+973"},BD:{name:"Bangladesh",dial_code:"+880"},BB:{name:"Barbados",dial_code:"+1246"},BY:{name:"Belarus",dial_code:"+375"},BE:{name:"Belgium",dial_code:"+32"},BZ:{name:"Belize",dial_code:"+501"},BJ:{name:"Benin",dial_code:"+229"},BM:{name:"Bermuda",dial_code:"+1441"},BT:{name:"Bhutan",dial_code:"+975"},BO:{name:"Bolivia, Plurinational State of",dial_code:"+591"},BA:{name:"Bosnia and Herzegovina",dial_code:"+387"},BW:{name:"Botswana",dial_code:"+267"},BR:{name:"Brazil",dial_code:"+55"},IO:{name:"British Indian Ocean Territory",dial_code:"+246"},BN:{name:"Brunei Darussalam",dial_code:"+673"},BG:{name:"Bulgaria",dial_code:"+359"},BF:{name:"Burkina Faso",dial_code:"+226"},BI:{name:"Burundi",dial_code:"+257"},KH:{name:"Cambodia",dial_code:"+855"},CM:{name:"Cameroon",dial_code:"+237"},CA:{name:"Canada",dial_code:"+1"},CV:{name:"Cape Verde",dial_code:"+238"},KY:{name:"Cayman Islands",dial_code:"+ 345"},CF:{name:"Central African Republic",dial_code:"+236"},TD:{name:"Chad",dial_code:"+235"},CL:{name:"Chile",dial_code:"+56"},CN:{name:"China",dial_code:"+86"},CX:{name:"Christmas Island",dial_code:"+61"},CC:{name:"Cocos (Keeling) Islands",dial_code:"+61"},CO:{name:"Colombia",dial_code:"+57"},KM:{name:"Comoros",dial_code:"+269"},CG:{name:"Congo",dial_code:"+242"},CD:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243"},CK:{name:"Cook Islands",dial_code:"+682"},CR:{name:"Costa Rica",dial_code:"+506"},CI:{name:"Cote d'Ivoire",dial_code:"+225"},HR:{name:"Croatia",dial_code:"+385"},CU:{name:"Cuba",dial_code:"+53"},CY:{name:"Cyprus",dial_code:"+357"},CZ:{name:"Czech Republic",dial_code:"+420"},DK:{name:"Denmark",dial_code:"+45"},DJ:{name:"Djibouti",dial_code:"+253"},DM:{name:"Dominica",dial_code:"+1767"},DO:{name:"Dominican Republic",dial_code:"+1849"},EC:{name:"Ecuador",dial_code:"+593"},EG:{name:"Egypt",dial_code:"+20"},SV:{name:"El Salvador",dial_code:"+503"},GQ:{name:"Equatorial Guinea",dial_code:"+240"},ER:{name:"Eritrea",dial_code:"+291"},EE:{name:"Estonia",dial_code:"+372"},ET:{name:"Ethiopia",dial_code:"+251"},FK:{name:"Falkland Islands (Malvinas)",dial_code:"+500"},FO:{name:"Faroe Islands",dial_code:"+298"},FJ:{name:"Fiji",dial_code:"+679"},FI:{name:"Finland",dial_code:"+358"},FR:{name:"France",dial_code:"+33"},GF:{name:"French Guiana",dial_code:"+594"},PF:{name:"French Polynesia",dial_code:"+689"},GA:{name:"Gabon",dial_code:"+241"},GM:{name:"Gambia",dial_code:"+220"},GE:{name:"Georgia",dial_code:"+995"},DE:{name:"Germany",dial_code:"+49"},GH:{name:"Ghana",dial_code:"+233"},GI:{name:"Gibraltar",dial_code:"+350"},GR:{name:"Greece",dial_code:"+30"},GL:{name:"Greenland",dial_code:"+299"},GD:{name:"Grenada",dial_code:"+1473"},GP:{name:"Guadeloupe",dial_code:"+590"},GU:{name:"Guam",dial_code:"+1671"},GT:{name:"Guatemala",dial_code:"+502"},GG:{name:"Guernsey",dial_code:"+44"},GN:{name:"Guinea",dial_code:"+224"},GW:{name:"Guinea-Bissau",dial_code:"+245"},GY:{name:"Guyana",dial_code:"+595"},HT:{name:"Haiti",dial_code:"+509"},VA:{name:"Holy See (Vatican City State)",dial_code:"+379"},HN:{name:"Honduras",dial_code:"+504"},HK:{name:"Hong Kong",dial_code:"+852"},HU:{name:"Hungary",dial_code:"+36"},IS:{name:"Iceland",dial_code:"+354"},IN:{name:"India",dial_code:"+91"},ID:{name:"Indonesia",dial_code:"+62"},IR:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98"},IQ:{name:"Iraq",dial_code:"+964"},IE:{name:"Ireland",dial_code:"+353"},IM:{name:"Isle of Man",dial_code:"+44"},IL:{name:"Israel",dial_code:"+972"},IT:{name:"Italy",dial_code:"+39"},JM:{name:"Jamaica",dial_code:"+1876"},JP:{name:"Japan",dial_code:"+81"},JE:{name:"Jersey",dial_code:"+44"},JO:{name:"Jordan",dial_code:"+962"},KZ:{name:"Kazakhstan",dial_code:"+77"},KE:{name:"Kenya",dial_code:"+254"},KI:{name:"Kiribati",dial_code:"+686"},KP:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850"},KR:{name:"Korea, Republic of South Korea",dial_code:"+82"},KW:{name:"Kuwait",dial_code:"+965"},KG:{name:"Kyrgyzstan",dial_code:"+996"},LA:{name:"Laos",dial_code:"+856"},LV:{name:"Latvia",dial_code:"+371"},LB:{name:"Lebanon",dial_code:"+961"},LS:{name:"Lesotho",dial_code:"+266"},LR:{name:"Liberia",dial_code:"+231"},LY:{name:"Libyan Arab Jamahiriya",dial_code:"+218"},LI:{name:"Liechtenstein",dial_code:"+423"},LT:{name:"Lithuania",dial_code:"+370"},LU:{name:"Luxembourg",dial_code:"+352"},MO:{name:"Macao",dial_code:"+853"},MK:{name:"Macedonia",dial_code:"+389"},MG:{name:"Madagascar",dial_code:"+261"},MW:{name:"Malawi",dial_code:"+265"},MY:{name:"Malaysia",dial_code:"+60"},MV:{name:"Maldives",dial_code:"+960"},ML:{name:"Mali",dial_code:"+223"},MT:{name:"Malta",dial_code:"+356"},MH:{name:"Marshall Islands",dial_code:"+692"},MQ:{name:"Martinique",dial_code:"+596"},MR:{name:"Mauritania",dial_code:"+222"},MU:{name:"Mauritius",dial_code:"+230"},YT:{name:"Mayotte",dial_code:"+262"},MX:{name:"Mexico",dial_code:"+52"},FM:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691"},MD:{name:"Moldova",dial_code:"+373"},MC:{name:"Monaco",dial_code:"+377"},MN:{name:"Mongolia",dial_code:"+976"},ME:{name:"Montenegro",dial_code:"+382"},MS:{name:"Montserrat",dial_code:"+1664"},MA:{name:"Morocco",dial_code:"+212"},MZ:{name:"Mozambique",dial_code:"+258"},MM:{name:"Myanmar",dial_code:"+95"},NA:{name:"Namibia",dial_code:"+264"},NR:{name:"Nauru",dial_code:"+674"},NP:{name:"Nepal",dial_code:"+977"},NL:{name:"Netherlands",dial_code:"+31"},AN:{name:"Netherlands Antilles",dial_code:"+599"},NC:{name:"New Caledonia",dial_code:"+687"},NZ:{name:"New Zealand",dial_code:"+64"},NI:{name:"Nicaragua",dial_code:"+505"},NE:{name:"Niger",dial_code:"+227"},NG:{name:"Nigeria",dial_code:"+234"},NU:{name:"Niue",dial_code:"+683"},NF:{name:"Norfolk Island",dial_code:"+672"},MP:{name:"Northern Mariana Islands",dial_code:"+1670"},NO:{name:"Norway",dial_code:"+47"},OM:{name:"Oman",dial_code:"+968"},PK:{name:"Pakistan",dial_code:"+92"},PW:{name:"Palau",dial_code:"+680"},PS:{name:"Palestinian Territory, Occupied",dial_code:"+970"},PA:{name:"Panama",dial_code:"+507"},PG:{name:"Papua New Guinea",dial_code:"+675"},PY:{name:"Paraguay",dial_code:"+595"},PE:{name:"Peru",dial_code:"+51"},PH:{name:"Philippines",dial_code:"+63"},PN:{name:"Pitcairn",dial_code:"+872"},PL:{name:"Poland",dial_code:"+48"},PT:{name:"Portugal",dial_code:"+351"},PR:{name:"Puerto Rico",dial_code:"+1939"},QA:{name:"Qatar",dial_code:"+974"},RO:{name:"Romania",dial_code:"+40"},RU:{name:"Russia",dial_code:"+7"},RW:{name:"Rwanda",dial_code:"+250"},RE:{name:"Reunion",dial_code:"+262"},BL:{name:"Saint Barthelemy",dial_code:"+590"},SH:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290"},KN:{name:"Saint Kitts and Nevis",dial_code:"+1869"},LC:{name:"Saint Lucia",dial_code:"+1758"},MF:{name:"Saint Martin",dial_code:"+590"},PM:{name:"Saint Pierre and Miquelon",dial_code:"+508"},VC:{name:"Saint Vincent and the Grenadines",dial_code:"+1784"},WS:{name:"Samoa",dial_code:"+685"},SM:{name:"San Marino",dial_code:"+378"},ST:{name:"Sao Tome and Principe",dial_code:"+239"},SA:{name:"Saudi Arabia",dial_code:"+966"},SN:{name:"Senegal",dial_code:"+221"},RS:{name:"Serbia",dial_code:"+381"},SC:{name:"Seychelles",dial_code:"+248"},SL:{name:"Sierra Leone",dial_code:"+232"},SG:{name:"Singapore",dial_code:"+65"},SK:{name:"Slovakia",dial_code:"+421"},SI:{name:"Slovenia",dial_code:"+386"},SB:{name:"Solomon Islands",dial_code:"+677"},SO:{name:"Somalia",dial_code:"+252"},ZA:{name:"South Africa",dial_code:"+27"},SS:{name:"South Sudan",dial_code:"+211"},GS:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500"},ES:{name:"Spain",dial_code:"+34"},LK:{name:"Sri Lanka",dial_code:"+94"},SD:{name:"Sudan",dial_code:"+249"},SR:{name:"Suriname",dial_code:"+597"},SJ:{name:"Svalbard and Jan Mayen",dial_code:"+47"},SZ:{name:"Swaziland",dial_code:"+268"},SE:{name:"Sweden",dial_code:"+46"},CH:{name:"Switzerland",dial_code:"+41"},SY:{name:"Syrian Arab Republic",dial_code:"+963"},TW:{name:"Taiwan",dial_code:"+886"},TJ:{name:"Tajikistan",dial_code:"+992"},TZ:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255"},TH:{name:"Thailand",dial_code:"+66"},TL:{name:"Timor-Leste",dial_code:"+670"},TG:{name:"Togo",dial_code:"+228"},TK:{name:"Tokelau",dial_code:"+690"},TO:{name:"Tonga",dial_code:"+676"},TT:{name:"Trinidad and Tobago",dial_code:"+1868"},TN:{name:"Tunisia",dial_code:"+216"},TR:{name:"Turkey",dial_code:"+90"},TM:{name:"Turkmenistan",dial_code:"+993"},TC:{name:"Turks and Caicos Islands",dial_code:"+1649"},TV:{name:"Tuvalu",dial_code:"+688"},UG:{name:"Uganda",dial_code:"+256"},UA:{name:"Ukraine",dial_code:"+380"},AE:{name:"United Arab Emirates",dial_code:"+971"},GB:{name:"United Kingdom",dial_code:"+44"},US:{name:"United States",dial_code:"+1"},UY:{name:"Uruguay",dial_code:"+598"},UZ:{name:"Uzbekistan",dial_code:"+998"},VU:{name:"Vanuatu",dial_code:"+678"},VE:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58"},VN:{name:"Vietnam",dial_code:"+84"},VG:{name:"Virgin Islands, British",dial_code:"+1284"},VI:{name:"Virgin Islands, U.S.",dial_code:"+1340"},WF:{name:"Wallis and Futuna",dial_code:"+681"},YE:{name:"Yemen",dial_code:"+967"},ZM:{name:"Zambia",dial_code:"+260"},ZW:{name:"Zimbabwe",dial_code:"+263"}},Ta=M({FormWrapper:{},ErrorInput:{"&::part(base)":{border:"1px solid var(--sl-color-danger-500)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sl-color-danger-500)"}},ErrorText:{color:"var(--sl-color-danger-500)",marginTop:"10px"},TextContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"16px"},InputContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"24px",paddingBottom:"36px",maxWidth:"450px"},SearchInput:{padding:"var(--sl-spacing-x-small)"},BtnContainer:{paddingTop:"36px",display:"flex",gap:"8px"},CheckboxWrapper:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},DescriptionText:{color:"var(--sl-color-neutral-500)"},BoldText:{fontWeight:"bold"},RoundedCheckbox:{"&::part(control)":{borderRadius:"50%"}},AlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},PartnerAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none",padding:"0 16px"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}},PageDescriptionText:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)"},PhoneInputsSection:{display:"flex",flexDirection:"column",gap:"4px","& p":{fontSize:"var(--sl-font-size-small)",color:"var(--sl-input-label-color)",fontWeight:"var(--sl-font-weight-semibold)"}},PhoneInputsContainer:{display:"flex",gap:"4px",width:"100%","& #phoneNumber":{width:"100%",minWidth:"0px"}}}),Ia=Ta.toString(),ka=a=>{var t,i,n,o,r,l,s,d,c,u,m,h,v,y,g,f,b,x,C;const{states:S,states:{formState:w},callbacks:T,text:I,refs:k,data:P}=a,{classes:_}=Ta,A=p.formatMessage({id:"bankingCollectionText",defaultMessage:I.allowBankingCollection},{termsAndConditionsLink:e("a",{href:I.termsAndConditionsLink,target:"_blank"},I.termsAndConditionsLabel)});let N;switch(P.regionLabelEnum){case"STATE":N=I.state;break;case"PROVINCE":N=I.province;break;case"REGION":N=I.region;break;default:N=I.state}return e("sl-form",{class:_.FormWrapper,"onSl-submit":T.onSubmit,ref:e=>k.formRef.current=e,novalidate:!0},e("style",{type:"text/css"},Ia,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n p {\n line-height: 18px;\n color: var(--sl-color-gray-800);\n font-size: var(--sl-font-size-small);\n }\n\n sl-radio-group::part(base) {\n display: flex;\n flex-direction: column;\n }\n\n sl-select#phoneNumberCountryCode::part(menu) {\n min-width: 250px;\n }\n "),S.loadingError&&e("div",null,e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:Ta.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,I.error.loadingErrorAlertHeader),e("br",null),p.formatMessage({id:"loadingErrorAlertDescription",defaultMessage:I.error.loadingErrorAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),e("br",null)),S.loading?e(J,null):e("div",null,e("div",{class:_.TextContainer},e("div",null,!S.hideSteps&&e("p",null,p.formatMessage({id:"formStep",defaultMessage:I.formStep},{step:S.step,count:4})),e("h3",null,I.personalInformation),e("p",{class:_.PageDescriptionText},I.taxAndPayoutsDescription))),(null===(t=w.errors)||void 0===t?void 0:t.general)&&e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"warning",open:!0,class:Ta.classes.AlertContainer},e("sl-icon",{slot:"icon",name:"exclamation-octagon"}),e("strong",null,I.error.generalTitle),e("br",null),p.formatMessage({id:"generalDescription",defaultMessage:I.error.generalDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),(S.isPartner||S.isUser)&&e("sl-alert",{type:"primary",open:!0,class:Ta.classes.PartnerAlertContainer,exportparts:"base: alert-base, icon:alert-icon"},e("sl-icon",{slot:"icon",name:"info-circle"}),e("strong",null,I.isPartnerAlertHeader),e("br",null),p.formatMessage({id:"isPartnerAlertDescription",defaultMessage:I.isPartnerAlertDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},I.supportLink)})),e("div",null,e("div",{class:_.InputContainer},e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",value:w.firstName,label:I.firstName,disabled:S.disabled||S.isUser||S.isPartner},(null===(i=w.errors)||void 0===i?void 0:i.firstName)?{class:_.ErrorInput,helpText:X(I.firstName,w.errors.firstName)}:{},{id:"firstName",name:"/firstName",required:!0})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",value:w.lastName,label:I.lastName,disabled:S.disabled||S.isUser||S.isPartner},(null===(n=w.errors)||void 0===n?void 0:n.lastName)?{class:_.ErrorInput,helpText:X(I.lastName,w.errors.lastName)}:{},{id:"lastName",name:"/lastName",required:!0})),e("sl-input",{exportparts:"label: input-label, base: input-base",value:w.email,label:I.email,disabled:!0,id:"email",name:"/email",required:!0}),e("sl-select",Object.assign({id:"countryCode",exportparts:"label: input-label, base: input-base",name:"/countryCode",label:I.country,value:w.countryCode,disabled:S.disabled||S.isPartner},(null===(o=w.errors)||void 0===o?void 0:o.countryCode)?{class:_.ErrorInput,helpText:X(I.country,w.errors.countryCode)}:{},{required:!0,"onSl-select":e=>T.onFormChange("countryCode",e)}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setCountrySearch(e.target.value)}}),null===(r=null==P?void 0:P.countries)||void 0===r?void 0:r.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(l=null==P?void 0:P.allCountries)||void 0===l?void 0:l.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),e("div",{class:_.PhoneInputsSection},e("p",null,I.phoneNumber),e("div",{class:_.PhoneInputsContainer},e("sl-select",Object.assign({id:"phoneNumberCountryCode",exportparts:"label: input-label, base: input-base",name:"/phoneNumberCountryCode",value:w.phoneNumberCountryCode,disabled:S.disabled||S.isPartner,ref:e=>k.phoneCountryRef.current=e},(null===(s=w.errors)||void 0===s?void 0:s.phoneNumberCountryCode)?{class:_.ErrorInput}:{},{required:!0,"onSl-select":e=>T.onFormChange("phoneCountry",e)}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setPhoneCountrySearch(e.target.value)}}),null===(d=null==P?void 0:P.phoneCountries)||void 0===d?void 0:d.map((a=>{var t,i;return e("sl-menu-item",{value:a.countryCode},e("div",{slot:"prefix"},`${null===(t=wa[a.countryCode])||void 0===t?void 0:t.name} `),null===(i=wa[a.countryCode])||void 0===i?void 0:i.dial_code)})),null===(c=null==P?void 0:P.allCountries)||void 0===c?void 0:c.map((a=>{var t,i;return e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},e("div",{slot:"prefix"},`${null===(t=wa[a.countryCode])||void 0===t?void 0:t.name} `),null===(i=wa[a.countryCode])||void 0===i?void 0:i.dial_code)}))),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",id:"phoneNumber",name:"/phoneNumber",value:w.phoneNumber,validationError:({value:e})=>{Q(/[a-zA-Z]+/,e)&&X(I.phoneNumber,I.error.fieldInvalidError)},disabled:S.disabled||S.isPartner},(null===(u=w.errors)||void 0===u?void 0:u.phoneNumber)?{class:_.ErrorInput,helpText:X(I.phoneNumber,w.errors.phoneNumber)}:{},{required:!0})))),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",label:I.address,id:"address",name:"/address",value:w.address,validationError:({value:e})=>!Q(/^[\x20-\xFF]+$/,e)&&X(I.address,I.error.invalidCharacterError),disabled:S.disabled||S.isPartner},(null===(m=w.errors)||void 0===m?void 0:m.address)?{class:_.ErrorInput,helpText:X(I.address,w.errors.address)}:{},{required:!0})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",label:I.city,id:"city",name:"/city",value:w.city,validationError:({value:e})=>!Q(/^[\x20-\xFF]+$/,e)&&X(I.city,I.error.invalidCharacterError),disabled:S.disabled||S.isPartner},(null===(h=w.errors)||void 0===h?void 0:h.city)?{class:_.ErrorInput,helpText:X(I.city,w.errors.city)}:{},{required:!0})),!S.hideState&&e("sl-select",Object.assign({label:N,exportparts:"label: input-label, base: input-base",id:"state",name:"/state",value:w.state,disabled:S.disabled||S.isPartner},(null===(v=w.errors)||void 0===v?void 0:v.state)?{class:_.ErrorInput,helpText:X(I.state,w.errors.state)}:{},{required:!0}),null===(y=P.regions)||void 0===y?void 0:y.map((a=>e("sl-menu-item",{value:a.value},a.label)))),e("sl-input",Object.assign({label:I.postalCode,exportparts:"label: input-label, base: input-base",id:"postalCode",name:"/postalCode",value:w.postalCode,disabled:S.disabled||S.isPartner},(null===(g=w.errors)||void 0===g?void 0:g.postalCode)?{class:_.ErrorInput,helpText:X(I.postalCode,w.errors.postalCode)}:{},{required:!0})),e("sl-select",Object.assign({id:"currency",exportparts:"label: input-label, base: input-base",name:"/currency",label:I.currency,menu:!0,value:w.currency,disabled:S.disabled||S.isPartner,helpText:I.currencyHelpText},(null===(f=w.errors)||void 0===f?void 0:f.currency)?{class:_.ErrorInput,helpText:X(I.currency,w.errors.currency)}:{},{required:!0,ref:e=>k.currencyRef.current=e}),e("sl-input",{class:_.SearchInput,placeholder:I.searchForCurrencyText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{T.setCurrencySearch(e.target.value)}}),null===(b=null==P?void 0:P.currencies)||void 0===b?void 0:b.map((a=>e("sl-menu-item",{value:a.currencyCode},a.currencyCode," - ",a.displayName))),null===(x=null==P?void 0:P.allCurrencies)||void 0===x?void 0:x.map((a=>e("sl-menu-item",{value:a.currencyCode,style:{display:"none"}},a.currencyCode," - ",a.displayName)))),e("div",{class:_.CheckboxWrapper},e("sl-checkbox",{exportparts:"label: input-label, base: input-base",checked:!0===w.allowBankingCollection,"onSl-change":e=>{e.target.value=e.target.checked},disabled:!S.isPartner&&S.disabled,required:!0,value:w.allowBankingCollection,id:"allowBankingCollection",name:"/allowBankingCollection"},A),(null===(C=w.errors)||void 0===C?void 0:C.allowBankingCollection)&&e("p",{class:_.ErrorText},X(I.termsAndConditionsLabel,w.errors.allowBankingCollection)))),e("sl-button",{type:"primary",disabled:!S.isPartner&&S.disabled,submit:!0,exportparts:"base: primarybutton-base"},I.continueButton))))},Pa=class{constructor(e){a(this,e),this.ignored=!0,this.firstName="First name",this.lastName="Last name",this.email="Email",this.country="Country",this.phoneNumber="Phone number",this.address="Address",this.city="City",this.state="State",this.province="Province",this.region="Region",this.postalCode="Postal code",this.currency="Currency",this.currencyHelpText="Choose your preferred payout currency",this.formStep="Step {step} of {count}",this.personalInformation="Personal Information",this.continueButton="Continue",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",this.termsAndConditionsLabel="terms and conditions",this.termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.searchForCountryText="Search for country..",this.searchForCurrencyText="Search for currency..",this.fieldRequiredError="{fieldName} is required",this.fieldInvalidError="{fieldName} is invalid",this.invalidCharacterError="{fieldName} includes characters that aren't supported.",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.supportLink="support team",l(this)}disconnectedCallback(){}getTextProps(){const e=N(this);return{...e,error:{fieldRequiredError:e.fieldRequiredError,fieldInvalidError:e.fieldInvalidError,generalTitle:e.generalErrorTitle,generalDescription:e.generalErrorDescription,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription,invalidCharacterError:e.invalidCharacterError}}}render(){const a=C()?function(e){const a=S("sq:tax-and-cash");return A({setStep:a,onSubmit:()=>{a("/2")},onRadioClick:()=>{},text:e.getTextProps(),refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}},data:{currencies:[{currencyCode:"CAD",displayName:"CAD"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"}],countries:[{countryCode:"CA",displayName:"Canada"}],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],allCountries:[{countryCode:"CA",displayName:"Canada"}]},callbacks:{setCurrencySearch:e=>console.log(e),setCountrySearch:e=>console.log(e),setPhoneCountrySearch:e=>console.log(e),onFormChange:()=>{}},states:{step:"1",disabled:!1,loading:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{errors:{email:!1,firstName:!1,lastName:!1,countryCode:!1,currency:!1}}}},e.demoData||{},{arrayMerge:(e,a)=>a})}(this):function(e){var a,t,i,l;const s=n(void 0),c=n(void 0),u=n(null),p=f("sq:tax-form-context"),m=f("sq:countries:sorted"),[h,v]=g("sq:tax-and-cash"),[y,x]=g("sq:user-form-context"),{data:C,loading:S,errors:w}=b("sq:user-info-query"),T=f("sq:currencies:list"),I=d((()=>[...T||[]].sort(((e,a)=>e.displayName.localeCompare(a.displayName)))),[T]),[k,P]=o(""),[A,N]=o(""),[E,M]=o(m||[]),[D,R]=o(m||[]),[B,q]=o(""),[F,L]=o(I||[]),[U,O]=o({});r((()=>{var e,a,t,i,n,o,r,l,s,d;const c=null==C?void 0:C.user;if(!c||"/1"!==h)return;if(ee(y))return;const u=(null===(e=c.managedIdentity)||void 0===e?void 0:e.emailVerified)?c.managedIdentity.email:c.email;(null===(a=c.impactConnection)||void 0===a?void 0:a.publisher)&&(null===(t=c.impactConnection)||void 0===t?void 0:t.user)?x({email:u,firstName:c.impactConnection.user.firstName,lastName:c.impactConnection.user.lastName,countryCode:c.impactConnection.publisher.countryCode,currency:c.impactConnection.publisher.currency,phoneNumberCountryCode:c.impactConnection.publisher.phoneNumberCountryCode,phoneNumber:c.impactConnection.publisher.phoneNumber,address:c.impactConnection.publisher.billingAddress,city:c.impactConnection.publisher.billingCity,state:c.impactConnection.publisher.billingState,postalCode:c.impactConnection.publisher.billingPostalCode}):(null==y?void 0:y.email)||x({email:u,firstName:c.firstName,lastName:c.lastName,countryCode:c.countryCode||"US",currency:null===(i=c.customFields)||void 0===i?void 0:i.currency,phoneNumberCountryCode:(null===(n=c.customFields)||void 0===n?void 0:n.phoneNumberCountryCode)||"US",phoneNumber:null===(o=c.customFields)||void 0===o?void 0:o.phoneNumber,address:null===(r=c.customFields)||void 0===r?void 0:r.address,city:null===(l=c.customFields)||void 0===l?void 0:l.city,state:null===(s=c.customFields)||void 0===s?void 0:s.state,postalCode:null===(d=c.customFields)||void 0===d?void 0:d.postalCode})}),[C,h,y]),r((()=>{(null==m?void 0:m.length)&&(""===k.trim()?M(m||[]):M(m.filter((e=>e.displayName.toLowerCase().includes(k.toLowerCase())))||[]))}),[k,m]),r((()=>{(null==m?void 0:m.length)&&(""===A.trim()?R(m||[]):R(m.filter((e=>e.displayName.toLowerCase().includes(A.toLowerCase())))||[]))}),[A,m]),r((()=>{(null==I?void 0:I.length)&&(""===B.trim()?L(I||[]):L(I.filter((e=>e.currencyCode.toLowerCase().includes(B.toLowerCase())))||[]))}),[B,I]);const W=["ES","AU","US","CA"].includes(y.countryCode),V=W?ae[null==y?void 0:y.countryCode]:{};return{setStep:v,onSubmit:async function(a){let t=a.target.getFormControls(),i={},n={};if(null==t||t.forEach((a=>{if(!a.name)return;const t=a.name,o=a.value;if("function"==typeof a.validationError){const e=(0,a.validationError)({control:a,key:t,value:o});e&&_.set(n,t,e)}a.required&&(!o||"string"==typeof o&&""===o.trim())&&_.set(n,t,e.fieldRequiredError),_.set(i,t,o)})),Object.keys(n).length)return void O(n);const{allowBankingCollection:o,...r}=i;x({...y,firstName:r.firstName,lastName:r.lastName,phoneNumberCountryCode:r.phoneNumberCountryCode,phoneNumber:r.phoneNumber,countryCode:r.countryCode,address:r.address,city:r.city,state:r.state,postalCode:r.postalCode,currency:r.currency}),v(p.overrideNextStep||"/2"),window.location.hash=""},text:e.getTextProps(),callbacks:{setCurrencySearch:q,setCountrySearch:P,setPhoneCountrySearch:N,onFormChange:(e,a)=>{var t,i;const n=null===(i=null===(t=a.detail)||void 0===t?void 0:t.item)||void 0===i?void 0:i.__value;n||console.error("Could not detect select change"),x({...y,[e]:n}),"countryCode"===e&&(c.current.value=n,s.current.value="")}},refs:{formRef:u,currencyRef:s,phoneCountryRef:c},data:{currencies:F,countries:E,phoneCountries:D,allCurrencies:I,allCountries:m,regionLabelEnum:null==V?void 0:V.labelEnum,regions:(null==V?void 0:V.regions)||[]},states:{step:null==h?void 0:h.replace("/",""),hideState:!W,hideSteps:!!p.hideSteps,disabled:S,loadingError:!!(null==w?void 0:w.message),loading:S,isPartner:!!(null===(t=null===(a=null==C?void 0:C.user)||void 0===a?void 0:a.impactConnection)||void 0===t?void 0:t.publisher),isUser:!!(null===(l=null===(i=null==C?void 0:C.user)||void 0===i?void 0:i.impactConnection)||void 0===l?void 0:l.user),formState:{...y,errors:U}}}}(this);return e(t,null,e(ka,{data:a.data,states:a.states,callbacks:{...a.callbacks,onSubmit:a.onSubmit},text:a.text,refs:a.refs}))}};export{Te as sqm_banking_info_form,Ae as sqm_code_verification,je as sqm_docusign_form,Ye as sqm_indirect_tax_form,Qe as sqm_invoice_table,ia as sqm_invoice_table_data_cell,na as sqm_invoice_table_data_column,oa as sqm_invoice_table_date_cell,ra as sqm_invoice_table_date_column,la as sqm_invoice_table_download_cell,sa as sqm_invoice_table_download_column,pa as sqm_payout_details_card,ma as sqm_table_cell,ha as sqm_table_row,va as sqm_tax_and_cash,Sa as sqm_tax_and_cash_dashboard,Pa as sqm_user_info_form}
|