@verdocs/web-sdk 5.0.56 → 5.0.58

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.
Files changed (97) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +0 -6
  5. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-kba-dialog_3.cjs.entry.js +5 -5
  7. package/dist/cjs/verdocs-kba-dialog_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  10. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  11. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +6 -6
  12. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js.map +1 -1
  13. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +1 -1
  14. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
  15. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +1 -1
  16. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  17. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -31
  18. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js.map +1 -1
  19. package/dist/components/{p-85b0a2e1.js → p-6ce406a3.js} +3 -3
  20. package/dist/components/{p-85b0a2e1.js.map → p-6ce406a3.js.map} +1 -1
  21. package/dist/components/{p-95466b4d.js → p-9024119f.js} +7 -7
  22. package/dist/components/p-9024119f.js.map +1 -0
  23. package/dist/components/{p-592a0baf.js → p-97dbeb13.js} +3 -3
  24. package/dist/components/{p-592a0baf.js.map → p-97dbeb13.js.map} +1 -1
  25. package/dist/components/{p-bcdf821c.js → p-bd500fd4.js} +2 -2
  26. package/dist/components/{p-bcdf821c.js.map → p-bd500fd4.js.map} +1 -1
  27. package/dist/components/{p-25c19f32.js → p-f438ff37.js} +2 -9
  28. package/dist/components/p-f438ff37.js.map +1 -0
  29. package/dist/components/verdocs-auth.js +1 -1
  30. package/dist/components/verdocs-auth.js.map +1 -1
  31. package/dist/components/verdocs-build.js +4 -4
  32. package/dist/components/verdocs-field-attachment.js +1 -1
  33. package/dist/components/verdocs-otp-dialog.js +1 -1
  34. package/dist/components/verdocs-preview.js +1 -1
  35. package/dist/components/verdocs-sign.js +2 -2
  36. package/dist/components/verdocs-sign.js.map +1 -1
  37. package/dist/components/verdocs-template-document-page.js +1 -1
  38. package/dist/components/verdocs-template-fields.js +1 -1
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/verdocs-auth.entry.js +1 -1
  41. package/dist/esm/verdocs-auth.entry.js.map +1 -1
  42. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -7
  43. package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
  44. package/dist/esm/verdocs-kba-dialog_3.entry.js +5 -5
  45. package/dist/esm/verdocs-kba-dialog_3.entry.js.map +1 -1
  46. package/dist/esm/verdocs-sign.entry.js +1 -1
  47. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  48. package/dist/esm/verdocs-web-sdk.js +1 -1
  49. package/dist/esm-es5/loader.js +1 -1
  50. package/dist/esm-es5/loader.js.map +1 -1
  51. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  52. package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
  53. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  54. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  55. package/dist/esm-es5/verdocs-kba-dialog_3.entry.js +1 -1
  56. package/dist/esm-es5/verdocs-kba-dialog_3.entry.js.map +1 -1
  57. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  58. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  59. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  60. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  61. package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +1 -7
  62. package/dist/types/components.d.ts +0 -8
  63. package/dist/verdocs-web-sdk/{p-29bb8e0b.system.entry.js → p-0d2bfff7.system.entry.js} +2 -2
  64. package/dist/verdocs-web-sdk/{p-29bb8e0b.system.entry.js.map → p-0d2bfff7.system.entry.js.map} +1 -1
  65. package/dist/verdocs-web-sdk/p-2d0a3ca7.system.entry.js +2 -0
  66. package/dist/verdocs-web-sdk/p-2d0a3ca7.system.entry.js.map +1 -0
  67. package/dist/verdocs-web-sdk/p-7cac9509.entry.js +2 -0
  68. package/dist/verdocs-web-sdk/p-7cac9509.entry.js.map +1 -0
  69. package/dist/verdocs-web-sdk/p-8a6c7f95.system.js +1 -1
  70. package/dist/verdocs-web-sdk/p-8a6c7f95.system.js.map +1 -1
  71. package/dist/verdocs-web-sdk/p-b9be3c0a.entry.js +2 -0
  72. package/dist/verdocs-web-sdk/p-b9be3c0a.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/p-bf2b179d.system.entry.js +2 -0
  74. package/dist/verdocs-web-sdk/p-bf2b179d.system.entry.js.map +1 -0
  75. package/dist/verdocs-web-sdk/p-dc51907a.system.entry.js +2 -0
  76. package/dist/verdocs-web-sdk/p-dc51907a.system.entry.js.map +1 -0
  77. package/dist/verdocs-web-sdk/p-f08ffa15.entry.js +2 -0
  78. package/dist/verdocs-web-sdk/p-f08ffa15.entry.js.map +1 -0
  79. package/dist/verdocs-web-sdk/{p-47a807b3.entry.js → p-f665bc0d.entry.js} +2 -2
  80. package/dist/verdocs-web-sdk/{p-47a807b3.entry.js.map → p-f665bc0d.entry.js.map} +1 -1
  81. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  82. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/components/p-25c19f32.js.map +0 -1
  85. package/dist/components/p-95466b4d.js.map +0 -1
  86. package/dist/verdocs-web-sdk/p-0b26b5c8.system.entry.js +0 -2
  87. package/dist/verdocs-web-sdk/p-0b26b5c8.system.entry.js.map +0 -1
  88. package/dist/verdocs-web-sdk/p-0b5effa9.entry.js +0 -2
  89. package/dist/verdocs-web-sdk/p-0b5effa9.entry.js.map +0 -1
  90. package/dist/verdocs-web-sdk/p-307e74f5.system.entry.js +0 -2
  91. package/dist/verdocs-web-sdk/p-307e74f5.system.entry.js.map +0 -1
  92. package/dist/verdocs-web-sdk/p-b0d1c5ec.entry.js +0 -2
  93. package/dist/verdocs-web-sdk/p-b0d1c5ec.entry.js.map +0 -1
  94. package/dist/verdocs-web-sdk/p-c63e8032.system.entry.js +0 -2
  95. package/dist/verdocs-web-sdk/p-c63e8032.system.entry.js.map +0 -1
  96. package/dist/verdocs-web-sdk/p-f972dcb5.entry.js +0 -2
  97. package/dist/verdocs-web-sdk/p-f972dcb5.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsAuthCss","VerdocsAuthStyle0","VerdocsAuth","exports","class_1","hostRef","this","endpoint","VerdocsEndpoint","getDefault","visible","logo","displayMode","org_name","first_name","last_name","email","verificationCode","newPassword","password","confirmpass","submitting","resendDisabled","session","profile","resendDisabledTimer","tempAuthEndpoint","baseURL","getBaseURL","persist","prototype","componentWillLoad","_this","loadSession","onSessionChanged","_endpoint","_a","authenticated","emit","_b","isPasswordComplex","isUppercase","ch","test","isLowercase","isSpecialChar","countOfUpperCase","countOfLowerCase","countOfSpecialChar","i","length","charAt","handleSignup","VerdocsToast","style","clearSession","createProfile","then","r","console","log","setToken","access_token","catch","e","response","sdkError","SDKError","message","_c","status","_d","data","_f","_e","error","handleVerification","verifyEmail","token","verificationResult","_g","sent","completeLogin","e_1","result","clearForms","loginAndCheckVerification","authenticate","username","trim","grant_type","authResult","getMyUser","user","email_verified","e_2","handleLogout","handleResendVerification","setTimeout","resendVerification","handleResendReset","resetPassword","handleResetGetCode","e_3","handleResetPassword","code","new_password","resetResult","e_4","handleReset","e_5","render","h","display","label","disabled","onClick","justifyContent","margin","invalid","class","href","src","alt","variant","onSubmit","flexDirection","columnGap","autocomplete","required","value","onInput","target","type","flex","marginTop","size"],"sources":["src/components/embeds/verdocs-auth/verdocs-auth.scss?tag=verdocs-auth","src/components/embeds/verdocs-auth/verdocs-auth.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-auth {\n font-family: $verdocs-primary-font;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n\n .form {\n width: 320px;\n display: flex;\n padding: 20px;\n max-width: 90%;\n align-items: center;\n flex-direction: column;\n box-sizing: border-box;\n justify-content: center;\n background: $verdocs-grey-4;\n }\n\n .logo {\n width: 128px;\n max-width: 100%;\n margin: 20px 0 30px;\n }\n\n h3 {\n color: $verdocs-grey-0;\n text-align: center;\n font-weight: 400;\n font-size: 18px;\n line-height: 1.75;\n margin: 0;\n }\n\n em {\n font-size: 14px;\n margin: 15px 0;\n }\n\n .buttons {\n gap: 20px;\n margin: 20px 0 0 0;\n display: flex;\n flex-direction: row;\n justify-content: center;\n }\n\n .status-result {\n display: none;\n\n &.debug {\n white-space: pre-wrap;\n font-size: 14px;\n background: #fff;\n padding: 10px;\n display: block;\n flex-direction: row;\n justify-content: center;\n }\n }\n\n form {\n width: 100%;\n }\n\n verdocs-text-input {\n margin-bottom: 10px;\n }\n\n .account-option {\n gap: 8px;\n margin: 20px 0 8px 0;\n display: flex;\n flex-direction: row;\n }\n\n p {\n color: $verdocs-grey-0;\n margin: 1em 0;\n font-size: 14px;\n }\n\n // Our <p>s are in a flex layout which prevents margins from collapsing because each item creates its own row\n p + p {\n margin-top: 0;\n }\n\n verdocs-help-icon {\n margin-top: 18px;\n display: flex;\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n }\n\n .already-have {\n color: $verdocs-grey-0;\n margin: 0.5em 0;\n font-size: 14px;\n }\n}\n","import {TSession, VerdocsEndpoint, createProfile, authenticate, resendVerification, resetPassword, verifyEmail, IAuthenticateResponse, getMyUser, IProfile} from '@verdocs/js-sdk';\nimport {Component, Prop, State, h, Event, EventEmitter} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\n\nexport interface IAuthStatus {\n authenticated: boolean;\n session: TSession;\n profile: IProfile | null;\n}\n\n/**\n * Display an authentication dialog that allows the user to login or sign up. If the user is\n * already authenticated with a valid session, this component will hide itself and fire the\n * success callback immediately. It is up to the host application to render the next appropriate\n * view for the application.\n *\n * To simplify UI development, a visibility flag can force this component to never display. This\n * allows you to subscribe to notifications from client apps without calling the lower-level JS SDK.\n *\n * This embed is responsive / mobile-friendly, but the calling application should provide at\n * least a 300px wide container to allow sufficient space for the required forms.\n *\n * ```ts\n * interface IAuthStatus {\n * authenticated: boolean;\n * session: TSession;\n * profile: IProfile | null;\n * }\n *\n * <verdocs-auth\n * onAuthenticated={({ detail }: { detail: IAuthStatus }) => console.log('Authentication state:', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-auth',\n styleUrl: 'verdocs-auth.scss',\n shadow: false,\n})\nexport class VerdocsAuth {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Normally, if the user has a valid session, this embed will be invisible, otherwise it will display\n * login / signup forms. If this is set to false, this embed will be invisible in both cases. Apps may\n * use this to verify if a user has a valid session without needing a separate call to Verdocs JS SDK.\n */\n @Prop() visible: boolean = true;\n\n /**\n * By default, a Verdocs logo will be displayed above the login/signup forms. This may be used to\n * override its source. (Alternatively, you may simply hide it via CSS overrides.) Logos should be\n * in SVG format for best results.\n */\n @Prop() logo: string = 'https://app.verdocs.com/assets/blue-logo.svg';\n\n /**\n * The display mode to start in.\n */\n @Prop({mutable: true}) displayMode: 'login' | 'forgot' | 'reset' | 'signup' | 'verify' = 'login';\n\n /**\n * Event fired when session authentication process has completed. Check the event\n * contents for completion status. This event will always be called at least once,\n * when the component is first rendered.\n */\n @Event({composed: true}) authenticated: EventEmitter<IAuthStatus>;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() org_name: string = '';\n @State() first_name: string = '';\n @State() last_name: string = '';\n @State() email: string = '';\n @State() verificationCode: string = '';\n @State() newPassword: string = '';\n @State() password: string = '';\n @State() confirmpass: string = '';\n @State() submitting: boolean = false;\n @State() resendDisabled = false;\n @State() session: TSession = null;\n @State() profile: IProfile | null = null;\n\n resendDisabledTimer = null;\n\n // We can't instantly log in on the default endpoint because other listeners might see\n // its events and incorrectly trigger before we're done. So we manage our own temp\n // endpoint and pass the final tokens to the default once we're ready.\n tempAuthEndpoint = new VerdocsEndpoint({\n baseURL: VerdocsEndpoint.getDefault().getBaseURL(),\n persist: false,\n });\n\n componentWillLoad() {\n this.endpoint.loadSession();\n VerdocsEndpoint.getDefault().onSessionChanged((_endpoint, session, profile) => {\n this.session = session;\n this.profile = profile;\n if (session) {\n this.authenticated?.emit({authenticated: true, session, profile});\n } else {\n this.authenticated?.emit({authenticated: false, session, profile});\n }\n });\n }\n\n isPasswordComplex(password: string) {\n const isUppercase = (ch: string) => /[A-Z]/.test(ch);\n const isLowercase = (ch: string) => /[a-z]/.test(ch);\n const isSpecialChar = (ch: string) => /[`!@#$%^&*()_\\-+=\\[\\]{};':\"\\\\|,.<>\\/?~ ]/.test(ch);\n let countOfUpperCase = 0,\n countOfLowerCase = 0,\n countOfSpecialChar = 0;\n for (let i = 0; i < password.length; i++) {\n let ch = password.charAt(i);\n if (isUppercase(ch)) countOfUpperCase++;\n else if (isLowercase(ch)) countOfLowerCase++;\n else if (isSpecialChar(ch)) countOfSpecialChar++;\n }\n return password.length >= 8 && countOfLowerCase > 0 && countOfUpperCase > 0 && countOfSpecialChar > 0;\n }\n\n handleSignup() {\n if (!this.isPasswordComplex(this.password)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.password !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n createProfile(this.tempAuthEndpoint, {\n email: this.email,\n password: this.password,\n first_name: this.first_name,\n last_name: this.last_name,\n org_name: this.org_name,\n })\n .then(r => {\n console.log('[AUTH] Profile creation result', r);\n this.tempAuthEndpoint.setToken(r.access_token);\n // We can't clearForms because we need email to stick around\n this.password = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n this.displayMode = 'verify';\n this.submitting = false;\n })\n .catch(e => {\n console.log('[AUTH] Signup error', e.response);\n this.submitting = false;\n this.authenticated?.emit({authenticated: false, profile: null, session: null});\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n\n VerdocsToast('Signup failed: ' + e.response?.data?.error || 'Unknown Error', {style: 'error'});\n });\n }\n\n async handleVerification() {\n this.submitting = true;\n\n try {\n this.submitting = false;\n const verificationResult = await verifyEmail(this.tempAuthEndpoint, {email: this.email, token: this.verificationCode});\n VerdocsToast('Thank you for verifying your email address.', {style: 'success'});\n this.completeLogin(verificationResult);\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n completeLogin(result: IAuthenticateResponse) {\n this.clearForms();\n this.tempAuthEndpoint.clearSession();\n this.endpoint.setToken(result.access_token);\n }\n\n async loginAndCheckVerification() {\n if (this.submitting) {\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n\n try {\n this.submitting = false;\n const authResult = await authenticate(this.tempAuthEndpoint, {username: this.email.trim(), password: this.password, grant_type: 'password'});\n console.log('[AUTH] Authenticated, checking email verification');\n this.tempAuthEndpoint.setToken(authResult.access_token);\n\n const user = await getMyUser(this.tempAuthEndpoint);\n console.log('Got user', user);\n\n if (!user.email_verified) {\n console.log('[AUTH] Logged in, pending email address verification');\n this.displayMode = 'verify';\n } else {\n console.log('[AUTH] Email address is verified, completing login');\n this.completeLogin(authResult);\n }\n } catch (e) {\n this.submitting = false;\n console.log('[AUTH] Auth failure', e.response?.data || e);\n VerdocsToast('Login failed. Please check your credentials and try again.', {style: 'error'});\n }\n }\n\n clearForms() {\n this.submitting = false;\n this.resendDisabled = false;\n this.email = '';\n this.password = '';\n this.newPassword = '';\n this.confirmpass = '';\n this.verificationCode = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n }\n\n handleLogout() {\n console.log('logging out');\n this.endpoint.clearSession();\n this.tempAuthEndpoint.clearSession();\n this.clearForms();\n this.displayMode = 'login';\n }\n\n handleResendVerification() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resendVerification(this.tempAuthEndpoint)\n .then(r => {\n console.log('[AUTH] Verification request resent', r);\n VerdocsToast('Please check your email for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend verification', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n handleResendReset() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resetPassword(this.tempAuthEndpoint, {email: this.email})\n .then(r => {\n console.log('[AUTH] Resend-code request resent', r);\n VerdocsToast('Please check your email again for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend reset request', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n async handleResetGetCode() {\n this.submitting = true;\n this.confirmpass = '';\n this.newPassword = '';\n\n try {\n this.submitting = false;\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset result', result);\n VerdocsToast('Please check your email inbox for a password reset code.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.displayMode = 'reset';\n } catch (e) {\n this.submitting = false;\n console.log('Reset request error', e);\n VerdocsToast('Request failed. Please check your email address and try again.');\n }\n }\n\n async handleResetPassword() {\n if (!this.isPasswordComplex(this.newPassword)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.newPassword !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n try {\n this.submitting = false;\n const resetResult = await resetPassword(this.endpoint, {email: this.email, code: this.verificationCode, new_password: this.newPassword});\n console.log('reset result', resetResult);\n VerdocsToast('Your password has been reset. You may now use your new password to login.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.password = '';\n this.displayMode = 'login';\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n async handleReset() {\n this.submitting = true;\n\n try {\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset sent', result);\n this.submitting = false;\n this.displayMode = 'login';\n VerdocsToast('If your email address is registered, you will receive instructions on resetting your password shortly.', {style: 'info'});\n } catch (e) {\n console.log('[AUTH] Unable to reset password', e);\n this.submitting = false;\n VerdocsToast('Unable to reset password. Please check your email address and try again.', {style: 'error'});\n }\n }\n\n render() {\n if (!this.visible) {\n return <div style={{display: 'none'}}>Authenticated</div>;\n }\n\n if (this.session) {\n return (\n <verdocs-button\n label=\"Sign Out\"\n disabled={this.submitting}\n onClick={() => this.handleLogout()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n );\n }\n\n if (this.displayMode === 'signup') {\n const invalid = this.submitting || !this.first_name || !this.last_name || !this.email || !this.password || !this.confirmpass || !this.org_name;\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Sign up for a free account</h3>\n <div class=\"already-have\">\n Already have an account?\n <verdocs-button label=\"Log In\" variant=\"text\" onClick={() => (this.displayMode = 'login')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.handleSignup()}>\n <div style={{display: 'flex', flexDirection: 'row', columnGap: '20px'}}>\n <verdocs-text-input\n label=\"First Name\"\n autocomplete=\"first\"\n required={true}\n value={this.first_name}\n onInput={(e: any) => (this.first_name = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Last Name\"\n autocomplete=\"last\"\n required={true}\n value={this.last_name}\n onInput={(e: any) => (this.last_name = e.target.value)}\n disabled={this.submitting}\n />\n </div>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"new-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Organization Name\"\n autocomplete=\"org\"\n required={true}\n value={this.org_name}\n onInput={(e: any) => (this.org_name = e.target.value)}\n disabled={this.submitting}\n style={{flex: '1'}}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <verdocs-button\n label=\"Next\"\n disabled={invalid}\n onClick={invalid ? () => {} : () => this.handleSignup()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'verify') {\n return (\n <div class=\"form\">\n <form onSubmit={() => this.handleVerification()}>\n <p>Please check your e-mail inbox for a verification code and enter it below.</p>\n\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Sign Out\" variant=\"outline\" disabled={this.submitting} onClick={() => this.handleLogout()} />\n <verdocs-button label=\"Verify\" disabled={this.submitting || !this.verificationCode || this.verificationCode.length !== 6} onClick={() => this.handleVerification()} />\n </div>\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendVerification()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'forgot') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check\n your spam folder if you do not receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetGetCode()}>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button size=\"small\" label=\"Request Code\" disabled={this.submitting} onClick={() => this.handleResetGetCode()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'reset') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not\n receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetPassword()}>\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.newPassword}\n onInput={(e: any) => (this.newPassword = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button label=\"Reset\" disabled={this.submitting} onClick={() => this.handleResetPassword()} />\n </div>\n\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendReset()} />\n </div>\n </form>\n </div>\n );\n }\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Log in to your account</h3>\n <div class=\"already-have\">\n Don't have an account?\n <verdocs-button label=\"Sign Up\" variant=\"text\" onClick={() => (this.displayMode = 'signup')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.loginAndCheckVerification()}>\n <verdocs-text-input label=\"Email\" autocomplete=\"username\" value={this.email} onInput={(e: any) => (this.email = e.target.value)} disabled={this.submitting} />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n autocomplete=\"current-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n\n <verdocs-button\n label=\"Forgot Your Password?\"\n variant=\"text\"\n onClick={() => (this.displayMode = 'forgot')}\n disabled={this.submitting}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 20px'}}\n />\n\n <verdocs-button\n label=\"Login\"\n disabled={this.submitting}\n onClick={() => this.loginAndCheckVerification()}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 0'}}\n />\n </form>\n </div>\n );\n }\n}\n"],"mappings":"u2DAAA,IAAMA,EAAiB,o9DACvB,IAAAC,EAAeD,E,ICwCFE,EAAWC,EAAA,0BALxB,SAAAC,EAAAC,G,0FASUC,KAAAC,SAA4BC,EAAgBC,aAO5CH,KAAAI,QAAmB,KAOnBJ,KAAAK,KAAe,+CAKAL,KAAAM,YAAkE,QAehFN,KAAAO,SAAmB,GACnBP,KAAAQ,WAAqB,GACrBR,KAAAS,UAAoB,GACpBT,KAAAU,MAAgB,GAChBV,KAAAW,iBAA2B,GAC3BX,KAAAY,YAAsB,GACtBZ,KAAAa,SAAmB,GACnBb,KAAAc,YAAsB,GACtBd,KAAAe,WAAsB,MACtBf,KAAAgB,eAAiB,MACjBhB,KAAAiB,QAAoB,KACpBjB,KAAAkB,QAA2B,KAEpClB,KAAAmB,oBAAsB,KAKtBnB,KAAAoB,iBAAmB,IAAIlB,EAAgB,CACrCmB,QAASnB,EAAgBC,aAAamB,aACtCC,QAAS,O,CAGXzB,EAAA0B,UAAAC,kBAAA,eAAAC,EAAA1B,KACEA,KAAKC,SAAS0B,cACdzB,EAAgBC,aAAayB,kBAAiB,SAACC,EAAWZ,EAASC,G,QACjEQ,EAAKT,QAAUA,EACfS,EAAKR,QAAUA,EACf,GAAID,EAAS,EACXa,EAAAJ,EAAKK,iBAAa,M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EAAKb,SAAW6C,EAAEoE,OAAOF,KAA/B,EAChBf,SAAU7G,KAAKe,aAGjB2F,EAAA,kBACEE,MAAM,wBACNU,QAAQ,OACRR,QAAS,kBAAOpF,EAAKpB,YAAc,QAA1B,EACTuG,SAAU7G,KAAKe,WACfiC,MAAO,CAAC2D,QAAS,OAAQI,eAAgB,SAAUC,OAAQ,oBAG7DN,EAAA,kBACEE,MAAM,QACNC,SAAU7G,KAAKe,WACf+F,QAAS,WAAM,OAAApF,EAAKsD,2BAAL,EACfhC,MAAO,CAAC2D,QAAS,OAAQI,eAAgB,SAAUC,OAAQ,kB,WAjjB/C,I","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as i,H as o,F as r,g as a}from"./p-576f984d.js";import{getRGBA as s,VerdocsEndpoint as n,updateField as d}from"@verdocs/js-sdk";import{S as l}from"./p-b0766439.js";import{S as c}from"./p-33300e3a.js";import{A as p,d as b}from"./p-3ceeb122.js";import{a as h,F as f}from"./p-c7ee88c7.js";import{f as g}from"./p-12bab948.js";import{i as u}from"./p-a901dff2.js";import"./p-85aa8e05.js";const v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-attachment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-attachment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-attachment label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-attachment svg{width:16px;height:16px}verdocs-field-attachment.disabled svg{opacity:0.5}verdocs-field-attachment.disabled svg span{cursor:inherit}verdocs-field-attachment .attach{cursor:inherit;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-field-attachment.required .attach{border:1px solid #cc0000}verdocs-field-attachment verdocs-button-panel{top:1px;left:-19px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-attachment verdocs-button-panel[data-active],verdocs-field-attachment verdocs-button-panel:hover{opacity:1}verdocs-field-attachment verdocs-button-panel .icon svg{fill:#333333}verdocs-field-attachment verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-attachment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-attachment .settings-icon svg{fill:#707ae5}verdocs-field-attachment .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const x=v;const m=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>`;const k=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#339933" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-check"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="m9 15 2 2 4-4"/></svg>`;const y=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.attached=t(this,"attached",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.dialogOpen=false;this.selectedFile=null;this.focused=false;this.handleUploadNext=e=>{var t;console.log("Upload next",e);this.dialogOpen=false;this.selectedFile=e.detail[0];(t=this.attached)===null||t===void 0?void 0:t.emit(e.detail[0])};this.handleUploadRemove=e=>{var t;e.preventDefault();e.stopPropagation();this.dialogOpen=false;this.selectedFile=null;(t=this.deleted)===null||t===void 0?void 0:t.emit({fieldName:this.fieldname})}}async focusField(){this.focused=true;this.dialogOpen=true;setTimeout((()=>{this.focused=false}),500)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}handleShow(){this.dialogOpen=true}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{required:v=false,value:x="",label:y="",settings:w={}}=u||{};const z=s(g);const C=x||!!this.selectedFile;if(d){return i(o,{class:{done:d}},i("div",{class:"attach",innerHTML:C?k:m}))}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:z}},y&&i("label",null,y),i("div",{class:"attach",innerHTML:C?k:m,onClick:()=>!p&&this.handleShow()}),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Attachments allow the user to attach their own documents (e.g. resumes or disclosures) to a signing flow."}))),this.dialogOpen&&i("verdocs-portal",null,i("verdocs-upload-dialog",{existingFile:w,onNext:e=>this.handleUploadNext(e),onRemove:e=>this.handleUploadRemove(e),onExit:()=>this.dialogOpen=false})))}get el(){return a(this)}};y.style=x;const w='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-checkbox{padding:0;width:16px;height:16px;display:block;scroll-margin:20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-field-checkbox div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-checkbox label{cursor:inherit;width:14px;height:14px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-checkbox.disabled label{opacity:0.5}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox label>input[type=checkbox]{display:none}verdocs-field-checkbox label>input[type=checkbox]+*::before{margin:0;content:"";width:12px;height:12px;display:block;line-height:12px;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #aeb4bf}verdocs-field-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-field-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;font-size:12px;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-field-checkbox.required{border:1px solid #cc0000}verdocs-field-checkbox.hide{display:none}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox verdocs-button-panel{display:block;margin-left:-20px;margin-top:-17px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-checkbox .settings-icon{position:absolute;top:-5px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-checkbox .settings-icon svg{fill:#707ae5}verdocs-field-checkbox .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const z=w;const C=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}async focusField(){this.focused=true;setTimeout((()=>{this.focused=false}),500)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{required:v=false,label:x="",value:m=false}=u||{};const k=s(g);const y=m==="true";if(d){return i(o,{class:{done:d}},y?"✓":"☐")}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:k}},x&&i("div",{class:"label"},x),i("label",{htmlFor:a},i("input",{id:a,name:a,type:"checkbox",checked:y,disabled:p,required:v}),i("span",null),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${u.name}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:u.name,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."})))))}};C.style=z;const S='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-date{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:74px;height:20px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-date.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-date label{top:-14px;left:0;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-date input{position:absolute;font-size:12px;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;border:1px solid #cccccc;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-date input.hide{display:none}verdocs-field-date.disabled input{opacity:0.5}verdocs-field-date.required input{border:1px solid #cc0000}verdocs-field-date verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-date verdocs-button-panel[data-active],verdocs-field-date verdocs-button-panel:hover{opacity:1}verdocs-field-date verdocs-button-panel .icon svg{fill:#333333}verdocs-field-date verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-date .settings-icon{position:absolute;top:-3px;left:-18px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-date .settings-icon svg{fill:#707ae5}verdocs-field-date .settings-icon:hover{opacity:1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{-webkit-transition:all var(--adp-transition-duration) var(--adp-transition-ease);transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7, var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex:1;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7, var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3, 1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4, 1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);-webkit-box-sizing:content-box;box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:-ms-inline-flexbox;display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255, 255, 255, 0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-column-gap:12px;-ms-flex-align:center;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic", CenturyGothic, AppleGothic, sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;-ms-flex-item-align:end;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:11px;height:17px;background:-webkit-gradient(linear, left top, right top, from(var(--adp-time-track-color)), to(var(--adp-time-track-color))) left 50%/100% var(--adp-time-track-height) no-repeat;background:linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;-ms-flex:1;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-box-sizing:border-box;box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0, 0, 0, 0)}.air-datepicker{--adp-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:0.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92, 196, 239, 0.1);--adp-background-color-in-range-focused:rgba(92, 196, 239, 0.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92, 196, 239, 0.1);--adp-cell-background-color-in-range-hover:rgba(92, 196, 239, 0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0, 0, 0, 0.3);--adp-overlay-transition-duration:0.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);-webkit-box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);border-radius:var(--adp-border-radius);-webkit-box-sizing:content-box;box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4, -webkit-max-content);grid-template-rows:repeat(4, max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family), sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;-webkit-transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), transform var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{-webkit-transform:translateY(calc(var(--adp-transition-offset) * -1));transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{-webkit-transform:translateX(var(--adp-transition-offset));transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{-webkit-transform:translateY(var(--adp-transition-offset));transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{-webkit-transform:translateX(calc(var(--adp-transition-offset) * -1));transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){-webkit-transform:translate(0, 0);transform:translate(0, 0);opacity:1}.air-datepicker.-active-.-custom-position-{-webkit-transition:none;transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);-webkit-box-shadow:none;box-shadow:none;position:static;left:auto;right:auto;opacity:1;-webkit-transform:none;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){-webkit-transform:translate(-50%, calc(-50% + var(--adp-transition-offset)));transform:translate(-50%, calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.air-datepicker.-custom-position-{-webkit-transition:none;transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);-webkit-box-sizing:border-box;box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{-webkit-box-sizing:content-box;box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;-webkit-transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), left 0s, height 0s, width 0s;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), left 0s, height 0s, width 0s;-webkit-transition-delay:0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);transition-delay:0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;-webkit-transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), height 0s, width 0s;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), height 0s, width 0s}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const $=S;const I=class{constructor(i){e(this,i);this.settingsPress=t(this,"settingsPress",7);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.containerId=`verdocs-date-picker-${Math.random().toString(36).substring(2,11)}`;this.showingProperties=false;this.picker=null;this.focused=false}async focusField(){var e;this.focused=true;(e=this.picker)===null||e===void 0?void 0:e.show();setTimeout((()=>{this.focused=false}),500)}componentDidLoad(){this.picker=new p(`#${this.containerId}`,{locale:b,isMobile:true,autoClose:true,onShow:()=>this.focused=true,onHide:()=>this.focused=false,onSelect:({date:e,formattedDate:t})=>{const i=new CustomEvent("fieldChange",{detail:{date:e,formattedDate:t}});this.hostEl.dispatchEvent(i)}});console.log("p",this.picker)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:f=1,yscale:u=1}=this;const{index:v,field:x}=c.getField(e,t,a,this.field);const{required:m=false,placeholder:k="Date...",value:y="",label:w=""}=x||{};const z=s(v);const C=y?g(new Date(y),h):"";if(this.done){return i(o,{class:{done:d}},C)}return i(o,{class:{required:m,disabled:p,done:d,focused:b},style:{backgroundColor:z}},w&&i("label",null,w),i("input",{name:a,class:"input-el",type:"text",value:C,id:this.containerId,disabled:p,placeholder:k,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false}),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/f*1e3)/1e3}, ${Math.floor(1/u*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${x.name}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Date fields allow the user to select a date."}))))}get hostEl(){return a(this)}};I.style=$;const M='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-dropdown{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:85px;height:20px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-dropdown label{top:-14px;left:0;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-dropdown select{cursor:inherit;position:absolute;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 6px, calc(100% - 3px) 6px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2);padding:0 5px}verdocs-field-dropdown select:focus{outline:none}verdocs-field-dropdown select.hide{display:none}verdocs-field-dropdown.disabled select{opacity:0.5}verdocs-field-dropdown.required select{border:1px solid #cc0000}verdocs-field-dropdown.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-dropdown verdocs-button-panel{display:block;margin-left:-33px;margin-top:-1px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-dropdown .settings-icon{position:absolute;top:-2px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-dropdown .settings-icon svg{fill:#707ae5}verdocs-field-dropdown .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const N=M;const D=class{constructor(i){e(this,i);this.fieldChange=t(this,"fieldChange",7);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}async focusField(){var e;this.focused=true;setTimeout((()=>{this.focused=false}),500);(e=this.selectEl)===null||e===void 0?void 0:e.showPicker()}handleChange(e){this.fieldChange.emit(e.target.value)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);let{required:v=false,value:x="",label:m="",options:k}=u||{};const y=s(g);if(d){return i(o,{class:{done:d}},x)}k||(k=[]);return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:y}},m&&i("label",null,m),i("select",{disabled:p,onChange:e=>this.handleChange(e),ref:e=>this.selectEl=e},i("option",{value:""},"Select..."),k.map((e=>i("option",{value:e.id,selected:e.id===x},e.label))),!k.length&&i("option",{value:"NA"},"N/A")),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Dropdowns are used to capture a recipient's selection of one of several options."}))))}};D.style=N;const F='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial.disabled img{opacity:0.5}verdocs-field-initial button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-initial .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-initial .settings-icon svg{fill:#707ae5}verdocs-field-initial .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const T=F;const j=class{constructor(i){e(this,i);this.adopt=t(this,"adopt",7);this.exit=t(this,"exit",7);this.fieldChange=t(this,"fieldChange",7);this.settingsChanged=t(this,"settingsChanged",7);this.settingsPress=t(this,"settingsPress",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.tempInitials=""}async focusField(){this.handleShow()}hideDialog(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null;this.focused=false}handleAdopt(e){var t;console.log("[INITIAL] Adopted initials");this.tempInitials=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempInitials);this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.setAttribute("initials",this.initials);this.dialog.addEventListener("exit",(()=>this.hideDialog()));this.dialog.addEventListener("next",(e=>this.handleAdopt(e)));document.body.append(this.dialog);this.focused=true}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{required:v=false,value:x="",label:m="",settings:k={}}=u||{};const y=s(g);const{base64:w}=k;if(d){return i(o,{class:{done:d}},x&&i("img",{src:x,alt:"Initial"}))}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:y}},m&&i("label",null,m),w?i("img",{src:w,alt:"Initial"}):i("button",{onClick:()=>!p&&this.handleShow()},"Initial"),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:u.name});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"initial fields capture the recipient's initials on a clause or page."}))))}};j.style=T;const A='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-radio{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:14px;height:14px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-field-radio.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-radio svg{margin-top:4px}verdocs-field-radio.disabled.done{opacity:1}verdocs-field-radio div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-radio div.group{top:14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#bb0589;border-bottom-left-radius:2px;border-bottom-right-radius:2px}verdocs-field-radio input{cursor:inherit}verdocs-field-radio.disabled input{opacity:0.5}verdocs-field-radio.done input[type=radio]{margin:0;padding:0;width:10px;height:10px}verdocs-field-radio:not(.done) input[type=radio]{position:absolute;opacity:0}verdocs-field-radio:not(.done) input[type=radio]+label:before{content:"";border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:12px;height:12px;position:absolute;left:0;top:0;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-field-radio:not(.done) input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-field-radio:not(.done) input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-field-radio:not(.done) input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:rgb(160, 160, 207.5);background:rgb(160, 160, 207.5)}verdocs-field-radio:not(.done) input[type=radio]+label:empty:before{margin-right:0}verdocs-field-radio.required{border:1px solid #cc0000}verdocs-field-radio.hide{display:none}verdocs-field-radio.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-radio verdocs-button-panel{margin-left:-20px;margin-top:-7px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-radio .settings-icon{position:absolute;top:-6px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-radio .settings-icon svg{fill:#707ae5}verdocs-field-radio .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const q=A;const H=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg>`;const L=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg>`;const P=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.required=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}async focusField(){this.focused=true;setTimeout((()=>{this.focused=false}),500)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{name:v,required:x=false,label:m="",group:k="",value:y=false}=u||{};const w=s(g);const z=y==="true";if(d){return i(o,{class:{done:d},style:{maxWidth:"10px"}},i("span",{innerHTML:z?L:H}))}return i(o,{class:{required:this.required||x,disabled:p,done:d,focused:b},style:{backgroundColor:w}},m&&i("div",{class:"label"},m),n&&k&&i("div",{class:"group"},k),i("input",{id:a,type:"radio",name:k||a,value:v,checked:!!z,disabled:p,required:x}),i("label",{htmlFor:a}),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Radio buttons capture the recipient's selection of just one of several related (exclusive) options."}))))}};P.style=q;const R='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature.disabled img{opacity:0.5}verdocs-field-signature button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid rgb(204, 0, 0)}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-signature .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-signature .settings-icon svg{fill:#707ae5}verdocs-field-signature .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const _=R;const U=class{constructor(i){e(this,i);this.fieldChange=t(this,"fieldChange",7);this.settingsPress=t(this,"settingsPress",7);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.tempSignature=""}async focusField(){this.handleShow()}hideDialog(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null;this.focused=false}handleAdopt(e){var t;console.log("[SIGNATURE] Adopted signature");this.tempSignature=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempSignature);this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-signature-dialog");this.dialog.setAttribute("name",this.name);this.dialog.addEventListener("exit",(()=>this.hideDialog()));this.dialog.addEventListener("next",(e=>this.handleAdopt(e)));document.body.append(this.dialog);this.focused=true}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{required:v=false,value:x="",label:m="",settings:k={}}=u||{};const{base64:y}=k;const w=s(g);if(d){return i(o,{class:{done:d}},x&&i("img",{src:y,alt:""}))}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:w}},m&&i("label",null,m),y?i("img",{src:y,alt:""}):i("button",{onClick:()=>!p&&this.handleShow()},"Signature"),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Signature fields capture a recipient's signature on a document."}))))}};U.style=_;const B='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea{cursor:inherit;width:100%;height:100%;resize:none;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.disabled textarea{opacity:0.5}verdocs-field-textarea label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-textarea.required{border:1px solid rgb(204, 0, 0)}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textarea .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-textarea .settings-icon svg{fill:#707ae5}verdocs-field-textarea .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const E=B;const O=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.endpoint=n.getDefault();this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}componentDidRender(){u.dynamicDrop(true);if(this.editable){u(this.el).resizable({edges:{top:true,bottom:true,left:true,right:true},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}}handleResizeStart(e){e.preventDefault();e.stopPropagation()}handleResize(e){let{x:t=0,y:i=0,h:o=0}=e.target.dataset;let{width:r,height:a}=e.rect;t=(parseFloat(t)||0)+e.deltaRect.left;i=(parseFloat(i)||0)+e.deltaRect.top;o=(parseFloat(o)||0)+e.deltaRect.height;Object.assign(e.target.style,{width:`${r}px`,height:`${a}px`,transform:`translate(${t}px, ${i+o}px)`});Object.assign(e.target.dataset,{x:t,y:i,h:o})}handleResizeEnd(e){const{source:t,sourceid:i,fieldname:o}=this;const{field:r}=c.getField(t,i,o,this.field);if(!r){return}const[a,s]=e.target.style.transform.split("(")[1].split(")")[0].split(",").map(parseFloat);const n=Math.round(parseFloat(e.target.style.width)/this.xscale);const l=Math.round(parseFloat(e.target.style.height)/this.yscale);const p=Math.round(r.x+a/this.xscale);const b=Math.round(r.y-s/this.yscale);d(this.endpoint,this.sourceid,this.fieldname,{x:p,y:b,width:n,height:l}).then((t=>{var i;(i=this.settingsChanged)===null||i===void 0?void 0:i.emit({fieldName:this.fieldname,field:t});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((e=>console.log("Field update failed",e)))}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);const{required:v=false,placeholder:x="",value:m="",label:k=""}=u||{};const y=s(g);if(d){return i(o,{class:{done:d}},m)}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:y}},k&&i("label",null,k),i("textarea",{name:a,disabled:p,required:v,placeholder:x,ref:e=>this.inputEl=e,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false},m),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Text areas may be used to create multi-line text fields."}))))}get el(){return a(this)}};O.style=E;const X='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox .edge-top,verdocs-field-textbox .edge-right,verdocs-field-textbox .edge-left,verdocs-field-textbox .edge-bottom{position:absolute;z-index:10}verdocs-field-textbox .edge-top{top:-2px;left:0;right:0;height:5px}verdocs-field-textbox .edge-right{top:0;bottom:0;right:-2px;width:5px}verdocs-field-textbox .edge-left{top:0;left:-2px;bottom:0;width:5px}verdocs-field-textbox .edge-bottom{bottom:-2px;left:0;right:0;height:5px}verdocs-field-textbox input{cursor:inherit;width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.disabled input{opacity:0.5}verdocs-field-textbox textarea{cursor:inherit;width:100%;height:100%;resize:none;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox textarea.hide{display:none}verdocs-field-textbox.disabled textarea{opacity:0.5}verdocs-field-textbox label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-textbox.required{border:1px solid rgb(204, 0, 0)}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}verdocs-field-textbox .settings-icon{position:absolute;top:-4px;left:-18px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-textbox .settings-icon svg{fill:#707ae5}verdocs-field-textbox .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';const Y=X;const G=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.multiline=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}componentDidRender(){u.dynamicDrop(true);if(this.editable){u(this.el).resizable({edges:{top:".edge-top",left:".edge-left",bottom:".edge-bottom",right:".edge-right"},modifiers:[u.modifiers.restrictSize({min:{width:30,height:15}})],listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}}handleResizeStart(e){e.preventDefault();e.stopPropagation()}handleResize(e){let{width:t,height:i}=e.rect;const o=e.deltaRect.left;const r=e.deltaRect.bottom;const a=parseFloat(e.target.style.left);const s=parseFloat(e.target.style.bottom);t/=this.xscale;i/=this.yscale;Object.assign(e.target.style,{width:`${t}px`,height:`${i}px`,left:`${a+o}px`,bottom:`${s-r}px`})}handleResizeEnd(e){const{sourceid:t,fieldname:i}=this;const o=Math.round(parseFloat(e.target.style.width));let r=Math.round(parseFloat(e.target.style.height));if(r<20){r=15}const a=r>15;d(n.getDefault(),t,i,{width:o,height:r,multiline:a}).then((async t=>{var o;const r=await c.getTemplate(n.getDefault(),this.sourceid);const a=JSON.parse(JSON.stringify(r));const s=a.fields.findIndex((e=>e.name===i));if(s>-1){a.fields[s]=t}c.updateTemplate(this.sourceid,a);(o=this.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:i,field:t});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((e=>console.log("Field update failed",e)))}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,focused:b,xscale:h=1,yscale:f=1}=this;const{index:g,field:u}=c.getField(e,t,a,this.field);let{required:v=false,placeholder:x="",label:m="",width:k=150,default:y="",multiline:w=false}=u||{};const z=s(g);if(u===null||u===void 0?void 0:u.value){y=u===null||u===void 0?void 0:u.value}const C=k/5;if(d){return i(o,{class:{done:d}},y)}return i(o,{class:{required:v,disabled:p,done:d,focused:b},style:{backgroundColor:z}},n&&i("div",{class:"edge-top"}),n&&i("div",{class:"edge-right"}),n&&i("div",{class:"edge-left"}),n&&i("div",{class:"edge-bottom"}),m&&i("label",null,m),w?i("textarea",{name:a,disabled:p,required:v,placeholder:x,ref:e=>this.inputEl=e,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false},y):i("input",{type:"text",name:a,value:y,disabled:p,required:v,placeholder:x,maxlength:C,ref:e=>this.inputEl=e,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false}),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'}))))}get el(){return a(this)}};G.style=Y;const W='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-timestamp{width:160px;height:15px;display:block;font-size:9px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-field-timestamp.done{opacity:1}verdocs-field-timestamp input{position:absolute;cursor:inherit;opacity:0.5;width:100%;height:100%;font-size:9px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-timestamp input.hide{display:none}verdocs-field-timestamp label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-timestamp.required{border:1px solid rgb(204, 0, 0)}verdocs-field-timestamp.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-timestamp verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-timestamp verdocs-button-panel[data-active],verdocs-field-timestamp verdocs-button-panel:hover{opacity:1}verdocs-field-timestamp verdocs-button-panel .icon svg{fill:#333333}verdocs-field-timestamp verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-timestamp .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-timestamp .settings-icon svg{fill:#707ae5}verdocs-field-timestamp .settings-icon:hover{opacity:1}';const V=W;const J=class{constructor(i){e(this,i);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false}async focusField(){this.el.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}render(){const{source:e,sourceid:t,fieldname:a,editable:n=false,done:d=false,disabled:p=false,xscale:b=1,yscale:h=1}=this;const{index:u,field:v}=c.getField(e,t,a,this.field);const{required:x=false,placeholder:m="",value:k="",label:y=""}=v||{};const w=s(u);const z=g(new Date(k||(new Date).toISOString()),f);if(d){return i(o,{class:{done:d}},z)}return i(o,{class:{required:x,disabled:p,done:d},style:{backgroundColor:w}},y&&i("label",null,y),i("input",{type:"text",placeholder:m,value:z,disabled:true,ref:e=>this.el=e}),n&&i(r,null,i("div",{id:`verdocs-settings-panel-trigger-${a}`,style:{transform:`scale(${Math.floor(1/b*1e3)/1e3}, ${Math.floor(1/h*1e3)/1e3})`},class:"settings-icon",innerHTML:l,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&i("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${a}`,onClickAway:()=>this.showingProperties=false},i("verdocs-template-field-properties",{templateId:t,fieldName:a,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:a});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Time stamps are automatically set when the recipient signs the document."}))))}};J.style=V;const Z='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-initial-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275)}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}';const K=Z;const Q=class{constructor(i){e(this,i);this.next=t(this,"next",7);this.exit=t(this,"exit",7);this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}componentWillLoad(){this.enteredInitials=this.initials.toUpperCase();const e=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");e.load().then((e=>{document.fonts.add(e);this.fontLoaded=true}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){console.log("redrawing sig");if(!this.canvasElement){console.log("no canvas");return}const e=this.canvasElement.width;console.log("cw",e);const t=this.canvasElement.getContext("2d");t.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let i=100;do{i-=2;t.font=`${i}px Dancing Script`}while(t.measureText(this.enteredInitials).width>e-32);t.textAlign="center";t.textBaseline="middle";t.font=`${i}px Dancing Script`;t.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(e){this.enteredInitials=e.target.value}handleCancel(e){e.stopPropagation();e.preventDefault();this.exit.emit()}handleAdopt(e){e.stopPropagation();e.preventDefault();const t=this.canvasElement.toDataURL("image/png");this.next.emit(t)}render(){return i(o,{key:"4085e9b406a11216f58f457e7a0cdfb558792a98",onClick:e=>this.handleCancel(e)},i("div",{key:"4c6a003c8f792fad3ae9b99f94a587501bc2749b",class:"dialog"},i("div",{key:"4180f88e05069d2218b6f42883e1f907095c7579",class:"heading"},"Create Your Initial"),i("div",{key:"fa4fc8d6137c30a22727a915322125042f5786f6",class:"content"},i("verdocs-text-input",{key:"afbc49e66e366601720774c105974cb0de3c481e",placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:e=>this.handleNameChange(e)}),i("div",{key:"5b21e779b447afd130b819f9aa912378ffea930d",class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?i("canvas",{ref:e=>this.canvasElement=e}):i("div",{style:{display:"none"}}),i("div",{key:"75ba8cbf3198ff549cf59410ce359e77eca021af",class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),i("div",{key:"327877bb6d9cd5cfd268d362ac5cad0cb17c2ce2",class:"buttons"},i("verdocs-button",{key:"a0a04659ea55b9ffe7d5f19af3f81119f53e58df",label:"CANCEL",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{key:"c5bb10699adb3df54a0a07dada14260ce2eab2db",label:"Adopt & Sign",onClick:e=>this.handleAdopt(e)})))))}};Q.style=K;const ee='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-signature-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-signature-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-signature-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-signature-dialog .content{font-size:14px;padding:20px}verdocs-signature-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-signature-dialog .buttons verdocs-button{margin-left:16px}verdocs-signature-dialog canvas{background:#ffffff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275)}verdocs-signature-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-signature-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-signature-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-signature-dialog .tabs .tab:hover{color:#55bc81}';const te=ee;const ie=class{constructor(i){e(this,i);this.next=t(this,"next",7);this.exit=t(this,"exit",7);this.name="";this.fontLoaded=false;this.enteredName="";this.mode="type"}componentWillLoad(){this.enteredName=this.name;const e=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");e.load().then((e=>{document.fonts.add(e);this.fontLoaded=true}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement){return}const e=this.canvasElement.width;const t=this.canvasElement.getContext("2d");t.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let i=100;do{i-=2;t.font=`${i}px Dancing Script`}while(t.measureText(this.enteredName).width>e-32);t.textAlign="center";t.textBaseline="middle";t.font=`${i}px Dancing Script`;t.fillText(this.enteredName,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(e){this.enteredName=e.target.value}handleCancel(e){e.stopPropagation();e.preventDefault();this.exit.emit()}handleAdopt(e){e.stopPropagation();e.preventDefault();const t=this.canvasElement.toDataURL("image/png");this.next.emit(t)}render(){return i(o,{key:"dea4d21238c781bda1f5fdaec35b51e798a8f073",onClick:e=>this.handleCancel(e)},i("div",{key:"2cc79e7a89ce233347bd2cfc46441106a2d02728",class:"dialog"},i("div",{key:"983646ce131571a60e89d9e5f96479c8473ee888",class:"heading"},"Create Your Signature"),i("div",{key:"7909c75a451b6778ea69d637949e29b83e3e3b12",class:"content"},i("verdocs-text-input",{key:"fd2b5b6a259aab0636bcda106175d225712a05e8",placeholder:"Full Name...",label:"Full Name",value:this.enteredName,onInput:e=>this.handleNameChange(e),onClick:e=>e.stopPropagation()}),i("div",{key:"7c3795b469571dd019e9a8a79c7110b647795147",class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?i("canvas",{ref:e=>this.canvasElement=e}):i("div",{style:{display:"none"}}),i("div",{key:"ddc7ccd402ba1023e7ffbc5c1a94208149563d32",class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),i("div",{key:"74dc260aee414296796d156f3dea10919eca6da3",class:"buttons"},i("verdocs-button",{key:"24747ae1cc4d47a640fc509c9b3c66e06fff0eb8",label:"CANCEL",size:"normal",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{key:"b845f87b51e1998d69ce579693b871536b316230",label:"Adopt & Sign",size:"normal",onClick:e=>this.handleAdopt(e)})))))}};ie.style=te;const oe='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .upload-dialog-content{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:#33364b;border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0;font-weight:500}verdocs-upload-dialog .drop-target p.subscript{margin:20px;color:#5c6575;font-size:14px}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}verdocs-upload-dialog .error{margin:20px 0;color:#cc0000}';const re=oe;const ae=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>`;const se=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>`;const ne=class{constructor(i){e(this,i);this.exit=t(this,"exit",7);this.next=t(this,"next",7);this.remove=t(this,"remove",7);this.maxSize=20*1024*1024;this.draggingOver=false;this.confirmDelete=false;this.selectedFiles=[];this.errorMessage=""}handleCancel(){this.exit.emit()}handleDismiss(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}}handleDone(){this.next.emit(this.selectedFiles)}handleDragOver(e){e.preventDefault();this.draggingOver=true}handleDragLeave(e){e.preventDefault();this.draggingOver=false}async handleDrop(e){e.preventDefault();this.draggingOver=false;this.handleSetSelected(Array.from(e.dataTransfer.files))}handleRemoveAttachment(e){const t=[...this.selectedFiles];t.splice(e,1);this.handleSetSelected(t)}handleSetSelected(e){this.selectedFiles=e;this.errorMessage="";const t=this.selectedFiles.reduce(((e,t)=>e+t.size),0);if(t>this.maxSize){this.errorMessage="Total file size must not exceed 20MB."}}handleDeleteAttachment(e){var t;e.preventDefault();e.stopPropagation();(t=this.remove)===null||t===void 0?void 0:t.emit();this.existingFile=null;this.confirmDelete=false}handleSelectFile(){var e;(e=this.fileInput)===null||e===void 0?void 0:e.click()}async handleFileChange(){var e;const t=Array.from((e=this.fileInput)===null||e===void 0?void 0:e.files);this.handleSetSelected(t)}render(){var e;const t=((e=this.existingFile)===null||e===void 0?void 0:e.name)?this.existingFile:null;return i(o,{key:"08473beb6f11411c7837dbc5942e1825ec0d22dc"},i("div",{key:"a01184384424554b6aeb2acc9c3cd62b785b7d99",class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{key:"ddd7b02d0474e932dcd8b85237b66221bc7447b9",class:"upload-dialog-content"},i("div",{key:"01d0251de4006b606ca3328e93d3f1540f656c08",class:"heading"},"Upload attachment"),this.selectedFiles.length<1&&t&&i(r,{key:"0a20be6be694db1078519c13326986d5cecbec9b"},i("div",{key:"2b9d6fdc8c379697980db9b6e9542ab334bea11e",class:"current-label"},"Current Attachment"),i("div",{key:"0b8bb43991af9fd7ee0001d8532ecc803cee3050",class:"attachments",style:{marginTop:"0"}},i("div",{key:"e5754b28e09f671a7e178a0203de7fd80b0b9e4b",class:"attachment"},i("div",{key:"8c483a269cbfcf32d12ddcdcb454fd266b202f2d",class:"icon",innerHTML:se}),i("div",{key:"2f9d1bf2a641b24844cb556060a928408a79f6ef",class:"name"},t.name),i("div",{key:"0b33e4614ead3a0eb3ebdf7d35fda8a191a44f3b",class:"icon trash",innerHTML:ae,onClick:()=>this.confirmDelete=true})))),this.selectedFiles.length<1&&!t&&i("div",{key:"b26e6641e0f86afd57168b5d1f025db39ece3703",class:{"drop-target":true,"dragging-over":this.draggingOver},onDragOver:e=>this.handleDragOver(e),onDragLeave:e=>this.handleDragLeave(e),onDrop:e=>this.handleDrop(e)},i("p",{key:"20638e894d486dcce6116b95a5f8059412ed17a3"},"Drag and drop your files here"),i("p",{key:"e0fbd1510e54329559704463c00f5f0252923473",class:"subscript"},"Supported files: PDF, Word, JPG, PNG"),i("verdocs-button",{key:"a1ec278f83dd3ed18149d95fb7d8067d883b1b78",label:!!t?"Replace files":"Select files",onClick:()=>this.handleSelectFile()}),i("input",{key:"0cf5ca756bf69accce561847f19bd4e08d5e4136",type:"file",ref:e=>this.fileInput=e,style:{display:"none"},accept:".pdf,application/pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/*",onChange:()=>this.handleFileChange()})),this.selectedFiles.length>0&&i("div",{key:"5ea0adc338de2dc0e75465771b6250d318bbd2f6",class:"attachments"},this.selectedFiles.map(((e,t)=>i("div",{class:"attachment"},i("div",{class:"icon",innerHTML:se}),i("div",{class:"name"},e.name),i("div",{class:"icon trash",innerHTML:ae,onClick:()=>this.handleRemoveAttachment(t)}))))),!!this.errorMessage&&i("div",{key:"e1fe73bca3d6410fbfda06bdde719dc1ccc80629",class:"error"},this.errorMessage),i("div",{key:"3ae75e913b14618d39ca941fbb5679eb193d8c44",class:"buttons"},i("verdocs-button",{key:"72a38fb360150cdce2a8dea577e22ed25db2a2dc",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{key:"4ba76d8e1fec6f8b18dd14dd36b4a598989ea953",label:"Upload",onClick:()=>this.handleDone(),disabled:!!this.errorMessage||this.selectedFiles.length<1})))),this.confirmDelete&&i("verdocs-ok-dialog",{key:"85370235ceb8cbf198dea8002712046aeb67f231",heading:"Delete Attachment?",message:"Are you sure you wish to delete this attachment? This action cannot be undone.",showCancel:true,onExit:e=>{e.preventDefault();e.stopPropagation();this.confirmDelete=false},onNext:e=>this.handleDeleteAttachment(e)}))}};ne.style=re;export{y as verdocs_field_attachment,C as verdocs_field_checkbox,I as verdocs_field_date,D as verdocs_field_dropdown,j as verdocs_field_initial,P as verdocs_field_radio,U as verdocs_field_signature,O as verdocs_field_textarea,G as verdocs_field_textbox,J as verdocs_field_timestamp,Q as verdocs_initial_dialog,ie as verdocs_signature_dialog,ne as verdocs_upload_dialog};
2
+ //# sourceMappingURL=p-f08ffa15.entry.js.map