@verdocs/web-sdk 6.13.1 → 6.13.3

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 (93) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +3 -3
  3. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +13 -4
  5. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-preview_6.cjs.entry.js +6 -6
  7. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -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/embeds/verdocs-send/verdocs-send.css +26 -0
  12. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +5 -5
  13. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -1
  15. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  16. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +3 -3
  17. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  18. package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +36 -4
  19. package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js.map +1 -1
  20. package/dist/components/{p-BTrjJycH.js → p-06em1_P-.js} +2 -2
  21. package/dist/components/p-D495hZfr.js +2 -0
  22. package/dist/components/p-D495hZfr.js.map +1 -0
  23. package/dist/components/p-K-sDaUxS.js +2 -0
  24. package/dist/components/p-K-sDaUxS.js.map +1 -0
  25. package/dist/components/{p-ByrpRZ3E.js → p-lCn8WPSe.js} +2 -2
  26. package/dist/components/p-lCn8WPSe.js.map +1 -0
  27. package/dist/components/verdocs-build.js +1 -1
  28. package/dist/components/verdocs-contact-picker.js +1 -1
  29. package/dist/components/verdocs-send.js +1 -1
  30. package/dist/components/verdocs-sign-footer.js +1 -1
  31. package/dist/components/verdocs-sign.js +1 -1
  32. package/dist/components/verdocs-sign.js.map +1 -1
  33. package/dist/components/verdocs-view.js +1 -1
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/verdocs-contact-picker.entry.js +3 -3
  36. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  37. package/dist/esm/verdocs-download-dialog_4.entry.js +13 -4
  38. package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
  39. package/dist/esm/verdocs-preview_6.entry.js +6 -6
  40. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  41. package/dist/esm/verdocs-sign.entry.js +3 -1
  42. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  43. package/dist/esm/verdocs-web-sdk.js +1 -1
  44. package/dist/esm-es5/loader.js +1 -1
  45. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  46. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  47. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  48. package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
  49. package/dist/esm-es5/verdocs-preview_6.entry.js +2 -2
  50. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  51. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  52. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  53. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  54. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  55. package/dist/types/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.d.ts +4 -0
  56. package/dist/types/components.d.ts +10 -0
  57. package/dist/verdocs-web-sdk/{p-38800961.system.entry.js → p-3a97f4b4.system.entry.js} +2 -2
  58. package/dist/verdocs-web-sdk/p-3a97f4b4.system.entry.js.map +1 -0
  59. package/dist/verdocs-web-sdk/{p-301f0247.entry.js → p-78a18a3b.entry.js} +2 -2
  60. package/dist/verdocs-web-sdk/p-78a18a3b.entry.js.map +1 -0
  61. package/dist/verdocs-web-sdk/p-895174e4.system.entry.js +8 -0
  62. package/dist/verdocs-web-sdk/p-895174e4.system.entry.js.map +1 -0
  63. package/dist/verdocs-web-sdk/p-8f7d0062.entry.js +8 -0
  64. package/dist/verdocs-web-sdk/p-8f7d0062.entry.js.map +1 -0
  65. package/dist/verdocs-web-sdk/p-935267a6.entry.js +2 -0
  66. package/dist/verdocs-web-sdk/p-935267a6.entry.js.map +1 -0
  67. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  68. package/dist/verdocs-web-sdk/p-a9899fce.system.entry.js +2 -0
  69. package/dist/verdocs-web-sdk/p-a9899fce.system.entry.js.map +1 -0
  70. package/dist/verdocs-web-sdk/{p-2e382167.entry.js → p-ea6c0b55.entry.js} +2 -2
  71. package/dist/verdocs-web-sdk/p-ea6c0b55.entry.js.map +1 -0
  72. package/dist/verdocs-web-sdk/{p-3f9102c4.system.entry.js → p-eccac670.system.entry.js} +2 -2
  73. package/dist/verdocs-web-sdk/p-eccac670.system.entry.js.map +1 -0
  74. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  75. package/package.json +3 -3
  76. package/dist/components/p-ByrpRZ3E.js.map +0 -1
  77. package/dist/components/p-E2hWLZ47.js +0 -2
  78. package/dist/components/p-E2hWLZ47.js.map +0 -1
  79. package/dist/components/p-VqyGWtIp.js +0 -2
  80. package/dist/components/p-VqyGWtIp.js.map +0 -1
  81. package/dist/verdocs-web-sdk/p-2e382167.entry.js.map +0 -1
  82. package/dist/verdocs-web-sdk/p-301f0247.entry.js.map +0 -1
  83. package/dist/verdocs-web-sdk/p-38800961.system.entry.js.map +0 -1
  84. package/dist/verdocs-web-sdk/p-3f9102c4.system.entry.js.map +0 -1
  85. package/dist/verdocs-web-sdk/p-575b6f98.system.entry.js +0 -8
  86. package/dist/verdocs-web-sdk/p-575b6f98.system.entry.js.map +0 -1
  87. package/dist/verdocs-web-sdk/p-957e4cb0.entry.js +0 -2
  88. package/dist/verdocs-web-sdk/p-957e4cb0.entry.js.map +0 -1
  89. package/dist/verdocs-web-sdk/p-f3924e9e.entry.js +0 -8
  90. package/dist/verdocs-web-sdk/p-f3924e9e.entry.js.map +0 -1
  91. package/dist/verdocs-web-sdk/p-f41af68e.system.entry.js +0 -2
  92. package/dist/verdocs-web-sdk/p-f41af68e.system.entry.js.map +0 -1
  93. /package/dist/components/{p-BTrjJycH.js.map → p-06em1_P-.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-contact-picker.entry.js","sources":["src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.scss?tag=verdocs-contact-picker","src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-contact-picker {\n --picker-ink: var(--verdocs-body-color, #111827);\n --picker-ink-2: #374151;\n --picker-muted: #6b7280;\n --picker-faint: #9ca3af;\n --picker-control-border: #d1d5db;\n --picker-accent: var(--verdocs-link-color, #{$secondary-color});\n --picker-accent-tint: #f4f5fc;\n --picker-accent-tint-2: #e6e7f8;\n\n display: block;\n font-size: 14px;\n color: var(--picker-ink);\n font-family: $verdocs-primary-font;\n\n * {\n box-sizing: border-box;\n }\n\n form {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n // Fields scroll above a pinned Done button when the host constrains the picker's height; with\n // no constraint the body simply grows and the fade never shows.\n .form-body-wrap {\n position: relative;\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n .form-body {\n position: relative;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n .scroll-fade {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 36px;\n opacity: 0;\n pointer-events: none;\n transition: opacity 150ms ease-out;\n background: linear-gradient(rgba(255, 255, 255, 0), #ffffff);\n }\n\n .scrollable:not(.at-end) > .scroll-fade {\n opacity: 1;\n }\n\n .row.names {\n display: flex;\n column-gap: 8px;\n position: relative;\n\n .field {\n flex: 1;\n min-width: 0;\n }\n }\n\n .field {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n margin: 0 0 10px 0;\n\n label {\n font-size: 12px;\n font-weight: 500;\n color: var(--picker-ink-2);\n\n .optional {\n color: var(--picker-muted);\n font-weight: 400;\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n font-size: 13px;\n font-family: inherit;\n color: var(--picker-ink);\n background: #ffffff;\n border: 1px solid var(--picker-control-border);\n border-radius: 6px;\n outline: none;\n\n &:focus {\n border-color: var(--picker-accent);\n box-shadow: 0 0 0 2px var(--picker-accent-tint-2);\n }\n\n &::placeholder {\n color: var(--picker-faint);\n opacity: 1;\n }\n }\n\n input {\n height: 34px;\n padding: 0 10px;\n }\n\n textarea {\n height: 56px;\n padding: 8px 10px;\n resize: vertical;\n }\n\n .group {\n margin: 2px 0 12px 0;\n\n .group-label {\n font-size: 12px;\n font-weight: 500;\n color: var(--picker-ink-2);\n margin: 0 0 6px 0;\n }\n }\n\n .pills {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n .pill {\n all: unset;\n height: 26px;\n padding: 0 9px;\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n font-family: inherit;\n white-space: nowrap;\n border-radius: 999px;\n color: var(--picker-ink-2);\n border: 1px solid var(--picker-control-border);\n\n &:focus-visible {\n outline: 2px solid var(--picker-accent);\n outline-offset: 2px;\n }\n\n &.selected {\n color: var(--picker-accent);\n border-color: var(--picker-accent);\n background: var(--picker-accent-tint);\n }\n\n &.locked {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .pill-icon,\n .pill-icon svg {\n width: 12px;\n height: 12px;\n display: block;\n }\n }\n\n .passcode {\n display: flex;\n align-items: center;\n column-gap: 8px;\n margin-top: 8px;\n\n input {\n flex: 0 0 120px;\n width: 120px;\n height: 30px;\n }\n\n .passcode-hint {\n flex: 1;\n min-width: 0;\n font-size: 11px;\n line-height: 1.35;\n color: var(--picker-muted);\n align-self: center;\n }\n }\n\n .buttons {\n margin-top: 10px;\n padding-top: 12px;\n border-top: 1px solid #e5e7eb;\n flex: none;\n display: flex;\n column-gap: 10px;\n\n verdocs-button:last-child {\n flex: 1;\n }\n\n verdocs-button:last-child button {\n width: 100%;\n }\n }\n\n .suggestions {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 20;\n max-height: 225px;\n overflow-y: auto;\n background: #ffffff;\n border-radius: 6px;\n border: 1px solid #e5e7eb;\n box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);\n\n .suggestion {\n display: flex;\n padding: 6px 12px;\n align-items: center;\n flex-direction: row;\n cursor: pointer;\n\n svg {\n width: 28px;\n height: 28px;\n }\n\n .avatar {\n width: 28px;\n height: 28px;\n flex: 0 0 28px;\n margin-right: 8px;\n border-radius: 100%;\n }\n\n .details {\n display: flex;\n flex-direction: column;\n min-width: 0;\n }\n\n .name {\n font-size: 13px;\n font-weight: 500;\n color: var(--picker-ink);\n }\n\n .destination {\n font-size: 12px;\n color: var(--picker-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n background: var(--picker-accent-tint);\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n}\n","import {Component, Element, h, Event, EventEmitter, Listen, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {updateScrollFade} from '../../../utils/ScrollFade';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nconst lockIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></svg>`;\n\ntype TSigningOption = 'none' | 'delegator' | 'name_locked';\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n name_locked: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\n @Element() el: HTMLElement;\n\n private namesRowEl: HTMLElement;\n private suggestionsEl: HTMLElement;\n\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 * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Whether to show a Cancel button beside Done.\n */\n @Prop() showCancel = true;\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() name_locked: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true;\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : this.templateRole.name_locked || false;\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements\n // call fails or we stay loading forever.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\n }\n\n // Make sure the suggestion list doesn't break the scroll region\n componentDidRender() {\n const body = this.el.querySelector('.form-body') as HTMLElement | null;\n updateScrollFade(body);\n if (this.suggestionsEl && this.namesRowEl && body) {\n this.suggestionsEl.style.top = `${this.namesRowEl.offsetTop + this.namesRowEl.offsetHeight - body.scrollTop + 4}px`;\n }\n }\n\n @Listen('click', {target: 'document'})\n handleDocumentClick(e: MouseEvent) {\n if (this.showSuggestions && !this.el.contains(e.target as Node)) {\n this.showSuggestions = false;\n }\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n name_locked: this.name_locked,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n toggleAuthMethod(method: TRecipientAuthMethod) {\n if (this.auth_methods.includes(method)) {\n this.auth_methods = this.auth_methods.filter(selected => selected !== method);\n } else {\n this.auth_methods = [...this.auth_methods, method];\n }\n }\n\n // TODO: Decide whether we want to keep these mutually-exclusive\n setSigningOption(option: TSigningOption) {\n this.delegator = option === 'delegator';\n this.name_locked = option === 'name_locked';\n }\n\n renderPill(label: string, selected: boolean, onClick: () => void, opts: {locked?: boolean; title?: string} = {}) {\n return (\n <button\n type=\"button\"\n class={{pill: true, selected, locked: !!opts.locked}}\n aria-pressed={selected ? 'true' : 'false'}\n disabled={opts.locked && !selected}\n title={opts.title}\n onClick={onClick}\n >\n {opts.locked && <span class=\"pill-icon\" innerHTML={lockIcon} />}\n {label}\n </button>\n );\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n\n const hasAuthRequirements = this.auth_methods.every(method => {\n switch (method) {\n case 'passcode':\n return !!this.passcode;\n case 'kba':\n return !!this.first_name && !!this.last_name;\n case 'email':\n return !!this.email;\n case 'sms':\n return !!this.phone;\n default:\n return true;\n }\n });\n\n const canSubmit = hasBasics && hasAuthRequirements;\n const hasSMSAuth = !!this.activeEntitlements.sms_auth;\n\n // TODO: We show non-entitled options disabled so folks know what's possible. We could alternatively hide them.\n const verificationOptions: {label: string; value: TRecipientAuthMethod; locked?: boolean}[] = [\n {label: 'Email OTP', value: 'email'},\n {label: 'Passcode', value: 'passcode'},\n {label: 'SMS OTP', value: 'sms', locked: !hasSMSAuth},\n {label: 'KBA', value: 'kba', locked: !this.activeEntitlements.kba_auth},\n {label: 'ID check', value: 'id', locked: !this.activeEntitlements.id_auth},\n ];\n\n const signingOption: TSigningOption = this.delegator ? 'delegator' : this.name_locked ? 'name_locked' : 'none';\n\n return (\n <form onSubmit={e => e.preventDefault()} autocomplete=\"off\">\n <div class=\"form-body-wrap\">\n <div\n class=\"form-body\"\n onScroll={(e: any) => {\n updateScrollFade(e.target);\n this.showSuggestions = false;\n }}\n >\n <div class=\"row names\" ref={el => (this.namesRowEl = el)}>\n <div class=\"field\">\n <label htmlFor={this.firstNameFieldId}>First name</label>\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n </div>\n <div class=\"field\">\n <label htmlFor={this.lastNameFieldId}>Last name</label>\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n </div>\n\n <div class=\"field\">\n <label htmlFor={this.emailFieldId}>Email</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {hasSMSAuth && (\n <div class=\"field\">\n <label htmlFor={this.phoneFieldId}>\n Phone <span class=\"optional\">(optional)</span>\n </label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"+1 (555) 000-0000\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <div class=\"group\">\n <div class=\"group-label\">Verification</div>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" />\n ) : (\n <div class=\"pills\">\n {verificationOptions.map(option =>\n this.renderPill(option.label, this.auth_methods.includes(option.value), () => this.toggleAuthMethod(option.value), {\n locked: option.locked,\n title: option.locked ? 'Please contact sales@verdocs.com to enable this feature.' : undefined,\n }),\n )}\n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"passcode\">\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n aria-label=\"Passcode\"\n value={this.passcode}\n placeholder=\"4-8 digits\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n <span class=\"passcode-hint\">PIN or passcode shared separately with the recipient ahead of time</span>\n </div>\n )}\n </div>\n\n <div class=\"group\">\n <div class=\"group-label\">Signing options</div>\n <div class=\"pills\">\n {this.renderPill('None', signingOption === 'none', () => this.setSigningOption('none'))}\n {this.renderPill('May delegate', signingOption === 'delegator', () => this.setSigningOption('delegator'))}\n {this.renderPill('Name locked', signingOption === 'name_locked', () => this.setSigningOption('name_locked'))}\n </div>\n </div>\n\n <div class=\"field\">\n <label htmlFor=\"verdocs-contact-picker-message\">\n Message <span class=\"optional\">(optional)</span>\n </label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Add a message to the invitation\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n </div>\n <div class=\"scroll-fade\" />\n {this.showSuggestions && (\n <div class=\"suggestions\" role=\"listbox\" ref={el => (this.suggestionsEl = el)}>\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name?.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n <div class=\"buttons\">\n {this.showCancel && <verdocs-button label=\"Cancel\" variant=\"text\" size=\"small\" onClick={e => this.handleCancel(e)} />}\n <verdocs-button label=\"Done\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,uBAAuB,GAAG,MAAM,CAAC,oqMAAoqM,CAAC;;ACK5sM,MAAM,YAAY,GAAG,CAAA,iUAAA,CAAmU;AAExV,MAAM,QAAQ,GAAG,CAAA,4PAAA,CAA8P;MA8ClQ,oBAAoB,GAAA,MAAA;AALjC,IAAA,WAAA,CAAA,OAAA,EAAA;;;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A,EAAgB,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAA,CAAI,EACrH,CAAA,CAAA,gBAAA,EAAA,EAAgB,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,SAAS,GAAG,MAAK,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI,CAC1H,CACD;;;;;;;;"}
1
+ {"version":3,"file":"verdocs-contact-picker.entry.js","sources":["src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.scss?tag=verdocs-contact-picker","src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-contact-picker {\n --picker-ink: var(--verdocs-body-color, #111827);\n --picker-ink-2: #374151;\n --picker-muted: #6b7280;\n --picker-faint: #9ca3af;\n --picker-control-border: #d1d5db;\n --picker-accent: var(--verdocs-link-color, #{$secondary-color});\n --picker-accent-tint: #f4f5fc;\n --picker-accent-tint-2: #e6e7f8;\n\n display: block;\n font-size: 14px;\n color: var(--picker-ink);\n font-family: $verdocs-primary-font;\n\n * {\n box-sizing: border-box;\n }\n\n form {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n // Fields scroll above a pinned Done button when the host constrains the picker's height; with\n // no constraint the body simply grows and the fade never shows.\n .form-body-wrap {\n position: relative;\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n .form-body {\n position: relative;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n .scroll-fade {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 36px;\n opacity: 0;\n pointer-events: none;\n transition: opacity 150ms ease-out;\n background: linear-gradient(rgba(255, 255, 255, 0), #ffffff);\n }\n\n .scrollable:not(.at-end) > .scroll-fade {\n opacity: 1;\n }\n\n .row.names {\n display: flex;\n column-gap: 8px;\n position: relative;\n\n .field {\n flex: 1;\n min-width: 0;\n }\n }\n\n .field {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n margin: 0 0 10px 0;\n\n label {\n font-size: 12px;\n font-weight: 500;\n color: var(--picker-ink-2);\n\n .optional {\n color: var(--picker-muted);\n font-weight: 400;\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n font-size: 13px;\n font-family: inherit;\n color: var(--picker-ink);\n background: #ffffff;\n border: 1px solid var(--picker-control-border);\n border-radius: 6px;\n outline: none;\n\n &:focus {\n border-color: var(--picker-accent);\n box-shadow: 0 0 0 2px var(--picker-accent-tint-2);\n }\n\n &::placeholder {\n color: var(--picker-faint);\n opacity: 1;\n }\n }\n\n input {\n height: 34px;\n padding: 0 10px;\n }\n\n textarea {\n height: 56px;\n padding: 8px 10px;\n resize: vertical;\n }\n\n .group {\n margin: 2px 0 12px 0;\n\n .group-label {\n font-size: 12px;\n font-weight: 500;\n color: var(--picker-ink-2);\n margin: 0 0 6px 0;\n }\n }\n\n .pills {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n .pill {\n all: unset;\n height: 26px;\n padding: 0 9px;\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n font-family: inherit;\n white-space: nowrap;\n border-radius: 999px;\n color: var(--picker-ink-2);\n border: 1px solid var(--picker-control-border);\n\n &:focus-visible {\n outline: 2px solid var(--picker-accent);\n outline-offset: 2px;\n }\n\n &.selected {\n color: var(--picker-accent);\n border-color: var(--picker-accent);\n background: var(--picker-accent-tint);\n }\n\n &.locked {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .pill-icon,\n .pill-icon svg {\n width: 12px;\n height: 12px;\n display: block;\n }\n }\n\n .passcode {\n display: flex;\n align-items: center;\n column-gap: 8px;\n margin-top: 8px;\n\n input {\n flex: 0 0 120px;\n width: 120px;\n height: 30px;\n }\n\n .passcode-hint {\n flex: 1;\n min-width: 0;\n font-size: 11px;\n line-height: 1.35;\n color: var(--picker-muted);\n align-self: center;\n }\n }\n\n .buttons {\n margin-top: 10px;\n padding-top: 12px;\n border-top: 1px solid #e5e7eb;\n flex: none;\n display: flex;\n column-gap: 10px;\n\n verdocs-button:last-child {\n flex: 1;\n }\n\n verdocs-button:last-child button {\n width: 100%;\n }\n }\n\n .suggestions {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 20;\n max-height: 225px;\n overflow-y: auto;\n background: #ffffff;\n border-radius: 6px;\n border: 1px solid #e5e7eb;\n box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);\n\n .suggestion {\n display: flex;\n padding: 6px 12px;\n align-items: center;\n flex-direction: row;\n cursor: pointer;\n\n svg {\n width: 28px;\n height: 28px;\n }\n\n .avatar {\n width: 28px;\n height: 28px;\n flex: 0 0 28px;\n margin-right: 8px;\n border-radius: 100%;\n }\n\n .details {\n display: flex;\n flex-direction: column;\n min-width: 0;\n }\n\n .name {\n font-size: 13px;\n font-weight: 500;\n color: var(--picker-ink);\n }\n\n .destination {\n font-size: 12px;\n color: var(--picker-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n background: var(--picker-accent-tint);\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n}\n","import {Component, Element, h, Event, EventEmitter, Listen, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {updateScrollFade} from '../../../utils/ScrollFade';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nconst lockIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></svg>`;\n\ntype TSigningOption = 'none' | 'delegator' | 'name_locked';\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n name_locked: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\n @Element() el: HTMLElement;\n\n private namesRowEl: HTMLElement;\n private suggestionsEl: HTMLElement;\n\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 * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Whether to show a Cancel button beside Done.\n */\n @Prop() showCancel = true;\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() name_locked: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true;\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : this.templateRole.name_locked || false;\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements\n // call fails or we stay loading forever.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\n }\n\n // Make sure the suggestion list doesn't break the scroll region\n componentDidRender() {\n const body = this.el.querySelector('.form-body') as HTMLElement | null;\n updateScrollFade(body);\n if (this.suggestionsEl && this.namesRowEl && body) {\n this.suggestionsEl.style.top = `${this.namesRowEl.offsetTop + this.namesRowEl.offsetHeight - body.scrollTop + 4}px`;\n }\n }\n\n @Listen('click', {target: 'document'})\n handleDocumentClick(e: MouseEvent) {\n if (this.showSuggestions && !this.el.contains(e.target as Node)) {\n this.showSuggestions = false;\n }\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n name_locked: this.name_locked,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n toggleAuthMethod(method: TRecipientAuthMethod) {\n if (this.auth_methods.includes(method)) {\n this.auth_methods = this.auth_methods.filter(selected => selected !== method);\n } else {\n this.auth_methods = [...this.auth_methods, method];\n }\n }\n\n // TODO: Decide whether we want to keep these mutually-exclusive\n setSigningOption(option: TSigningOption) {\n this.delegator = option === 'delegator';\n this.name_locked = option === 'name_locked';\n }\n\n renderPill(label: string, selected: boolean, onClick: () => void, opts: {locked?: boolean; title?: string} = {}) {\n return (\n <button\n type=\"button\"\n class={{pill: true, selected, locked: !!opts.locked}}\n aria-pressed={selected ? 'true' : 'false'}\n disabled={opts.locked && !selected}\n title={opts.title}\n onClick={onClick}\n >\n {opts.locked && <span class=\"pill-icon\" innerHTML={lockIcon} />}\n {label}\n </button>\n );\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n\n // First name is the first focused field so it's our quicksearch matching target.\n const visibleSuggestions = (this.contactSuggestions || []).filter(\n suggestion => !this.first_name || suggestion.first_name?.toLowerCase().includes(this.first_name.toLowerCase()),\n );\n\n const hasAuthRequirements = this.auth_methods.every(method => {\n switch (method) {\n case 'passcode':\n return !!this.passcode;\n case 'kba':\n return !!this.first_name && !!this.last_name;\n case 'email':\n return !!this.email;\n case 'sms':\n return !!this.phone;\n default:\n return true;\n }\n });\n\n const canSubmit = hasBasics && hasAuthRequirements;\n const hasSMSAuth = !!this.activeEntitlements.sms_auth;\n\n // TODO: We show non-entitled options disabled so folks know what's possible. We could alternatively hide them.\n const verificationOptions: {label: string; value: TRecipientAuthMethod; locked?: boolean}[] = [\n {label: 'Email OTP', value: 'email'},\n {label: 'Passcode', value: 'passcode'},\n {label: 'SMS OTP', value: 'sms', locked: !hasSMSAuth},\n {label: 'KBA', value: 'kba', locked: !this.activeEntitlements.kba_auth},\n {label: 'ID check', value: 'id', locked: !this.activeEntitlements.id_auth},\n ];\n\n const signingOption: TSigningOption = this.delegator ? 'delegator' : this.name_locked ? 'name_locked' : 'none';\n\n return (\n <form onSubmit={e => e.preventDefault()} autocomplete=\"off\">\n <div class=\"form-body-wrap\">\n <div\n class=\"form-body\"\n onScroll={(e: any) => {\n updateScrollFade(e.target);\n this.showSuggestions = false;\n }}\n >\n <div class=\"row names\" ref={el => (this.namesRowEl = el)}>\n <div class=\"field\">\n <label htmlFor={this.firstNameFieldId}>First name</label>\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n </div>\n <div class=\"field\">\n <label htmlFor={this.lastNameFieldId}>Last name</label>\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n </div>\n\n <div class=\"field\">\n <label htmlFor={this.emailFieldId}>Email</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {hasSMSAuth && (\n <div class=\"field\">\n <label htmlFor={this.phoneFieldId}>\n Phone <span class=\"optional\">(optional)</span>\n </label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"+1 (555) 000-0000\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <div class=\"group\">\n <div class=\"group-label\">Verification</div>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" />\n ) : (\n <div class=\"pills\">\n {verificationOptions.map(option =>\n this.renderPill(option.label, this.auth_methods.includes(option.value), () => this.toggleAuthMethod(option.value), {\n locked: option.locked,\n title: option.locked ? 'Please contact sales@verdocs.com to enable this feature.' : undefined,\n }),\n )}\n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"passcode\">\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n aria-label=\"Passcode\"\n value={this.passcode}\n placeholder=\"4-8 digits\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n <span class=\"passcode-hint\">PIN or passcode shared separately with the recipient ahead of time</span>\n </div>\n )}\n </div>\n\n <div class=\"group\">\n <div class=\"group-label\">Signing options</div>\n <div class=\"pills\">\n {this.renderPill('None', signingOption === 'none', () => this.setSigningOption('none'))}\n {this.renderPill('May delegate', signingOption === 'delegator', () => this.setSigningOption('delegator'))}\n {this.renderPill('Name locked', signingOption === 'name_locked', () => this.setSigningOption('name_locked'))}\n </div>\n </div>\n\n <div class=\"field\">\n <label htmlFor=\"verdocs-contact-picker-message\">\n Message <span class=\"optional\">(optional)</span>\n </label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Add a message to the invitation\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n </div>\n <div class=\"scroll-fade\" />\n {this.showSuggestions && visibleSuggestions.length > 0 && (\n <div class=\"suggestions\" role=\"listbox\" ref={el => (this.suggestionsEl = el)}>\n {visibleSuggestions.map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n <div class=\"buttons\">\n {this.showCancel && <verdocs-button label=\"Cancel\" variant=\"text\" size=\"small\" onClick={e => this.handleCancel(e)} />}\n <verdocs-button label=\"Done\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,uBAAuB,GAAG,MAAM,CAAC,oqMAAoqM,CAAC;;ACK5sM,MAAM,YAAY,GAAG,CAAA,iUAAA,CAAmU;AAExV,MAAM,QAAQ,GAAG,CAAA,4PAAA,CAA8P;MA8ClQ,oBAAoB,GAAA,MAAA;AALjC,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAWE;;AAEG;AACK,Q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C,QAAQ,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAA,CAAI,EACrH,CAAA,CAAA,gBAAA,EAAA,EAAgB,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,SAAS,GAAG,MAAK,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI,CAC1H,CACD;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{d(n.next(e))}catch(e){s(e)}}function a(e){try{d(n["throw"](e))}catch(e){s(e)}}function d(e){e.done?t(e.value):i(e.value).then(r,a)}d((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return d([e,o])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{D as DownloadAction}from"./Types-CIxfEdV7.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-Bh3zb1Xs.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import"./index-BglCURB-.js";var verdocsDownloadDialogCss=function(){return'verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var DocumentIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CertificateIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ZipIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CheckIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var RefreshIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var VerdocsDownloadDialog=function(){function e(e){registerInstance(this,e);this.download=createEvent(this,"download");this.exit=createEvent(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}e.prototype.handleOptionClick=function(e,o){var t=this.documents.some((function(e){return e.type==="certificate"}))||this.hasCertificate;var n=this.signed&&t;var i=e===DownloadAction.certificate&&!n;var s=e===DownloadAction.zip&&(this.polling||!n);var r=e===DownloadAction.combined&&(this.polling||!n||!o);if(i||s||r)return;this.download.emit({action:e,documentId:o})};e.prototype.render=function(){var e=this;var o=this.documents.filter((function(e){return e.type==="attachment"})).sort((function(e,o){return e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)}));var t=this.documents.find((function(e){return e.type==="certificate"}));var n=!!t||this.hasCertificate;var i=this.signed&&n;var s=!this.polling&&i;var r=s&&!!(t===null||t===void 0?void 0:t.id);var a=!this.signed;return h("verdocs-dialog",{key:"e81c1d9afcfd7d0d562ed46b446ad58b7179e6e6",onExit:function(){return e.exit.emit()}},h("div",{key:"261deacdab44f0e1171368b88e7a8d302f944cb7",slot:"heading",class:"heading-container"},h("h3",{key:"820864e938baac9dd0c3d52c8cbac8fdb53d5df0",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),h("div",{key:"80dd159ca7f87f2211b05e999d82835b888812f3",slot:"content",class:"content"},o.length<=2&&o.map((function(o){return h("div",{class:"download-option",onClick:function(){return e.handleOptionClick(DownloadAction.document,o.id)}},h("div",{class:"icon-container",innerHTML:DocumentIcon}),h("div",{class:"text-container"},h("div",{class:"label"},o.name),h("div",{class:"description"},"Download the document")),a?h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})):h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Signed")))})),o.length>2&&h("div",{key:"45858f7f05b76b709a4553adc4145e256aaa7f77",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),h("div",{key:"31de335c65785eb002e25aefc06215ab77ff5a15",class:{"download-option":true,disabled:!i},onClick:function(){return e.handleOptionClick(DownloadAction.certificate)},title:!i?"Certificate not yet available":""},h("div",{key:"a8bf0227b447652e1d5689be0da2113180dcb0d5",class:"icon-container",innerHTML:CertificateIcon}),h("div",{key:"97479d13b9097ee075407f75e859cfcd6c9a8984",class:"text-container"},h("div",{key:"084d60ec1880909d47b4c7f465a247d8a0bf2cba",class:"label"},"Certificate"),h("div",{key:"89e9d255ef65cb30bbff1474e1412fae16f0b352",class:"description"},"Download the certificate")),i?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"4d0f64c6149d8fdac06a871bbb23671c517a6cde",class:{"download-option":true,disabled:!r},onClick:function(){return e.handleOptionClick(DownloadAction.combined,t===null||t===void 0?void 0:t.id)},title:!r?"Waiting for all documents to be ready":""},h("div",{key:"ce3091bebdcf99c55b0af1ad509f42f8a2ff5503",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"42097a1e59fb74ee85515620b13ba5dd13a15dbd",class:"text-container"},h("div",{key:"b1198c4edb5fdf1139684d77a9e151d5dcb522e3",class:"label"},"Combined"),h("div",{key:"1017a16375215e825a8ee88d36c3033315fd155a",class:"description"},"Merge envelopes & certificate into a single PDF")),r?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"e8b69ca68a7f061032cd59f4bd556e60f01e7d11",class:{"download-option":true,disabled:!s},onClick:function(){return e.handleOptionClick(DownloadAction.zip)},title:!s?"Waiting for all documents to be ready":""},h("div",{key:"14b857365e6546ec8c8cee34849476010d3a73af",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"e5167c1dacd9457baeed1034a4a2edf28645e78e",class:"text-container"},h("div",{key:"0e7329d541e4241e7dfafd8489f225dca5bbf067",class:"label"},"All Files"),h("div",{key:"ddbd16ecc68cb370d2a69ef11099269f03bbdba0",class:"description"},"Download everything as a ZIP file")),s?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})))),h("div",{key:"164f6fbc5591d04c9f757deb46e06914509fe38b",slot:"footer",style:{display:"none"}}))};return e}();VerdocsDownloadDialog.style=verdocsDownloadDialogCss();var verdocsEnvelopeDocumentPageCss=function(){return"verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}"};var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=o.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(o){for(var t=0,n=o;t<n.length;t++){var i=n[t];var s=i.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var o="".concat(this.renderedHeight,"px");return h(Host,{key:"9f4eed5e187a1b37822c7e7d4ba69f4be519ad6d",id:"".concat(this.containerId),style:{height:o,flex:"0 0 ".concat(o)}},this.layers.map((function(t){return t.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(t.name),style:{height:o}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(t.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(o){e.naturalWidth=o.target.naturalWidth;e.naturalHeight=o.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=o.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=verdocsEnvelopeDocumentPageCss();var verdocsQuestionDialogCss=function(){return'verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}'};var QuestionIcon$1='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>';var VerdocsQuestionDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.question="";this.closed=false}e.prototype.handleOk=function(){this.next.emit({question:this.question})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"0414d528934d806570c21d2d2c977ff2fcf14fec",onExit:function(o){return e.handleDismiss(o)}},h("div",{key:"39fc22581c93ae2b651f8e3fb7459c115f6170b2",slot:"heading",class:"heading"},h("div",{key:"2c0ef9e1125eb00355f22ce4a72faf36e02994e7",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"56421198555e6827968ab37ef94b2a4526ac6626",class:"title"},"Ask the Sender a Question")),h("div",{key:"251815c6f9571e0abee3256ebc3c7bef9d0b1f8c",slot:"content",class:"content"},h("textarea",{key:"bac7bcc37c8c80d817ecf8a59f27e7129373509c",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(o){return e.question=o.target.value}},this.question)),h("div",{key:"1d2b0cbe22317f3fe77e4a783d0fec830313bddb",class:"footer",slot:"footer"},h("div",{key:"c8c7c1800fddfe38101a9189238bbac69be2a09a",class:"buttons"},h("button",{key:"a6223053635fa089f3052c897699276b64a73fb9",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"5897511c092259879316bfcda03d27b5ce0f1fd5",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss();var verdocsSignFooterCss=function(){return'verdocs-sign-footer{left:0;right:0;bottom:0;height:48px;display:-ms-flexbox;display:flex;color:#616161;position:fixed;font-size:12px;padding:0 24px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background:#ffffff;container-type:inline-size;border-top:1px solid #e0e0e0;-ms-flex-pack:justify;justify-content:space-between;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-sign-footer a{color:#616161;cursor:pointer;text-decoration:none;border-bottom:1px dotted #616161}verdocs-sign-footer.loading{display:none}verdocs-sign-footer .powered-by{white-space:nowrap}verdocs-sign-footer .buttons{-ms-flex:0;flex:0;gap:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap;-ms-flex-align:center;align-items:center}verdocs-sign-footer .buttons button{gap:4px;border:none;display:-ms-flexbox;display:flex;outline:none;cursor:pointer;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent}verdocs-sign-footer .buttons div{gap:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign-footer .links{-ms-flex:0;flex:0;gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap}verdocs-sign-footer.just-buttons .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}@container (max-width: 720px){verdocs-sign-footer.has-buttons .powered-by{display:none}}@container (max-width: 540px){verdocs-sign-footer.no-buttons .powered-by{display:none}verdocs-sign-footer.has-buttons .links{display:none}verdocs-sign-footer .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}}'};var QuestionIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>';var DeclineIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>';var SaveIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>';var VerdocsSignFooter=function(){function e(e){registerInstance(this,e);this.askQuestion=createEvent(this,"askQuestion");this.decline=createEvent(this,"decline");this.finishLater=createEvent(this,"finishLater");this.sdkError=createEvent(this,"sdkError");this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.isDone=false;this.askingQuestion=false;this.declinine=false;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(n){console.log("[FOOTER] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(o){e.envelope=o}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.render=function(){var e=this;var o,t,n,i,s,r,a,d,c,l,f,u,v,b,p,g,x,w,k,m,y,C,L,H;var D=!!((t=(o=this.envelope)===null||o===void 0?void 0:o.organization)===null||t===void 0?void 0:t.powered_by_label);var V=!!((i=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||i===void 0?void 0:i.terms_use_url)||!!((r=(s=this.envelope)===null||s===void 0?void 0:s.organization)===null||r===void 0?void 0:r.privacy_policy_url);var M=!this.isDone;return h(Host,{key:"25254ae03c8006c1c78a317a17ddac1e78d41eef",class:{"has-buttons":M,"no-buttons":!M,"has-powered-by":D,"has-links":V,"just-buttons":!D&&!V}},((d=(a=this.envelope)===null||a===void 0?void 0:a.organization)===null||d===void 0?void 0:d.powered_by_label)&&h("div",{key:"7a1687edb9c9c9f4cb055429d1fbe9d02acea2de",class:"powered-by"},((l=(c=this.envelope)===null||c===void 0?void 0:c.organization)===null||l===void 0?void 0:l.powered_by_url)?h("a",{href:(u=(f=this.envelope)===null||f===void 0?void 0:f.organization)===null||u===void 0?void 0:u.powered_by_url,target:"_blank",rel:"noopener noreferrer"},h("span",null,(b=(v=this.envelope)===null||v===void 0?void 0:v.organization)===null||b===void 0?void 0:b.powered_by_label)):h("span",null,(g=(p=this.envelope)===null||p===void 0?void 0:p.organization)===null||g===void 0?void 0:g.powered_by_label)),!this.isDone&&h("div",{key:"37d14a5b539fad2999ac7a9fd8377c3a3b37d929",class:"buttons"},h("button",{key:"0a49dedb4d514f2c172dd5c969d3e59f445bd293",onClick:function(){return e.askingQuestion=true}},h("span",{key:"ab1949843bcc1af9ebdb22451f82ef682a70def2",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"e77ba7f5b720a1fcd2549d6d04cd313a81f5fe08",onClick:function(){var o;return(o=e.decline)===null||o===void 0?void 0:o.emit()}},h("span",{key:"0041dcc1b0092e33c4c1cf5ca8bcf2a510c3c64e",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"c6c9ebd4480f810c14a301b879ec313a8eec340b",onClick:function(){var o;return(o=e.finishLater)===null||o===void 0?void 0:o.emit()}},h("span",{key:"02fab42090a858fb2e7cc6d1f5535dd9efacbda4",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"a9b765ad18b6b9521495e08a7e94727c3ef89163",class:"links"},((w=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||w===void 0?void 0:w.terms_use_url)&&h("a",{key:"29c7fda43eee3ac14b3f05d80c370ffe014a29a0",href:(m=(k=this.envelope)===null||k===void 0?void 0:k.organization)===null||m===void 0?void 0:m.terms_use_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"182d6eb92ef630c241a41b096893427a6108ab10"},"Terms of Use")),((C=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&h("a",{key:"078bb0c0505e61b64d6c8b570c1d0c6568db1155",href:(H=(L=this.envelope)===null||L===void 0?void 0:L.organization)===null||H===void 0?void 0:H.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"c234b147c7c35b6eaf74747bfcbad1efef298266"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"6b50774f79849f481036dbdef04db7f9ee953f4b",onNext:function(o){var t;(t=e.askQuestion)===null||t===void 0?void 0:t.emit({question:o.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss();export{VerdocsDownloadDialog as verdocs_download_dialog,VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{d(n.next(e))}catch(e){s(e)}}function a(e){try{d(n["throw"](e))}catch(e){s(e)}}function d(e){e.done?t(e.value):i(e.value).then(r,a)}d((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return d([e,o])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{D as DownloadAction}from"./Types-CIxfEdV7.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-Bh3zb1Xs.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import"./index-BglCURB-.js";var verdocsDownloadDialogCss=function(){return'verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var DocumentIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CertificateIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ZipIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CheckIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var RefreshIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var VerdocsDownloadDialog=function(){function e(e){registerInstance(this,e);this.download=createEvent(this,"download");this.exit=createEvent(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}e.prototype.handleOptionClick=function(e,o){var t=this.documents.some((function(e){return e.type==="certificate"}))||this.hasCertificate;var n=this.signed&&t;var i=e===DownloadAction.certificate&&!n;var s=e===DownloadAction.zip&&(this.polling||!n);var r=e===DownloadAction.combined&&(this.polling||!n||!o);if(i||s||r)return;this.download.emit({action:e,documentId:o})};e.prototype.render=function(){var e=this;var o=this.documents.filter((function(e){return e.type==="attachment"})).sort((function(e,o){return e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)}));var t=this.documents.find((function(e){return e.type==="certificate"}));var n=!!t||this.hasCertificate;var i=this.signed&&n;var s=!this.polling&&i;var r=s&&!!(t===null||t===void 0?void 0:t.id);var a=!this.signed;return h("verdocs-dialog",{key:"e81c1d9afcfd7d0d562ed46b446ad58b7179e6e6",onExit:function(){return e.exit.emit()}},h("div",{key:"261deacdab44f0e1171368b88e7a8d302f944cb7",slot:"heading",class:"heading-container"},h("h3",{key:"820864e938baac9dd0c3d52c8cbac8fdb53d5df0",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),h("div",{key:"80dd159ca7f87f2211b05e999d82835b888812f3",slot:"content",class:"content"},o.length<=2&&o.map((function(o){return h("div",{class:"download-option",onClick:function(){return e.handleOptionClick(DownloadAction.document,o.id)}},h("div",{class:"icon-container",innerHTML:DocumentIcon}),h("div",{class:"text-container"},h("div",{class:"label"},o.name),h("div",{class:"description"},"Download the document")),a?h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})):h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Signed")))})),o.length>2&&h("div",{key:"45858f7f05b76b709a4553adc4145e256aaa7f77",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),h("div",{key:"31de335c65785eb002e25aefc06215ab77ff5a15",class:{"download-option":true,disabled:!i},onClick:function(){return e.handleOptionClick(DownloadAction.certificate)},title:!i?"Certificate not yet available":""},h("div",{key:"a8bf0227b447652e1d5689be0da2113180dcb0d5",class:"icon-container",innerHTML:CertificateIcon}),h("div",{key:"97479d13b9097ee075407f75e859cfcd6c9a8984",class:"text-container"},h("div",{key:"084d60ec1880909d47b4c7f465a247d8a0bf2cba",class:"label"},"Certificate"),h("div",{key:"89e9d255ef65cb30bbff1474e1412fae16f0b352",class:"description"},"Download the certificate")),i?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"4d0f64c6149d8fdac06a871bbb23671c517a6cde",class:{"download-option":true,disabled:!r},onClick:function(){return e.handleOptionClick(DownloadAction.combined,t===null||t===void 0?void 0:t.id)},title:!r?"Waiting for all documents to be ready":""},h("div",{key:"ce3091bebdcf99c55b0af1ad509f42f8a2ff5503",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"42097a1e59fb74ee85515620b13ba5dd13a15dbd",class:"text-container"},h("div",{key:"b1198c4edb5fdf1139684d77a9e151d5dcb522e3",class:"label"},"Combined"),h("div",{key:"1017a16375215e825a8ee88d36c3033315fd155a",class:"description"},"Merge envelopes & certificate into a single PDF")),r?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"e8b69ca68a7f061032cd59f4bd556e60f01e7d11",class:{"download-option":true,disabled:!s},onClick:function(){return e.handleOptionClick(DownloadAction.zip)},title:!s?"Waiting for all documents to be ready":""},h("div",{key:"14b857365e6546ec8c8cee34849476010d3a73af",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"e5167c1dacd9457baeed1034a4a2edf28645e78e",class:"text-container"},h("div",{key:"0e7329d541e4241e7dfafd8489f225dca5bbf067",class:"label"},"All Files"),h("div",{key:"ddbd16ecc68cb370d2a69ef11099269f03bbdba0",class:"description"},"Download everything as a ZIP file")),s?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})))),h("div",{key:"164f6fbc5591d04c9f757deb46e06914509fe38b",slot:"footer",style:{display:"none"}}))};return e}();VerdocsDownloadDialog.style=verdocsDownloadDialogCss();var verdocsEnvelopeDocumentPageCss=function(){return"verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}"};var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=o.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(o){for(var t=0,n=o;t<n.length;t++){var i=n[t];var s=i.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var o="".concat(this.renderedHeight,"px");return h(Host,{key:"9f4eed5e187a1b37822c7e7d4ba69f4be519ad6d",id:"".concat(this.containerId),style:{height:o,flex:"0 0 ".concat(o)}},this.layers.map((function(t){return t.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(t.name),style:{height:o}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(t.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(o){e.naturalWidth=o.target.naturalWidth;e.naturalHeight=o.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=o.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=verdocsEnvelopeDocumentPageCss();var verdocsQuestionDialogCss=function(){return'verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}'};var QuestionIcon$1='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>';var VerdocsQuestionDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.question="";this.closed=false}e.prototype.handleOk=function(){this.next.emit({question:this.question})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"0414d528934d806570c21d2d2c977ff2fcf14fec",onExit:function(o){return e.handleDismiss(o)}},h("div",{key:"39fc22581c93ae2b651f8e3fb7459c115f6170b2",slot:"heading",class:"heading"},h("div",{key:"2c0ef9e1125eb00355f22ce4a72faf36e02994e7",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"56421198555e6827968ab37ef94b2a4526ac6626",class:"title"},"Ask the Sender a Question")),h("div",{key:"251815c6f9571e0abee3256ebc3c7bef9d0b1f8c",slot:"content",class:"content"},h("textarea",{key:"bac7bcc37c8c80d817ecf8a59f27e7129373509c",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(o){return e.question=o.target.value}},this.question)),h("div",{key:"1d2b0cbe22317f3fe77e4a783d0fec830313bddb",class:"footer",slot:"footer"},h("div",{key:"c8c7c1800fddfe38101a9189238bbac69be2a09a",class:"buttons"},h("button",{key:"a6223053635fa089f3052c897699276b64a73fb9",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"5897511c092259879316bfcda03d27b5ce0f1fd5",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss();var verdocsSignFooterCss=function(){return'verdocs-sign-footer{left:0;right:0;bottom:0;height:48px;display:-ms-flexbox;display:flex;color:#616161;position:fixed;font-size:12px;padding:0 24px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background:#ffffff;container-type:inline-size;border-top:1px solid #e0e0e0;-ms-flex-pack:justify;justify-content:space-between;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-sign-footer a{color:#616161;cursor:pointer;text-decoration:none;border-bottom:1px dotted #616161}verdocs-sign-footer.loading{display:none}verdocs-sign-footer .powered-by{white-space:nowrap}verdocs-sign-footer .buttons{-ms-flex:0;flex:0;gap:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap;-ms-flex-align:center;align-items:center}verdocs-sign-footer .buttons button{gap:4px;border:none;display:-ms-flexbox;display:flex;outline:none;cursor:pointer;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent}verdocs-sign-footer .buttons div{gap:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign-footer .links{-ms-flex:0;flex:0;gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap}verdocs-sign-footer.just-buttons .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}@container (max-width: 720px){verdocs-sign-footer.has-buttons .powered-by{display:none}}@container (max-width: 540px){verdocs-sign-footer.no-buttons .powered-by{display:none}verdocs-sign-footer.has-buttons .links{display:none}verdocs-sign-footer .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}}'};var QuestionIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>';var DeclineIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>';var SaveIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>';var VerdocsSignFooter=function(){function e(e){registerInstance(this,e);this.askQuestion=createEvent(this,"askQuestion");this.decline=createEvent(this,"decline");this.finishLater=createEvent(this,"finishLater");this.sdkError=createEvent(this,"sdkError");this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.isDone=false;this.brand=null;this.askingQuestion=false;this.declinine=false;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(n){console.log("[FOOTER] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(o){e.envelope=o}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.render=function(){var e=this;var o,t,n,i,s,r;var a=(o=this.envelope)===null||o===void 0?void 0:o.organization;var d=((t=this.brand)===null||t===void 0?void 0:t.powered_by_label)||(a===null||a===void 0?void 0:a.powered_by_label);var c=((n=this.brand)===null||n===void 0?void 0:n.powered_by_label)?(i=this.brand)===null||i===void 0?void 0:i.powered_by_url:a===null||a===void 0?void 0:a.powered_by_url;var l=((s=this.brand)===null||s===void 0?void 0:s.terms_use_url)||(a===null||a===void 0?void 0:a.terms_use_url);var f=((r=this.brand)===null||r===void 0?void 0:r.privacy_policy_url)||(a===null||a===void 0?void 0:a.privacy_policy_url);var u=!!d;var v=!!l||!!f;var b=!this.isDone;return h(Host,{key:"91d822a2405449adbfb2cce4c87a4086958e4e79",class:{"has-buttons":b,"no-buttons":!b,"has-powered-by":u,"has-links":v,"just-buttons":!u&&!v}},d&&h("div",{key:"5f856e6ba57091e30e455657fb304c6718d9b80c",class:"powered-by"},c?h("a",{href:c,target:"_blank",rel:"noopener noreferrer"},h("span",null,d)):h("span",null,d)),!this.isDone&&h("div",{key:"a9090f99ebc82d1b6602e52edd6d92f8eb94efcc",class:"buttons"},h("button",{key:"08c7596ba10f3240dd29dc9d30f92ea3d6e4b0c3",onClick:function(){return e.askingQuestion=true}},h("span",{key:"19ba5c915fab3c7e38598f0cf90b1a8c82cc86d8",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"12189b38952064e2a65e6c28f7a5f95d75f12ba7",onClick:function(){var o;return(o=e.decline)===null||o===void 0?void 0:o.emit()}},h("span",{key:"a5df4760b465ad3c8be1cec7ddbc8d4c88dfa3e2",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"dfd2079149f39c688bd535474ed2a5d86b9be75d",onClick:function(){var o;return(o=e.finishLater)===null||o===void 0?void 0:o.emit()}},h("span",{key:"35da50d7a9dd7fdf9d0748248cc1a5d98b9d3d11",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"7d50e834619ee75a6651d8dc8a0f8e2bcc3c17ad",class:"links"},l&&h("a",{key:"02fb19b915a6c22156a91001e90941219efc529c",href:l,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"752ca1e97fd782fdefe6fdd0d1b2831ea54ca80c"},"Terms of Use")),f&&h("a",{key:"d27725658461073751f76b7c33e76df527b6ea7c",href:f,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"1e7ef9f0a9e88a877bb432b8bf5e4311b759d651"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"c2ceb8bd5237792f3ef42f919bd837c11dff9a12",onNext:function(o){var t;(t=e.askQuestion)===null||t===void 0?void 0:t.emit({question:o.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss();export{VerdocsDownloadDialog as verdocs_download_dialog,VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
2
2
  //# sourceMappingURL=verdocs-download-dialog_4.entry.js.map