@verdocs/web-sdk 2.3.8 → 2.3.10

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 (201) hide show
  1. package/dist/cjs/{Profiles-54271244.js → Profiles-1a26e4eb.js} +0 -34
  2. package/dist/cjs/{TemplateStore-0ed8cd92.js → TemplateStore-1adfba8c.js} +1 -1
  3. package/dist/cjs/{VerdocsEndpoint-7a8bf79c.js → VerdocsEndpoint-b9ed9603.js} +1 -43
  4. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-auth.cjs.entry.js +4 -27
  8. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -2
  16. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -1
  19. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +79 -0
  21. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +26 -4
  23. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-sign.cjs.entry.js +7 -4
  25. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  31. package/dist/collection/collection-manifest.json +0 -1
  32. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +20 -1
  33. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +2 -27
  34. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +7 -3
  35. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +2 -1
  36. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
  37. package/dist/components/TemplateStore.js +1 -1
  38. package/dist/components/VerdocsEndpoint.js +2 -43
  39. package/dist/components/index.d.ts +0 -1
  40. package/dist/components/index.js +0 -1
  41. package/dist/components/verdocs-auth.js +8 -39
  42. package/dist/components/verdocs-field-textarea.js +2 -1
  43. package/dist/components/verdocs-field-textbox.js +1 -1
  44. package/dist/components/verdocs-ok-dialog2.js +3 -1
  45. package/dist/components/verdocs-search.js +2 -8
  46. package/dist/components/verdocs-settings-organization2.js +22 -1
  47. package/dist/components/verdocs-sign.js +7 -3
  48. package/dist/docs.json +18 -108
  49. package/dist/esm/{Profiles-4cc942ef.js → Profiles-d4df4d1c.js} +1 -32
  50. package/dist/esm/{TemplateStore-0ecf6e55.js → TemplateStore-09d1ae9f.js} +1 -1
  51. package/dist/esm/{VerdocsEndpoint-a18c0968.js → VerdocsEndpoint-3add43eb.js} +2 -43
  52. package/dist/esm/ipc-test.entry.js +2 -2
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  55. package/dist/esm/verdocs-auth.entry.js +4 -27
  56. package/dist/esm/verdocs-build.entry.js +2 -2
  57. package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
  58. package/dist/esm/verdocs-contact-picker_3.entry.js +1 -1
  59. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  60. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  61. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  62. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  63. package/dist/esm/verdocs-field-textarea.entry.js +3 -2
  64. package/dist/esm/verdocs-field-textbox.entry.js +2 -2
  65. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  66. package/dist/esm/verdocs-ok-dialog.entry.js +2 -1
  67. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  68. package/dist/esm/verdocs-quick-functions_2.entry.js +74 -0
  69. package/dist/esm/verdocs-search.entry.js +1 -1
  70. package/dist/esm/verdocs-settings-api-keys_4.entry.js +24 -2
  71. package/dist/esm/verdocs-settings.entry.js +1 -1
  72. package/dist/esm/verdocs-sign.entry.js +7 -4
  73. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  74. package/dist/esm/verdocs-template-fields_4.entry.js +2 -2
  75. package/dist/esm/verdocs-template-star.entry.js +1 -1
  76. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  77. package/dist/esm/verdocs-view.entry.js +1 -1
  78. package/dist/esm/verdocs-web-sdk.js +1 -1
  79. package/dist/esm-es5/Profiles-d4df4d1c.js +1 -0
  80. package/dist/esm-es5/{TemplateStore-0ecf6e55.js → TemplateStore-09d1ae9f.js} +1 -1
  81. package/dist/esm-es5/VerdocsEndpoint-3add43eb.js +1 -0
  82. package/dist/esm-es5/ipc-test.entry.js +1 -1
  83. package/dist/esm-es5/loader.js +1 -1
  84. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
  89. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  94. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -0
  99. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  107. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  109. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +4 -0
  110. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
  111. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  112. package/dist/types/components.d.ts +8 -34
  113. package/dist/types/utils/utils.d.ts +1 -1
  114. package/dist/verdocs-web-sdk/{p-cc962212.system.entry.js → p-048cfdb5.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/p-0bf08021.js +1 -0
  116. package/dist/verdocs-web-sdk/p-0cf6b69a.system.js +1 -0
  117. package/dist/verdocs-web-sdk/{p-58f28d9f.system.entry.js → p-13936429.system.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-9b1c719d.system.entry.js → p-13ae6d98.system.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-fce1bc9e.entry.js → p-15b3184c.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-7c61d1b4.system.entry.js → p-2fc54023.system.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/p-30fecb02.entry.js +1 -0
  122. package/dist/verdocs-web-sdk/p-315e20ac.system.entry.js +1 -0
  123. package/dist/verdocs-web-sdk/p-318a7887.entry.js +1 -0
  124. package/dist/verdocs-web-sdk/{p-26388fe4.entry.js → p-33077795.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-2ca76aa5.system.entry.js → p-387580cd.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-f9889d9a.entry.js → p-3950200c.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/p-3e607686.js +1 -0
  128. package/dist/verdocs-web-sdk/{p-eb8029ba.entry.js → p-3edde2fa.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-acba9950.entry.js → p-4490750d.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-c18362fd.entry.js → p-459510cf.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/p-45bc9865.system.entry.js +1 -0
  132. package/dist/verdocs-web-sdk/{p-f77c6153.system.entry.js → p-52cd4ee2.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-b5972878.entry.js → p-532e4fc1.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-cf19be3a.system.entry.js → p-5ba1045a.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-3070cc3b.system.js → p-5d1fecb5.system.js} +1 -1
  136. package/dist/verdocs-web-sdk/{p-05b000c0.entry.js → p-66507ccf.entry.js} +1 -1
  137. package/dist/verdocs-web-sdk/{p-2a9669b6.entry.js → p-6ce14c63.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/{p-6da61008.entry.js → p-73cbe09b.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-d844ab61.system.entry.js → p-76cadb98.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/p-7bad61b5.system.entry.js +1 -0
  141. package/dist/verdocs-web-sdk/{p-f25a6c17.system.entry.js → p-87040b70.system.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-4e43fd86.entry.js → p-a1ef2dd4.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-31e97ef4.system.entry.js → p-a4749aeb.system.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-5d32e0a5.system.entry.js → p-a4cec3d0.system.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-a4e0b977.entry.js +1 -0
  146. package/dist/verdocs-web-sdk/{p-f16c85f8.entry.js → p-b33ab87b.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-03105a2e.system.entry.js → p-b4c4335f.system.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-2af999c9.entry.js → p-b63fb3e8.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-f7fd08bb.system.entry.js → p-b70ad4db.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-f709b7d9.entry.js → p-c4140ec7.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/p-c50a3992.entry.js +1 -0
  152. package/dist/verdocs-web-sdk/{p-1c7c6ec7.entry.js → p-c8135ff6.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/p-c9ad6362.entry.js +1 -0
  154. package/dist/verdocs-web-sdk/p-cd20fb77.system.js +1 -0
  155. package/dist/verdocs-web-sdk/{p-91fd5faa.system.entry.js → p-d0acae0f.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-013d1556.system.entry.js → p-d1ea580b.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-6bc1c9f2.system.entry.js → p-d8fc5f12.system.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-304cf5b0.system.entry.js → p-dcb0e6ae.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/{p-6aef8042.js → p-e429f3bd.js} +1 -1
  161. package/dist/verdocs-web-sdk/{p-9adda357.system.entry.js → p-e5cf9dd1.system.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/p-e7755198.entry.js +1 -0
  163. package/dist/verdocs-web-sdk/{p-d5e82bfc.entry.js → p-eccbfc3a.entry.js} +1 -1
  164. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  165. package/dist/verdocs-web-sdk/{p-85abbfc9.entry.js → p-f07340cd.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-b77a743c.system.entry.js → p-f2aec486.system.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-aac84ce0.system.entry.js → p-f368f4f3.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-9b1cb5bd.entry.js → p-f5778ebb.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/p-f7510858.system.entry.js +1 -0
  170. package/dist/verdocs-web-sdk/{p-a15df083.system.entry.js → p-ff80d211.system.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  172. package/package.json +2 -2
  173. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +0 -220
  174. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +0 -66
  175. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +0 -187
  176. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +0 -14
  177. package/dist/components/Organizations.js +0 -32
  178. package/dist/components/verdocs-search-activity.d.ts +0 -11
  179. package/dist/components/verdocs-search-activity.js +0 -6
  180. package/dist/components/verdocs-search-activity2.js +0 -170
  181. package/dist/esm/verdocs-quick-functions_3.entry.js +0 -214
  182. package/dist/esm-es5/Profiles-4cc942ef.js +0 -1
  183. package/dist/esm-es5/VerdocsEndpoint-a18c0968.js +0 -1
  184. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +0 -1
  185. package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +0 -33
  186. package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.stories.d.ts +0 -10
  187. package/dist/verdocs-web-sdk/p-04580be0.entry.js +0 -1
  188. package/dist/verdocs-web-sdk/p-0f06edcc.system.entry.js +0 -1
  189. package/dist/verdocs-web-sdk/p-1674c703.entry.js +0 -1
  190. package/dist/verdocs-web-sdk/p-16d0f4e6.system.entry.js +0 -1
  191. package/dist/verdocs-web-sdk/p-21126597.entry.js +0 -1
  192. package/dist/verdocs-web-sdk/p-23617458.entry.js +0 -1
  193. package/dist/verdocs-web-sdk/p-23c7d6bb.system.entry.js +0 -1
  194. package/dist/verdocs-web-sdk/p-4bf88541.system.js +0 -1
  195. package/dist/verdocs-web-sdk/p-5d51cf54.system.entry.js +0 -1
  196. package/dist/verdocs-web-sdk/p-8941fee6.entry.js +0 -1
  197. package/dist/verdocs-web-sdk/p-8ff245c9.js +0 -1
  198. package/dist/verdocs-web-sdk/p-983da2f6.js +0 -1
  199. package/dist/verdocs-web-sdk/p-a5ac349f.entry.js +0 -1
  200. package/dist/verdocs-web-sdk/p-cc05162a.entry.js +0 -1
  201. package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +0 -1
@@ -1,170 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { V as VerdocsEndpoint, g as getTemplates } from './VerdocsEndpoint.js';
3
- import './Types.js';
4
-
5
- /**
6
- * Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
7
- * to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
8
- * each collection (e.g. {@link Envelopes.Envelopes.searchEnvelopes} or {@link Templates.Templates.searchTemplates}).
9
- *
10
- * @module
11
- */
12
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- /**
49
- * Retrieve recent and saved searches. Note that result counts will be limited to a maximum of 20 entries for each
50
- * type but this may be expanded in the future. Client UI's should self-limit display counts as needed.
51
- *
52
- * ```typescript
53
- * import {Content} from '@verdocs/js-sdk/Search';
54
- *
55
- * const {recent, saved} = await Content.getSearchHistory();
56
- * ```
57
- */
58
- var getSearchHistory = function (endpoint) { return __awaiter(void 0, void 0, void 0, function () {
59
- return __generator(this, function (_a) {
60
- return [2 /*return*/, endpoint.api //
61
- .get('/search/history')
62
- .then(function (r) { return r.data; })];
63
- });
64
- }); };
65
-
66
- const verdocsSearchActivityCss = "verdocs-search-activity{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}";
67
-
68
- const DocumentIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
69
- const VerdocsSearchActivity = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
70
- constructor() {
71
- super();
72
- this.__registerHost();
73
- this.entrySelected = createEvent(this, "entrySelected", 7);
74
- this.endpoint = VerdocsEndpoint.getDefault();
75
- this.type = 'recent';
76
- this.options = undefined;
77
- this.emptyMessage = 'You do not have any starred searches.';
78
- this.authFailure = false;
79
- this.title = 'Recent Searches';
80
- this.recent = [];
81
- this.saved = [];
82
- this.starred = [];
83
- }
84
- componentWillLoad() {
85
- this.endpoint.loadSession();
86
- const errorHandler = e => {
87
- var _a;
88
- console.warn('[Verdocs/search-activity] Error getting search data', e);
89
- if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
90
- this.authFailure = true;
91
- }
92
- };
93
- switch (this.type) {
94
- case 'recent':
95
- this.title = 'Recent Searches';
96
- this.emptyMessage = 'You do not have any recent searches.';
97
- getSearchHistory(this.endpoint)
98
- .then(r => (this.recent = r.recent))
99
- .catch(errorHandler);
100
- break;
101
- case 'saved':
102
- this.title = 'Saved Searches';
103
- this.emptyMessage = 'You do not have any saved searches.';
104
- getSearchHistory(this.endpoint)
105
- .then(r => (this.saved = r.saved))
106
- .catch(errorHandler);
107
- break;
108
- case 'starred':
109
- this.title = 'My Starred items';
110
- this.emptyMessage = 'You do not have any starred templates.';
111
- getTemplates(this.endpoint, { is_starred: true })
112
- .then(r => (this.starred = r))
113
- .catch(errorHandler);
114
- break;
115
- }
116
- }
117
- handleSelectEntry(entry) {
118
- this.entrySelected.emit(entry);
119
- }
120
- computePagesText(pages) {
121
- if (pages < 2) {
122
- return `${pages} Page`;
123
- }
124
- else {
125
- return `${pages} Pages`;
126
- }
127
- }
128
- computeRecipientsText(recipients) {
129
- if (typeof recipients === 'object') {
130
- return recipients.join(', ');
131
- }
132
- else if (recipients > 1) {
133
- return `${recipients} Recipients`;
134
- }
135
- else {
136
- return `${recipients} Recipient`;
137
- }
138
- }
139
- render() {
140
- const showEmpty = this.recent.length < 1 && this.saved.length < 1 && this.starred.length < 1;
141
- return (h("div", { class: "container" }, h("p", { class: "title" }, this.title), h("div", { class: "items" }, this.recent.map(recent => (h("button", { class: "item", onClick: () => this.handleSelectEntry(recent) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, recent.params.q), h("div", { class: "info" }, "Test"))))), this.saved.map(option => (h("button", { class: "item", onClick: () => this.handleSelectEntry(option) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, option.params.q), h("div", { class: "info" }))))), showEmpty && h("div", { class: "empty" }, this.authFailure ? 'Authentication required' : this.emptyMessage))));
142
- }
143
- static get style() { return verdocsSearchActivityCss; }
144
- }, [0, "verdocs-search-activity", {
145
- "endpoint": [16],
146
- "type": [1],
147
- "options": [8],
148
- "emptyMessage": [32],
149
- "authFailure": [32],
150
- "title": [32],
151
- "recent": [32],
152
- "saved": [32],
153
- "starred": [32]
154
- }]);
155
- function defineCustomElement() {
156
- if (typeof customElements === "undefined") {
157
- return;
158
- }
159
- const components = ["verdocs-search-activity"];
160
- components.forEach(tagName => { switch (tagName) {
161
- case "verdocs-search-activity":
162
- if (!customElements.get(tagName)) {
163
- customElements.define(tagName, VerdocsSearchActivity);
164
- }
165
- break;
166
- } });
167
- }
168
- defineCustomElement();
169
-
170
- export { VerdocsSearchActivity as V, defineCustomElement as d };
@@ -1,214 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-172625c5.js';
2
- import './Types-5f31149e.js';
3
- import { V as VerdocsEndpoint, e as getTemplates } from './VerdocsEndpoint-a18c0968.js';
4
-
5
- /**
6
- * Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
7
- * to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
8
- * each collection (e.g. {@link Envelopes.Envelopes.searchEnvelopes} or {@link Templates.Templates.searchTemplates}).
9
- *
10
- * @module
11
- */
12
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- /**
49
- * Retrieve recent and saved searches. Note that result counts will be limited to a maximum of 20 entries for each
50
- * type but this may be expanded in the future. Client UI's should self-limit display counts as needed.
51
- *
52
- * ```typescript
53
- * import {Content} from '@verdocs/js-sdk/Search';
54
- *
55
- * const {recent, saved} = await Content.getSearchHistory();
56
- * ```
57
- */
58
- var getSearchHistory = function (endpoint) { return __awaiter(void 0, void 0, void 0, function () {
59
- return __generator(this, function (_a) {
60
- return [2 /*return*/, endpoint.api //
61
- .get('/search/history')
62
- .then(function (r) { return r.data; })];
63
- });
64
- }); };
65
-
66
- const verdocsQuickFunctionsCss = "verdocs-quick-functions{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}";
67
-
68
- const DocumentIcon$1 = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
69
- const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>`;
70
- const VerdocsQuickFunctions = class {
71
- constructor(hostRef) {
72
- registerInstance(this, hostRef);
73
- this.createTemplate = createEvent(this, "createTemplate", 7);
74
- this.createDocument = createEvent(this, "createDocument", 7);
75
- this.endpoint = VerdocsEndpoint.getDefault();
76
- }
77
- handleCreateTemplate() {
78
- this.createTemplate.emit();
79
- }
80
- handleCreateDocument() {
81
- this.createDocument.emit();
82
- }
83
- render() {
84
- return (h("div", { class: "container" }, h("p", { class: "title" }, "Quick Create"), h("button", { onClick: () => this.handleCreateTemplate(), innerHTML: TemplateIcon }, "Template"), h("button", { onClick: () => this.handleCreateDocument(), innerHTML: DocumentIcon$1 }, "Document")));
85
- }
86
- };
87
- VerdocsQuickFunctions.style = verdocsQuickFunctionsCss;
88
-
89
- const verdocsSearchActivityCss = "verdocs-search-activity{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}";
90
-
91
- const DocumentIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
92
- const VerdocsSearchActivity = class {
93
- constructor(hostRef) {
94
- registerInstance(this, hostRef);
95
- this.entrySelected = createEvent(this, "entrySelected", 7);
96
- this.endpoint = VerdocsEndpoint.getDefault();
97
- this.type = 'recent';
98
- this.options = undefined;
99
- this.emptyMessage = 'You do not have any starred searches.';
100
- this.authFailure = false;
101
- this.title = 'Recent Searches';
102
- this.recent = [];
103
- this.saved = [];
104
- this.starred = [];
105
- }
106
- componentWillLoad() {
107
- this.endpoint.loadSession();
108
- const errorHandler = e => {
109
- var _a;
110
- console.warn('[Verdocs/search-activity] Error getting search data', e);
111
- if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
112
- this.authFailure = true;
113
- }
114
- };
115
- switch (this.type) {
116
- case 'recent':
117
- this.title = 'Recent Searches';
118
- this.emptyMessage = 'You do not have any recent searches.';
119
- getSearchHistory(this.endpoint)
120
- .then(r => (this.recent = r.recent))
121
- .catch(errorHandler);
122
- break;
123
- case 'saved':
124
- this.title = 'Saved Searches';
125
- this.emptyMessage = 'You do not have any saved searches.';
126
- getSearchHistory(this.endpoint)
127
- .then(r => (this.saved = r.saved))
128
- .catch(errorHandler);
129
- break;
130
- case 'starred':
131
- this.title = 'My Starred items';
132
- this.emptyMessage = 'You do not have any starred templates.';
133
- getTemplates(this.endpoint, { is_starred: true })
134
- .then(r => (this.starred = r))
135
- .catch(errorHandler);
136
- break;
137
- }
138
- }
139
- handleSelectEntry(entry) {
140
- this.entrySelected.emit(entry);
141
- }
142
- computePagesText(pages) {
143
- if (pages < 2) {
144
- return `${pages} Page`;
145
- }
146
- else {
147
- return `${pages} Pages`;
148
- }
149
- }
150
- computeRecipientsText(recipients) {
151
- if (typeof recipients === 'object') {
152
- return recipients.join(', ');
153
- }
154
- else if (recipients > 1) {
155
- return `${recipients} Recipients`;
156
- }
157
- else {
158
- return `${recipients} Recipient`;
159
- }
160
- }
161
- render() {
162
- const showEmpty = this.recent.length < 1 && this.saved.length < 1 && this.starred.length < 1;
163
- return (h("div", { class: "container" }, h("p", { class: "title" }, this.title), h("div", { class: "items" }, this.recent.map(recent => (h("button", { class: "item", onClick: () => this.handleSelectEntry(recent) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, recent.params.q), h("div", { class: "info" }, "Test"))))), this.saved.map(option => (h("button", { class: "item", onClick: () => this.handleSelectEntry(option) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, option.params.q), h("div", { class: "info" }))))), showEmpty && h("div", { class: "empty" }, this.authFailure ? 'Authentication required' : this.emptyMessage))));
164
- }
165
- };
166
- VerdocsSearchActivity.style = verdocsSearchActivityCss;
167
-
168
- const verdocsSearchBoxCss = "verdocs-search-box{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}";
169
-
170
- const SearchIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>`;
171
- const CloseIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>`;
172
- const VerdocsSearchBox = class {
173
- constructor(hostRef) {
174
- registerInstance(this, hostRef);
175
- this.searchClicked = createEvent(this, "searchClicked", 7);
176
- this.typeChanged = createEvent(this, "typeChanged", 7);
177
- this.queryChanged = createEvent(this, "queryChanged", 7);
178
- this.endpoint = VerdocsEndpoint.getDefault();
179
- this.placeholder = 'Search envelopes, templates, organizations...';
180
- this.type = 'all';
181
- this.query = '';
182
- this.grabsFocus = false;
183
- }
184
- async focusField() {
185
- this.inputEl.focus();
186
- }
187
- componentDidRender() {
188
- if (this.grabsFocus) {
189
- this.inputEl.focus();
190
- }
191
- }
192
- handleSearch(e) {
193
- this.searchClicked.emit({ type: this.type, query: this.query });
194
- e.preventDefault();
195
- return false;
196
- }
197
- handleChange(e) {
198
- this.queryChanged.emit(e.target.value);
199
- }
200
- handleClearFilter() {
201
- this.typeChanged.emit('all');
202
- }
203
- handleKeyUp(e) {
204
- if (e.key === 'Enter') {
205
- this.searchClicked.emit({ type: this.type, query: this.query });
206
- }
207
- }
208
- render() {
209
- return (h("form", { onSubmit: e => this.handleSearch(e) }, this.type !== undefined && this.type !== 'all' && (h("span", { class: "type" }, this.type, "s ", h("button", { class: "remove", innerHTML: CloseIcon, onClick: () => this.handleClearFilter() }))), h("input", { type: "text", value: this.query, placeholder: this.placeholder, onInput: e => this.handleChange(e), onKeyUp: e => this.handleKeyUp(e), ref: el => (this.inputEl = el) }), h("button", { onClick: e => this.handleSearch(e), class: "search" }, h("span", { innerHTML: SearchIcon }), "Search")));
210
- }
211
- };
212
- VerdocsSearchBox.style = verdocsSearchBoxCss;
213
-
214
- export { VerdocsQuickFunctions as verdocs_quick_functions, VerdocsSearchActivity as verdocs_search_activity, VerdocsSearchBox as verdocs_search_box };
@@ -1 +0,0 @@
1
- var getOrganization=function(t,n){return t.api.get("/organizations/".concat(n)).then((function(t){return t.data}))};var updateOrganization=function(t,n,a){return t.api.patch("/organizations/".concat(n),a).then((function(t){return t.data}))};var isOrgAvailable=function(t,n){return t.api.post("/organizations/check-availability",{name:n},{baseURL:t.getBaseURLv2()}).then((function(t){return t.data}))};var getCurrentProfile=function(t){return t.api.get("/profiles").then((function(t){return(t.data||[]).find((function(t){return t.current}))}))};var getRoles=function(t){return t.api.get("/roles").then((function(t){return t.data}))};var updateProfile=function(t,n,a){return t.api.put("/profiles/".concat(n),a).then((function(t){return t.data}))};var createBusinessAccount=function(t,n){return t.api.post("/user/business",n).then((function(t){return t.data}))};export{getOrganization as a,getCurrentProfile as b,createBusinessAccount as c,updateProfile as d,getRoles as g,isOrgAvailable as i,updateOrganization as u};
@@ -1 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};import{d as decodeAccessTokenBody}from"./Types-5f31149e.js";var TemplateSenderTypes$1;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes$1||(TemplateSenderTypes$1={}));var TemplatePermissions;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(TemplatePermissions||(TemplatePermissions={}));var canPerformTemplateAction=function(e,t,r){var n,i;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var o=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var s=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!o){return{canPerform:false,message:"Active session required"}}var a=(r===null||r===void 0?void 0:r.profile_id)===o;var u=(r===null||r===void 0?void 0:r.organization_id)===s;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var c=(i=r===null||r===void 0?void 0:r.is_public)!==null&&i!==void 0?i:false;var f=[];switch(t){case"create_personal":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!a){if(!l&&u||!c){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ)}}break;case"write":if(!a){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ);f.push(TemplatePermissions.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);f.push(TemplatePermissions.TEMPLATE_CREATOR_VISIBILITY)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_DELETE)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(hasRequiredPermissions(e,f)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(f.toString())}};var hasRequiredPermissions=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var __awaiter=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var getTemplates=function(e,t){return e.api.post("/templates",{params:t}).then((function(e){return e.data}))};var getTemplate=function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))};var ALLOWED_CREATE_FIELDS=["name","is_personal","is_public","sender","description","roles","fields"];var createTemplatev2=function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;ALLOWED_CREATE_FIELDS.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}};var updateTemplate=function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))};var deleteTemplate=function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))};var SortOptions$1;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions$1||(SortOptions$1={}));var listTemplates=function(e,t){if(t===void 0){t={}}return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))};var TemplateSenderTypes;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes||(TemplateSenderTypes={}));var TemplateActions;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(TemplateActions||(TemplateActions={}));var SortOptions;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions||(SortOptions={}));var Permissions;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(Permissions||(Permissions={}));var Plans;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(Plans||(Plans={}));var Roles;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(Roles||(Roles={}));var denyList=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var isRetryAllowed=function(e){return!denyList.has(e&&e.code)};var namespace="axios-retry";function isNetworkError(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return isRetryAllowed(e)}var SAFE_HTTP_METHODS=["get","head","options"];var IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(["put","delete"]);function isRetryableError(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function isSafeRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&SAFE_HTTP_METHODS.indexOf(e.config.method)!==-1}function isIdempotentRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&IDEMPOTENT_HTTP_METHODS.indexOf(e.config.method)!==-1}function isNetworkOrIdempotentRequestError(e){return isNetworkError(e)||isIdempotentRequestError(e)}function noDelay(){return 0}function exponentialDelay(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var DEFAULT_OPTIONS={retries:3,retryCondition:isNetworkOrIdempotentRequestError,retryDelay:noDelay,shouldResetTimeout:false,onRetry:function(){}};function getRequestOptions(e,t){return __assign(__assign(__assign({},DEFAULT_OPTIONS),t),e[namespace])}function setCurrentState(e,t){var r=getRequestOptions(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[namespace]=r;return r}function fixConfig(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function shouldRetry(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,i];case 2:o=a.sent();return[2,o!==false];case 3:s=a.sent();return[2,false];case 4:return[2,i]}}))}))}var axiosRetry=function(e,t){var r=e.interceptors.request.use((function(e){setCurrentState(e,t);return e}));var n=e.interceptors.response.use(null,(function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,l,c;return __generator(this,(function(f){switch(f.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=setCurrentState(n,t);return[4,shouldRetry(i,r)];case 1:if(!f.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,s=i.shouldResetTimeout,a=i.onRetry;u=o(i.retryCount,r);fixConfig(e,n);if(!s&&n.timeout&&i.lastRequestTime){l=Date.now()-i.lastRequestTime;c=n.timeout-l-u;if(c<=0){return[2,Promise.reject(r)]}n.timeout=c}n.transformRequest=[function(e){return e}];return[4,a(i.retryCount,r,n)];case 2:f.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(n))}),u)}))];case 3:return[2,Promise.reject(r)]}}))}))}));return{requestInterceptorId:r,responseInterceptorId:n}};axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;function bind(e,t){return function r(){return e.apply(t,arguments)}}var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var kindOfTest=function(e){e=e.toLowerCase();return function(t){return kindOf(t)===e}};var typeOfTest=function(e){return function(t){return typeof t===e}};var isArray=Array.isArray;var isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&isArrayBuffer(e.buffer)}return t}var isString=typeOfTest("string");var isFunction=typeOfTest("function");var isNumber=typeOfTest("number");var isObject=function(e){return e!==null&&typeof e==="object"};var isBoolean=function(e){return e===true||e===false};var isPlainObject=function(e){if(kindOf(e)!=="object"){return false}var t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var isDate=kindOfTest("Date");var isFile=kindOfTest("File");var isBlob=kindOfTest("Blob");var isFileList=kindOfTest("FileList");var isStream=function(e){return isObject(e)&&isFunction(e.pipe)};var isFormData=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))};var isURLSearchParams=kindOfTest("URLSearchParams");var trim=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var s;var a;if(typeof e!=="object"){e=[e]}if(isArray(e)){for(s=0,a=e.length;s<a;s++){t.call(null,e[s],s,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var l=u.length;var c=void 0;for(s=0;s<l;s++){c=u[s];t.call(null,e[c],c,e)}}}function findKey(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var _global=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var isContextDefined=function(e){return!isUndefined(e)&&e!==_global};function merge(){var e=(isContextDefined(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&findKey(t,n)||n;if(isPlainObject(t[i])&&isPlainObject(r)){t[i]=merge(t[i],r)}else if(isPlainObject(r)){t[i]=merge({},r)}else if(isArray(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&forEach(arguments[n],r)}return t}var extend=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;forEach(t,(function(t,n){if(r&&isFunction(t)){e[n]=bind(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var stripBOM=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var inherits=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var toFlatObject=function(e,t,r,n){var i;var o;var s;var a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!a[s]){t[s]=e[s];a[s]=true}}e=r!==false&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var endsWith=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var toArray=function(e){if(!e)return null;if(isArray(e))return e;var t=e.length;if(!isNumber(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var isTypedArray=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&getPrototypeOf(Uint8Array));var forEachEntry=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var matchAll=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var isHTMLForm=kindOfTest("HTMLFormElement");var toCamelCase=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var hasOwnProperty=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var isRegExp=kindOfTest("RegExp");var reduceDescriptors=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};forEach(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var freezeMethods=function(e){reduceDescriptors(e,(function(t,r){if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!isFunction(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var toObjectSet=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};isArray(e)?n(e):n(String(e).split(t));return r};var noop=function(){};var toFiniteNumber=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ALPHA="abcdefghijklmnopqrstuvwxyz";var DIGIT="0123456789";var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function(e,t){if(e===void 0){e=16}if(t===void 0){t=ALPHABET.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var toJSONObject=function(e){var t=new Array(10);var r=function(e,n){if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=isArray(e)?[]:{};forEach(e,(function(e,t){var o=r(e,n+1);!isUndefined(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var isAsyncFn=kindOfTest("AsyncFunction");var isThenable=function(e){return e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch)};var utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}utils$1.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype$1=AxiosError.prototype;var descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){descriptors[e]={value:e}}));Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:true});AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype$1);utils$1.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));AxiosError.call(s,e.message,t,r,n,i);s.cause=e;s.name=e.name;o&&Object.assign(s,o);return s};var httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=removeBrackets(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}var predicates=utils$1.toFlatObject(utils$1,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils$1.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils$1.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils$1.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var s=r.indexes;var a=r.Blob||typeof Blob!=="undefined"&&Blob;var u=a&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils$1.isDate(e)){return e.toISOString()}if(!u&&utils$1.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var a=e;if(e&&!i&&typeof e==="object"){if(utils$1.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(a=utils$1.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils$1.isUndefined(n)||n===null)&&t.append(s===true?renderKey([r],i,o):s===null?r:r+"[]",l(n))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,r,o),l(e));return false}var f=[];var d=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable:isVisitable});function p(e,r){if(utils$1.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils$1.forEach(e,(function e(n,o){var s=!(utils$1.isUndefined(n)||n===null)&&i.call(t,n,utils$1.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils$1.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function encode$1(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])};prototype.toString=function e(t){var r=t?function(e){return t.call(this,e,encode$1)}:encode$1;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t){return e}var n=r&&r.encode||encode;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n)}if(o){var s=e.indexOf("#");if(s!==-1){e=e.slice(0,s)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var InterceptorManager=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){utils$1.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var transitionalDefaults={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var URLSearchParams$1=typeof URLSearchParams!=="undefined"?URLSearchParams:AxiosURLSearchParams;var FormData$1=typeof FormData!=="undefined"?FormData:null;var Blob$1=typeof Blob!=="undefined"?Blob:null;var platform$1={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]};var hasBrowserEnv=typeof window!=="undefined"&&typeof document!=="undefined";var hasStandardBrowserEnv=function(e){return hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var hasStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var utils=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,hasStandardBrowserEnv:hasStandardBrowserEnv});var platform=__assign(__assign({},utils),platform$1);function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(platform.isNode&&utils$1.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function arrayToObject(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function formDataToJSON(e){function t(e,r,n,i){var o=e[i++];var s=Number.isFinite(+o);var a=i>=e.length;o=!o&&utils$1.isArray(n)?n.length:o;if(a){if(utils$1.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils$1.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils$1.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){var r={};utils$1.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e)){try{(t||JSON.parse)(e);return utils$1.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=utils$1.isObject(t);if(o&&utils$1.isHTMLForm(t)){t=new FormData(t)}var s=utils$1.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)){return t}if(utils$1.isArrayBufferView(t)){return t.buffer}if(utils$1.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(t,this.formSerializer).toString()}if((a=utils$1.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return toFormData(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return stringifySafely(t)}return t}],transformResponse:[function e(t){var r=this.transitional||defaults.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&utils$1.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var s=!o&&i;try{return JSON.parse(t)}catch(e){if(s){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};utils$1.forEach(["delete","get","head","post","put","patch"],(function(e){defaults.headers[e]={}}));var ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&ignoreDuplicateOf[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var isValidHeaderName=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function matchHeaderValue(e,t,r,n,i){if(utils$1.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils$1.isString(t))return;if(utils$1.isString(n)){return t.indexOf(n)!==-1}if(utils$1.isRegExp(n)){return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function buildAccessors(e,t){var r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var AxiosHeaders=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}var o=utils$1.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=normalizeValue(e)}}var o=function(e,t){return utils$1.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils$1.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){o(parseHeaders(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils$1.isFunction(t)){return t.call(this,n,r)}if(utils$1.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||matchHeaderValue(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=normalizeHeader(e);if(e){var i=utils$1.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils$1.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||matchHeaderValue(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};utils$1.forEach(this,(function(n,i){var o=utils$1.findKey(r,i);if(o){t[o]=normalizeValue(n);delete t[i];return}var s=e?formatHeader(i):String(i).trim();if(s!==i){delete t[i]}t[s]=normalizeValue(n);r[s]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);utils$1.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[$internals]=this[$internals]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=normalizeHeader(e);if(!r[t]){buildAccessors(n,e);r[t]=true}}utils$1.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));utils$1.freezeMethods(AxiosHeaders);function transformData(e,t){var r=this||defaults;var n=t||r;var i=AxiosHeaders.from(n.headers);var o=n.data;utils$1.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r);this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var cookies=platform.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var s=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());utils$1.isString(n)&&s.push("path="+n);utils$1.isString(i)&&s.push("domain="+i);o===true&&s.push("secure");document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}var isURLSameOrigin=platform.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=utils$1.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var s;t=t!==undefined?t:1e3;return function a(u){var l=Date.now();var c=n[o];if(!s){s=l}r[i]=u;n[i]=l;var f=o;var d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-s<t){return}var p=c&&l-c;return p?Math.round(d*1e3/p):undefined}}function progressEventReducer(e,t){var r=0;var n=speedometer(50,250);return function(i){var o=i.loaded;var s=i.lengthComputable?i.total:undefined;var a=o-r;var u=n(a);var l=o<=s;r=o;var c={loaded:o,total:s,progress:s?o/s:undefined,bytes:a,rate:u?u:undefined,estimated:u&&s&&l?(s-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var isXHRAdapterSupported=typeof XMLHttpRequest!=="undefined";var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function t(r,n){var i=e.data;var o=AxiosHeaders.from(e.headers).normalize();var s=e.responseType,a=e.withXSRFToken;var u;function l(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var c;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((c=o.getContentType())!==false){var f=c?c.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=f[0],p=f.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"";var m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(E+":"+m))}var v=buildFullPath(e.baseURL,e.url);h.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function T(){if(!h){return}var t=AxiosHeaders.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};settle((function e(t){r(t);l()}),(function e(t){n(t);l()}),o);h=null}if("onloadend"in h){h.onloadend=T}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(T)}}h.onabort=function t(){if(!h){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||transitionalDefaults;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new AxiosError(r,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,h));h=null};if(platform.hasStandardBrowserEnv){a&&utils$1.isFunction(a)&&(a=a(e));if(a||a!==false&&isURLSameOrigin(v)){var y=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(y){o.set(e.xsrfHeaderName,y)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){utils$1.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!utils$1.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(s&&s!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new CanceledError(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var R=parseProtocol(v);if(R&&platform.protocols.indexOf(R)===-1){n(new AxiosError("Unsupported protocol "+R+":",AxiosError.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var renderReason=function(e){return"- ".concat(e)};var isResolvedHandle=function(e){return utils$1.isFunction(e)||e===null||e===false};var adapters={getAdapter:function(e){e=utils$1.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var s=void 0;n=r;if(!isResolvedHandle(r)){n=knownAdapters[(s=String(r)).toLowerCase()];if(n===undefined){throw new AxiosError("Unknown adapter '".concat(s,"'"))}}if(n){break}i[s||"#"+o]=n}if(!n){var a=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?a.length>1?"since :\n"+a.map(renderReason).join("\n"):" "+renderReason(a[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=AxiosHeaders.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=adapters.getAdapter(e.adapter||defaults.adapter);return t(e).then((function t(r){throwIfCancellationRequested(e);r.data=transformData.call(e,e.transformResponse,r);r.headers=AxiosHeaders.from(r.headers);return r}),(function t(r){if(!isCancel(r)){throwIfCancellationRequested(e);if(r&&r.response){r.response.data=transformData.call(e,e.transformResponse,r.response);r.response.headers=AxiosHeaders.from(r.response.headers)}}return Promise.reject(r)}))}var headersToObject=function(e){return e instanceof AxiosHeaders?e.toJSON():e};function mergeConfig(e,t){t=t||{};var r={};function n(e,t,r){if(utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)){return utils$1.merge.call({caseless:r},e,t)}else if(utils$1.isPlainObject(t)){return utils$1.merge({},t)}else if(utils$1.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils$1.isUndefined(t)){return n(e,t,r)}else if(!utils$1.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}else if(!utils$1.isUndefined(e)){return n(undefined,e)}}function a(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:function(e,t){return i(headersToObject(e),headersToObject(t),true)}};utils$1.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils$1.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.6.2";var validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new AxiosError(i(n," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED)}if(r&&!deprecatedWarnings[n]){deprecatedWarnings[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function assertOptions(e,t,r){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var s=t[o];if(s){var a=e[o];var u=a===undefined||s(a,o,e);if(u!==true){throw new AxiosError("option "+o+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}}var validator={assertOptions:assertOptions,validators:validators$1};var validators=validator.validators;var Axios=function(){function e(e){this.defaults=e;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false)}if(n!=null){if(utils$1.isFunction(n)){t.paramsSerializer={serialize:n}}else{validator.assertOptions(n,{encode:validators.function,serialize:validators.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&utils$1.merge(i.common,i[t.method]);i&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=AxiosHeaders.concat(o,i);var s=[];var a=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}a=a&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var l;var c=0;var f;if(!a){var d=[dispatchRequest.bind(this),undefined];d.unshift.apply(d,s);d.push.apply(d,u);f=d.length;l=Promise.resolve(t);while(c<f){l=l.then(d[c++],d[c++])}return l}f=s.length;var p=t;c=0;while(c<f){var h=s[c++];var E=s[c++];try{p=h(p)}catch(e){E.call(this,e);break}}try{l=dispatchRequest.call(this,p)}catch(e){return Promise.reject(e)}c=0;f=u.length;while(c<f){l=l.then(u[c++],u[c++])}return l};e.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)};return e}();utils$1.forEach(["delete","get","head","options"],(function e(t){Axios.prototype[t]=function(e,r){return this.request(mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}}));utils$1.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(mergeConfig(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[t]=r();Axios.prototype[t+"Form"]=r(true)}));var CancelToken=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new CanceledError(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function spread(e){return function t(r){return e.apply(null,r)}}function isAxiosError(e){return utils$1.isObject(e)&&e.isAxiosError===true}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((function(e){var t=e[0],r=e[1];HttpStatusCode[r]=t}));function createInstance(e){var t=new Axios(e);var r=bind(Axios.prototype.request,t);utils$1.extend(r,Axios.prototype,t,{allOwnKeys:true});utils$1.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return createInstance(mergeConfig(e,r))};return r}var axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=function(e){return formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e)};axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var naiveFallback=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var globalThis_1=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return naiveFallback()}try{if(!__global__)return naiveFallback();return __global__}finally{delete Object.prototype.__global__}}();var ENDPOINT_KEY=Symbol.for("verdocs-default-endpoint");var requestLogger=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var VerdocsEndpoint=function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.baseURLv2="https://api-v2.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.baseURLv2=(e===null||e===void 0?void 0:e.baseURLv2)||"https://api-v2.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=axios.create({baseURL:this.baseURL,timeout:this.timeout});axiosRetry(this.api,{retries:0,retryDelay:axiosRetry.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){globalThis_1[ENDPOINT_KEY]=this};e.getDefault=function(){if(!globalThis_1[ENDPOINT_KEY]){globalThis_1[ENDPOINT_KEY]=new e;window.console.debug("[JS_SDK] Created default endpoint",globalThis_1[ENDPOINT_KEY])}return globalThis_1[ENDPOINT_KEY]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getBaseURLv2=function(){return this.baseURLv2};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setBaseURLv2=function(e){this.baseURLv2=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(requestLogger)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=decodeAccessTokenBody(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=t;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}();export{TemplateSenderTypes as T,VerdocsEndpoint as V,TemplateActions as a,createTemplatev2 as b,canPerformTemplateAction as c,deleteTemplate as d,getTemplates as e,getTemplate as g,listTemplates as l,updateTemplate as u};
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function c(e){try{a(r["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):i(e.value).then(s,c)}a((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(t){return a([e,t])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h}from"./index-172625c5.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint,e as getTemplates}from"./VerdocsEndpoint-a18c0968.js";var __awaiter=undefined&&undefined.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function c(e){try{a(r["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):i(e.value).then(s,c)}a((r=r.apply(e,t||[])).next())}))};var __generator=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(t){return a([e,t])}}function a(c){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(n=0)),n)try{if(r=1,i&&(o=c[0]&2?i["return"]:c[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;if(i=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:n.label++;return{value:c[1],done:false};case 5:n.label++;i=c[1];c=[0];continue;case 7:c=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1];o=c;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(c);break}if(o[2])n.ops.pop();n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e];i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var getSearchHistory=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))}))};var verdocsQuickFunctionsCss='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var DocumentIcon$1='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate",7);this.createDocument=createEvent(this,"createDocument",7);this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{class:"container"},h("p",{class:"title"},"Quick Create"),h("button",{onClick:function(){return e.handleCreateTemplate()},innerHTML:TemplateIcon},"Template"),h("button",{onClick:function(){return e.handleCreateDocument()},innerHTML:DocumentIcon$1},"Document"))};return e}();VerdocsQuickFunctions.style=verdocsQuickFunctionsCss;var verdocsSearchActivityCss='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var VerdocsSearchActivity=function(){function e(e){registerInstance(this,e);this.entrySelected=createEvent(this,"entrySelected",7);this.endpoint=VerdocsEndpoint.getDefault();this.type="recent";this.options=undefined;this.emptyMessage="You do not have any starred searches.";this.authFailure=false;this.title="Recent Searches";this.recent=[];this.saved=[];this.starred=[]}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();var t=function(t){var n;console.warn("[Verdocs/search-activity] Error getting search data",t);if(((n=t===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.status)===401){e.authFailure=true}};switch(this.type){case"recent":this.title="Recent Searches";this.emptyMessage="You do not have any recent searches.";getSearchHistory(this.endpoint).then((function(t){return e.recent=t.recent})).catch(t);break;case"saved":this.title="Saved Searches";this.emptyMessage="You do not have any saved searches.";getSearchHistory(this.endpoint).then((function(t){return e.saved=t.saved})).catch(t);break;case"starred":this.title="My Starred items";this.emptyMessage="You do not have any starred templates.";getTemplates(this.endpoint,{is_starred:true}).then((function(t){return e.starred=t})).catch(t);break}};e.prototype.handleSelectEntry=function(e){this.entrySelected.emit(e)};e.prototype.computePagesText=function(e){if(e<2){return"".concat(e," Page")}else{return"".concat(e," Pages")}};e.prototype.computeRecipientsText=function(e){if(typeof e==="object"){return e.join(", ")}else if(e>1){return"".concat(e," Recipients")}else{return"".concat(e," Recipient")}};e.prototype.render=function(){var e=this;var t=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return h("div",{class:"container"},h("p",{class:"title"},this.title),h("div",{class:"items"},this.recent.map((function(t){return h("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},h("div",{class:"icon",innerHTML:DocumentIcon}),h("div",{class:"details"},h("div",{class:"item-title"},t.params.q),h("div",{class:"info"},"Test")))})),this.saved.map((function(t){return h("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},h("div",{class:"icon",innerHTML:DocumentIcon}),h("div",{class:"details"},h("div",{class:"item-title"},t.params.q),h("div",{class:"info"})))})),t&&h("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))};return e}();VerdocsSearchActivity.style=verdocsSearchActivityCss;var verdocsSearchBoxCss='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';var SearchIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>';var CloseIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>';var VerdocsSearchBox=function(){function e(e){registerInstance(this,e);this.searchClicked=createEvent(this,"searchClicked",7);this.typeChanged=createEvent(this,"typeChanged",7);this.queryChanged=createEvent(this,"queryChanged",7);this.endpoint=VerdocsEndpoint.getDefault();this.placeholder="Search envelopes, templates, organizations...";this.type="all";this.query="";this.grabsFocus=false}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.componentDidRender=function(){if(this.grabsFocus){this.inputEl.focus()}};e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return h("form",{onSubmit:function(t){return e.handleSearch(t)}},this.type!==undefined&&this.type!=="all"&&h("span",{class:"type"},this.type,"s ",h("button",{class:"remove",innerHTML:CloseIcon,onClick:function(){return e.handleClearFilter()}})),h("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:function(t){return e.handleChange(t)},onKeyUp:function(t){return e.handleKeyUp(t)},ref:function(t){return e.inputEl=t}}),h("button",{onClick:function(t){return e.handleSearch(t)},class:"search"},h("span",{innerHTML:SearchIcon}),"Search"))};return e}();VerdocsSearchBox.style=verdocsSearchBoxCss;export{VerdocsQuickFunctions as verdocs_quick_functions,VerdocsSearchActivity as verdocs_search_activity,VerdocsSearchBox as verdocs_search_box};
@@ -1,33 +0,0 @@
1
- import { ITemplate } from '@verdocs/js-sdk/Templates/Types';
2
- import { IRecentSearch, ISavedSearch } from '@verdocs/js-sdk/Search/Types';
3
- import { EventEmitter } from '../../../stencil-public-runtime';
4
- import { VerdocsEndpoint } from '@verdocs/js-sdk';
5
- /**
6
- * Display a list of starred items.
7
- *
8
- * Authentication is required to demonstrate this Element. You may do this in Storybook by using the Auth
9
- * embed. This Element will reuse the same session produced by logging in via that Embed.
10
- */
11
- export declare class VerdocsSearchActivity {
12
- /**
13
- * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
14
- */
15
- endpoint: VerdocsEndpoint;
16
- type: 'recent' | 'saved' | 'starred';
17
- options: any;
18
- /**
19
- * Event fired when an entry is clicked.
20
- */
21
- entrySelected: EventEmitter<IRecentSearch>;
22
- emptyMessage: string;
23
- authFailure: boolean;
24
- title: string;
25
- recent: IRecentSearch[];
26
- saved: ISavedSearch[];
27
- starred: ITemplate[];
28
- componentWillLoad(): void;
29
- handleSelectEntry(entry: any): void;
30
- computePagesText(pages: any): string;
31
- computeRecipientsText(recipients: any): any;
32
- render(): any;
33
- }