@verdocs/web-sdk 6.3.1 → 6.3.2

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 (31) hide show
  1. package/dist/cjs/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js.map +1 -1
  2. package/dist/cjs/verdocs-envelope-document-page_3.cjs.entry.js +1 -1
  3. package/dist/collection/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.css +5 -0
  4. package/dist/components/{p-B847qTqO.js → p-8N-Q0mJE.js} +3 -3
  5. package/dist/components/{p-B847qTqO.js.map → p-8N-Q0mJE.js.map} +1 -1
  6. package/dist/components/{p-C97fAomN.js → p-BukckV1k.js} +4 -4
  7. package/dist/components/{p-C97fAomN.js.map → p-BukckV1k.js.map} +1 -1
  8. package/dist/components/{p-CWGZlA4l.js → p-qGaFgS8W.js} +3 -3
  9. package/dist/components/p-qGaFgS8W.js.map +1 -0
  10. package/dist/components/verdocs-question-dialog.js +1 -1
  11. package/dist/components/verdocs-sign-footer.js +1 -1
  12. package/dist/components/verdocs-sign.js +3 -3
  13. package/dist/components/verdocs-view.js +1 -1
  14. package/dist/esm/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  15. package/dist/esm/verdocs-envelope-document-page_3.entry.js +1 -1
  16. package/dist/esm-es5/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  17. package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js +1 -1
  18. package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js.map +1 -1
  19. package/dist/verdocs-web-sdk/p-06063fe6.entry.js +2 -0
  20. package/dist/verdocs-web-sdk/{p-acd04b08.entry.js.map → p-06063fe6.entry.js.map} +1 -1
  21. package/dist/verdocs-web-sdk/p-57a4694c.system.entry.js +2 -0
  22. package/dist/verdocs-web-sdk/{p-46c1af93.system.entry.js.map → p-57a4694c.system.entry.js.map} +1 -1
  23. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  24. package/dist/verdocs-web-sdk/p-FCFl6lCt.system.js.map +1 -0
  25. package/dist/verdocs-web-sdk/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.esm.js.map +1 -1
  26. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/components/p-CWGZlA4l.js.map +0 -1
  29. package/dist/verdocs-web-sdk/p-46c1af93.system.entry.js +0 -2
  30. package/dist/verdocs-web-sdk/p-CzO641zU.system.js.map +0 -1
  31. package/dist/verdocs-web-sdk/p-acd04b08.entry.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js","sources":["src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-envelope-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst 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=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst 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>`;\nconst 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>`;\nconst 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>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\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 envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_label ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }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IAAI,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,kBAAkB,MAC9C,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,YAAY,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,kBAAkB,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAA,EACjG,CAA2B,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,gBAAA,CAAA,CACzB,CACL,CACG,EAEL,IAAI,CAAC,cAAc,KAClB,gFACE,MAAM,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;"}
1
+ {"version":3,"file":"verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js","sources":["src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-envelope-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: fixed;\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst 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=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst 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>`;\nconst 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>`;\nconst 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>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\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 envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_label ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"names":["QuestionIcon"],"mappings":";;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+qBAA+qB;;MCiBzsB,2BAA2B,GAAA,MAAA;AALxC,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASE;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAE9B;;;AAGG;AACK,QAAA,IAAY,CAAA,YAAA,GAAW,GAAG;AAElC;;;AAGG;AACoB,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAElD;;;;;;;;;;;AAWG;AACK,QAAA,IAAA,CAAA,MAAM,GAAiB,CAAC,EAAC,IAAI,EAAE,MAA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M,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;"}
@@ -128,7 +128,7 @@ const VerdocsEnvelopeDocumentPage = class {
128
128
  };
129
129
  VerdocsEnvelopeDocumentPage.style = verdocsEnvelopeDocumentPageCss;
130
130
 
131
- const verdocsQuestionDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-question-dialog{-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}";
131
+ const verdocsQuestionDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-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}";
132
132
 
133
133
  const 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>`;
134
134
  const VerdocsQuestionDialog = class {
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js","sources":["src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-envelope-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst 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=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst 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>`;\nconst 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>`;\nconst 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>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\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 envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_label ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"names":["QuestionIcon"],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EAAA,CAAE,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,kBAAkB,MAC9C,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,YAAY,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,kBAAkB,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAA,EACjG,CAA2B,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,gBAAA,CAAA,CACzB,CACL,CACG,EAEL,IAAI,CAAC,cAAc,KAClB,gFACE,MAAM,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;"}
1
+ {"version":3,"file":"verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js","sources":["src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-envelope-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: fixed;\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst 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=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst 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>`;\nconst 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>`;\nconst 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>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\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 envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_label ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"names":["QuestionIcon"],"mappings":";;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+qBAA+qB;;MCiBzsB,2BAA2B,GAAA,MAAA;AALxC,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASE;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAE9B;;;AAGG;AACK,QAAA,IAAY,CAAA,YAAA,GAAW,GAAG;AAElC;;;AAGG;AACoB,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAElD;;;;;;;;;;;AAWG;AACK,QAAA,IAAA,CAAA,MAAM,GAAiB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC;AAEvD,QAAA,IAAI,CAAA,IAAA,GA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E,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;"}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,n,o,t){function i(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{c(t.next(e))}catch(e){r(e)}}function a(e){try{c(t["throw"](e))}catch(e){r(e)}}function c(e){e.done?o(e.value):i(e.value).then(s,a)}c((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(n){return c([e,n])}}function c(a){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(t=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=n.call(e,o)}catch(e){a=[6,e];i=0}finally{t=r=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-BIRwgFLv.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-PdWvXqe5.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";import"./index-dzBXqXlK.js";import"./Types-dqxNbm_b.js";var verdocsEnvelopeDocumentPageCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-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(n){switch(n.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=n.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(n){for(var o=0,t=n;o<t.length;o++){var i=t[o];var r=i.contentRect.width;e.renderedWidth=r;e.renderedHeight=e.virtualHeight*(r/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 n="".concat(this.renderedHeight,"px");return h(Host,{key:"85514f30999e6276db3c53d10cf1ceac48b3c9ef",id:"".concat(this.containerId),style:{height:n,flex:"0 0 ".concat(n)}},this.layers.map((function(o){return o.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:n}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(n){e.naturalWidth=n.target.naturalWidth;e.naturalHeight=n.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=n.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='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-question-dialog{-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:"13b30d1c4fb9cb618be260714b427107f9def28c",onExit:function(n){return e.handleDismiss(n)}},h("div",{key:"eaebb83af7fa9d410396ba0a2be98bedfbb12ff6",slot:"heading",class:"heading"},h("div",{key:"c112c9543a39c7ba3df30c7415f4d57dad9ec5ab",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"95b99c499d0941f222ddcf111d84aca429c5a751",class:"title"},"Ask the Sender a Question")),h("div",{key:"decfbd3bb77d3ab6d5e199535a5305849b520d87",slot:"content",class:"content"},h("textarea",{key:"48aae01e022e5eff016e03d01144b0a8c0f0157d",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(n){return e.question=n.target.value}},this.question)),h("div",{key:"902c0e38f8fd5ec3e614bff91cc68aaad566ec8b",class:"footer",slot:"footer"},h("div",{key:"ec6b73358f94ef6c0a86f03c52d4e9708a4e36e0",class:"buttons"},h("button",{key:"55de4dd386b3c7018e6d1cf6129b4efa7a343368",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"1b80aed507bb327c8abd24243ea5adb6bf459e73",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss;var verdocsSignFooterCss='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: -ms-flexbox;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: "Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;\n -webkit-transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n}\nverdocs-sign-footer a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n}\nverdocs-sign-footer.loading {\n display: none;\n}\nverdocs-sign-footer .powered-by {\n white-space: nowrap;\n}\nverdocs-sign-footer .buttons {\n -ms-flex: 0;\n flex: 0;\n gap: 16px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .buttons button {\n gap: 4px;\n border: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n cursor: pointer;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n background: transparent;\n}\nverdocs-sign-footer .buttons div {\n gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .links {\n -ms-flex: 0;\n flex: 0;\n gap: 8px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n}\nverdocs-sign-footer.just-buttons .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n}\n@container (max-width: 720px) {\n verdocs-sign-footer.has-buttons .powered-by {\n display: none;\n }\n}\n@container (max-width: 540px) {\n verdocs-sign-footer.no-buttons .powered-by {\n display: none;\n }\n verdocs-sign-footer.has-buttons .links {\n display: none;\n }\n verdocs-sign-footer .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n }\n}';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,n,o;return __generator(this,(function(t){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(t){console.log("[FOOTER] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.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(n){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(n){e.envelope=n}));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 n,o,t,i,r,s,a,c,d,l,f,u,v,b,g,p,x,m,y,k,w,C,L,V;var H=!!((o=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||o===void 0?void 0:o.powered_by_label);var E=!!((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.terms_use_url)||!!((s=(r=this.envelope)===null||r===void 0?void 0:r.organization)===null||s===void 0?void 0:s.privacy_policy_url);var _=!this.isDone;return h(Host,{key:"d6c9c85e457e98238f722f10cd38912d7f83a8b7",class:{"has-buttons":_,"no-buttons":!_,"has-powered-by":H,"has-links":E,"just-buttons":!H&&!E}},((c=(a=this.envelope)===null||a===void 0?void 0:a.organization)===null||c===void 0?void 0:c.powered_by_label)&&h("div",{key:"081e69cd08dad7339d3d8be8a4b27bdf4673b808",class:"powered-by"},((l=(d=this.envelope)===null||d===void 0?void 0:d.organization)===null||l===void 0?void 0:l.powered_by_label)?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,(p=(g=this.envelope)===null||g===void 0?void 0:g.organization)===null||p===void 0?void 0:p.powered_by_label)),!this.isDone&&h("div",{key:"164d99486b6e7f81dbb9489cfa0893f437c34c60",class:"buttons"},h("button",{key:"ea5d24fbc206f9ad8ec433da82276fe41c099d26",onClick:function(){return e.askingQuestion=true}},h("span",{key:"937c4e9dee69add3c1c2f189f966a53013256d8d",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"b477592dd1c5f38bca6b7cc51cdd55a30bfba840",onClick:function(){var n;return(n=e.decline)===null||n===void 0?void 0:n.emit()}},h("span",{key:"b0b221a61c2b7c64422387969494e080a47a475c",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"adb296470e7c479f7876941e006abdafcf479963",onClick:function(){var n;return(n=e.finishLater)===null||n===void 0?void 0:n.emit()}},h("span",{key:"641ff39a912b2939303c74553b17190316e9d631",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"f6d9ad2b78eb8e3745150f7f6c0edc61fc4f8a86",class:"links"},((m=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||m===void 0?void 0:m.terms_use_url)&&h("a",{key:"94eeaa50ce8be03e570aef87644115f6499a251e",href:(k=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||k===void 0?void 0:k.terms_use_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"4a5cb461ff02f96996b1062b9ac51ecc55c0bb8c"},"Terms of Use")),((C=(w=this.envelope)===null||w===void 0?void 0:w.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&h("a",{key:"d470ad770a09776ecdd77a6586995e98a892f58f",href:(V=(L=this.envelope)===null||L===void 0?void 0:L.organization)===null||V===void 0?void 0:V.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"a7e8ab31707294a6bca99a97446255d03fc244ea"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"11e35a94dca072a8eff7d07ab577203dd6bb82bc",onNext:function(n){var o;(o=e.askQuestion)===null||o===void 0?void 0:o.emit({question:n.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss;export{VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
1
+ var __awaiter=this&&this.__awaiter||function(e,n,o,t){function i(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{c(t.next(e))}catch(e){r(e)}}function a(e){try{c(t["throw"](e))}catch(e){r(e)}}function c(e){e.done?o(e.value):i(e.value).then(s,a)}c((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(n){return c([e,n])}}function c(a){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(t=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=n.call(e,o)}catch(e){a=[6,e];i=0}finally{t=r=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-BIRwgFLv.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-PdWvXqe5.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";import"./index-dzBXqXlK.js";import"./Types-dqxNbm_b.js";var verdocsEnvelopeDocumentPageCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-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(n){switch(n.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=n.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(n){for(var o=0,t=n;o<t.length;o++){var i=t[o];var r=i.contentRect.width;e.renderedWidth=r;e.renderedHeight=e.virtualHeight*(r/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 n="".concat(this.renderedHeight,"px");return h(Host,{key:"85514f30999e6276db3c53d10cf1ceac48b3c9ef",id:"".concat(this.containerId),style:{height:n,flex:"0 0 ".concat(n)}},this.layers.map((function(o){return o.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:n}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(n){e.naturalWidth=n.target.naturalWidth;e.naturalHeight=n.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=n.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='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-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:"13b30d1c4fb9cb618be260714b427107f9def28c",onExit:function(n){return e.handleDismiss(n)}},h("div",{key:"eaebb83af7fa9d410396ba0a2be98bedfbb12ff6",slot:"heading",class:"heading"},h("div",{key:"c112c9543a39c7ba3df30c7415f4d57dad9ec5ab",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"95b99c499d0941f222ddcf111d84aca429c5a751",class:"title"},"Ask the Sender a Question")),h("div",{key:"decfbd3bb77d3ab6d5e199535a5305849b520d87",slot:"content",class:"content"},h("textarea",{key:"48aae01e022e5eff016e03d01144b0a8c0f0157d",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(n){return e.question=n.target.value}},this.question)),h("div",{key:"902c0e38f8fd5ec3e614bff91cc68aaad566ec8b",class:"footer",slot:"footer"},h("div",{key:"ec6b73358f94ef6c0a86f03c52d4e9708a4e36e0",class:"buttons"},h("button",{key:"55de4dd386b3c7018e6d1cf6129b4efa7a343368",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"1b80aed507bb327c8abd24243ea5adb6bf459e73",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss;var verdocsSignFooterCss='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: -ms-flexbox;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: "Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;\n -webkit-transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n}\nverdocs-sign-footer a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n}\nverdocs-sign-footer.loading {\n display: none;\n}\nverdocs-sign-footer .powered-by {\n white-space: nowrap;\n}\nverdocs-sign-footer .buttons {\n -ms-flex: 0;\n flex: 0;\n gap: 16px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .buttons button {\n gap: 4px;\n border: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n cursor: pointer;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n background: transparent;\n}\nverdocs-sign-footer .buttons div {\n gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .links {\n -ms-flex: 0;\n flex: 0;\n gap: 8px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n}\nverdocs-sign-footer.just-buttons .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n}\n@container (max-width: 720px) {\n verdocs-sign-footer.has-buttons .powered-by {\n display: none;\n }\n}\n@container (max-width: 540px) {\n verdocs-sign-footer.no-buttons .powered-by {\n display: none;\n }\n verdocs-sign-footer.has-buttons .links {\n display: none;\n }\n verdocs-sign-footer .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n }\n}';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,n,o;return __generator(this,(function(t){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(t){console.log("[FOOTER] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.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(n){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(n){e.envelope=n}));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 n,o,t,i,r,s,a,c,d,l,f,u,v,b,g,p,x,m,y,k,w,C,L,V;var H=!!((o=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||o===void 0?void 0:o.powered_by_label);var E=!!((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.terms_use_url)||!!((s=(r=this.envelope)===null||r===void 0?void 0:r.organization)===null||s===void 0?void 0:s.privacy_policy_url);var _=!this.isDone;return h(Host,{key:"d6c9c85e457e98238f722f10cd38912d7f83a8b7",class:{"has-buttons":_,"no-buttons":!_,"has-powered-by":H,"has-links":E,"just-buttons":!H&&!E}},((c=(a=this.envelope)===null||a===void 0?void 0:a.organization)===null||c===void 0?void 0:c.powered_by_label)&&h("div",{key:"081e69cd08dad7339d3d8be8a4b27bdf4673b808",class:"powered-by"},((l=(d=this.envelope)===null||d===void 0?void 0:d.organization)===null||l===void 0?void 0:l.powered_by_label)?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,(p=(g=this.envelope)===null||g===void 0?void 0:g.organization)===null||p===void 0?void 0:p.powered_by_label)),!this.isDone&&h("div",{key:"164d99486b6e7f81dbb9489cfa0893f437c34c60",class:"buttons"},h("button",{key:"ea5d24fbc206f9ad8ec433da82276fe41c099d26",onClick:function(){return e.askingQuestion=true}},h("span",{key:"937c4e9dee69add3c1c2f189f966a53013256d8d",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"b477592dd1c5f38bca6b7cc51cdd55a30bfba840",onClick:function(){var n;return(n=e.decline)===null||n===void 0?void 0:n.emit()}},h("span",{key:"b0b221a61c2b7c64422387969494e080a47a475c",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"adb296470e7c479f7876941e006abdafcf479963",onClick:function(){var n;return(n=e.finishLater)===null||n===void 0?void 0:n.emit()}},h("span",{key:"641ff39a912b2939303c74553b17190316e9d631",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"f6d9ad2b78eb8e3745150f7f6c0edc61fc4f8a86",class:"links"},((m=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||m===void 0?void 0:m.terms_use_url)&&h("a",{key:"94eeaa50ce8be03e570aef87644115f6499a251e",href:(k=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||k===void 0?void 0:k.terms_use_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"4a5cb461ff02f96996b1062b9ac51ecc55c0bb8c"},"Terms of Use")),((C=(w=this.envelope)===null||w===void 0?void 0:w.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&h("a",{key:"d470ad770a09776ecdd77a6586995e98a892f58f",href:(V=(L=this.envelope)===null||L===void 0?void 0:L.organization)===null||V===void 0?void 0:V.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"a7e8ab31707294a6bca99a97446255d03fc244ea"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"11e35a94dca072a8eff7d07ab577203dd6bb82bc",onNext:function(n){var o;(o=e.askQuestion)===null||o===void 0?void 0:o.emit({question:n.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss;export{VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
2
2
  //# sourceMappingURL=verdocs-envelope-document-page_3.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["registerInstance","createEvent","h","Host","getElement","VerdocsEndpoint","getEnvelopeDocumentPageDisplayUri","getEnvelope","throttle","SDKError","Store","verdocsEnvelopeDocumentPageCss","VerdocsEnvelopeDocumentPage","class_1","hostRef","this","pageRendered","endpoint","getDefault","envelopeId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","concat","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","prototype","componentWillLoad","_0","_1","sent","componentDidLoad","_this","resizeObserver","ResizeObserver","entries","_i","entries_1","length","entry","contentRect","width","notifyRenderedSize","observe","container","disconnectedCallback","_a","disconnect","emit","xScale","yScale","render","height","key","id","style","flex","map","layer","class","src","alt","loading","onLoad","e","target","offsetWidth","Object","defineProperty","verdocsQuestionDialogCss","QuestionIcon$1","VerdocsQuestionDialog","next","exit","question","closed","handleOk","handleCancel","handleDismiss","className","preventDefault","onExit","slot","innerHTML","rows","placeholder","onInput","value","onClick","verdocsSignFooterCss","QuestionIcon","DeclineIcon","SaveIcon","VerdocsSignFooter","class_2","askQuestion","decline","finishLater","sdkError","envelopeListenerId","isDone","askingQuestion","declinine","envelope","console","log","listenToEnvelope","message","_b","response","status","_c","data","unlistenToEnvelope","subscribe","store","delListener","_d","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_z","hasPoweredBy","organization","powered_by_label","hasLinks","terms_use_url","privacy_policy_url","hasButtons","href","powered_by_url","rel","onNext","detail"],"sources":["module.ts"],"mappings":"0iDAAcA,sBAAuBC,YAAaC,OAAQC,UAAWC,eAAkB,6BAC9EC,gBAAiBC,kCAAmCC,gBAAmB,8BAClEC,aAAgB,kCAChBC,aAAgB,mCAChBC,UAAa,gCACpB,4BACA,sBAEP,IAAMC,+BAAiC,grBAEvC,IAAMC,4BAA2B,WAC7B,SAAAC,EAAYC,GACRd,iBAAiBe,KAAMD,GACvBC,KAAKC,aAAef,YAAYc,KAAM,gBAItCA,KAAKE,SAAWZ,gBAAgBa,aAIhCH,KAAKI,WAAa,GAIlBJ,KAAKK,WAAa,GAIlBL,KAAKM,WAAa,EAKlBN,KAAKO,aAAe,IAKpBP,KAAKQ,cAAgB,IAarBR,KAAKS,OAAS,CAAC,CAAEC,KAAM,OAAQC,KAAM,WACrCX,KAAKW,KAAO,WACZX,KAAKY,YAAc,kCAAAC,OAAkCC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,KA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AEjB3F,8DAA+DyE,iDAAkDsB","ignoreList":[]}
1
+ {"version":3,"names":["registerInstance","createEvent","h","Host","getElement","VerdocsEndpoint","getEnvelopeDocumentPageDisplayUri","getEnvelope","throttle","SDKError","Store","verdocsEnvelopeDocumentPageCss","VerdocsEnvelopeDocumentPage","class_1","hostRef","this","pageRendered","endpoint","getDefault","envelopeId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","concat","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","prototype","componentWillLoad","_0","_1","sent","componentDidLoad","_this","resizeObserver","ResizeObserver","entries","_i","entries_1","length","entry","contentRect","width","notifyRenderedSize","observe","container","disconnectedCallback","_a","disconnect","emit","xScale","yScale","render","height","key","id","style","flex","map","layer","class","src","alt","loading","onLoad","e","target","offsetWidth","Object","defineProperty","verdocsQuestionDialogCss","QuestionIcon$1","VerdocsQuestionDialog","next","exit","question","closed","handleOk","handleCancel","handleDismiss","className","preventDefault","onExit","slot","innerHTML","rows","placeholder","onInput","value","onClick","verdocsSignFooterCss","QuestionIcon","DeclineIcon","SaveIcon","VerdocsSignFooter","class_2","askQuestion","decline","finishLater","sdkError","envelopeListenerId","isDone","askingQuestion","declinine","envelope","console","log","listenToEnvelope","message","_b","response","status","_c","data","unlistenToEnvelope","subscribe","store","delListener","_d","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_z","hasPoweredBy","organization","powered_by_label","hasLinks","terms_use_url","privacy_policy_url","hasButtons","href","powered_by_url","rel","onNext","detail"],"sources":["module.ts"],"mappings":"0iDAAcA,sBAAuBC,YAAaC,OAAQC,UAAWC,eAAkB,6BAC9EC,gBAAiBC,kCAAmCC,gBAAmB,8BAClEC,aAAgB,kCAChBC,aAAgB,mCAChBC,UAAa,gCACpB,4BACA,sBAEP,IAAMC,+BAAiC,grBAEvC,IAAMC,4BAA2B,WAC7B,SAAAC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