@saasquatch/mint-components 1.8.5-24 → 1.8.5-26
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/{ShadowViewAddon-1e2f6f9b.js → ShadowViewAddon-89ba2ab0.js} +17 -17
- package/dist/cjs/{email-registration-view-5170d9f1.js → email-registration-view-a6b6430e.js} +3 -3
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +17 -17
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +3 -3
- package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-cae2a67d.js → sqm-invoice-table-view-501f8985.js} +8 -8
- package/dist/cjs/sqm-password-field.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-forgot-password-view-969c49ed.js → sqm-portal-forgot-password-view-ca5f6db9.js} +1 -1
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-851a020f.js → sqm-portal-profile-view-d8697f23.js} +4 -4
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-reset-password-view-96f329ed.js → sqm-portal-reset-password-view-07a13210.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-verify-email-view-ce552bbc.js → sqm-portal-verify-email-view-1ae5724a.js} +3 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +88 -31
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +13 -11
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +1 -1
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +1 -1
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +3 -3
- package/dist/collection/components/sqm-empty/sqm-empty-view.js +2 -2
- package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +1 -1
- package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +2 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +1 -1
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +2 -2
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +4 -4
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +2 -2
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +2 -2
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +2 -2
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +2 -2
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -0
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +3 -1
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +90 -32
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +8 -8
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -12
- package/dist/collection/components/views/email-registration-view.js +3 -3
- package/dist/esm/{ShadowViewAddon-8fd4f148.js → ShadowViewAddon-c22043d9.js} +17 -17
- package/dist/esm/{email-registration-view-07d80492.js → email-registration-view-4a4202e7.js} +3 -3
- package/dist/esm/sqm-banking-info-form_16.entry.js +17 -17
- package/dist/esm/sqm-big-stat_38.entry.js +3 -3
- package/dist/esm/sqm-empty_4.entry.js +2 -2
- package/dist/esm/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-c905071b.js → sqm-invoice-table-view-d00894ce.js} +8 -8
- package/dist/esm/sqm-password-field.entry.js +1 -1
- package/dist/esm/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-a764ad67.js} +1 -1
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-eeff5fa0.js → sqm-portal-profile-view-13f0ef79.js} +4 -4
- package/dist/esm/sqm-portal-profile.entry.js +1 -1
- package/dist/esm/sqm-portal-registration-form.entry.js +2 -2
- package/dist/esm/{sqm-portal-reset-password-view-79a85e02.js → sqm-portal-reset-password-view-d3e726a9.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-283bf637.js → sqm-portal-verify-email-view-279b4e58.js} +3 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +90 -33
- package/dist/esm/sqm-referred-registration.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +13 -11
- package/dist/esm-es5/ShadowViewAddon-c22043d9.js +1 -0
- package/dist/esm-es5/{email-registration-view-07d80492.js → email-registration-view-4a4202e7.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-c905071b.js → sqm-invoice-table-view-d00894ce.js} +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-a764ad67.js} +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-profile-view-13f0ef79.js +1 -0
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-79a85e02.js → sqm-portal-reset-password-view-d3e726a9.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-279b4e58.js +1 -0
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-05bfb3bf.js +391 -0
- package/dist/mint-components/{p-ebbcc7c5.entry.js → p-11be93f5.entry.js} +1 -1
- package/dist/mint-components/{p-11858d60.system.entry.js → p-18ccb4ad.system.entry.js} +1 -1
- package/dist/mint-components/{p-4b3fff57.entry.js → p-1a5005fe.entry.js} +2 -2
- package/dist/mint-components/{p-5c750437.entry.js → p-1a8a8795.entry.js} +1 -1
- package/dist/mint-components/{p-a61430ad.system.entry.js → p-20e2037d.system.entry.js} +1 -1
- package/dist/mint-components/{p-f3be6d20.entry.js → p-2a6133dc.entry.js} +1 -1
- package/dist/mint-components/{p-e0f374e2.entry.js → p-2f2b220a.entry.js} +1 -1
- package/dist/mint-components/{p-03cfceb5.js → p-3539d14d.js} +1 -1
- package/dist/mint-components/p-3a5d82b7.system.entry.js +1 -0
- package/dist/mint-components/p-44b12b2e.system.js +1 -1
- package/dist/mint-components/{p-d49e2f7a.js → p-46ef82ed.js} +1 -1
- package/dist/mint-components/{p-6868667d.entry.js → p-4e513c81.entry.js} +1 -1
- package/dist/mint-components/p-71fed413.system.entry.js +1 -0
- package/dist/mint-components/{p-7d5e0645.system.js → p-7487f23c.system.js} +1 -1
- package/dist/mint-components/p-7f6a6657.system.js +1 -0
- package/dist/mint-components/p-8a9ceee6.entry.js +9 -0
- package/dist/mint-components/p-9b400b7e.system.entry.js +1 -0
- package/dist/mint-components/p-a40d2ed3.system.js +1 -0
- package/dist/mint-components/{p-6a6b1966.system.entry.js → p-a9482c97.system.entry.js} +1 -1
- package/dist/mint-components/p-af7a9281.system.entry.js +1 -0
- package/dist/mint-components/p-b153fc0c.system.js +1 -0
- package/dist/mint-components/p-b5ee2781.js +1 -0
- package/dist/mint-components/p-b67f5743.system.js +1 -0
- package/dist/mint-components/p-b9d010e0.js +1 -0
- package/dist/mint-components/p-be584089.system.entry.js +1 -0
- package/dist/mint-components/{p-6d95589e.system.entry.js → p-be96cc00.system.entry.js} +1 -1
- package/dist/mint-components/p-c74a8f95.entry.js +1 -0
- package/dist/mint-components/{p-2020caa1.system.js → p-cd45b39f.system.js} +1 -1
- package/dist/mint-components/p-cef64e28.system.entry.js +1 -0
- package/dist/mint-components/{p-41e2a408.entry.js → p-d3cd5ec5.entry.js} +1 -1
- package/dist/mint-components/{p-1403b1f1.system.entry.js → p-da99e3c7.system.entry.js} +1 -1
- package/dist/mint-components/{p-9891a965.entry.js → p-dd5ca1b2.entry.js} +2 -2
- package/dist/mint-components/{p-1b9e6fc6.js → p-ea6a7135.js} +1 -1
- package/dist/mint-components/p-f24de0a5.entry.js +1 -0
- package/dist/mint-components/p-f5f25aba.js +1 -0
- package/dist/mint-components/{p-4d964945.entry.js → p-f710f9d7.entry.js} +3 -3
- package/dist/mint-components/{p-4e48267b.system.js → p-fca0dc98.system.js} +1 -1
- package/dist/mint-components/{p-b2e34063.system.entry.js → p-fd3dacb9.system.entry.js} +1 -1
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-8fd4f148.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-eeff5fa0.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-283bf637.js +0 -1
- package/dist/mint-components/p-0382167f.entry.js +0 -1
- package/dist/mint-components/p-10036f16.js +0 -1
- package/dist/mint-components/p-3652236f.system.entry.js +0 -1
- package/dist/mint-components/p-3e096e73.entry.js +0 -1
- package/dist/mint-components/p-4a3a0014.entry.js +0 -9
- package/dist/mint-components/p-4d9744bf.js +0 -1
- package/dist/mint-components/p-5e1366ac.system.js +0 -1
- package/dist/mint-components/p-6bf41e0d.system.js +0 -1
- package/dist/mint-components/p-8c5a6603.js +0 -1
- package/dist/mint-components/p-9bdccddd.system.entry.js +0 -1
- package/dist/mint-components/p-ab174fe6.system.entry.js +0 -1
- package/dist/mint-components/p-abc6cb26.system.js +0 -1
- package/dist/mint-components/p-ccb7d32e.system.entry.js +0 -1
- package/dist/mint-components/p-d4b174e1.system.js +0 -1
- package/dist/mint-components/p-d60b15e7.js +0 -391
- package/dist/mint-components/p-da718618.system.entry.js +0 -1
- package/dist/mint-components/p-e1253472.system.entry.js +0 -1
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i}from"./p-64c3217a.js";import{n as t}from"./p-2446212d.js";import{i as s,b as r}from"./p-ab49b4e4.js";import"./p-e7e129ac.js";import{c as a}from"./p-c1086930.js";import"./p-02be1a88.js";import"./p-cef45012.js";import{E as o}from"./p-
|
|
1
|
+
import{r as e,h as i}from"./p-64c3217a.js";import{n as t}from"./p-2446212d.js";import{i as s,b as r}from"./p-ab49b4e4.js";import"./p-e7e129ac.js";import{c as a}from"./p-c1086930.js";import"./p-02be1a88.js";import"./p-cef45012.js";import{E as o}from"./p-f5f25aba.js";import"./p-c3a388cd.js";import{u as l}from"./p-d1c7aed7.js";const h=class{constructor(i){e(this,i),this.ignored=!0,this.emailLabel="Email",this.firstNameLabel="First Name",this.lastNameLabel="Last Name",this.registerLabel="Start Referring",this.includeName=!1,this.hideBorder=!1,this.requiredFieldErrorMessage="Cannot be empty",this.invalidEmailErrorMessage="Please enter a valid email address",this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.",this.fraudErrorMessage="Our team will review this referral. If approved, you and your friend will receive your rewards. Need help? Reach out to our Support team.",this.fraudErrorMessageTitle="Looks like you tried referring yourself",this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",this.backgroundColor="#ffffff",this.includeCookies=!0,t(this)}disconnectedCallback(){}render(){const{states:e,callbacks:t}=s()?a({states:{error:"",loading:!1},callbacks:{submit:async()=>{r({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"})}}},this.demoData||{},{arrayMerge:(e,i)=>i}):l(this),h={fraudErrorMessage:this.fraudErrorMessage,fraudErrorMessageTitle:this.fraudErrorMessageTitle,emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:i("slot",{name:"top"}),bottomSlot:i("slot",{name:"bottom"})};return i(o,{states:e,callbacks:t,content:h})}};export{h as sqm_referred_registration}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};System.register(["./p-ff17b3a4.system.js","./p-d5a682bf.system.js","./p-59e810e6.system.js","./p-c5429a81.system.js","./p-4bd679a7.system.js","./p-1a673057.system.js","./p-6333265f.system.js","./p-4f775e84.system.js","./p-
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};System.register(["./p-ff17b3a4.system.js","./p-d5a682bf.system.js","./p-59e810e6.system.js","./p-c5429a81.system.js","./p-4bd679a7.system.js","./p-1a673057.system.js","./p-6333265f.system.js","./p-4f775e84.system.js","./p-b67f5743.system.js","./p-9cb1ab69.system.js"],(function(e){"use strict";var t,n,i,r,s,a,o,u,l,d,f,m,c,v;return{setters:[function(e){t=e.r;n=e.h},function(e){i=e.k;r=e.f;s=e.n},function(){},function(e){a=e.d;o=e.Q;u=e.y;l=e.f;d=e.i},function(e){f=e.c},function(){},function(e){m=e.g},function(){},function(e){c=e.P},function(e){v=e.i}],execute:function(){var g=a.gql(__makeTemplateObject(["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"],["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"]));var _=a.gql(__makeTemplateObject(["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"],["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"]));var h={country:"",email:"",firstName:"",lastName:"",errors:{},error:""};function p(e){var t=o();var n=i(false),s=n[0],a=n[1];var d=i(undefined),f=d[0],m=d[1];var c=i(h),p=c[0],y=c[1];var b=u(g,{},!(t===null||t===void 0?void 0:t.jwt));var x=l(_),N=x[0],S=x[1];r((function(){if(S===null||S===void 0?void 0:S.loading)return;if(S===null||S===void 0?void 0:S.errors){y((function(e){var t,n,i;return __assign(__assign({},e),{error:(i=(n=(t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.errors)===null||i===void 0?void 0:i[0].message})}))}else{m((function(e){var t;return __assign(__assign({},e),(t=S===null||S===void 0?void 0:S.data)===null||t===void 0?void 0:t.upsertUser)}));if(S===null||S===void 0?void 0:S.data)a(true)}}),[S===null||S===void 0?void 0:S.loading]);r((function(){var e,t;m((function(e){var t;return __assign(__assign({},e),(t=b===null||b===void 0?void 0:b.data)===null||t===void 0?void 0:t.viewer)}));y(__assign(__assign(__assign({},h),(e=b.data)===null||e===void 0?void 0:e.viewer),(t=S.data)===null||t===void 0?void 0:t.upsertUser))}),[b===null||b===void 0?void 0:b.data]);r((function(){var t,n;if((t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.message){y(__assign(__assign({},(n=b.data)===null||n===void 0?void 0:n.viewer),{error:e.networkRequestMessage}))}}),[S===null||S===void 0?void 0:S.errors]);var j=function(){a(false);if(p.firstName&&p.lastName){N({id:t===null||t===void 0?void 0:t.id,accountId:t===null||t===void 0?void 0:t.accountId,firstName:p.firstName,lastName:p.lastName});y((function(e){return __assign(__assign({},e),{errors:{},error:""})}));return}var n={};if(!p.firstName){n["firstName"]={message:e.fieldEmptyText}}if(!p.lastName){n["lastName"]={message:e.fieldEmptyText}}if(!v(n)){y((function(t){return __assign(__assign({},t),{error:e.formErrorText})}))}y((function(e){return __assign(__assign({},e),{errors:n})}))};return{states:{success:s,loading:(b===null||b===void 0?void 0:b.loading)||S.loading,submitDisabled:false,showCountry:!e.hideCountry,formState:p,user:f,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:j,onChange:function(e){var t=e.target,n=t.name,i=t.value;y((function(e){var t;return __assign(__assign({},e),(t={},t[n]=i,t))}))}}}}var y=e("sqm_portal_profile",function(){function e(e){t(this,e);this.ignored=true;this.firstnametext="First Name";this.lastnametext="Last Name";this.emailtext="Email";this.countrytext="Country";this.editProfileHeader="Edit your profile";this.editProfileSubHeader="Personal Information";this.submitChangeButtonText="Submit Changes";this.hideCountry=false;this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.";this.fieldEmptyText="Field is required";this.formErrorText="Please correct the errors below to update your profile.";this.submissionSuccessText="Your profile has been successfully updated.";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=d()?b(m(this)):p(m(this));return n(c,Object.assign({},e))};return e}());function b(e){return f({states:{success:false,loading:false,submitDisabled:false,showCountry:!e.hideCountry,user:{id:"01",accountId:"111100000",firstName:"Joe",lastName:"Smith",email:"jsmith@gmail.com",countryCode:"CA"},text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,emailtext:e.emailtext,countrytext:e.countrytext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText,submissionSuccessText:e.submissionSuccessText,fieldEmptyText:e.fieldEmptyText},formState:{country:"Canada",firstName:"Joe",lastName:"Smith",errors:null,error:""}},callbacks:{onSubmit:function(e){return console.log(e)},onChange:function(e){return console.log(e)}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as e,c as s}from"./p-64c3217a.js";import{n as r,f as a,k as n,i,m as o,b as l,j as c}from"./p-2446212d.js";import{i as d}from"./p-7cf5c24c.js";import{i as u,_ as h,d as m,Q as p,H as v,f as g,y as f,B as b,L as y,g as x,$ as w,p as k,q as C,x as E,u as S,r as I,S as M}from"./p-ab49b4e4.js";import{j as R}from"./p-e7e129ac.js";import{c as q}from"./p-c1086930.js";import"./p-02be1a88.js";import{c as _}from"./p-cef45012.js";import{a as T}from"./p-71c592d4.js";import{u as A}from"./p-b4984452.js";import"./p-df1b9e5b.js";import{g as N,a as P,s as L}from"./p-9ec99ced.js";import"./p-5d0c9424.js";import{p as D}from"./p-8d363802.js";import{R as V,u as F}from"./p-c3a388cd.js";import{i as $}from"./p-4ca22e1b.js";import{A as j}from"./p-121cdc60.js";import{b as B,V as z,B as O,Q as H,K as U,j as W,M as G,D as Z,E as K,H as X,I as Y,W as J,L as Q,N as tt,d as et,i as st,P as rt,e as at,f as nt,R as it,X as ot,k as lt,a as ct,S as dt,C as ut,u as ht,c as mt,T as pt}from"./p-
|
|
1
|
+
import{r as t,h as e,c as s}from"./p-64c3217a.js";import{n as r,f as a,k as n,i,m as o,b as l,j as c}from"./p-2446212d.js";import{i as d}from"./p-7cf5c24c.js";import{i as u,_ as h,d as m,Q as p,H as v,f as g,y as f,B as b,L as y,g as x,$ as w,p as k,q as C,x as E,u as S,r as I,S as M}from"./p-ab49b4e4.js";import{j as R}from"./p-e7e129ac.js";import{c as q}from"./p-c1086930.js";import"./p-02be1a88.js";import{c as _}from"./p-cef45012.js";import{a as T}from"./p-71c592d4.js";import{u as A}from"./p-b4984452.js";import"./p-df1b9e5b.js";import{g as N,a as P,s as L}from"./p-9ec99ced.js";import"./p-5d0c9424.js";import{p as D}from"./p-8d363802.js";import{R as V,u as F}from"./p-c3a388cd.js";import{i as $}from"./p-4ca22e1b.js";import{A as j}from"./p-121cdc60.js";import{b as B,V as z,B as O,Q as H,K as U,j as W,M as G,D as Z,E as K,H as X,I as Y,W as J,L as Q,N as tt,d as et,i as st,P as rt,e as at,f as nt,R as it,X as ot,k as lt,a as ct,S as dt,C as ut,u as ht,c as mt,T as pt}from"./p-05bfb3bf.js";import"./p-e704842c.js";const vt=class{constructor(e){t(this,e),this.flexReverse=!1,this.ignored=!0,r(this)}disconnectedCallback(){}render(){var t;const{props:s,label:r}=u()?B(this):z(this),a=!!(null===(t=h().innerHTML)||void 0===t?void 0:t.trim()),n=e("slot",{name:"label"},a?e("slot",null):r);return e(O,Object.assign({},s,{labelSlot:n}))}},gt=class{constructor(e){t(this,e),r(this)}disconnectedCallback(){}render(){var t,r;const n=null!==(t=function(t){if(t)try{return H(t)}catch{}}(this.brandColor))&&void 0!==t?t:"",i=(null!==(r=this.brandFont)&&void 0!==r?r:"Nunito Sans").trim()||void 0;a((()=>{if(!i)return;const t=document.createElement("link");return t.setAttribute("href",function(...t){return`https://fonts.googleapis.com/css2?${t.map((t=>`family=${encodeURIComponent(t)}`)).join("&")}`}(i)),t.setAttribute("rel","stylesheet"),document.head.appendChild(t),()=>document.head.removeChild(t)}),[i]);const o=null!=i?i:"";return e(s,null,e("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),e("slot",null))}},ft=class{constructor(e){t(this,e),this.ignored=!0,this.width=347,this.gap=24,r(this)}disconnectedCallback(){}render(){return e(U,Object.assign({},N(this)),e("slot",null))}},bt=_({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),yt=bt.toString();function xt({missingProps:t,heading:s="There was a problem loading this section",subheading:r="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:a="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},i){if(!t)return!1;const o=h(),[l,c]=n(!1);return e("sl-alert",{type:"danger",open:!0},e("style",{type:"text/css"},yt),e("div",{slot:"icon",class:bt.classes.IconStyle},e("sl-icon",{name:"exclamation-octagon"})),e("div",{class:bt.classes.DivStyle},e("h2",{class:bt.classes.Heading},d.formatMessage({id:"error-heading",defaultMessage:s})),e("p",null,d.formatMessage({id:"error-subheading",defaultMessage:r}))),e("details",{class:bt.classes.Details},e("summary",{onClick:()=>c(!l)},l?"Less":"More"," details"),e("p",null,d.formatMessage({id:"error-description",defaultMessage:a},{tagName:o.tagName.toLowerCase()})),e("ul",null,t.map((t=>e("li",null,e("strong",null,t.attribute)))))),e("div",{class:bt.classes.Children},i))}const wt=class{constructor(e){t(this,e),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,r(this)}disconnectedCallback(){}render(){const t=P([{attribute:"checkbox-name",value:this.checkboxName}]);if(!u()&&t)return e(xt,{missingProps:t,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const s={...N(this)},{states:r,callbacks:o}=u()?q({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(t,e)=>e}):function(t){var e;const s=i(V),[r,o]=n(!1);return a((()=>{var e,r;(null===(e=null==s?void 0:s.initialData)||void 0===e?void 0:e[t.checkboxName])&&o(!!(null===(r=null==s?void 0:s.initialData)||void 0===r?void 0:r[t.checkboxName]))}),[null===(e=null==s?void 0:s.initialData)||void 0===e?void 0:e[t.checkboxName]]),{states:{registrationFormState:s,checked:r},callbacks:{setChecked:o}}}(this);return e(W,{states:r,content:s,callbacks:o})}},kt=m.gql`
|
|
2
2
|
query fuelTankRewardsQuery($programId: ID!) {
|
|
3
3
|
user: viewer {
|
|
4
4
|
... on User {
|
|
@@ -98,7 +98,7 @@ import{r as t,h as e,c as s}from"./p-64c3217a.js";import{n as r,f as a,k as n,i,
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
`,Bt=class{constructor(e){t(this,e),this.hideViewer=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,r(this),J(this)}disconnectedCallback(){}render(){const t={empty:e(zt,null),loadingstate:e(Ot,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,showRank:this.showRank},s={...t,demoData:this.demoData},r=u()?function(t){var s,r;const a=(null===(r=null===(s=t.demoData)||void 0===s?void 0:s.data)||void 0===r?void 0:r.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return q({states:{loading:!1,hasLeaders:!0,styles:{usersheading:t.usersheading?t.usersheading:"Top referrers",statsheading:t.statsheading?t.statsheading:"New customers",rankheading:t.rankheading?t.rankheading:"Rank",anonymousUser:t.anonymousUser?t.anonymousUser:"Anonymous User",showRank:t.showRank,hideViewer:t.hideViewer}},data:{rankType:"rowNumber",leaderboard:a},elements:{empty:e(zt,null),loadingstate:e(Ot,null)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(s):function(t){var e,s,r,a,n,i,o,l,c,d;const u=v(),h=null!==(e=t.programId)&&void 0!==e?e:u,m=p(),g=y(),b=h?{type:t.leaderboardType,filter:{programId_eq:h}}:{type:t.leaderboardType,filter:{}};t.interval&&(b.filter.interval=t.interval),g&&(b.locale=g),t.maxRows>0&&(b.limit=t.maxRows);const{data:x,loading:w}=f($t,b,!(null==m?void 0:m.jwt)),{data:k}=f(jt,b,!(null==m?void 0:m.jwt)),C=null==(I=null===(s=null==x?void 0:x.userLeaderboard)||void 0===s?void 0:s.rows)?void 0:I.flatMap((e=>{var s,r;return{textValue:e.textValue,firstName:e.firstName,lastInitial:e.lastInitial,rank:null===(s=e.rank)||void 0===s?void 0:s[t.rankType],rowNumber:null===(r=e.rank)||void 0===r?void 0:r.rowNumber}})),E=null==C?void 0:C.sort((function(t,e){return t.rank-e.rank})),S={textValue:null===(a=null===(r=null==k?void 0:k.viewer)||void 0===r?void 0:r.leaderboardRank)||void 0===a?void 0:a.textValue,firstName:null===(n=null==k?void 0:k.viewer)||void 0===n?void 0:n.firstName,lastInitial:null===(i=null==k?void 0:k.viewer)||void 0===i?void 0:i.lastInitial,rank:null===(l=null===(o=null==k?void 0:k.viewer)||void 0===o?void 0:o.leaderboardRank)||void 0===l?void 0:l[t.rankType],rowNumber:null===(d=null===(c=null==k?void 0:k.viewer)||void 0===c?void 0:c.leaderboardRank)||void 0===d?void 0:d.rowNumber};var I;return{states:{loading:w,hasLeaders:(null==E?void 0:E.length)>0,styles:t},data:{leaderboard:E,rankType:t.rankType,viewerRank:S},elements:{empty:t.empty,loadingstate:t.loadingstate}}}(t);return e(Q,Object.assign({},r))}};function zt(){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}function Ot(){return e("slot",{name:"loading"},e("table",null,[...Array(10)].map((()=>e("tr",null,e("td",null,e("sl-skeleton",null)))))))}const Ht=_({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Ut=Ht.toString();function Wt(t){const{onClick:s,buttonText:r}=t;return e("span",{class:Ht.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},Ut,"\n:host{\n display: inline; \n}\n"),e("sl-button",{type:"primary",exportparts:"base: primarybutton-base"},e("a",{onClick:s,class:Ht.classes.Link,part:"sqm-link"},r)))}const Gt=class{constructor(e){t(this,e),this.openInNewTab=!1,this.buttonText="Click here"}render(){return e(Wt,Object.assign({},{...N(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},Zt=class{constructor(e){t(this,e),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",r(this)}disconnectedCallback(){}render(){const{states:t}=u()?q({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(t,e)=>e}):function(t){return{states:{registrationFormState:i(V),content:{lastNameLabel:t.lastNameLabel,firstNameLabel:t.firstNameLabel}}}}(this);return e(tt,{states:t})}};function Kt(t){const{states:s}=t,{styles:r}=s;return s.includeDropdown?e("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},e("sl-button",{slot:"trigger",caret:!0,onClick:t.callbacks.rerender,exportparts:"base: dropdownbutton-base"},r.menuLabel),e("sl-menu",{ref:e=>{void 0===t.ref.current&&(t.ref.current=e,t.callbacks.rerender())}},e("slot",null))):""}const Xt=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){const t=u()?function(t){return q({states:{includeDropdown:!0,styles:{...t,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},t.demoData||{},{arrayMerge:(t,e)=>e})}(N(this)):function(t){const e=o(),[,s]=x(),r=p();return a((()=>{var t;null===(t=e.current)||void 0===t||t.addEventListener("sl-select",(t=>function(t){w.push(t.detail.item.value)}(t)))}),[e.current]),{states:{includeDropdown:void 0!==((null==r?void 0:r.id)||(null==r?void 0:r.accountId)||(null==r?void 0:r.jwt)),styles:{menuLabel:t.menuLabel}},callbacks:{rerender:s},ref:e}}(N(this));return e(s,{slot:"sqm-navigation-menu"},e(Kt,Object.assign({},t)))}};Xt.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const Yt=class{constructor(e){t(this,e),this.ignored=!0,this.modalChangePasswordHeader="Change Password",this.cancelText="Cancel",this.changePasswordButtonText="Change Password",this.passwordFieldLabel="New Password",this.confirmPasswordFieldLabel="Confirm New Password",this.successMessage="Your password has been updated.",this.portalChangePasswordHeader="Password",this.portalChangePasswordButtonText="Change your password...",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.nonMatchingPasswordErrorText="contain at least 1 lowercase character",this.invalidSessionErrorText="Please log in again to change your password.",this.hasErrorText="contain at least 1 number or symbol",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s}=u()?function(t){const[e,s]=n(!1);return q({states:{open:e,error:"",content:{modalChangePasswordHeader:t.modalChangePasswordHeader,cancelText:t.cancelText,changePasswordButtonText:t.changePasswordButtonText,passwordFieldLabel:t.passwordFieldLabel,confirmPasswordFieldLabel:t.confirmPasswordFieldLabel,successMessage:t.successMessage,portalChangePasswordHeader:t.portalChangePasswordHeader,portalChangePasswordButtonText:t.portalChangePasswordButtonText,meetsRequirementsText:t.meetsRequirementsText,doesNotMeetRequirementsText:t.doesNotMeetRequirementsText,minErrorText:t.minErrorText,uppercaseErrorText:t.uppercaseErrorText,lowercaseErrorText:t.lowercaseErrorText,hasErrorText:t.hasErrorText}},callbacks:{setOpen:t=>s(t),submit:t=>console.log("Submit",t)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(this):function(t){var e,s,r,a,i,o,l;const[c,{loading:d,errors:u}]=k(),[h,m]=n(!1),[v,g]=n(""),[f,b]=n(!1),y=p();return{states:{open:h,loading:d,success:f,error:v||(null===(a=null===(r=null===(s=null===(e=null==u?void 0:u.response)||void 0===e?void 0:e.errors)||void 0===s?void 0:s[0])||void 0===r?void 0:r.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(o=null===(i=null==u?void 0:u.response)||void 0===i?void 0:i.errors)||void 0===o?void 0:o[0])||void 0===l?void 0:l.message),content:{modalChangePasswordHeader:t.modalChangePasswordHeader,cancelText:t.cancelText,changePasswordButtonText:t.changePasswordButtonText,passwordFieldLabel:t.passwordFieldLabel,confirmPasswordFieldLabel:t.confirmPasswordFieldLabel,successMessage:t.successMessage,portalChangePasswordHeader:t.portalChangePasswordHeader,portalChangePasswordButtonText:t.portalChangePasswordButtonText,meetsRequirementsText:t.meetsRequirementsText,doesNotMeetRequirementsText:t.doesNotMeetRequirementsText,minErrorText:t.minErrorText,uppercaseErrorText:t.uppercaseErrorText,lowercaseErrorText:t.lowercaseErrorText,hasErrorText:t.hasErrorText}},data:{},callbacks:{setOpen:m,submit:async e=>{var s,r;b(!1);const a=null===(s=e.detail)||void 0===s?void 0:s.formData;if(null==a||a.forEach(((t,e)=>{R.set(a,e,t)})),!(null==y?void 0:y.jwt))return void g(t.invalidSessionErrorText);if(a.password!==a.confirmPassword)return void g(t.nonMatchingPasswordErrorText);g("");const n={password:a.password},i=await c(n);i instanceof Error||!(null===(r=i.changeManagedIdentityPassword)||void 0===r?void 0:r.success)||b(!0)}}}}(this);return e(et,{states:t,callbacks:s})}},Jt=class{constructor(e){t(this,e),this.ignored=!0,this.hideSupportText=!1,this.supportEmail="support@example.com",this.supportText="For program support, contact {email}",this.hidePoweredBy=!1,this.poweredByLink="https://impact.com/advocate/",this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",r(this)}disconnectedCallback(){}render(){return e(st,Object.assign({},N(this)))}static get assetsDirs(){return["../../assets"]}},Qt=class{constructor(e){t(this,e),this.ignored=!0,this.notFullScreen=!1,r(this)}disconnectedCallback(){}render(){const t=e("slot",{name:"footer"}),s=e("slot",{name:"header"}),r=u()?function(t,s,r){return q({notFullScreen:!0,data:{footer:t||e("span",null,"example@example.com"),header:s||e("div",{style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal"))},callbacks:{rerender:()=>{}}},r.demoData||{},{arrayMerge:(t,e)=>e})}(t,s,this):function(t,e){const[,s]=x();return{data:{footer:t,header:e},callbacks:{rerender:s}}}(t,s);return e(rt,Object.assign({},r),e("slot",null))}},te=class{constructor(e){t(this,e),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s}=u()?q({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register"},callbacks:{submit:async()=>{console.log("submit")}}},this.demoData||{},{arrayMerge:(t,e)=>e}):function(t){var e,s,r,a,i,o,l;const[c,{loading:d,errors:u}]=C(),[h,m]=n(""),p=new URLSearchParams(w.location.search),v=p.get("nextPage");return{states:{loading:d,error:(null===(a=null===(r=null===(s=null===(e=null==u?void 0:u.response)||void 0===e?void 0:e.errors)||void 0===s?void 0:s[0])||void 0===r?void 0:r.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(o=null===(i=null==u?void 0:u.response)||void 0===i?void 0:i.errors)||void 0===o?void 0:o[0])||void 0===l?void 0:l.message)||h,registerPath:t.registerPath,forgotPasswordPath:t.forgotPasswordPath},callbacks:{submit:async e=>{var s,r;m("");let a=e.detail.formData;null==a||a.forEach(((t,e)=>{R.set(a,e,t)}));const n={email:a.email,password:a.password},i=await c(n);if(i instanceof Error)((null==i?void 0:i.message)||(null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.error))&&m(t.networkErrorMessage);else if(null===(r=i.authenticateManagedIdentityWithEmailAndPassword)||void 0===r?void 0:r.token){p.delete("nextPage");const e=L(v||t.nextPage);w.push(e.href)}}}}}(this),r={forgotPasswordButton:e("slot",{name:"forgotPassword"},e("a",{onClick:()=>w.push(t.forgotPasswordPath)},this.forgotPasswordLabel)),secondaryButton:e("slot",{name:"secondaryButton"},e("sl-button",{type:"text",disabled:t.loading,onClick:()=>w.push(t.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return e(at,{states:t,callbacks:s,content:r})}},ee=class{constructor(e){t(this,e),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s,refs:r}=u()?q({states:{error:"",loading:!1,confirmPassword:(n=this).confirmPassword,hideInputs:n.hideInputs||!1,customPasswordField:!1,loginPath:n.loginPath,disablePasswordValidation:n.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},n.demoData||{},{arrayMerge:(t,e)=>e}):function(t){var e,s,r,n,i,l,c,d,u;const h=o(null),{registrationFormState:m,setRegistrationFormState:p}=F({}),[v,{loading:g,errors:f}]=E();a((()=>{if(!h.current)return;const t=h.current;return t.addEventListener("sl-input",b),()=>{t.removeEventListener("sl-input",b)}}),[h.current]);const b=S((t=>{var e,s;if("tel"!==(null===(s=null===(e=t.target)||void 0===e?void 0:e.type)||void 0===s?void 0:s.toLowerCase()))return;const r=new j("US");t.target.value=r.input(t.target.value)}),[]);let y="";return y=(null===(e=null==f?void 0:f.response)||void 0===e?void 0:e.error)||(null==f?void 0:f.message)&&!(null===(s=null==f?void 0:f.response)||void 0===s?void 0:s.errors.length)?t.networkErrorMessage:(null===(l=null===(i=null===(n=null===(r=null==f?void 0:f.response)||void 0===r?void 0:r.errors)||void 0===n?void 0:n[0])||void 0===i?void 0:i.extensions)||void 0===l?void 0:l.message)||(null===(u=null===(d=null===(c=null==f?void 0:f.response)||void 0===c?void 0:c.errors)||void 0===d?void 0:d[0])||void 0===u?void 0:u.message)||(null==m?void 0:m.error),{states:{loading:g,error:y,registrationFormState:m,confirmPassword:t.confirmPassword,hideInputs:t.hideInputs,loginPath:t.loginPath,disablePasswordValidation:t.disablePasswordValidation},callbacks:{submit:async e=>{var s;let r=e.target.getFormControls(),a={},n={};if(null==r||r.forEach((e=>{if(!e.name)return;const s=e.name,r=e.value;if(R.set(a,s,r),e.required&&!r&&R.set(n,s,t.requiredFieldErrorMessage),"function"==typeof e.validationError){const t=(0,e.validationError)({control:e,key:s,value:r});t&&R.set(n,s,t)}})),(t.confirmPassword||a.confirmPassword)&&a.password!==a.confirmPassword&&(n={...n,confirmPassword:t.passwordMismatchErrorMessage}),Object.keys(n).length)return void p({loading:!1,error:"",validationErrors:n});p({loading:!0,error:"",validationErrors:{}});const{email:i,password:o}=a;delete a.email,delete a.password,delete a.confirmPassword,a={...a};const l={email:i,password:o,formData:a,redirectPath:t.redirectPath};try{const e=await v(l);if(e instanceof Error)throw e;p({loading:!1,error:"",validationErrors:{}}),(null===(s=e.registerManagedIdentityWithEmailAndPassword)||void 0===s?void 0:s.token)&&w.push(t.nextPage)}catch(e){p({loading:!1,error:t.networkErrorMessage,validationErrors:{}})}},inputFunction:b},refs:{formRef:h}}}(this);var n;const i={formData:e("slot",{name:"formData"}),secondaryButton:e("slot",{name:"secondaryButton"},e("sl-button",{type:"text",disabled:t.loading,onClick:()=>w.push(t.loginPath)},this.loginLabel)),terms:e("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return e(nt,{states:t,callbacks:s,content:i,refs:r})}};function se(t,s){const r=_({Container:{color:t.textColor||"var(--sl-color-neutral-900)",background:t.backgroundColor||""},Header:{fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-bold)",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-large)",textAlign:"center"},Grid:{display:"flex",flexDirection:"row",gap:"var(--sl-spacing-large)","@media (max-width: 499px)":{flexDirection:"column"}}}),a=r.toString();return e("div",{class:r.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},a,"\n ::slotted(*){\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n ::slotted(*){\n display: block;\n }\n }"),e("div",{class:r.classes.Header},e("div",{class:r.classes.Header,part:"sqm-header"},t.header)),e("div",{class:r.classes.Grid,part:"sqm-grid-container"},s))}const re=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){return e(se,Object.assign({},N(this)),e("slot",null))}};function ae(t){const s=_({Container:{display:"flex",flexDirection:"column",width:"100%",padding:"var(--sl-spacing-x-large)",lineHeight:"var(--sl-line-height-dense)",color:t.textColor||"var(--sl-color-neutral-900)",background:t.backgroundColor||"var(--sl-color-primary-50)","@media (max-width: 499px)":{flexDirection:"row",width:"auto",paddingBottom:"var(--sl-spacing-large)"}},Text:{"@media (max-width: 499px)":{marginLeft:"var(--sl-spacing-large)"}},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-bold)",marginTop:"var(--sl-spacing-x-large)","@media (max-width: 499px)":{margin:"0"}},Description:{fontSize:"var(--sl-font-size-medium)",marginTop:"var(--sl-spacing-small)","@media (max-width: 499px)":{marginTop:"var(--sl-spacing-x-small)"}},Media:{width:"64px",height:"64px",borderRadius:"100%",objectFit:"cover",userSelect:"none",background:"#FFF",color:"var(--sl-color-primary-300)",fontSize:"26px",textAlign:"center",lineHeight:"72px"}}),r=s.toString();return e("div",{class:s.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},r),e("div",null,t.imageUrl?e("img",{class:s.classes.Media,src:t.imageUrl,part:"sqm-media"}):e("div",{class:s.classes.Media,part:"sqm-media"},e("sl-icon",{name:t.icon}))),e("div",{class:s.classes.Text},e("div",{class:s.classes.Header,part:"sqm-header"},t.header),e("div",{class:s.classes.Description,part:"sqm-description"},t.description)))}const ne=class{constructor(e){t(this,e),r(this)}disconnectedCallback(){}render(){return e(ae,Object.assign({},N(this)))}},ie=l("sq:useProgramMenu"),oe=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){const{data:t,ref:r}=function(t){const e=v(),s=h();ie({programId:e,props:t});const r=o(),[,n]=x();return a((()=>{var t;null===(t=r.current)||void 0===t||t.addEventListener("sl-select",(t=>{s.dispatchEvent(new CustomEvent("sq:update-program-id",{detail:t.detail.item.value,bubbles:!0,composed:!0}))}))}),[r.current]),{data:{programId:e},callbacks:{rerender:n},ref:r}}(N(this));return e(s,{style:{display:"contents"}},e("sl-select",{style:{paddingBottom:"var(--sl-spacing-large)"},value:t.programId,ref:t=>r.current=t},e("slot",null)))}},le=_({Container:{borderRadius:"var(--sl-border-radius-large)",color:"var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-0)",display:"flex",flexDirection:"column",rowGap:"var(--sl-spacing-large)"},EndContainer:{display:"flex",flexDirection:"column",alignItems:"center"},ColumnContainer:{"& p":{margin:"0"},display:"grid",gridAutoColumns:"minmax(0, 1fr)",gridAutoFlow:"column",gap:"calc(2 * var(--sl-spacing-medium))","@media (max-width: 499px)":{gridAutoFlow:"unset",gridAutoColumns:"unset",gridTemplateColumns:"1fr",border:"none"}}}),ce=le.toString();function de(t){return e("div",{part:"sqm-base",class:le.classes.Container,style:{border:t.hideBorder?"none":"1px solid var(--sl-color-neutral-300)","padding-top":`var(--sl-spacing-${t.paddingTop})`,"padding-right":`var(--sl-spacing-${t.paddingRight})`,"padding-bottom":`var(--sl-spacing-${t.paddingBottom})`,"padding-left":`var(--sl-spacing-${t.paddingLeft})`,backgroundColor:t.backgroundColor,maxWidth:t.limitWidth?"600px":"none",margin:t.limitWidth?"auto":"none"}},e("style",{type:"text/css"},ce,"\n :host{\n display: block; \n }\n "),t.hasHeader&&e("div",{class:le.classes.EndContainer},t.slots.header),e("div",{part:"sqm-column-container",class:le.classes.ColumnContainer,style:{alignItems:t.verticalAlignment}},t.slots.left,t.slots.right),t.hasFooter&&e("div",{class:le.classes.EndContainer},t.slots.footer))}const ue=class{constructor(e){t(this,e),this.ignored=!0,this.verticalAlignment="start",this.hideBorder=!1,this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",this.backgroundColor="#ffffff",this.limitWidth=!1,r(this)}disconnectedCallback(){}render(){const t={left:e("slot",{name:"left"}),right:e("slot",{name:"right"}),header:e("slot",{name:"header"}),footer:e("slot",{name:"footer"})},s=A(),r=s.findIndex((t=>"header"===t.slot))>-1,a=s.findIndex((t=>"footer"===t.slot))>-1;return e(de,Object.assign({},N(this),{slots:t,hasHeader:r,hasFooter:a}),e("slot",null))}},he=m.gql`
|
|
101
|
+
`,Bt=class{constructor(e){t(this,e),this.hideViewer=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,r(this),J(this)}disconnectedCallback(){}render(){const t={empty:e(zt,null),loadingstate:e(Ot,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,showRank:this.showRank},s={...t,demoData:this.demoData},r=u()?function(t){var s,r;const a=(null===(r=null===(s=t.demoData)||void 0===s?void 0:s.data)||void 0===r?void 0:r.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return q({states:{loading:!1,hasLeaders:!0,styles:{usersheading:t.usersheading?t.usersheading:"Top referrers",statsheading:t.statsheading?t.statsheading:"New customers",rankheading:t.rankheading?t.rankheading:"Rank",anonymousUser:t.anonymousUser?t.anonymousUser:"Anonymous User",showRank:t.showRank,hideViewer:t.hideViewer}},data:{rankType:"rowNumber",leaderboard:a},elements:{empty:e(zt,null),loadingstate:e(Ot,null)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(s):function(t){var e,s,r,a,n,i,o,l,c,d;const u=v(),h=null!==(e=t.programId)&&void 0!==e?e:u,m=p(),g=y(),b=h?{type:t.leaderboardType,filter:{programId_eq:h}}:{type:t.leaderboardType,filter:{}};t.interval&&(b.filter.interval=t.interval),g&&(b.locale=g),t.maxRows>0&&(b.limit=t.maxRows);const{data:x,loading:w}=f($t,b,!(null==m?void 0:m.jwt)),{data:k}=f(jt,b,!(null==m?void 0:m.jwt)),C=null==(I=null===(s=null==x?void 0:x.userLeaderboard)||void 0===s?void 0:s.rows)?void 0:I.flatMap((e=>{var s,r;return{textValue:e.textValue,firstName:e.firstName,lastInitial:e.lastInitial,rank:null===(s=e.rank)||void 0===s?void 0:s[t.rankType],rowNumber:null===(r=e.rank)||void 0===r?void 0:r.rowNumber}})),E=null==C?void 0:C.sort((function(t,e){return t.rank-e.rank})),S={textValue:null===(a=null===(r=null==k?void 0:k.viewer)||void 0===r?void 0:r.leaderboardRank)||void 0===a?void 0:a.textValue,firstName:null===(n=null==k?void 0:k.viewer)||void 0===n?void 0:n.firstName,lastInitial:null===(i=null==k?void 0:k.viewer)||void 0===i?void 0:i.lastInitial,rank:null===(l=null===(o=null==k?void 0:k.viewer)||void 0===o?void 0:o.leaderboardRank)||void 0===l?void 0:l[t.rankType],rowNumber:null===(d=null===(c=null==k?void 0:k.viewer)||void 0===c?void 0:c.leaderboardRank)||void 0===d?void 0:d.rowNumber};var I;return{states:{loading:w,hasLeaders:(null==E?void 0:E.length)>0,styles:t},data:{leaderboard:E,rankType:t.rankType,viewerRank:S},elements:{empty:t.empty,loadingstate:t.loadingstate}}}(t);return e(Q,Object.assign({},r))}};function zt(){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}function Ot(){return e("slot",{name:"loading"},e("table",null,[...Array(10)].map((()=>e("tr",null,e("td",null,e("sl-skeleton",null)))))))}const Ht=_({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Ut=Ht.toString();function Wt(t){const{onClick:s,buttonText:r}=t;return e("span",{class:Ht.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},Ut,"\n:host{\n display: inline; \n}\n"),e("sl-button",{onClick:s,type:"primary",exportparts:"base: primarybutton-base"},e("a",{class:Ht.classes.Link,part:"sqm-link"},r)))}const Gt=class{constructor(e){t(this,e),this.openInNewTab=!1,this.buttonText="Click here"}render(){return e(Wt,Object.assign({},{...N(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},Zt=class{constructor(e){t(this,e),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",r(this)}disconnectedCallback(){}render(){const{states:t}=u()?q({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(t,e)=>e}):function(t){return{states:{registrationFormState:i(V),content:{lastNameLabel:t.lastNameLabel,firstNameLabel:t.firstNameLabel}}}}(this);return e(tt,{states:t})}};function Kt(t){const{states:s}=t,{styles:r}=s;return s.includeDropdown?e("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},e("sl-button",{slot:"trigger",caret:!0,onClick:t.callbacks.rerender,exportparts:"base: dropdownbutton-base"},r.menuLabel),e("sl-menu",{ref:e=>{void 0===t.ref.current&&(t.ref.current=e,t.callbacks.rerender())}},e("slot",null))):""}const Xt=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){const t=u()?function(t){return q({states:{includeDropdown:!0,styles:{...t,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},t.demoData||{},{arrayMerge:(t,e)=>e})}(N(this)):function(t){const e=o(),[,s]=x(),r=p();return a((()=>{var t;null===(t=e.current)||void 0===t||t.addEventListener("sl-select",(t=>function(t){w.push(t.detail.item.value)}(t)))}),[e.current]),{states:{includeDropdown:void 0!==((null==r?void 0:r.id)||(null==r?void 0:r.accountId)||(null==r?void 0:r.jwt)),styles:{menuLabel:t.menuLabel}},callbacks:{rerender:s},ref:e}}(N(this));return e(s,{slot:"sqm-navigation-menu"},e(Kt,Object.assign({},t)))}};Xt.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const Yt=class{constructor(e){t(this,e),this.ignored=!0,this.modalChangePasswordHeader="Change Password",this.cancelText="Cancel",this.changePasswordButtonText="Change Password",this.passwordFieldLabel="New Password",this.confirmPasswordFieldLabel="Confirm New Password",this.successMessage="Your password has been updated.",this.portalChangePasswordHeader="Password",this.portalChangePasswordButtonText="Change your password...",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.nonMatchingPasswordErrorText="contain at least 1 lowercase character",this.invalidSessionErrorText="Please log in again to change your password.",this.hasErrorText="contain at least 1 number or symbol",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s}=u()?function(t){const[e,s]=n(!1);return q({states:{open:e,error:"",content:{modalChangePasswordHeader:t.modalChangePasswordHeader,cancelText:t.cancelText,changePasswordButtonText:t.changePasswordButtonText,passwordFieldLabel:t.passwordFieldLabel,confirmPasswordFieldLabel:t.confirmPasswordFieldLabel,successMessage:t.successMessage,portalChangePasswordHeader:t.portalChangePasswordHeader,portalChangePasswordButtonText:t.portalChangePasswordButtonText,meetsRequirementsText:t.meetsRequirementsText,doesNotMeetRequirementsText:t.doesNotMeetRequirementsText,minErrorText:t.minErrorText,uppercaseErrorText:t.uppercaseErrorText,lowercaseErrorText:t.lowercaseErrorText,hasErrorText:t.hasErrorText}},callbacks:{setOpen:t=>s(t),submit:t=>console.log("Submit",t)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(this):function(t){var e,s,r,a,i,o,l;const[c,{loading:d,errors:u}]=k(),[h,m]=n(!1),[v,g]=n(""),[f,b]=n(!1),y=p();return{states:{open:h,loading:d,success:f,error:v||(null===(a=null===(r=null===(s=null===(e=null==u?void 0:u.response)||void 0===e?void 0:e.errors)||void 0===s?void 0:s[0])||void 0===r?void 0:r.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(o=null===(i=null==u?void 0:u.response)||void 0===i?void 0:i.errors)||void 0===o?void 0:o[0])||void 0===l?void 0:l.message),content:{modalChangePasswordHeader:t.modalChangePasswordHeader,cancelText:t.cancelText,changePasswordButtonText:t.changePasswordButtonText,passwordFieldLabel:t.passwordFieldLabel,confirmPasswordFieldLabel:t.confirmPasswordFieldLabel,successMessage:t.successMessage,portalChangePasswordHeader:t.portalChangePasswordHeader,portalChangePasswordButtonText:t.portalChangePasswordButtonText,meetsRequirementsText:t.meetsRequirementsText,doesNotMeetRequirementsText:t.doesNotMeetRequirementsText,minErrorText:t.minErrorText,uppercaseErrorText:t.uppercaseErrorText,lowercaseErrorText:t.lowercaseErrorText,hasErrorText:t.hasErrorText}},data:{},callbacks:{setOpen:m,submit:async e=>{var s,r;b(!1);const a=null===(s=e.detail)||void 0===s?void 0:s.formData;if(null==a||a.forEach(((t,e)=>{R.set(a,e,t)})),!(null==y?void 0:y.jwt))return void g(t.invalidSessionErrorText);if(a.password!==a.confirmPassword)return void g(t.nonMatchingPasswordErrorText);g("");const n={password:a.password},i=await c(n);i instanceof Error||!(null===(r=i.changeManagedIdentityPassword)||void 0===r?void 0:r.success)||b(!0)}}}}(this);return e(et,{states:t,callbacks:s})}},Jt=class{constructor(e){t(this,e),this.ignored=!0,this.hideSupportText=!1,this.supportEmail="support@example.com",this.supportText="For program support, contact {email}",this.hidePoweredBy=!1,this.poweredByLink="https://impact.com/advocate/",this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",r(this)}disconnectedCallback(){}render(){return e(st,Object.assign({},N(this)))}static get assetsDirs(){return["../../assets"]}},Qt=class{constructor(e){t(this,e),this.ignored=!0,this.notFullScreen=!1,r(this)}disconnectedCallback(){}render(){const t=e("slot",{name:"footer"}),s=e("slot",{name:"header"}),r=u()?function(t,s,r){return q({notFullScreen:!0,data:{footer:t||e("span",null,"example@example.com"),header:s||e("div",{style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal"))},callbacks:{rerender:()=>{}}},r.demoData||{},{arrayMerge:(t,e)=>e})}(t,s,this):function(t,e){const[,s]=x();return{data:{footer:t,header:e},callbacks:{rerender:s}}}(t,s);return e(rt,Object.assign({},r),e("slot",null))}},te=class{constructor(e){t(this,e),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s}=u()?q({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register"},callbacks:{submit:async()=>{console.log("submit")}}},this.demoData||{},{arrayMerge:(t,e)=>e}):function(t){var e,s,r,a,i,o,l;const[c,{loading:d,errors:u}]=C(),[h,m]=n(""),p=new URLSearchParams(w.location.search),v=p.get("nextPage");return{states:{loading:d,error:(null===(a=null===(r=null===(s=null===(e=null==u?void 0:u.response)||void 0===e?void 0:e.errors)||void 0===s?void 0:s[0])||void 0===r?void 0:r.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(o=null===(i=null==u?void 0:u.response)||void 0===i?void 0:i.errors)||void 0===o?void 0:o[0])||void 0===l?void 0:l.message)||h,registerPath:t.registerPath,forgotPasswordPath:t.forgotPasswordPath},callbacks:{submit:async e=>{var s,r;m("");let a=e.detail.formData;null==a||a.forEach(((t,e)=>{R.set(a,e,t)}));const n={email:a.email,password:a.password},i=await c(n);if(i instanceof Error)((null==i?void 0:i.message)||(null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.error))&&m(t.networkErrorMessage);else if(null===(r=i.authenticateManagedIdentityWithEmailAndPassword)||void 0===r?void 0:r.token){p.delete("nextPage");const e=L(v||t.nextPage);w.push(e.href)}}}}}(this),r={forgotPasswordButton:e("slot",{name:"forgotPassword"},e("a",{onClick:()=>w.push(t.forgotPasswordPath)},this.forgotPasswordLabel)),secondaryButton:e("slot",{name:"secondaryButton"},e("sl-button",{type:"text",disabled:t.loading,onClick:()=>w.push(t.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return e(at,{states:t,callbacks:s,content:r})}},ee=class{constructor(e){t(this,e),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",r(this)}disconnectedCallback(){}render(){const{states:t,callbacks:s,refs:r}=u()?q({states:{error:"",loading:!1,confirmPassword:(n=this).confirmPassword,hideInputs:n.hideInputs||!1,customPasswordField:!1,loginPath:n.loginPath,disablePasswordValidation:n.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},n.demoData||{},{arrayMerge:(t,e)=>e}):function(t){var e,s,r,n,i,l,c,d,u;const h=o(null),{registrationFormState:m,setRegistrationFormState:p}=F({}),[v,{loading:g,errors:f}]=E();a((()=>{if(!h.current)return;const t=h.current;return t.addEventListener("sl-input",b),()=>{t.removeEventListener("sl-input",b)}}),[h.current]);const b=S((t=>{var e,s;if("tel"!==(null===(s=null===(e=t.target)||void 0===e?void 0:e.type)||void 0===s?void 0:s.toLowerCase()))return;const r=new j("US");t.target.value=r.input(t.target.value)}),[]);let y="";return y=(null===(e=null==f?void 0:f.response)||void 0===e?void 0:e.error)||(null==f?void 0:f.message)&&!(null===(s=null==f?void 0:f.response)||void 0===s?void 0:s.errors.length)?t.networkErrorMessage:(null===(l=null===(i=null===(n=null===(r=null==f?void 0:f.response)||void 0===r?void 0:r.errors)||void 0===n?void 0:n[0])||void 0===i?void 0:i.extensions)||void 0===l?void 0:l.message)||(null===(u=null===(d=null===(c=null==f?void 0:f.response)||void 0===c?void 0:c.errors)||void 0===d?void 0:d[0])||void 0===u?void 0:u.message)||(null==m?void 0:m.error),{states:{loading:g,error:y,registrationFormState:m,confirmPassword:t.confirmPassword,hideInputs:t.hideInputs,loginPath:t.loginPath,disablePasswordValidation:t.disablePasswordValidation},callbacks:{submit:async e=>{var s;let r=e.target.getFormControls(),a={},n={};if(null==r||r.forEach((e=>{if(!e.name)return;const s=e.name,r=e.value;if(R.set(a,s,r),e.required&&!r&&R.set(n,s,t.requiredFieldErrorMessage),"function"==typeof e.validationError){const t=(0,e.validationError)({control:e,key:s,value:r});t&&R.set(n,s,t)}})),(t.confirmPassword||a.confirmPassword)&&a.password!==a.confirmPassword&&(n={...n,confirmPassword:t.passwordMismatchErrorMessage}),Object.keys(n).length)return void p({loading:!1,error:"",validationErrors:n});p({loading:!0,error:"",validationErrors:{}});const{email:i,password:o}=a;delete a.email,delete a.password,delete a.confirmPassword,a={...a};const l={email:i,password:o,formData:a,redirectPath:t.redirectPath};try{const e=await v(l);if(e instanceof Error)throw e;p({loading:!1,error:"",validationErrors:{}}),(null===(s=e.registerManagedIdentityWithEmailAndPassword)||void 0===s?void 0:s.token)&&w.push(t.nextPage)}catch(e){p({loading:!1,error:t.networkErrorMessage,validationErrors:{}})}},inputFunction:b},refs:{formRef:h}}}(this);var n;const i={formData:e("slot",{name:"formData"}),secondaryButton:e("slot",{name:"secondaryButton"},e("sl-button",{type:"text",disabled:t.loading,onClick:()=>w.push(t.loginPath)},this.loginLabel)),terms:e("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return e(nt,{states:t,callbacks:s,content:i,refs:r})}};function se(t,s){const r=_({Container:{color:t.textColor||"var(--sl-color-neutral-900)",background:t.backgroundColor||""},Header:{fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-bold)",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-large)",textAlign:"center"},Grid:{display:"flex",flexDirection:"row",gap:"var(--sl-spacing-large)","@media (max-width: 499px)":{flexDirection:"column"}}}),a=r.toString();return e("div",{class:r.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},a,"\n ::slotted(*){\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n ::slotted(*){\n display: block;\n }\n }"),e("div",{class:r.classes.Header},e("div",{class:r.classes.Header,part:"sqm-header"},t.header)),e("div",{class:r.classes.Grid,part:"sqm-grid-container"},s))}const re=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){return e(se,Object.assign({},N(this)),e("slot",null))}};function ae(t){const s=_({Container:{display:"flex",flexDirection:"column",width:"100%",padding:"var(--sl-spacing-x-large)",lineHeight:"var(--sl-line-height-dense)",color:t.textColor||"var(--sl-color-neutral-900)",background:t.backgroundColor||"var(--sl-color-primary-50)","@media (max-width: 499px)":{flexDirection:"row",width:"auto",paddingBottom:"var(--sl-spacing-large)"}},Text:{"@media (max-width: 499px)":{marginLeft:"var(--sl-spacing-large)"}},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-bold)",marginTop:"var(--sl-spacing-x-large)","@media (max-width: 499px)":{margin:"0"}},Description:{fontSize:"var(--sl-font-size-medium)",marginTop:"var(--sl-spacing-small)","@media (max-width: 499px)":{marginTop:"var(--sl-spacing-x-small)"}},Media:{width:"64px",height:"64px",borderRadius:"100%",objectFit:"cover",userSelect:"none",background:"#FFF",color:"var(--sl-color-primary-300)",fontSize:"26px",textAlign:"center",lineHeight:"72px"}}),r=s.toString();return e("div",{class:s.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},r),e("div",null,t.imageUrl?e("img",{class:s.classes.Media,src:t.imageUrl,part:"sqm-media"}):e("div",{class:s.classes.Media,part:"sqm-media"},e("sl-icon",{name:t.icon}))),e("div",{class:s.classes.Text},e("div",{class:s.classes.Header,part:"sqm-header"},t.header),e("div",{class:s.classes.Description,part:"sqm-description"},t.description)))}const ne=class{constructor(e){t(this,e),r(this)}disconnectedCallback(){}render(){return e(ae,Object.assign({},N(this)))}},ie=l("sq:useProgramMenu"),oe=class{constructor(e){t(this,e),this.ignored=!0,r(this)}disconnectedCallback(){}render(){const{data:t,ref:r}=function(t){const e=v(),s=h();ie({programId:e,props:t});const r=o(),[,n]=x();return a((()=>{var t;null===(t=r.current)||void 0===t||t.addEventListener("sl-select",(t=>{s.dispatchEvent(new CustomEvent("sq:update-program-id",{detail:t.detail.item.value,bubbles:!0,composed:!0}))}))}),[r.current]),{data:{programId:e},callbacks:{rerender:n},ref:r}}(N(this));return e(s,{style:{display:"contents"}},e("sl-select",{style:{paddingBottom:"var(--sl-spacing-large)"},value:t.programId,ref:t=>r.current=t},e("slot",null)))}},le=_({Container:{borderRadius:"var(--sl-border-radius-large)",color:"var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-0)",display:"flex",flexDirection:"column",rowGap:"var(--sl-spacing-large)"},EndContainer:{display:"flex",flexDirection:"column",alignItems:"center"},ColumnContainer:{"& p":{margin:"0"},display:"grid",gridAutoColumns:"minmax(0, 1fr)",gridAutoFlow:"column",gap:"calc(2 * var(--sl-spacing-medium))","@media (max-width: 499px)":{gridAutoFlow:"unset",gridAutoColumns:"unset",gridTemplateColumns:"1fr",border:"none"}}}),ce=le.toString();function de(t){return e("div",{part:"sqm-base",class:le.classes.Container,style:{border:t.hideBorder?"none":"1px solid var(--sl-color-neutral-300)","padding-top":`var(--sl-spacing-${t.paddingTop})`,"padding-right":`var(--sl-spacing-${t.paddingRight})`,"padding-bottom":`var(--sl-spacing-${t.paddingBottom})`,"padding-left":`var(--sl-spacing-${t.paddingLeft})`,backgroundColor:t.backgroundColor,maxWidth:t.limitWidth?"600px":"none",margin:t.limitWidth?"auto":"none"}},e("style",{type:"text/css"},ce,"\n :host{\n display: block; \n }\n "),t.hasHeader&&e("div",{class:le.classes.EndContainer},t.slots.header),e("div",{part:"sqm-column-container",class:le.classes.ColumnContainer,style:{alignItems:t.verticalAlignment}},t.slots.left,t.slots.right),t.hasFooter&&e("div",{class:le.classes.EndContainer},t.slots.footer))}const ue=class{constructor(e){t(this,e),this.ignored=!0,this.verticalAlignment="start",this.hideBorder=!1,this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",this.backgroundColor="#ffffff",this.limitWidth=!1,r(this)}disconnectedCallback(){}render(){const t={left:e("slot",{name:"left"}),right:e("slot",{name:"right"}),header:e("slot",{name:"header"}),footer:e("slot",{name:"footer"})},s=A(),r=s.findIndex((t=>"header"===t.slot))>-1,a=s.findIndex((t=>"footer"===t.slot))>-1;return e(de,Object.assign({},N(this),{slots:t,hasHeader:r,hasFooter:a}),e("slot",null))}},he=m.gql`
|
|
102
102
|
query getUser($programId: ID) {
|
|
103
103
|
viewer {
|
|
104
104
|
... on User {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as s}from"./p-64c3217a.js";import{i,k as n,n as e}from"./p-2446212d.js";import{i as r}from"./p-ab49b4e4.js";import{c as l}from"./p-c1086930.js";import{E as
|
|
1
|
+
import{h as t,r as s}from"./p-64c3217a.js";import{i,k as n,n as e}from"./p-2446212d.js";import{i as r}from"./p-ab49b4e4.js";import{c as l}from"./p-c1086930.js";import{E as o}from"./p-02be1a88.js";import{c as a}from"./p-cef45012.js";import{g as c}from"./p-9ec99ced.js";import{R as u}from"./p-c3a388cd.js";var h="(\\d.*)",d="([a-zA-Z].*)",p="([`~\\!@#\\$%\\^\\&\\*\\(\\)\\-_\\=\\+\\[\\{\\}\\]\\\\|;:\\'\",<.>\\/\\?€£¥₹§±].*)",v="([\\s].*)";function m(t,s){if(s&&s>1){const i=parseInt(s,10);return new RegExp(t+"{"+i+",}").test(this.password)===this.positive}return new RegExp(t).test(this.password)===this.positive}var f={not:function(t){return this.positive=!1,!t||m.call(this,t)},has:function(t){return this.positive=!0,!t||m.call(this,t)},is:function(){return this.positive=!0,!0},min:function(t){return this.password.length>=t},max:function(t){return this.password.length<=t},digits:function(t){return m.call(this,h,t)},letters:function(t){return m.call(this,d,t)},uppercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toLowerCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toLowerCase()===this.positive},lowercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toUpperCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toUpperCase()===this.positive},symbols:function(t){return m.call(this,p,t)},spaces:function(t){return m.call(this,v,t)},oneOf:function(t){return t.indexOf(this.password)>=0===this.positive}},g="Length should be a valid positive number";function b(t){const s=Number(t);if(isNaN(s)||!Number.isInteger(s)||s<1)throw new Error(g)}function w(t){return f[t.method].apply(this,t.arguments)}function y(t,s){return this.properties.push({method:t,arguments:s}),this}const x=(new class{constructor(){this.properties=[]}validate(t,s){return this.list=Boolean(s&&s.list),this.password=String(t),this.positive=!0,this.list?this.properties.reduce(((t,s)=>w.call(this,s)?t:t.concat(s.method)),[]):this.properties.every(w.bind(this))}letters(t){return t&&b(t),y.call(this,"letters",arguments)}digits(t){return t&&b(t),y.call(this,"digits",arguments)}symbols(t){return t&&b(t),y.call(this,"symbols",arguments)}min(t){return b(t),y.call(this,"min",arguments)}max(t){return b(t),y.call(this,"max",arguments)}lowercase(t){return t&&b(t),y.call(this,"lowercase",arguments)}uppercase(t){return t&&b(t),y.call(this,"uppercase",arguments)}spaces(t){return t&&b(t),y.call(this,"spaces",arguments)}has(){return y.call(this,"has",arguments)}not(){return y.call(this,"not",arguments)}is(){return y.call(this,"is",arguments)}oneOf(){return y.call(this,"oneOf",arguments)}}).is().min(8).has().uppercase().has().lowercase().has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/),C=(t,s)=>{const i=x.validate(t,{list:!0});return E(i,t,s)},L=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z",fill:"#259053"})),j=()=>t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z",fill:"#555555"})),I={display:"flex",alignItems:"center",fontSize:"var(--sl-font-size-small)","& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},k=a({Base:{fontSize:"var(--sl-font-size-small)"},ValidationList:{"list-style-type":"none",paddingRight:"var(--sl-spacing-large)",margin:"var(--sl-spacing-small) 0 var(--sl-spacing-x-large)","& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-xx-small)"},"& *":{"line-height":"var(--sl-line-height-dense)"}},ValidationItemValid:{...I,color:"var(--sl-color-success-600)"},ValidationItemInvalid:{...I}}),V=k.toString(),E=(s,i,n)=>{const e={min:n.minErrorText,uppercase:n.uppercaseErrorText,lowercase:n.lowercaseErrorText,has:n.hasErrorText};return!s.length&&i?t("div",{class:k.classes.ValidationItemValid,style:{paddingBottom:"var(--sl-spacing-x-large)"}},t("style",{type:"text/css"},V),t(L,null)," ",t("span",null,n.meetsRequirementsText)):t("div",{class:k.classes.Base},t("style",{type:"text/css"},V),n.doesNotMeetRequirementsText,t("ul",{class:k.classes.ValidationList},Object.keys(e).map((i=>s.includes(i)?t("li",{class:k.classes.ValidationItemInvalid},t(j,null)," ",t("span",null,e[i])):t("li",{class:k.classes.ValidationItemValid},t(L,null)," ",t("span",null,e[i]))))))},M=a({InputContainer:{"& > :not(:last-child)":{"margin-bottom":"20px"}},ErrorStyle:o}),S=M.toString();function Z(s){var i,n,e,r,l,o,a,c,u,h;const{states:d,callbacks:p}=s;return t("div",{class:M.classes.InputContainer,part:"sqm-base"},t("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n",S),t("sl-input",Object.assign({exportparts:"label: input-label",type:"password",name:"/password",label:d.content.fieldLabel||"Password",required:!0,disabled:(null===(i=d.registrationFormState)||void 0===i?void 0:i.loading)||(null===(n=d.registrationFormState)||void 0===n?void 0:n.disabled),validationError:({value:t})=>{if(!t)return"Cannot be empty"}},(null===(r=null===(e=d.registrationFormState)||void 0===e?void 0:e.initialData)||void 0===r?void 0:r.password)?{value:null===(o=null===(l=d.registrationFormState)||void 0===l?void 0:l.initialData)||void 0===o?void 0:o.password}:{},(null===(c=null===(a=d.registrationFormState)||void 0===a?void 0:a.validationErrors)||void 0===c?void 0:c.password)?{class:M.classes.ErrorStyle,helpText:(null===(h=null===(u=d.registrationFormState)||void 0===u?void 0:u.validationErrors)||void 0===h?void 0:h.password)||"Cannot be empty"}:[],{onInput:t=>d.enableValidation&&p.onInput(t)})),d.dynamicValidation)}const q=class{constructor(t){s(this,t),this.ignored=!0,this.fieldLabel="Password",this.disableValidation=!1,this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",e(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=r()?function(t){var s,i,e,r,o,a,c;const[u,h]=n(""),[d,p]=n("");if(t.demoData&&d!=(null===(s=null==t?void 0:t.demoData)||void 0===s?void 0:s.initValue)){const s=C((null===(i=null==t?void 0:t.demoData)||void 0===i?void 0:i.initValue)||"",t);h(""===(null===(e=null==t?void 0:t.demoData)||void 0===e?void 0:e.initValue)?"":s),p(null===(r=null==t?void 0:t.demoData)||void 0===r?void 0:r.initValue)}return l({states:{enableValidation:!t.disableValidation,dynamicValidation:u,registrationFormState:(null===(a=null===(o=null==t?void 0:t.demoData)||void 0===o?void 0:o.states)||void 0===a?void 0:a.registrationFormState)||{},content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);h(i)}}},(null===(c=null==t?void 0:t.demoData)||void 0===c?void 0:c.states)||{},{arrayMerge:(t,s)=>s})}(c(this)):function(t){const s=i(u),[e,r]=n("");return{states:{enableValidation:!t.disableValidation,dynamicValidation:e,registrationFormState:s,content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);r(i)}}}}(c(this));return t(Z,{states:s,callbacks:e})}};export{q as sqm_password_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ff17b3a4.system.js","./p-d5a682bf.system.js","./p-c5429a81.system.js","./p-b2295bc5.system.js","./p-4bd679a7.system.js","./p-f6934a55.system.js","./p-1a673057.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ff17b3a4.system.js","./p-d5a682bf.system.js","./p-c5429a81.system.js","./p-b2295bc5.system.js","./p-4bd679a7.system.js","./p-f6934a55.system.js","./p-1a673057.system.js","./p-b153fc0c.system.js","./p-9ae356ae.system.js","./p-88eab2f3.system.js"],(function(e){"use strict";var t,r,i,a,n,s,o,l;return{setters:[function(e){t=e.r;r=e.h},function(e){i=e.n},function(e){a=e.i;n=e.b},function(){},function(e){s=e.c},function(){},function(){},function(e){o=e.E},function(){},function(e){l=e.u}],execute:function(){var u=e("sqm_referred_registration",function(){function e(e){t(this,e);this.ignored=true;this.emailLabel="Email";this.firstNameLabel="First Name";this.lastNameLabel="Last Name";this.registerLabel="Start Referring";this.includeName=false;this.hideBorder=false;this.requiredFieldErrorMessage="Cannot be empty";this.invalidEmailErrorMessage="Please enter a valid email address";this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.";this.fraudErrorMessage="Our team will review this referral. If approved, you and your friend will receive your rewards. Need help? Reach out to our Support team.";this.fraudErrorMessageTitle="Looks like you tried referring yourself";this.paddingTop="large";this.paddingRight="large";this.paddingBottom="large";this.paddingLeft="large";this.backgroundColor="#ffffff";this.includeCookies=true;i(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=a()?c(this):l(this),t=e.states,i=e.callbacks;var n={fraudErrorMessage:this.fraudErrorMessage,fraudErrorMessageTitle:this.fraudErrorMessageTitle,emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:r("slot",{name:"top"}),bottomSlot:r("slot",{name:"bottom"})};return r(o,{states:t,callbacks:i,content:n})};return e}());function c(e){var t=this;var r=function(){n({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"})};return s({states:{error:"",loading:false},callbacks:{submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){r();return[2]}))}))}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-64c3217a.js";import{k as e,n as a}from"./p-2446212d.js";import{e as o,$ as i,i as r}from"./p-ab49b4e4.js";import{j as l}from"./p-e7e129ac.js";import{c as n}from"./p-c1086930.js";import"./p-02be1a88.js";import"./p-cef45012.js";import"./p-5d0c9424.js";import{P as c}from"./p-
|
|
1
|
+
import{r as s,h as t}from"./p-64c3217a.js";import{k as e,n as a}from"./p-2446212d.js";import{e as o,$ as i,i as r}from"./p-ab49b4e4.js";import{j as l}from"./p-e7e129ac.js";import{c as n}from"./p-c1086930.js";import"./p-02be1a88.js";import"./p-cef45012.js";import"./p-5d0c9424.js";import{P as c}from"./p-ea6a7135.js";const d=class{constructor(t){s(this,t),this.ignored=!0,this.redirectPath="/resetPassword",this.emailLabel="Email",this.submitLabel="Request Password Reset",this.loginPath="/login",this.headerText="Enter your email below to receive a password reset link.",this.loginText="Sign In",this.networkErrorMessage="An error occurred while loading this page. Please refresh the page.",this.successAlertText="If an account with that email exists, a password reset email will be sent.",a(this)}disconnectedCallback(){}render(){const{states:s,callbacks:a}=r()?n({states:{error:"",loading:!1,success:!1},callbacks:{submit:async()=>{}}},this.demoData||{},{arrayMerge:(s,t)=>t}):function(s){var t,a,r,n,c,d,m;const[u,h]=e(!1),[p,v]=e(""),[b,{loading:g,errors:f}]=o(),w=new URLSearchParams(i.location.search).get("nextPage");return{states:{loading:g,error:(null===(n=null===(r=null===(a=null===(t=null==f?void 0:f.response)||void 0===t?void 0:t.errors)||void 0===a?void 0:a[0])||void 0===r?void 0:r.extensions)||void 0===n?void 0:n.message)||(null===(m=null===(d=null===(c=null==f?void 0:f.response)||void 0===c?void 0:c.errors)||void 0===d?void 0:d[0])||void 0===m?void 0:m.message)||p,success:u,loginPath:s.loginPath,headerText:s.headerText,loginText:s.loginText},callbacks:{submit:async t=>{var e;v(""),h(!1);let a=t.detail.formData;null==a||a.forEach(((s,t)=>{l.set(a,t,s)}));const o={email:a.email,urlParams:w?{nextPage:w}:null,redirectPath:s.redirectPath},i=await b(o);i instanceof Error?i.message&&v(s.networkErrorMessage):(null===(e=i.requestManagedIdentityPasswordResetEmail)||void 0===e?void 0:e.success)&&h(!0)}}}}(this),d={secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:s.loading,onClick:()=>i.push(s.loginPath)},this.loginText)),messageSlot:t("slot",{name:"messageSlot"},this.headerText),emailLabel:this.emailLabel,submitLabel:this.submitLabel,successAlertText:this.successAlertText};return t(c,{states:s,callbacks:a,content:d})}};export{d as sqm_portal_forgot_password}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-64c3217a.js";import{k as r,f as i,n as o}from"./p-2446212d.js";import"./p-7cf5c24c.js";import{d as s,Q as a,y as l,f as n,i as u}from"./p-ab49b4e4.js";import{c as d}from"./p-c1086930.js";import"./p-cef45012.js";import{g as m}from"./p-9ec99ced.js";import"./p-5d0c9424.js";import{P as c}from"./p-
|
|
1
|
+
import{r as e,h as t}from"./p-64c3217a.js";import{k as r,f as i,n as o}from"./p-2446212d.js";import"./p-7cf5c24c.js";import{d as s,Q as a,y as l,f as n,i as u}from"./p-ab49b4e4.js";import{c as d}from"./p-c1086930.js";import"./p-cef45012.js";import{g as m}from"./p-9ec99ced.js";import"./p-5d0c9424.js";import{P as c}from"./p-b5ee2781.js";import{i as v}from"./p-4ca22e1b.js";const f=s.gql`
|
|
2
2
|
query {
|
|
3
3
|
viewer {
|
|
4
4
|
... on User {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-64c3217a.js";import{i as a}from"./p-7cf5c24c.js";import{c as t}from"./p-cef45012.js";const o=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}],r=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}],s={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}},n=t({Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}}),i=n.toString(),l=()=>e("div",{class:n.classes.Container},e("style",{type:"text/css"},i),e("sl-skeleton",{class:n.classes.TitleSkeleton}),e("div",{class:n.classes.HeaderContainer},e("sl-skeleton",{class:n.classes.StepSkeleton}),e("sl-skeleton",{class:n.classes.HeaderSkeleton})),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.StepSkeleton}),e("sl-skeleton",{class:n.classes.ButtonSkeleton}));function d(e,a){return"W9"===e&&"W9"===a||!("W8BEN"!==e&&"W8BENE"!==e||"W8BEN"!==a&&"W8BENE"!==a)}const c=e=>!Object.keys(e).find((a=>null==e[a])),m=e=>{switch(e){case"W9":return"W-9";case"W8BEN":return"W-8 BEN";case"W8BENE":return"W-8 BEN-E";default:return""}};function u(e,a){return a.trim().search(e)>-1}const T=(e,t)=>a.formatMessage({id:e,defaultMessage:t},{fieldName:e});function p({countryCode:e,locale:a}){return{countryCode:e,displayName:new Intl.DisplayNames([a],{type:"region"}).of(e)}}const b={Alert:{"&::part(base)":{backgroundColor:"var(--sl-color-danger-100)",border:"1px solid var(--sl-color-danger-200)",padding:"0 16px"},"& sl-icon":{margin:0},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)",margin:0}}},S=a=>{const o=t(b),r=o.toString(),{classes:s}=o;return e("div",null,e("style",null,r),e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:s.Alert},e("sl-icon",{slot:"icon",name:"exclamation-octagon",class:"Error"}),e("strong",null,a.loadingErrorAlertHeader),e("br",null),a.loadingErrorAlertDescription))},N={states:{step:"1",hideSteps:!1,hideState:!1,loading:!1,disabled:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{firstName:"Bob",lastName:"Testerson",email:"bobtesterson@example.com",phoneNumberCountryCode:"US",phoneNumber:"555 555 5555",countryCode:"US",currency:"CAD",address:"2/1337 Johnson Street",city:"Vancouver",state:"BC",postalCode:"555 555",errors:{}}},data:{regionLabelEnum:"STATE",regions:[],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"},{countryCode:"AR",displayName:"Argentina"},{countryCode:"AU",displayName:"Australia"},{countryCode:"ZW",displayName:"Zimbabwe"}],currencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}],allCountries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}]},refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}}},h={step:"2",hideSteps:!1,disabled:!1,loading:!1,isPartner:!1,loadingError:!1,formState:{checked:void 0,errors:{}}},A={states:{step:"4",hideSteps:!1,disabled:!1,loading:!1,hasPayPal:!1,isPartner:!1,hideBackButton:!1,saveDisabled:!1,thresholds:[],loadingError:!1,formState:{paymentMethodChecked:"toBankAccount"}},callbacks:{onSubmit:async()=>console.log("Submit"),setPaymentMethodChecked:()=>{},setPaymentScheduleChecked:()=>{},onBack:async()=>console.log("back"),setCountrySearch:()=>{}},refs:{formRef:{current:null}}},g={step:"3",urlLoading:!1,docusignStatus:void 0,hideSteps:!1,documentType:"W9",documentTypeString:"W9",loading:!1,disabled:!1,participantTypeDisabled:!1,loadingError:!1,formState:{participantType:"individualParticipant",errors:{},taxFormExpired:!1}},E={states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxNumber:"123456",indirectTaxType:"VAT",showNewFormDialog:!1},slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",{demoData:{states:{badgeStatus:"nextPayout"}}})}},y=()=>e(l,null),x=Object.freeze({__proto__:null,default:{title:"Components/Tax Form"},GeneralLoadingView:y,GeneralErrorView:()=>e(S,{loadingErrorAlertHeader:"There was a problem loading your form",loadingErrorAlertDescription:"Please refresh the page and try again. If this problem continues, contact Support."}),StepOne:()=>e("sqm-user-info-form",{demoData:N}),StepOneLoading:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,loading:!0}}}),StepOneDisabled:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,disabled:!0}}}),StepOneIsUser:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,isUser:!0}}}),StepOneIsPartner:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,disabled:!0,isPartner:!0}}}),StepOneWithErrors:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,formState:{...N.states.formState,errors:{firstName:!0,lastName:!0,email:!0,countryCode:!0,currency:!0,participantType:!0,allowBankingCollection:!0}}}}}),StepOneWithGeneralError:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,formState:{...N.states.formState,errors:{general:!0}}}}}),StepOneWithLoadingError:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,loadingError:!0,loading:!0,formState:{...N.states.formState}}}}),StepTwoLoading:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,loading:!0}}}),StepTwoLoadingError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,loading:!0,loadingError:!0}}}),StepTwoDisabled:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,disabled:!0}}}),StepTwoIsPartner:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,isPartner:!0}}}),StepTwoWithGeneralError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,errors:{general:!0}}}}}),StepTwoOtherRegionChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"UK",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanada:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BRITISHCOLUMBIA",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",qstNumber:"654321",hasQst:!0,errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegion:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",hasSubRegionTaxNumber:!0,subRegionTaxNumber:"654321",errors:{}}}}}),StepTwoOtherRegionCheckedWithInputErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{checked:"otherRegion",errors:{}}},slotProps:{formState:{province:"",selectedRegion:"GB",errors:{selectedRegion:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaWithProvinceError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BC",errors:{province:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQSTError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",hasQst:!0,errors:{province:!0,indirectTaxNumber:!0,qstNumber:!0}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",hasSubRegionTaxNumber:!0,errors:{indirectTaxNumber:!0,subRegionTaxNumberError:!0,subRegion:!0}}}}}),StepTwoNotRegisteredChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"notRegistered"}}}}),StepThreeWithDocusign:()=>e("sqm-docusign-form",{demoData:{states:{documentType:"W9",documentTypeString:m("W9"),...g}}}),StepThreeWithDocusignW8BEN:()=>e("sqm-docusign-form",{demoData:{states:{...g,documentType:"W8BEN",documentTypeString:m("W8BEN")}}}),StepThreeWithDocusignW8BENE:()=>e("sqm-docusign-form",{demoData:{states:{...g,documentType:"W8BENE",documentTypeString:m("W8BENE"),formState:{taxFormExpired:!1,participantType:"businessEntity",errors:{participantType:"",general:!1}}}}}),StepThreeWithDocusignExpired:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"ttl_expired",formState:{participantType:"individualParticipant",taxFormExpired:!0,errors:{}}}}}),StepThreeWithDocusignCompleted:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"signing_complete",formState:{participantType:"individualParticipant",taxFormExpired:!1,errors:{}}}}}),StepThreeDocusignWithError:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"exception",formState:{...g.formState,errors:{formSubmission:!0}}}}}),StepThreeDocusignWithGeneralError:()=>e("sqm-docusign-form",{demoData:{states:{...g,formState:{...g.formState,errors:{general:!0}}}}}),StepThreeDocusignWithLoadingError:()=>e("sqm-docusign-form",{demoData:{states:{...g,loadingError:!0,formState:{...g.formState}}}}),StepThreeDocusignLoading:()=>e("sqm-docusign-form",{demoData:{states:{...g,loading:!0}}}),StepThreeDocusignDisabled:()=>e("sqm-docusign-form",{demoData:{states:{...g,disabled:!0}}}),StepFourDefault:()=>e("sqm-banking-info-form",null),StepFourIsPartner:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,isPartner:!0,formState:{...A.states.formState}}}}),StepFourDirectToBankChecked:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,formState:{...A.states.formState}}}}),StepFourToPaypalChecked:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,formState:{...A.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),TaxAndCashDashboardActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E}}),TaxAndCashDashboardActiveW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BEN",documentTypeString:m("W8BEN"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BENE",documentTypeString:m("W8BENE"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,status:"INACTIVE",documentType:"W9",documentTypeString:m("W9"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W9",documentTypeString:m("W9"),noFormNeeded:!1,country:"United States",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_ACTIVE",documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"United Kingdom",showNewFormDialog:!1}}}),TaxAndCashDashboardNoFormNeeded:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!0,province:"Ontario",country:"Canada",indirectTaxNumber:"123456",indirectTaxType:"GST",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxCanada:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Ontario",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxCanadaQuebec:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Quebec",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",qstNumber:"44212",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxSpain:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"Spain",subRegion:"Spain Proper",indirectTaxType:"VAT",indirectTaxNumber:"123456",subRegionTaxNumber:"44212",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxNotRegistered:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardNewTaxForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!0}}}),TaxAndCashDashboardLoading:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardWithLoadingError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{disabled:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,loadingError:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardWithGeneralError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"Slovania",showNewFormDialog:!1,errors:{general:!0}}}}),TaxAndCashDashboardDisabled:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1}}}),TaxAndCashTextProps:()=>e("sqm-tax-and-cash",{demoData:{showTextProps:!0}})}),C={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"},v=t({Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"1px solid #E0E0E0",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::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)"}}}),f=v.toString(),I=t=>{var r,s,n;const{states:i,states:{formState:l},callbacks:d,text:c}=t,{classes:m}=v,u=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:c.indirectTaxNumber},{taxType:e}),p=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:c.error.indirectTaxNumber},{taxType:e}),b=({label:a,error:t,name:o})=>{var r;return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:a,disabled:i.loading||i.disabled,value:l[o]},(null===(r=l.errors)||void 0===r?void 0:r[o])&&{class:m.ErrorInput,helpText:t},{id:o,name:`/${o}`}))},S=()=>{var a,o;return e("div",{class:m.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:l.subRegion,label:c.subRegion,disabled:i.loading||i.disabled},(null===(a=l.errors)||void 0===a?void 0:a.indirectTaxNumber)&&{class:m.ErrorInput,helpText:T(c.subRegion,c.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),t.data.esRegions.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),e(b,{name:"indirectTaxNumber",label:u("VAT"),error:p("VAT")}),e("sl-checkbox",{class:m.Checkbox,exportparts:"label: input-label, base: input-base",checked:l.hasSubRegionTaxNumber,"onSl-change":d.onSpainToggle,disabled:i.disabled||i.isPartner},c.isRegisteredSubRegionIncomeTax),l.hasSubRegionTaxNumber&&e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:c.subRegionTaxNumberLabel,disabled:i.loading||i.disabled,value:l.subRegionTaxNumber},(null===(o=l.errors)||void 0===o?void 0:o.subRegionTaxNumber)&&{class:m.ErrorInput,helpText:T(c.subRegionTaxNumberLabel,c.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))},N=()=>{var a,r;const{classes:s}=v,n=null===(a=null==o?void 0:o.find((e=>e.regionCode===l.province)))||void 0===a?void 0:a.taxType;return e("div",{class:s.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,value:l.province,exportparts:"label: input-label, base: input-base",class:s.Input,label:c.province,disabled:i.loading||i.disabled,"onSl-select":e=>d.onFormChange("province",e)},(null===(r=l.errors)||void 0===r?void 0:r.province)&&{class:s.ErrorInput,helpText:T(c.province,c.error.fieldRequiredError)},{id:"province",name:"/province"}),t.data.provinces.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),"GST"===n&&e(b,{label:u("GST"),error:p("GST"),name:"indirectTaxNumber"}),"HST"===n&&e(b,{label:u("HST"),error:p("HST"),name:"indirectTaxNumber"}),"QUEBEC"===l.province&&e("div",{class:s.ConditionalInputsContainer},e("sl-checkbox",{class:s.Checkbox,exportparts:"label: input-label, base: input-base","onSl-change":d.onQstToggle,checked:l.hasQst,disabled:i.isPartner||i.disabled},c.isRegisteredQST),l.hasQst&&e(b,{name:"qstNumber",label:c.qstNumber,error:T(c.qstNumber,c.error.fieldRequiredError)})))},h=(a=>{var t;switch(a){case"CA":return e(N,null);case"ES":return e(S,null);default:return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:l.indirectTaxNumber,label:u(C[a]||"GENERAL"),disabled:i.loading||i.disabled},(null===(t=l.errors)||void 0===t?void 0:t.indirectTaxNumber)&&{class:m.ErrorInput,helpText:p(C[a]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}})(l.selectedRegion);return e("div",{style:i.hide?{display:"none"}:{}},e("form",{class:m.Container},e("style",{type:"text/css"},f,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n "),e("hr",{class:m.HR}),e("div",{class:m.InputContainer},e("sl-select",Object.assign({required:!0,class:m.Input,value:l.selectedRegion,exportparts:"label: input-label, base: input-base",label:c.selectedRegion,disabled:i.loading||i.disabled,"onSl-select":e=>d.onFormChange("selectedRegion",e)},(null===(r=l.errors)||void 0===r?void 0:r.selectedRegion)&&{class:m.ErrorInput,helpText:T(c.selectedRegion,c.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),e("sl-input",{class:m.SearchInput,placeholder:c.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{d.setCountrySearch(e.target.value)}}),null===(s=t.data.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(n=t.data.allCountries)||void 0===n?void 0:n.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),h),e("hr",{class:m.HR})))},D={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sl-color-gray-500)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function R(a,o){const r=t(D),s=r.toString();return e("div",{class:r.classes.Container},e("style",{type:"text/css"},"\n :host{\n display: block;\n }",s),e("div",{class:r.classes.InvoiceTableContaier},e("sl-details",{summary:a.header},e("p",{class:r.classes.Description},a.description),o)))}export{s as A,S as E,y as G,R as I,l as L,I as O,x as T,r as a,o as b,C as c,u as d,T as f,p as g,c as o,m as t,d as v}
|
|
1
|
+
import{h as e}from"./p-64c3217a.js";import{i as a}from"./p-7cf5c24c.js";import{c as t}from"./p-cef45012.js";const o=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}],r=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}],s={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}},n=t({Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}}),i=n.toString(),l=()=>e("div",{class:n.classes.Container},e("style",{type:"text/css"},i),e("sl-skeleton",{class:n.classes.TitleSkeleton}),e("div",{class:n.classes.HeaderContainer},e("sl-skeleton",{class:n.classes.StepSkeleton}),e("sl-skeleton",{class:n.classes.HeaderSkeleton})),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.InputSkeleton}),e("sl-skeleton",{class:n.classes.StepSkeleton}),e("sl-skeleton",{class:n.classes.ButtonSkeleton}));function d(e,a){return"W9"===e&&"W9"===a||!("W8BEN"!==e&&"W8BENE"!==e||"W8BEN"!==a&&"W8BENE"!==a)}const c=e=>!Object.keys(e).find((a=>null==e[a])),m=e=>{switch(e){case"W9":return"W-9";case"W8BEN":return"W-8 BEN";case"W8BENE":return"W-8 BEN-E";default:return""}};function u(e,a){return a.trim().search(e)>-1}const T=(e,t)=>a.formatMessage({id:e,defaultMessage:t},{fieldName:e});function p({countryCode:e,locale:a}){return{countryCode:e,displayName:new Intl.DisplayNames([a],{type:"region"}).of(e)}}const b={Alert:{"&::part(base)":{backgroundColor:"var(--sl-color-danger-100)",border:"1px solid var(--sl-color-danger-200)",padding:"0 16px"},"& sl-icon":{margin:0},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)",margin:0}}},S=a=>{const o=t(b),r=o.toString(),{classes:s}=o;return e("div",null,e("style",null,r),e("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:s.Alert},e("sl-icon",{slot:"icon",name:"exclamation-octagon",class:"Error"}),e("strong",null,a.loadingErrorAlertHeader),e("br",null),a.loadingErrorAlertDescription))},N={states:{step:"1",hideSteps:!1,hideState:!1,loading:!1,disabled:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{firstName:"Bob",lastName:"Testerson",email:"bobtesterson@example.com",phoneNumberCountryCode:"US",phoneNumber:"555 555 5555",countryCode:"US",currency:"CAD",address:"2/1337 Johnson Street",city:"Vancouver",state:"BC",postalCode:"555 555",errors:{}}},data:{regionLabelEnum:"STATE",regions:[],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"},{countryCode:"AR",displayName:"Argentina"},{countryCode:"AU",displayName:"Australia"},{countryCode:"ZW",displayName:"Zimbabwe"}],currencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}],allCountries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}]},refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}}},h={step:"2",hideSteps:!1,disabled:!1,loading:!1,isPartner:!1,loadingError:!1,formState:{checked:void 0,errors:{}}},A={states:{step:"4",hideSteps:!1,disabled:!1,loading:!1,hasPayPal:!1,isPartner:!1,hideBackButton:!1,saveDisabled:!1,thresholds:[],loadingError:!1,formState:{paymentMethodChecked:"toBankAccount"}},callbacks:{onSubmit:async()=>console.log("Submit"),setPaymentMethodChecked:()=>{},setPaymentScheduleChecked:()=>{},onBack:async()=>console.log("back"),setCountrySearch:()=>{}},refs:{formRef:{current:null}}},g={step:"3",urlLoading:!1,docusignStatus:void 0,hideSteps:!1,documentType:"W9",documentTypeString:"W9",loading:!1,disabled:!1,participantTypeDisabled:!1,loadingError:!1,formState:{participantType:"individualParticipant",errors:{},taxFormExpired:!1}},E={states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxNumber:"123456",indirectTaxType:"VAT",showNewFormDialog:!1},slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",{demoData:{states:{badgeStatus:"nextPayout"}}})}},y=()=>e(l,null),x=Object.freeze({__proto__:null,default:{title:"Components/Tax Form"},GeneralLoadingView:y,GeneralErrorView:()=>e(S,{loadingErrorAlertHeader:"There was a problem loading your form",loadingErrorAlertDescription:"Please refresh the page and try again. If this problem continues, contact Support."}),StepOne:()=>e("sqm-user-info-form",{demoData:N}),StepOneLoading:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,loading:!0}}}),StepOneDisabled:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,disabled:!0}}}),StepOneIsUser:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,isUser:!0}}}),StepOneIsPartner:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,disabled:!0,isPartner:!0}}}),StepOneWithErrors:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,formState:{...N.states.formState,errors:{firstName:!0,lastName:!0,email:!0,countryCode:!0,currency:!0,participantType:!0,allowBankingCollection:!0}}}}}),StepOneWithGeneralError:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,formState:{...N.states.formState,errors:{general:!0}}}}}),StepOneWithLoadingError:()=>e("sqm-user-info-form",{demoData:{states:{...N.states,loadingError:!0,loading:!0,formState:{...N.states.formState}}}}),StepTwoLoading:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,loading:!0}}}),StepTwoLoadingError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,loading:!0,loadingError:!0}}}),StepTwoDisabled:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,disabled:!0}}}),StepTwoIsPartner:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,isPartner:!0}}}),StepTwoWithGeneralError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,errors:{general:!0}}}}}),StepTwoOtherRegionChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"UK",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanada:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BRITISHCOLUMBIA",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",qstNumber:"654321",hasQst:!0,errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegion:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",hasSubRegionTaxNumber:!0,subRegionTaxNumber:"654321",errors:{}}}}}),StepTwoOtherRegionCheckedWithInputErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{checked:"otherRegion",errors:{}}},slotProps:{formState:{province:"",selectedRegion:"GB",errors:{selectedRegion:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaWithProvinceError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BC",errors:{province:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQSTError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",hasQst:!0,errors:{province:!0,indirectTaxNumber:!0,qstNumber:!0}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",hasSubRegionTaxNumber:!0,errors:{indirectTaxNumber:!0,subRegionTaxNumberError:!0,subRegion:!0}}}}}),StepTwoNotRegisteredChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...h,formState:{...h.formState,checked:"notRegistered"}}}}),StepThreeWithDocusign:()=>e("sqm-docusign-form",{demoData:{states:{documentType:"W9",documentTypeString:m("W9"),...g}}}),StepThreeWithDocusignW8BEN:()=>e("sqm-docusign-form",{demoData:{states:{...g,documentType:"W8BEN",documentTypeString:m("W8BEN")}}}),StepThreeWithDocusignW8BENE:()=>e("sqm-docusign-form",{demoData:{states:{...g,documentType:"W8BENE",documentTypeString:m("W8BENE"),formState:{taxFormExpired:!1,participantType:"businessEntity",errors:{participantType:"",general:!1}}}}}),StepThreeWithDocusignExpired:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"ttl_expired",formState:{participantType:"individualParticipant",taxFormExpired:!0,errors:{}}}}}),StepThreeWithDocusignCompleted:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"signing_complete",formState:{participantType:"individualParticipant",taxFormExpired:!1,errors:{}}}}}),StepThreeDocusignWithError:()=>e("sqm-docusign-form",{demoData:{states:{...g,docusignStatus:"exception",formState:{...g.formState,errors:{formSubmission:!0}}}}}),StepThreeDocusignWithGeneralError:()=>e("sqm-docusign-form",{demoData:{states:{...g,formState:{...g.formState,errors:{general:!0}}}}}),StepThreeDocusignWithLoadingError:()=>e("sqm-docusign-form",{demoData:{states:{...g,loadingError:!0,formState:{...g.formState}}}}),StepThreeDocusignLoading:()=>e("sqm-docusign-form",{demoData:{states:{...g,loading:!0}}}),StepThreeDocusignDisabled:()=>e("sqm-docusign-form",{demoData:{states:{...g,disabled:!0}}}),StepFourDefault:()=>e("sqm-banking-info-form",null),StepFourIsPartner:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,isPartner:!0,formState:{...A.states.formState}}}}),StepFourDirectToBankChecked:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,formState:{...A.states.formState}}}}),StepFourToPaypalChecked:()=>e("sqm-banking-info-form",{demoData:{...A,states:{...A.states,formState:{...A.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),TaxAndCashDashboardActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E}}),TaxAndCashDashboardActiveW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BEN",documentTypeString:m("W8BEN"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BENE",documentTypeString:m("W8BENE"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{noFormNeeded:!1,canEditPayoutInfo:!0,status:"INACTIVE",documentType:"W9",documentTypeString:m("W9"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W9",documentTypeString:m("W9"),noFormNeeded:!1,country:"United States",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotVerifiedW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardNotActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"NOT_ACTIVE",documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"United Kingdom",showNewFormDialog:!1}}}),TaxAndCashDashboardNoFormNeeded:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!0,province:"Ontario",country:"Canada",indirectTaxNumber:"123456",indirectTaxType:"GST",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxCanada:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Ontario",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxCanadaQuebec:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Quebec",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",qstNumber:"44212",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxSpain:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:m("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"Spain",subRegion:"Spain Proper",indirectTaxType:"VAT",indirectTaxNumber:"123456",subRegionTaxNumber:"44212",showNewFormDialog:!1}}}),TaxAndCashDashboardIndirectTaxNotRegistered:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardNewTaxForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!0}}}),TaxAndCashDashboardLoading:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardWithLoadingError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{disabled:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,loadingError:!0,showNewFormDialog:!1}}}),TaxAndCashDashboardWithGeneralError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:m("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"Slovania",showNewFormDialog:!1,errors:{general:!0}}}}),TaxAndCashDashboardDisabled:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...E,states:{canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:m("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1}}}),TaxAndCashTextProps:()=>e("sqm-tax-and-cash",{demoData:{showTextProps:!0}})}),C={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"},v=t({Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"1px solid #E0E0E0",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::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)"}}}),f=v.toString(),I=t=>{var r,s,n;const{states:i,states:{formState:l},callbacks:d,text:c}=t,{classes:m}=v,u=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:c.indirectTaxNumber},{taxType:e}),p=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:c.error.indirectTaxNumber},{taxType:e}),b=({label:a,error:t,name:o})=>{var r;return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label",class:m.Input,label:a,disabled:i.loading||i.disabled,value:l[o]},(null===(r=l.errors)||void 0===r?void 0:r[o])&&{class:m.ErrorInput,helpText:t},{id:o,name:`/${o}`}))},S=()=>{var a,o;return e("div",{class:m.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,exportparts:"label: input-label",class:m.Input,value:l.subRegion,label:c.subRegion,disabled:i.loading||i.disabled},(null===(a=l.errors)||void 0===a?void 0:a.indirectTaxNumber)&&{class:m.ErrorInput,helpText:T(c.subRegion,c.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),t.data.esRegions.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),e(b,{name:"indirectTaxNumber",label:u("VAT"),error:p("VAT")}),e("sl-checkbox",{class:m.Checkbox,exportparts:"label: input-label",checked:l.hasSubRegionTaxNumber,"onSl-change":d.onSpainToggle,disabled:i.disabled||i.isPartner},c.isRegisteredSubRegionIncomeTax),l.hasSubRegionTaxNumber&&e("sl-input",Object.assign({required:!0,exportparts:"label: input-label",class:m.Input,label:c.subRegionTaxNumberLabel,disabled:i.loading||i.disabled,value:l.subRegionTaxNumber},(null===(o=l.errors)||void 0===o?void 0:o.subRegionTaxNumber)&&{class:m.ErrorInput,helpText:T(c.subRegionTaxNumberLabel,c.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))},N=()=>{var a,r;const{classes:s}=v,n=null===(a=null==o?void 0:o.find((e=>e.regionCode===l.province)))||void 0===a?void 0:a.taxType;return e("div",{class:s.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,value:l.province,exportparts:"label: input-label",class:s.Input,label:c.province,disabled:i.loading||i.disabled,"onSl-select":e=>d.onFormChange("province",e)},(null===(r=l.errors)||void 0===r?void 0:r.province)&&{class:s.ErrorInput,helpText:T(c.province,c.error.fieldRequiredError)},{id:"province",name:"/province"}),t.data.provinces.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),"GST"===n&&e(b,{label:u("GST"),error:p("GST"),name:"indirectTaxNumber"}),"HST"===n&&e(b,{label:u("HST"),error:p("HST"),name:"indirectTaxNumber"}),"QUEBEC"===l.province&&e("div",{class:s.ConditionalInputsContainer},e("sl-checkbox",{class:s.Checkbox,exportparts:"label: input-label","onSl-change":d.onQstToggle,checked:l.hasQst,disabled:i.isPartner||i.disabled},c.isRegisteredQST),l.hasQst&&e(b,{name:"qstNumber",label:c.qstNumber,error:T(c.qstNumber,c.error.fieldRequiredError)})))},h=(a=>{var t;switch(a){case"CA":return e(N,null);case"ES":return e(S,null);default:return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label",class:m.Input,value:l.indirectTaxNumber,label:u(C[a]||"GENERAL"),disabled:i.loading||i.disabled},(null===(t=l.errors)||void 0===t?void 0:t.indirectTaxNumber)&&{class:m.ErrorInput,helpText:p(C[a]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}})(l.selectedRegion);return e("div",{style:i.hide?{display:"none"}:{}},e("form",{class:m.Container},e("style",{type:"text/css"},f,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n "),e("hr",{class:m.HR}),e("div",{class:m.InputContainer},e("sl-select",Object.assign({required:!0,class:m.Input,value:l.selectedRegion,exportparts:"label: input-label",label:c.selectedRegion,disabled:i.loading||i.disabled,"onSl-select":e=>d.onFormChange("selectedRegion",e)},(null===(r=l.errors)||void 0===r?void 0:r.selectedRegion)&&{class:m.ErrorInput,helpText:T(c.selectedRegion,c.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),e("sl-input",{class:m.SearchInput,placeholder:c.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{d.setCountrySearch(e.target.value)}}),null===(s=t.data.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(n=t.data.allCountries)||void 0===n?void 0:n.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),h),e("hr",{class:m.HR})))},D={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sl-color-gray-500)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function R(a,o){const r=t(D),s=r.toString();return e("div",{class:r.classes.Container},e("style",{type:"text/css"},"\n :host{\n display: block;\n }",s),e("div",{class:r.classes.InvoiceTableContaier},e("sl-details",{summary:a.header},e("p",{class:r.classes.Description},a.description),o)))}export{s as A,S as E,y as G,R as I,l as L,I as O,x as T,r as a,o as b,C as c,u as d,T as f,p as g,c as o,m as t,d as v}
|