@verdocs/web-sdk 5.0.67 → 5.0.68

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 (135) hide show
  1. package/dist/cjs/verdocs-contact-picker.verdocs-multiselect.entry.cjs.js.map +1 -1
  2. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +13 -8
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-organization-card.verdocs-portal.entry.cjs.js.map +1 -1
  5. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +5 -1
  6. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/verdocs-templates-list.cjs.entry.js +7 -7
  8. package/dist/cjs/verdocs-templates-list.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-templates-list.entry.cjs.js.map +1 -1
  10. package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.css +23 -0
  11. package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.js +1 -1
  12. package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.js.map +1 -1
  13. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +5 -1
  14. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js.map +1 -1
  15. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +11 -6
  16. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  17. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +17 -10
  18. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js.map +1 -1
  19. package/dist/components/{p-ChSdhofj.js → p-B8oLX6-0.js} +3 -3
  20. package/dist/components/{p-ChSdhofj.js.map → p-B8oLX6-0.js.map} +1 -1
  21. package/dist/components/{p-FMmdRAwT.js → p-BC9E1lIr.js} +14 -14
  22. package/dist/components/{p-FMmdRAwT.js.map → p-BC9E1lIr.js.map} +1 -1
  23. package/dist/components/{p-DcGAyXll.js → p-BPaxQrtW.js} +7 -3
  24. package/dist/components/p-BPaxQrtW.js.map +1 -0
  25. package/dist/components/{p-BF25av2F.js → p-BSopvRgr.js} +3 -3
  26. package/dist/components/{p-BF25av2F.js.map → p-BSopvRgr.js.map} +1 -1
  27. package/dist/components/{p-D-eXKBQK.js → p-BVwBJvZX.js} +3 -3
  28. package/dist/components/{p-D-eXKBQK.js.map → p-BVwBJvZX.js.map} +1 -1
  29. package/dist/components/{p-a2mcI8jM.js → p-BXnjauAt.js} +3 -3
  30. package/dist/components/{p-a2mcI8jM.js.map → p-BXnjauAt.js.map} +1 -1
  31. package/dist/components/{p-C_Iua_8I.js → p-Bd_tIPj6.js} +3 -3
  32. package/dist/components/{p-C_Iua_8I.js.map → p-Bd_tIPj6.js.map} +1 -1
  33. package/dist/components/{p-BiJg4trF.js → p-Blv4Px1q.js} +3 -3
  34. package/dist/components/{p-BiJg4trF.js.map → p-Blv4Px1q.js.map} +1 -1
  35. package/dist/components/{p-BK1G2TCe.js → p-BqQxZHHz.js} +3 -3
  36. package/dist/components/{p-BK1G2TCe.js.map → p-BqQxZHHz.js.map} +1 -1
  37. package/dist/components/{p-BERtpjuC.js → p-C-l2dmJo.js} +3 -3
  38. package/dist/components/{p-BERtpjuC.js.map → p-C-l2dmJo.js.map} +1 -1
  39. package/dist/components/{p-MZFye18Y.js → p-Ch6Kdfra.js} +3 -3
  40. package/dist/components/{p-MZFye18Y.js.map → p-Ch6Kdfra.js.map} +1 -1
  41. package/dist/components/{p-DL0ugSd9.js → p-CkX7jHYc.js} +14 -14
  42. package/dist/components/{p-DL0ugSd9.js.map → p-CkX7jHYc.js.map} +1 -1
  43. package/dist/components/{p-D6z0a96H.js → p-CsnQa5sQ.js} +4 -4
  44. package/dist/components/{p-D6z0a96H.js.map → p-CsnQa5sQ.js.map} +1 -1
  45. package/dist/components/{p-BXN75-nb.js → p-DC--nyvW.js} +5 -5
  46. package/dist/components/{p-BXN75-nb.js.map → p-DC--nyvW.js.map} +1 -1
  47. package/dist/components/{p-mxrRjSEM.js → p-DhrRkOUi.js} +3 -3
  48. package/dist/components/{p-mxrRjSEM.js.map → p-DhrRkOUi.js.map} +1 -1
  49. package/dist/components/{p-BRr3-bHO.js → p-DpbDLSke.js} +6 -12
  50. package/dist/components/p-DpbDLSke.js.map +1 -0
  51. package/dist/components/{p-Oos-rvdo.js → p-cJMs8iXW.js} +15 -10
  52. package/dist/components/p-cJMs8iXW.js.map +1 -0
  53. package/dist/components/{p-C7Cguo-b.js → p-eXVwQFzY.js} +3 -3
  54. package/dist/components/{p-C7Cguo-b.js.map → p-eXVwQFzY.js.map} +1 -1
  55. package/dist/components/{p-D3eafwac.js → p-r_GHGV6q.js} +13 -13
  56. package/dist/components/{p-D3eafwac.js.map → p-r_GHGV6q.js.map} +1 -1
  57. package/dist/components/verdocs-build.js +17 -17
  58. package/dist/components/verdocs-contact-picker.js +1 -1
  59. package/dist/components/verdocs-dropdown.js +1 -1
  60. package/dist/components/verdocs-envelope-sidebar.js +2 -2
  61. package/dist/components/verdocs-envelopes-list.js +2 -2
  62. package/dist/components/verdocs-field-attachment.js +1 -1
  63. package/dist/components/verdocs-field-checkbox.js +1 -1
  64. package/dist/components/verdocs-field-date.js +1 -1
  65. package/dist/components/verdocs-field-dropdown.js +1 -1
  66. package/dist/components/verdocs-field-initial.js +1 -1
  67. package/dist/components/verdocs-field-payment.js +1 -1
  68. package/dist/components/verdocs-field-radio.js +1 -1
  69. package/dist/components/verdocs-field-signature.js +1 -1
  70. package/dist/components/verdocs-field-textarea.js +1 -1
  71. package/dist/components/verdocs-field-textbox.js +1 -1
  72. package/dist/components/verdocs-field-timestamp.js +1 -1
  73. package/dist/components/verdocs-multiselect.js +1 -1
  74. package/dist/components/verdocs-organization-card.js +1 -1
  75. package/dist/components/verdocs-portal.js +1 -1
  76. package/dist/components/verdocs-preview.js +1 -1
  77. package/dist/components/verdocs-send.js +1 -1
  78. package/dist/components/verdocs-sign.js +3 -3
  79. package/dist/components/verdocs-template-document-page.js +1 -1
  80. package/dist/components/verdocs-template-fields.js +1 -1
  81. package/dist/components/verdocs-templates-list.js +9 -9
  82. package/dist/components/verdocs-templates-list.js.map +1 -1
  83. package/dist/components/verdocs-view.js +1 -1
  84. package/dist/custom-elements.json +1 -1
  85. package/dist/esm/verdocs-contact-picker.verdocs-multiselect.entry.js.map +1 -1
  86. package/dist/esm/verdocs-contact-picker_2.entry.js +13 -8
  87. package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
  88. package/dist/esm/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
  89. package/dist/esm/verdocs-organization-card_2.entry.js +5 -1
  90. package/dist/esm/verdocs-organization-card_2.entry.js.map +1 -1
  91. package/dist/esm/verdocs-templates-list.entry.js +7 -7
  92. package/dist/esm/verdocs-templates-list.entry.js.map +1 -1
  93. package/dist/esm-es5/verdocs-contact-picker.verdocs-multiselect.entry.js.map +1 -1
  94. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
  96. package/dist/esm-es5/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
  97. package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-organization-card_2.entry.js.map +1 -1
  99. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-templates-list.entry.js.map +1 -1
  101. package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +10 -3
  102. package/dist/types/components.d.ts +32 -4
  103. package/dist/verdocs-web-sdk/{p-15fdb9df.system.entry.js → p-22539b25.system.entry.js} +3 -3
  104. package/dist/verdocs-web-sdk/p-22539b25.system.entry.js.map +1 -0
  105. package/dist/verdocs-web-sdk/{p-80e61388.system.entry.js → p-289ad8d2.system.entry.js} +2 -2
  106. package/dist/verdocs-web-sdk/p-289ad8d2.system.entry.js.map +1 -0
  107. package/dist/verdocs-web-sdk/{p-4437b439.entry.js → p-5badc484.entry.js} +3 -3
  108. package/dist/verdocs-web-sdk/p-5badc484.entry.js.map +1 -0
  109. package/dist/verdocs-web-sdk/{p-e2985bcb.entry.js → p-720ceced.entry.js} +2 -2
  110. package/dist/verdocs-web-sdk/p-720ceced.entry.js.map +1 -0
  111. package/dist/verdocs-web-sdk/{p-6743a4ec.system.entry.js → p-795cb651.system.entry.js} +2 -2
  112. package/dist/verdocs-web-sdk/p-795cb651.system.entry.js.map +1 -0
  113. package/dist/verdocs-web-sdk/p-9b1b273c.entry.js +2 -0
  114. package/dist/verdocs-web-sdk/p-9b1b273c.entry.js.map +1 -0
  115. package/dist/verdocs-web-sdk/{p-C7nljRlm.system.js.map → p-BlaEjWtc.system.js.map} +1 -1
  116. package/dist/verdocs-web-sdk/p-CNuYIT4Z.system.js.map +1 -0
  117. package/dist/verdocs-web-sdk/p-CwXSduhy.system.js +1 -1
  118. package/dist/verdocs-web-sdk/p-D3kzqvo2.system.js.map +1 -0
  119. package/dist/verdocs-web-sdk/verdocs-contact-picker.verdocs-multiselect.entry.esm.js.map +1 -1
  120. package/dist/verdocs-web-sdk/verdocs-organization-card.verdocs-portal.entry.esm.js.map +1 -1
  121. package/dist/verdocs-web-sdk/verdocs-templates-list.entry.esm.js.map +1 -1
  122. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  123. package/package.json +1 -1
  124. package/dist/components/p-BRr3-bHO.js.map +0 -1
  125. package/dist/components/p-DcGAyXll.js.map +0 -1
  126. package/dist/components/p-Oos-rvdo.js.map +0 -1
  127. package/dist/verdocs-web-sdk/p-15fdb9df.system.entry.js.map +0 -1
  128. package/dist/verdocs-web-sdk/p-36e094d6.entry.js +0 -2
  129. package/dist/verdocs-web-sdk/p-36e094d6.entry.js.map +0 -1
  130. package/dist/verdocs-web-sdk/p-4437b439.entry.js.map +0 -1
  131. package/dist/verdocs-web-sdk/p-6743a4ec.system.entry.js.map +0 -1
  132. package/dist/verdocs-web-sdk/p-80e61388.system.entry.js.map +0 -1
  133. package/dist/verdocs-web-sdk/p-BIoNmybA.system.js.map +0 -1
  134. package/dist/verdocs-web-sdk/p-CMYmkzNA.system.js.map +0 -1
  135. package/dist/verdocs-web-sdk/p-e2985bcb.entry.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as s,H as n}from"./p-CF7i8guW.js";import{d as i}from"./p-dzBXqXlK.js";import{VerdocsEndpoint as l,getTemplates as a,deleteTemplate as d,integerSequence as c,canPerformTemplateAction as r}from"@verdocs/js-sdk";import{S as o}from"./p-C1sRVZWv.js";const h='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';const p=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>`;const v=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>`;const m=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>`;const x=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>`;const g=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>`;const b=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];const w=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];const k=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];const y=class{constructor(s){e(this,s);this.sdkError=t(this,"sdkError");this.viewTemplate=t(this,"viewTemplate");this.signNow=t(this,"signNow");this.submittedData=t(this,"submittedData");this.editTemplate=t(this,"editTemplate");this.templateDeleted=t(this,"templateDeleted");this.changeSort=t(this,"changeSort");this.changeVisibility=t(this,"changeVisibility");this.changeStarred=t(this,"changeStarred");this.changeName=t(this,"changeName");this.endpoint=l.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=(e,t)=>{var s,n,i,l;if(e==="send"){(s=this.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,template:t})}else if(e==="signnow"){(n=this.signNow)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:t})}else if(e==="submitted"){(i=this.submittedData)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:t})}else if(e==="edit"){(l=this.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:this.endpoint,template:t})}else if(e==="delete"){this.confirmDelete=t}}}handleSharingUpdated(){return this.queryTemplates()}handleStarredUpdated(){return this.queryTemplates()}handleSortUpdated(){return this.queryTemplates()}handleNameUpdated(){return this.queryTemplates()}handlePageUpdated(){return this.queryTemplates()}componentWillLoad(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}}async componentDidLoad(){await this.queryTemplates();this.initiallyLoaded=true}async queryTemplates(){var e,t,s;console.log("[TEMPLATES] Querying templates");this.loading=true;try{let e={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){e.q=this.name.trim()}const t=await a(this.endpoint,e);this.templates=t.templates;this.count=t.count;this.loading=false}catch(n){this.loading=false;console.log("[TEMPLATES] Error listing templates",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new o(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(s=n.response)===null||s===void 0?void 0:s.data))}}deleteTemplate(e){this.confirmDelete=null;d(this.endpoint,e.id).then((()=>{var t;console.log("[TEMPLATES] Deleted template",e);(t=this.templateDeleted)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:e});return this.queryTemplates()})).catch((t=>{var s,n,i;console.log("[TEMPLATES] Error deleting template",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new o(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(i=t.response)===null||i===void 0?void 0:i.data))}))}render(){const e=!this.localNameFilter?this.templates:this.templates.filter((e=>e.name.toLowerCase().includes(this.localNameFilter.toLowerCase())));return s(n,{key:"e7e90b641fbea53569365333de5671fe8056ad00"},s("div",{key:"800eaf67dd2c153ec9730952ecf86c2c883f3a59",class:"header"},s("div",{key:"0566a72ae5b65cae1d3d1ab9ee1f92193b28c7b7",class:"filter"},s("verdocs-text-input",{key:"18339e5f5219d4a874863483a5519313d62e5f39",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:e=>this.localNameFilter=e.target.value.trim(),onFocusout:e=>{var t;this.name=e.target.value.trim();this.localNameFilter=e.target.value.trim();(t=this.changeName)===null||t===void 0?void 0:t.emit(this.name)}})),s("verdocs-quick-filter",{key:"eb436954742039fe8e238e3f9e29323b284499fe",label:"Visibility",value:this.visibility,options:b,onOptionSelected:e=>{var t;this.visibility=e.detail.value;(t=this.changeVisibility)===null||t===void 0?void 0:t.emit(this.visibility)}}),s("verdocs-quick-filter",{key:"9a384e6a64b56c25ede399db0cfe691651712f08",label:"Starred",value:this.starred,options:w,onOptionSelected:e=>{var t;this.starred=e.detail.value;(t=this.changeStarred)===null||t===void 0?void 0:t.emit(this.starred)}}),s("verdocs-quick-filter",{key:"12b8d9bcbf43f10b98d19b429adeb2bb1fb9fa2d",label:"Sort By",value:this.sort,options:k,onOptionSelected:e=>{var t;this.sort=e.detail.value;(t=this.changeSort)===null||t===void 0?void 0:t.emit(this.sort)}}),this.loading&&s("verdocs-spinner",{key:"1c2a66d3549ee80decf1d523c9dece2416146a0b",mode:"dark",size:24}),s("div",{key:"6ecb8f54e7bb8a1b8e71497cfd78a5a8487466c5",style:{display:"flex",flex:"1"}})),e.map((e=>{const t=this.sort==="created_at"?"created_at":this.sort==="updated_at"?"updated_at":"last_used_at";const n=e[t];const l=[];const a=[];if(this.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!r(this.endpoint.profile,"read",e)})}if(this.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(this.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!r(this.endpoint.profile,"read",e)})}if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:""});if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes("write")})}if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes("delete")})}}return s("div",{class:"template",onClick:()=>{var t;(t=this.viewTemplate)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:e})}},s("div",{class:"inner"},s("verdocs-template-star",{template:e,endpoint:this.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},e.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:u,title:"Usage Counter"}),e.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},t==="created_at"&&s("span",{innerHTML:f,title:"Created"}),t==="updated_at"&&s("span",{innerHTML:g,title:"Last Updated"}),t==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),n?i.format(new Date(n),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),e.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:p})," Public"),!e.is_public&&!e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!e.is_public&&e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:t=>this.handleOptionSelected(t.detail.id,e)})))})),!this.initiallyLoaded&&s("div",{key:"9c248da7e6a766b6d4ca75c5a6728f609540ff43"},c(0,this.rowsPerPage).map((()=>s("div",{class:"template-placeholder"})))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"978cb7ba0c6ee2307781fa1a93311fded6c03cf7",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:e=>{this.selectedPage=e.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"737d3a3e1211a1a7da04bea7a1c5ba8cce43cd4b",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:()=>this.deleteTemplate(this.confirmDelete),onExit:()=>this.confirmDelete=null,showCancel:true}))}static get watchers(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}}};y.style=h;export{y as verdocs_templates_list};
2
- //# sourceMappingURL=p-e2985bcb.entry.js.map
1
+ import{r as e,c as t,h as s,H as n}from"./p-CF7i8guW.js";import{d as i}from"./p-dzBXqXlK.js";import{VerdocsEndpoint as l,getTemplates as a,deleteTemplate as d,integerSequence as c,canPerformTemplateAction as r}from"@verdocs/js-sdk";import{S as o}from"./p-C1sRVZWv.js";const h='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';const p=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>`;const v=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>`;const m=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>`;const x=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>`;const g=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>`;const b=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];const w=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];const k=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];const y=class{constructor(s){e(this,s);this.sdkError=t(this,"sdkError");this.viewTemplate=t(this,"viewTemplate");this.signNow=t(this,"signNow");this.submittedData=t(this,"submittedData");this.editTemplate=t(this,"editTemplate");this.templateDeleted=t(this,"templateDeleted");this.changeSort=t(this,"changeSort");this.changeVisibility=t(this,"changeVisibility");this.changeStarred=t(this,"changeStarred");this.changeName=t(this,"changeName");this.endpoint=l.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=(e,t)=>{var s,n,i,l;if(e==="send"){(s=this.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,template:t})}else if(e==="signnow"){(n=this.signNow)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:t})}else if(e==="submitted"){(i=this.submittedData)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:t})}else if(e==="edit"){(l=this.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:this.endpoint,template:t})}else if(e==="delete"){this.confirmDelete=t}}}handleSharingUpdated(){return this.queryTemplates()}handleStarredUpdated(){return this.queryTemplates()}handleSortUpdated(){return this.queryTemplates()}handleNameUpdated(){return this.queryTemplates()}handlePageUpdated(){return this.queryTemplates()}componentWillLoad(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}}async componentDidLoad(){await this.queryTemplates();this.initiallyLoaded=true}async queryTemplates(){var e,t,s;console.log("[TEMPLATES] Querying templates");this.loading=true;try{let e={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){e.q=this.name.trim()}const t=await a(this.endpoint,e);this.templates=t.templates;this.count=t.count;this.loading=false}catch(n){this.loading=false;console.log("[TEMPLATES] Error listing templates",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new o(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(s=n.response)===null||s===void 0?void 0:s.data))}}deleteTemplate(e){this.confirmDelete=null;d(this.endpoint,e.id).then((()=>{var t;console.log("[TEMPLATES] Deleted template",e);(t=this.templateDeleted)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:e});return this.queryTemplates()})).catch((t=>{var s,n,i;console.log("[TEMPLATES] Error deleting template",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new o(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(i=t.response)===null||i===void 0?void 0:i.data))}))}render(){const e=!this.localNameFilter?this.templates:this.templates.filter((e=>e.name.toLowerCase().includes(this.localNameFilter.toLowerCase())));return s(n,{key:"09f26fe2ca274c54c4a445b6fbd2b5b0e0b4e587"},s("div",{key:"419453dcda9b282dbb221e21c59c3b9ab805ccb3",class:"header"},s("div",{key:"0874a0b65a716901f2a974c6d9a687f94598bb7f",class:"filter"},s("verdocs-text-input",{key:"3f333fd5a1c0b450af04d8ea48922ced96f23e2b",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:e=>this.localNameFilter=e.target.value.trim(),onFocusout:e=>{var t;this.name=e.target.value.trim();this.localNameFilter=e.target.value.trim();(t=this.changeName)===null||t===void 0?void 0:t.emit(this.name)}})),s("verdocs-quick-filter",{key:"89ef45476a685f220aa9511556b7f60ad8ff5cf3",label:"Visibility",value:this.visibility,options:b,onOptionSelected:e=>{var t;this.visibility=e.detail.value;(t=this.changeVisibility)===null||t===void 0?void 0:t.emit(this.visibility)}}),s("verdocs-quick-filter",{key:"434e0caca9b04f840b841359b7ef94856676f957",label:"Starred",value:this.starred,options:w,onOptionSelected:e=>{var t;this.starred=e.detail.value;(t=this.changeStarred)===null||t===void 0?void 0:t.emit(this.starred)}}),s("verdocs-quick-filter",{key:"34b7ad87857dd9de3bfab997239c7e616716c8c0",label:"Sort By",value:this.sort,options:k,onOptionSelected:e=>{var t;this.sort=e.detail.value;(t=this.changeSort)===null||t===void 0?void 0:t.emit(this.sort)}}),this.loading&&s("verdocs-spinner",{key:"5d237a87ce4be276951b27e18c9597ee551f7ce3",mode:"dark",size:24}),s("div",{key:"91b04bd0fb46e2b9d712f3fdf9d162ed77f8af63",style:{display:"flex",flex:"1"}})),e.map((e=>{const t=this.sort==="created_at"?"created_at":this.sort==="updated_at"?"updated_at":"last_used_at";const n=e[t];const l=[];const a=[];if(this.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!r(this.endpoint.profile,"read",e)})}if(this.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(this.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!r(this.endpoint.profile,"read",e)})}if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:""});if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes("write")})}if(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes("delete")})}}return s("div",{class:"template",onClick:()=>{var t;(t=this.viewTemplate)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:e})}},s("div",{class:"inner"},s("verdocs-template-star",{template:e,endpoint:this.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},e.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:f,title:"Usage Counter"}),e.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},t==="created_at"&&s("span",{innerHTML:u,title:"Created"}),t==="updated_at"&&s("span",{innerHTML:g,title:"Last Updated"}),t==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),n?i.format(new Date(n),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),e.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:p})," Public"),!e.is_public&&!e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!e.is_public&&e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:t=>this.handleOptionSelected(t.detail.id,e)})))})),!this.initiallyLoaded&&s("div",{key:"02c8a2c032d7d5d9367640dc8af9207cac1191d3"},c(0,this.rowsPerPage).map((()=>s("div",{class:"template-placeholder"})))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"0fa668155a34667926145cce15f06ff8b9174049",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:e=>{this.selectedPage=e.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"2d5c0920ed5a25c1cee436ef49eed765b7f1c787",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:()=>this.deleteTemplate(this.confirmDelete),onExit:()=>this.confirmDelete=null,showCancel:true}))}static get watchers(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}}};y.style=h;export{y as verdocs_templates_list};
2
+ //# sourceMappingURL=p-720ceced.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsTemplatesListCss","GlobeAltIcon","LockClosedIcon","BuildingOfficeIcon","EnvelopeIcon","CreatedIcon","LastUsedIcon","UpdatedIcon","VisibilityFilters","value","label","StarredFilters","SortOptions","VerdocsTemplatesList","constructor","hostRef","this","endpoint","VerdocsEndpoint","getDefault","visibility","starred","sort","name","allowedActions","showPagination","rowsPerPage","selectedPage","count","initiallyLoaded","loading","confirmDelete","templates","localNameFilter","handleOptionSelected","option","template","_a","viewTemplate","emit","_b","signNow","_c","submittedData","_d","editTemplate","handleSharingUpdated","queryTemplates","handleStarredUpdated","handleSortUpdated","handleNameUpdated","handlePageUpdated","componentWillLoad","loadSession","session","console","log","componentDidLoad","queryParams","page","rows","trim","q","response","getTemplates","e","sdkError","SDKError","message","status","data","deleteTemplate","id","then","templateDeleted","catch","render","locallyFilteredTemplates","filter","t","toLowerCase","includes","h","Host","key","class","clearable","autocomplete","placeholder","onInput","target","onFocusout","changeName","options","onOptionSelected","detail","changeVisibility","changeStarred","changeSort","mode","size","style","display","flex","map","dateToShow","date","MENU_OPTIONS","allowed_operations","push","disabled","canPerformTemplateAction","profile","onClick","innerHTML","title","counter","format","Date","is_public","is_personal","integerSequence","length","marginTop","perPage","itemCount","onSelectPage","heading","onNext","onExit","showCancel"],"sources":["src/components/templates/verdocs-templates-list/verdocs-templates-list.scss?tag=verdocs-templates-list","src/components/templates/verdocs-templates-list/verdocs-templates-list.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-templates-list {\n display: flex;\n padding: 10px;\n font-size: 18px;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: $label-color;\n flex-direction: column;\n font-family: $primary-font;\n\n .header {\n width: 100%;\n row-gap: 4px;\n display: flex;\n flex-wrap: wrap;\n column-gap: 12px;\n margin: 0 0 10px 0;\n align-items: center;\n flex-direction: row;\n\n .filter {\n width: 150px;\n }\n\n verdocs-text-input {\n margin: 0;\n\n input {\n height: 32px;\n }\n }\n }\n\n .filter {\n align-items: center;\n }\n\n .template-placeholder {\n height: 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: $verdocs-grey-3;\n }\n\n .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: $verdocs-grey-4;\n\n &:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n }\n\n .inner {\n gap: 12px;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n flex-direction: row;\n align-items: center;\n container-type: inline-size;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n }\n\n .name {\n flex: 1;\n display: flex;\n color: black;\n font-size: 16px;\n //margin-left: 10px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media screen and (max-width: 1300px) {\n font-size: 16px;\n }\n\n @media screen and (max-width: 700px) {\n //flex: 0;\n }\n }\n\n .spacer {\n margin: 0;\n height: 30px;\n flex: 0 0 1px;\n display: flex;\n border-right: 1px solid #dad8dd;\n\n @media screen and (max-width: 800px) {\n display: none;\n }\n }\n\n .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n }\n\n .usage,\n .ownership,\n .last-used {\n gap: 10px;\n color: #444;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n align-items: center;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n span,\n svg {\n width: 24px;\n height: 24px;\n }\n\n span {\n display: block;\n }\n }\n\n verdocs-template-star {\n @media screen and (max-width: 700px) {\n display: none;\n }\n }\n\n .ownership {\n flex: 0 0 100px;\n\n @media screen and (max-width: 700px) {\n display: none;\n }\n }\n\n .last-used {\n flex: 0 0 130px;\n }\n\n .usage {\n flex: 0 0 60px;\n }\n\n .header-row {\n display: none;\n }\n\n table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n }\n\n .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n }\n\n .data-col {\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n verdocs-templates-list {\n @container (max-width:700 px) {\n .col-starred {\n display: none;\n }\n }\n }\n}\n","import {format} from 'date-fns';\nimport {deleteTemplate, getTemplates, TTemplateAction, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {integerSequence, ITemplate, IGetTemplatesParams, canPerformTemplateAction} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core';\nimport {IFilterOption} from '../../controls/verdocs-quick-filter/verdocs-quick-filter';\nimport {IMenuOption} from '../../controls/verdocs-dropdown/verdocs-dropdown';\nimport {SDKError} from '../../../utils/errors';\n\nconst GlobeAltIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418\" /></svg>`;\nconst LockClosedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z\" /></svg>`;\nconst BuildingOfficeIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21\" /></svg>`;\nconst EnvelopeIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75\" /></svg>`;\nconst CreatedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 122.88 122.88\"><g><path d=\"M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z\"/></g></svg>`;\nconst LastUsedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 410.2\"><path d=\"M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z\"/></svg>`;\nconst UpdatedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 506.49\"><path fill-rule=\"nonzero\" d=\"m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z\"/></svg>`;\n\nconst VisibilityFilters: IFilterOption[] = [\n {value: 'private_shared', label: 'Personal + Shared'},\n {value: 'private', label: 'Personal'},\n {value: 'shared', label: 'Shared'},\n {value: 'public', label: 'Public'},\n];\n\nconst StarredFilters: IFilterOption[] = [\n {value: 'all', label: 'All'},\n {value: 'starred', label: 'Starred'},\n {value: 'unstarred', label: 'Not Starred'},\n];\n\nconst SortOptions: IFilterOption[] = [\n {value: 'name', label: 'Name'},\n {value: 'created_at', label: 'Created'},\n {value: 'updated_at', label: 'Last Updated'},\n {value: 'last_used_at', label: 'Last Used'},\n {value: 'counter', label: 'Most Used'},\n {value: 'star_counter', label: 'Most Starred'},\n];\n\nexport type TAllowedTemplateAction = 'send' | 'createlink' | 'signnow' | 'submitted' | 'link' | 'edit' | 'delete';\n\n/**\n * Display a list of templates in the caller's account.\n *\n * ```ts\n * <verdocs-template-list\n * visibility=\"private\"\n * sort=\"updated_at\"\n * onViewTemplate={({ detail }) => console.log('View template:', detail) }\n * />\n * ```\n */@Component({\n tag: 'verdocs-templates-list',\n styleUrl: 'verdocs-templates-list.scss',\n})\nexport class VerdocsTemplatesList {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The sharing settings to filter by.\n */\n @Prop({reflect: true, mutable: true}) visibility?: 'private_shared' | 'private' | 'shared' | 'public' = 'private_shared';\n\n /**\n * The starred settings to filter by.\n */\n @Prop({reflect: true, mutable: true}) starred: 'all' | 'starred' | 'unstarred' = 'all';\n\n /**\n * The sort order to display.\n */\n @Prop({reflect: true, mutable: true}) sort: string = 'updated_at';\n\n /**\n * If set, filter templates by the specified name.\n */\n @Prop({reflect: true, mutable: true}) name: string = '';\n\n /**\n * Override the If set, filter templates by the specified name.\n */\n @Prop({reflect: true, mutable: true}) allowedActions: TAllowedTemplateAction[] = ['send', 'submitted', 'link', 'edit', 'delete'];\n // @Prop({reflect: true, mutable: true}) allowedActions: TAllowedTemplateAction[] = ['send', 'createlink', 'signnow', 'submitted', 'link', 'edit', 'delete'];\n\n /**\n * Whether or not pagination should be enabled.\n */\n @Prop() showPagination = true;\n\n /**\n * The number of rows to display per page.\n */\n @Prop() rowsPerPage = 10;\n\n /**\n * The initial page number to select. Pagination is internally controlled but may be overriden by the\n * host applicaiton.\n */\n @Prop() selectedPage = 0;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user clicks a template to view it. Typically the host application will use this to navigate\n * to the template preview. This is also fired when the user selects \"Preview/Send\" fropm the dropdown menu.\n */\n @Event({composed: true}) viewTemplate: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user clicks to sign a template now.\n */\n @Event({composed: true}) signNow: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user clicks to sign a template now.\n */\n @Event({composed: true}) submittedData: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user selects to create a preview link for a template.\n */\n // @Event({composed: true}) createLink: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user chooses the Edit option from the dropdown menu.\n */\n @Event({composed: true}) editTemplate: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user chooses the Delete option from the dropdown menu. When this is fired, the template\n * will already have been deleted. The host application should remove it from the list or refresh the list.\n */\n @Event({composed: true}) templateDeleted: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeSort: EventEmitter<string>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeVisibility: EventEmitter<'private_shared' | 'private' | 'shared' | 'public'>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeStarred: EventEmitter<'all' | 'starred' | 'unstarred'>;\n\n /**\n * Event fired when the user changes the name filter. This is fired for every inputChange event (every character\n * typed). This event is provided for balance with the other events, but host applications should generally not\n * save this value. Users might appreciate applications remembering their sorting or filtering preferences, but\n * probably not their search terms.\n */\n @Event({composed: true}) changeName: EventEmitter<string>;\n\n @State() count = 0;\n @State() initiallyLoaded = false;\n @State() loading = true;\n @State() confirmDelete: ITemplate | null = null;\n @State() templates: ITemplate[] = [];\n @State() localNameFilter = '';\n\n @Watch('sharing')\n handleSharingUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('starred')\n handleStarredUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('sort')\n handleSortUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('name')\n handleNameUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('selectedPage')\n handlePageUpdated() {\n return this.queryTemplates();\n }\n\n componentWillLoad() {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[TEMPLATES] Must be authenticated');\n return;\n }\n }\n\n async componentDidLoad() {\n await this.queryTemplates();\n this.initiallyLoaded = true;\n }\n\n async queryTemplates() {\n console.log('[TEMPLATES] Querying templates');\n this.loading = true;\n try {\n let queryParams: IGetTemplatesParams = {\n visibility: this.visibility,\n // starred: this.starred,\n page: this.selectedPage,\n // sort: this.sort,\n rows: this.rowsPerPage,\n // ascending: this.sort === 'name' || this.sort === 'star_counter',\n };\n\n if (this.name.trim() !== '') {\n queryParams.q = this.name.trim();\n }\n\n const response = await getTemplates(this.endpoint, queryParams);\n this.templates = response.templates;\n this.count = response.count;\n this.loading = false;\n } catch (e) {\n this.loading = false;\n console.log('[TEMPLATES] Error listing templates', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleOptionSelected = (option: string, template: ITemplate) => {\n if (option === 'send') {\n this.viewTemplate?.emit({endpoint: this.endpoint, template: template});\n // } else if (option === 'createlink') {\n // VerdocsToast('This feature is coming soon!');\n } else if (option === 'signnow') {\n this.signNow?.emit({endpoint: this.endpoint, template: template});\n } else if (option === 'submitted') {\n this.submittedData?.emit({endpoint: this.endpoint, template: template});\n // } else if (option === 'link') {\n // VerdocsToast('This feature is coming soon!');\n } else if (option === 'edit') {\n this.editTemplate?.emit({endpoint: this.endpoint, template: template});\n } else if (option === 'delete') {\n this.confirmDelete = template;\n }\n };\n\n deleteTemplate(template: ITemplate) {\n this.confirmDelete = null;\n deleteTemplate(this.endpoint, template.id)\n .then(() => {\n console.log('[TEMPLATES] Deleted template', template);\n this.templateDeleted?.emit({endpoint: this.endpoint, template: template});\n return this.queryTemplates();\n })\n .catch(e => {\n console.log('[TEMPLATES] Error deleting template', template);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n render() {\n // In addition to the server query we also filter locally. This provides a faster UI update\n // while the onBlur re-queries the server for any new records that now qualify by the filter.\n const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));\n\n return (\n <Host>\n <div class=\"header\">\n <div class=\"filter\">\n <verdocs-text-input\n id=\"verdocs-filter-name\"\n value={this.name}\n clearable={true}\n autocomplete=\"off\"\n placeholder=\"Filter by Name...\"\n onInput={(e: any) => (this.localNameFilter = e.target.value.trim())}\n onFocusout={(e: any) => {\n this.name = e.target.value.trim();\n this.localNameFilter = e.target.value.trim();\n this.changeName?.emit(this.name);\n }}\n />\n </div>\n\n <verdocs-quick-filter\n label=\"Visibility\"\n value={this.visibility}\n options={VisibilityFilters}\n onOptionSelected={e => {\n this.visibility = e.detail.value as any;\n this.changeVisibility?.emit(this.visibility);\n }}\n />\n\n <verdocs-quick-filter\n label=\"Starred\"\n value={this.starred}\n options={StarredFilters}\n onOptionSelected={e => {\n this.starred = e.detail.value as any;\n this.changeStarred?.emit(this.starred);\n }}\n />\n\n <verdocs-quick-filter\n label=\"Sort By\"\n value={this.sort}\n options={SortOptions}\n onOptionSelected={e => {\n this.sort = e.detail.value as any;\n this.changeSort?.emit(this.sort);\n }}\n />\n {this.loading && <verdocs-spinner mode=\"dark\" size={24} />}\n <div style={{display: 'flex', flex: '1'}} />\n </div>\n\n {/*<verdocs-table*/}\n {/* data={locallyFilteredTemplates}*/}\n {/* onRowClick={(template: any) => this.viewTemplate?.emit({endpoint: this.endpoint, template: template as ITemplate})}*/}\n {/* columns={[*/}\n {/* {*/}\n {/* id: 'starred',*/}\n {/* renderCell: (_, row) => <verdocs-template-star template={row} endpoint={this.endpoint} />,*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'name',*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'usage',*/}\n {/* renderCell: (_, row) => (*/}\n {/* <div>*/}\n {/* <span innerHTML={EnvelopeIcon} title=\"Usage Counter\" />*/}\n {/* {row.counter || '--'}*/}\n {/* </div>*/}\n {/* ),*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'created_at',*/}\n {/* renderCell: (_, row) => {*/}\n {/* const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';*/}\n {/* const date = row[dateToShow];*/}\n\n {/* return (*/}\n {/* <div class=\"last-used\">*/}\n {/* {dateToShow === 'created_at' && <span innerHTML={CreatedIcon} title=\"Created\" />}*/}\n {/* {dateToShow === 'updated_at' && <span innerHTML={UpdatedIcon} title=\"Last Updated\" />}*/}\n {/* {dateToShow === 'last_used_at' && <span innerHTML={LastUsedIcon} title=\"Last Used\" />}*/}\n {/* {date ? format(new Date(date), 'P') : 'Never'}*/}\n {/* </div>*/}\n {/* );*/}\n {/* },*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'ownership',*/}\n {/* renderCell: (_, row) => (*/}\n {/* <div>*/}\n {/* {row.is_public && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={GlobeAltIcon} /> Public*/}\n {/* </div>*/}\n {/* )}*/}\n {/* {!row.is_public && !row.is_personal && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={LockClosedIcon} /> Private*/}\n {/* </div>*/}\n {/* )}*/}\n {/* {!row.is_public && row.is_personal && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={BuildingOfficeIcon} /> Shared*/}\n {/* </div>*/}\n {/* )}*/}\n {/* </div>*/}\n {/* ),*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'actions',*/}\n {/* renderCell: (_, row) => {*/}\n {/* const MENU_OPTIONS: IMenuOption[] = [];*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.READ) && this.allowedActions.includes('send')) {*/}\n {/* MENU_OPTIONS.push({label: 'Preview / Send', id: 'send', disabled: !row.allowed_operations.includes(TemplateActions.READ)});*/}\n {/* }*/}\n\n {/* // if (this.allowedActions.includes('createlink')) {*/}\n {/* // MENU_OPTIONS.push({label: 'Create Link', id: 'createlink', disabled: true});*/}\n {/* // }*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.CREATE_PERSONAL) && this.allowedActions.includes('signnow')) {*/}\n {/* MENU_OPTIONS.push({label: 'Sign Now', id: 'signnow', disabled: true});*/}\n {/* }*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.READ) && this.allowedActions.includes('submitted')) {*/}\n {/* MENU_OPTIONS.push({label: ''});*/}\n {/* MENU_OPTIONS.push({label: 'Submissions', id: 'submitted'});*/}\n {/* }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({label: ''});*/}\n\n {/* // TODO: The preview link used to be just an internal route in the main Web application, but*/}\n {/* // that's not suitable for embeddding. Disabling until this gets re-requested as a feature,*/}\n {/* // in which case we'll want to move this to an API-driven function.*/}\n {/* // if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* // MENU_OPTIONS.push({label: 'Get Preview Link', id: 'link', disabled: !this.canPreview(template)});*/}\n {/* // }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({label: 'Edit', id: 'edit', disabled: !row.allowed_operations.includes(TemplateActions.WRITE)});*/}\n {/* }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({*/}\n {/* label: 'Delete',*/}\n {/* id: 'delete',*/}\n {/* disabled: !row.allowed_operations.includes(TemplateActions.DELETE),*/}\n {/* });*/}\n {/* }*/}\n {/* }*/}\n\n {/* return <verdocs-dropdown options={MENU_OPTIONS} onOptionSelected={e => this.handleOptionSelected(e.detail.id, row)} />;*/}\n {/* },*/}\n {/* },*/}\n {/* ]}*/}\n {/*/>*/}\n\n {locallyFilteredTemplates.map(template => {\n const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';\n const date = template[dateToShow];\n\n const MENU_OPTIONS: IMenuOption[] = [];\n\n const allowed_operations: TTemplateAction[] = [];\n\n // serverless/src/functions/getTemplates.ts: allowed_operations: [] as string[],\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_personal', record) && record.allowed_operations.push('create_personal');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_org', record) && record.allowed_operations.push('create_org');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_public', record) && record.allowed_operations.push('create_public');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'read', record) && record.allowed_operations.push('read');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'write', record) && record.allowed_operations.push('write');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'delete', record) && record.allowed_operations.push('delete');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_personal', record) && record.allowed_operations.push('change_visibility_personal');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_org', record) && record.allowed_operations.push('change_visibility_org');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_public', record) && record.allowed_operations.push('change_visibility_public');\n\n if (this.allowedActions.includes('send')) {\n MENU_OPTIONS.push({label: 'Preview / Send', id: 'send', disabled: !canPerformTemplateAction(this.endpoint.profile, 'read', template)});\n }\n\n // if (this.allowedActions.includes('createlink')) {\n // MENU_OPTIONS.push({label: 'Create Link', id: 'createlink', disabled: true});\n // }\n\n if (this.allowedActions.includes('signnow')) {\n MENU_OPTIONS.push({label: 'Sign Now', id: 'signnow', disabled: true});\n }\n\n if (this.allowedActions.includes('submitted')) {\n MENU_OPTIONS.push({label: ''});\n MENU_OPTIONS.push({label: 'Submissions', id: 'submitted', disabled: !canPerformTemplateAction(this.endpoint.profile, 'read', template)});\n }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: ''});\n\n // TODO: The preview link used to be just an internal route in the main Web application, but\n // that's not suitable for embeddding. Disabling until this gets re-requested as a feature,\n // in which case we'll want to move this to an API-driven function.\n // if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n // MENU_OPTIONS.push({label: 'Get Preview Link', id: 'link', disabled: !this.canPreview(template)});\n // }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: 'Edit', id: 'edit', disabled: !allowed_operations.includes('write')});\n }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: 'Delete', id: 'delete', disabled: !allowed_operations.includes('delete')});\n }\n }\n\n return (\n <div\n class=\"template\"\n onClick={() => {\n this.viewTemplate?.emit({endpoint: this.endpoint, template});\n }}\n >\n <div class=\"inner\">\n <verdocs-template-star template={template} endpoint={this.endpoint} />\n\n <div class=\"spacer icon-spacer\" />\n <div class=\"name\">{template.name}</div>\n\n <div class=\"spacer usage-spacer\" />\n <div class=\"usage\">\n <span innerHTML={EnvelopeIcon} title=\"Usage Counter\" />\n {template.counter || '--'}\n </div>\n\n <div class=\"spacer last-used-spacer\" />\n <div class=\"last-used\">\n {dateToShow === 'created_at' && <span innerHTML={CreatedIcon} title=\"Created\" />}\n {dateToShow === 'updated_at' && <span innerHTML={UpdatedIcon} title=\"Last Updated\" />}\n {dateToShow === 'last_used_at' && <span innerHTML={LastUsedIcon} title=\"Last Used\" />}\n {date ? format(new Date(date), 'P') : 'Never'}\n </div>\n\n <div class=\"spacer ownership-spacer\" />\n {template.is_public && (\n <div class=\"ownership\">\n <span innerHTML={GlobeAltIcon} /> Public\n </div>\n )}\n {!template.is_public && !template.is_personal && (\n <div class=\"ownership\">\n <span innerHTML={LockClosedIcon} /> Private\n </div>\n )}\n {!template.is_public && template.is_personal && (\n <div class=\"ownership\">\n <span innerHTML={BuildingOfficeIcon} /> Shared\n </div>\n )}\n\n <verdocs-dropdown options={MENU_OPTIONS} onOptionSelected={e => this.handleOptionSelected(e.detail.id, template)} />\n </div>\n </div>\n );\n })}\n\n {!this.initiallyLoaded && (\n <div>\n {integerSequence(0, this.rowsPerPage).map(() => (\n <div class=\"template-placeholder\" />\n ))}\n </div>\n )}\n\n {this.initiallyLoaded && !this.templates.length && <div class=\"empty-text\">No matching templates found. Please adjust your filters and try again.</div>}\n\n {this.initiallyLoaded && this.templates.length && this.showPagination ? (\n <div style={{marginTop: '20px'}}>\n <verdocs-pagination\n selectedPage={this.selectedPage}\n perPage={this.rowsPerPage}\n itemCount={this.count}\n onSelectPage={e => {\n this.selectedPage = e.detail.selectedPage;\n }}\n />\n </div>\n ) : (\n <div />\n )}\n\n {this.confirmDelete && (\n <verdocs-ok-dialog\n heading=\"Delete this Template?\"\n message=\"This operation cannot be undone.\"\n onNext={() => this.deleteTemplate(this.confirmDelete)}\n onExit={() => (this.confirmDelete = null)}\n showCancel={true}\n />\n )}\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{c(s.next(e))}catch(e){a(e)}}function r(e){try{c(s["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(l,r)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return c([e,t])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,r[0]&&(n=0)),n)try{if(s=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;i=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];i=0}finally{s=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-gAi_FRvp.system.js","./p-DmF0GSqu.system.js","@verdocs/js-sdk","./p-7Iu0_GGa.system.js"],(function(e){"use strict";var t,n,s,i,a,l,r,c,o,d,p;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(e){a=e.d},function(e){l=e.VerdocsEndpoint;r=e.getTemplates;c=e.deleteTemplate;o=e.integerSequence;d=e.canPerformTemplateAction},function(e){p=e.S}],execute:function(){var h='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var b=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var y=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var k=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var z=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError");this.viewTemplate=n(this,"viewTemplate");this.signNow=n(this,"signNow");this.submittedData=n(this,"submittedData");this.editTemplate=n(this,"editTemplate");this.templateDeleted=n(this,"templateDeleted");this.changeSort=n(this,"changeSort");this.changeVisibility=n(this,"changeVisibility");this.changeStarred=n(this,"changeStarred");this.changeName=n(this,"changeName");this.endpoint=l.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=function(e,t){var n,i,a,l;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(a=s.submittedData)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(l=s.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}}}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,a;return __generator(this,(function(l){switch(l.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;l.label=1;case 1:l.trys.push([1,3,,4]);s={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,r(this.endpoint,s)];case 2:i=l.sent();this.templates=i.templates;this.count=i.count;this.loading=false;return[3,4];case 3:a=l.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;c(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,a;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(a=n.response)===null||a===void 0?void 0:a.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,{key:"e7e90b641fbea53569365333de5671fe8056ad00"},s("div",{key:"800eaf67dd2c153ec9730952ecf86c2c883f3a59",class:"header"},s("div",{key:"0566a72ae5b65cae1d3d1ab9ee1f92193b28c7b7",class:"filter"},s("verdocs-text-input",{key:"18339e5f5219d4a874863483a5519313d62e5f39",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{key:"eb436954742039fe8e238e3f9e29323b284499fe",label:"Visibility",value:this.visibility,options:b,onOptionSelected:function(t){var n;e.visibility=t.detail.value;(n=e.changeVisibility)===null||n===void 0?void 0:n.emit(e.visibility)}}),s("verdocs-quick-filter",{key:"9a384e6a64b56c25ede399db0cfe691651712f08",label:"Starred",value:this.starred,options:y,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{key:"12b8d9bcbf43f10b98d19b429adeb2bb1fb9fa2d",label:"Sort By",value:this.sort,options:k,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{key:"1c2a66d3549ee80decf1d523c9dece2416146a0b",mode:"dark",size:24}),s("div",{key:"6ecb8f54e7bb8a1b8e71497cfd78a5a8487466c5",style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var r=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!d(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!d(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!r.includes("write")})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!r.includes("delete")})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:m,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:x,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:w,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:g,title:"Last Used"}),i?a.format(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:u})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",{key:"9c248da7e6a766b6d4ca75c5a6728f609540ff43"},o(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"978cb7ba0c6ee2307781fa1a93311fded6c03cf7",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"737d3a3e1211a1a7da04bea7a1c5ba8cce43cd4b",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());z.style=h}}}));
2
- //# sourceMappingURL=p-6743a4ec.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{c(s.next(e))}catch(e){a(e)}}function r(e){try{c(s["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(l,r)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return c([e,t])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,r[0]&&(n=0)),n)try{if(s=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;i=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];i=0}finally{s=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-gAi_FRvp.system.js","./p-DmF0GSqu.system.js","@verdocs/js-sdk","./p-7Iu0_GGa.system.js"],(function(e){"use strict";var t,n,s,i,a,l,r,c,o,d,p;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(e){a=e.d},function(e){l=e.VerdocsEndpoint;r=e.getTemplates;c=e.deleteTemplate;o=e.integerSequence;d=e.canPerformTemplateAction},function(e){p=e.S}],execute:function(){var h='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var b=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var y=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var k=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var z=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError");this.viewTemplate=n(this,"viewTemplate");this.signNow=n(this,"signNow");this.submittedData=n(this,"submittedData");this.editTemplate=n(this,"editTemplate");this.templateDeleted=n(this,"templateDeleted");this.changeSort=n(this,"changeSort");this.changeVisibility=n(this,"changeVisibility");this.changeStarred=n(this,"changeStarred");this.changeName=n(this,"changeName");this.endpoint=l.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=function(e,t){var n,i,a,l;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(a=s.submittedData)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(l=s.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}}}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,a;return __generator(this,(function(l){switch(l.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;l.label=1;case 1:l.trys.push([1,3,,4]);s={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,r(this.endpoint,s)];case 2:i=l.sent();this.templates=i.templates;this.count=i.count;this.loading=false;return[3,4];case 3:a=l.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;c(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,a;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(a=n.response)===null||a===void 0?void 0:a.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,{key:"09f26fe2ca274c54c4a445b6fbd2b5b0e0b4e587"},s("div",{key:"419453dcda9b282dbb221e21c59c3b9ab805ccb3",class:"header"},s("div",{key:"0874a0b65a716901f2a974c6d9a687f94598bb7f",class:"filter"},s("verdocs-text-input",{key:"3f333fd5a1c0b450af04d8ea48922ced96f23e2b",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{key:"89ef45476a685f220aa9511556b7f60ad8ff5cf3",label:"Visibility",value:this.visibility,options:b,onOptionSelected:function(t){var n;e.visibility=t.detail.value;(n=e.changeVisibility)===null||n===void 0?void 0:n.emit(e.visibility)}}),s("verdocs-quick-filter",{key:"434e0caca9b04f840b841359b7ef94856676f957",label:"Starred",value:this.starred,options:y,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{key:"34b7ad87857dd9de3bfab997239c7e616716c8c0",label:"Sort By",value:this.sort,options:k,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{key:"5d237a87ce4be276951b27e18c9597ee551f7ce3",mode:"dark",size:24}),s("div",{key:"91b04bd0fb46e2b9d712f3fdf9d162ed77f8af63",style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var r=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!d(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!d(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!r.includes("write")})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!r.includes("delete")})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:m,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:x,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:w,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:g,title:"Last Used"}),i?a.format(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:u})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",{key:"02c8a2c032d7d5d9367640dc8af9207cac1191d3"},o(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"0fa668155a34667926145cce15f06ff8b9174049",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"2d5c0920ed5a25c1cee436ef49eed765b7f1c787",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());z.style=h}}}));
2
+ //# sourceMappingURL=p-795cb651.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsTemplatesListCss","GlobeAltIcon","LockClosedIcon","BuildingOfficeIcon","EnvelopeIcon","CreatedIcon","LastUsedIcon","UpdatedIcon","VisibilityFilters","value","label","StarredFilters","SortOptions","VerdocsTemplatesList","exports","class_1","hostRef","_this","this","endpoint","VerdocsEndpoint","getDefault","visibility","starred","sort","name","allowedActions","showPagination","rowsPerPage","selectedPage","count","initiallyLoaded","loading","confirmDelete","templates","localNameFilter","handleOptionSelected","option","template","_a","viewTemplate","emit","_b","signNow","_c","submittedData","_d","editTemplate","prototype","handleSharingUpdated","queryTemplates","handleStarredUpdated","handleSortUpdated","handleNameUpdated","handlePageUpdated","componentWillLoad","loadSession","session","console","log","componentDidLoad","_e","sent","queryParams","page","rows","trim","q","getTemplates","response","e_1","sdkError","SDKError","message","status","data","deleteTemplate","id","then","templateDeleted","catch","e","render","locallyFilteredTemplates","filter","t","toLowerCase","includes","h","Host","key","class","clearable","autocomplete","placeholder","onInput","target","onFocusout","changeName","options","onOptionSelected","detail","changeVisibility","changeStarred","changeSort","mode","size","style","display","flex","map","dateToShow","date","MENU_OPTIONS","allowed_operations","push","disabled","canPerformTemplateAction","profile","onClick","innerHTML","title","counter","format","Date","is_public","is_personal","integerSequence","length","marginTop","perPage","itemCount","onSelectPage","heading","onNext","onExit","showCancel"],"sources":["src/components/templates/verdocs-templates-list/verdocs-templates-list.scss?tag=verdocs-templates-list","src/components/templates/verdocs-templates-list/verdocs-templates-list.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-templates-list {\n display: flex;\n padding: 10px;\n font-size: 18px;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: $label-color;\n flex-direction: column;\n font-family: $primary-font;\n\n .header {\n width: 100%;\n row-gap: 4px;\n display: flex;\n flex-wrap: wrap;\n column-gap: 12px;\n margin: 0 0 10px 0;\n align-items: center;\n flex-direction: row;\n\n .filter {\n width: 150px;\n }\n\n verdocs-text-input {\n margin: 0;\n\n input {\n height: 32px;\n }\n }\n }\n\n .filter {\n align-items: center;\n }\n\n .template-placeholder {\n height: 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: $verdocs-grey-3;\n }\n\n .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: $verdocs-grey-4;\n\n &:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n }\n\n .inner {\n gap: 12px;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n flex-direction: row;\n align-items: center;\n container-type: inline-size;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n }\n\n .name {\n flex: 1;\n display: flex;\n color: black;\n font-size: 16px;\n //margin-left: 10px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media screen and (max-width: 1300px) {\n font-size: 16px;\n }\n\n @media screen and (max-width: 700px) {\n //flex: 0;\n }\n }\n\n .spacer {\n margin: 0;\n height: 30px;\n flex: 0 0 1px;\n display: flex;\n border-right: 1px solid #dad8dd;\n\n @media screen and (max-width: 800px) {\n display: none;\n }\n }\n\n .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n }\n\n .usage,\n .ownership,\n .last-used {\n gap: 10px;\n color: #444;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n align-items: center;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n span,\n svg {\n width: 24px;\n height: 24px;\n }\n\n span {\n display: block;\n }\n }\n\n verdocs-template-star {\n @media screen and (max-width: 700px) {\n display: none;\n }\n }\n\n .ownership {\n flex: 0 0 100px;\n\n @media screen and (max-width: 700px) {\n display: none;\n }\n }\n\n .last-used {\n flex: 0 0 130px;\n }\n\n .usage {\n flex: 0 0 60px;\n }\n\n .header-row {\n display: none;\n }\n\n table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n }\n\n .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n }\n\n .data-col {\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n verdocs-templates-list {\n @container (max-width:700 px) {\n .col-starred {\n display: none;\n }\n }\n }\n}\n","import {format} from 'date-fns';\nimport {deleteTemplate, getTemplates, TTemplateAction, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {integerSequence, ITemplate, IGetTemplatesParams, canPerformTemplateAction} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core';\nimport {IFilterOption} from '../../controls/verdocs-quick-filter/verdocs-quick-filter';\nimport {IMenuOption} from '../../controls/verdocs-dropdown/verdocs-dropdown';\nimport {SDKError} from '../../../utils/errors';\n\nconst GlobeAltIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418\" /></svg>`;\nconst LockClosedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z\" /></svg>`;\nconst BuildingOfficeIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21\" /></svg>`;\nconst EnvelopeIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75\" /></svg>`;\nconst CreatedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 122.88 122.88\"><g><path d=\"M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z\"/></g></svg>`;\nconst LastUsedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 410.2\"><path d=\"M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z\"/></svg>`;\nconst UpdatedIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 506.49\"><path fill-rule=\"nonzero\" d=\"m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z\"/></svg>`;\n\nconst VisibilityFilters: IFilterOption[] = [\n {value: 'private_shared', label: 'Personal + Shared'},\n {value: 'private', label: 'Personal'},\n {value: 'shared', label: 'Shared'},\n {value: 'public', label: 'Public'},\n];\n\nconst StarredFilters: IFilterOption[] = [\n {value: 'all', label: 'All'},\n {value: 'starred', label: 'Starred'},\n {value: 'unstarred', label: 'Not Starred'},\n];\n\nconst SortOptions: IFilterOption[] = [\n {value: 'name', label: 'Name'},\n {value: 'created_at', label: 'Created'},\n {value: 'updated_at', label: 'Last Updated'},\n {value: 'last_used_at', label: 'Last Used'},\n {value: 'counter', label: 'Most Used'},\n {value: 'star_counter', label: 'Most Starred'},\n];\n\nexport type TAllowedTemplateAction = 'send' | 'createlink' | 'signnow' | 'submitted' | 'link' | 'edit' | 'delete';\n\n/**\n * Display a list of templates in the caller's account.\n *\n * ```ts\n * <verdocs-template-list\n * visibility=\"private\"\n * sort=\"updated_at\"\n * onViewTemplate={({ detail }) => console.log('View template:', detail) }\n * />\n * ```\n */@Component({\n tag: 'verdocs-templates-list',\n styleUrl: 'verdocs-templates-list.scss',\n})\nexport class VerdocsTemplatesList {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The sharing settings to filter by.\n */\n @Prop({reflect: true, mutable: true}) visibility?: 'private_shared' | 'private' | 'shared' | 'public' = 'private_shared';\n\n /**\n * The starred settings to filter by.\n */\n @Prop({reflect: true, mutable: true}) starred: 'all' | 'starred' | 'unstarred' = 'all';\n\n /**\n * The sort order to display.\n */\n @Prop({reflect: true, mutable: true}) sort: string = 'updated_at';\n\n /**\n * If set, filter templates by the specified name.\n */\n @Prop({reflect: true, mutable: true}) name: string = '';\n\n /**\n * Override the If set, filter templates by the specified name.\n */\n @Prop({reflect: true, mutable: true}) allowedActions: TAllowedTemplateAction[] = ['send', 'submitted', 'link', 'edit', 'delete'];\n // @Prop({reflect: true, mutable: true}) allowedActions: TAllowedTemplateAction[] = ['send', 'createlink', 'signnow', 'submitted', 'link', 'edit', 'delete'];\n\n /**\n * Whether or not pagination should be enabled.\n */\n @Prop() showPagination = true;\n\n /**\n * The number of rows to display per page.\n */\n @Prop() rowsPerPage = 10;\n\n /**\n * The initial page number to select. Pagination is internally controlled but may be overriden by the\n * host applicaiton.\n */\n @Prop() selectedPage = 0;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user clicks a template to view it. Typically the host application will use this to navigate\n * to the template preview. This is also fired when the user selects \"Preview/Send\" fropm the dropdown menu.\n */\n @Event({composed: true}) viewTemplate: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user clicks to sign a template now.\n */\n @Event({composed: true}) signNow: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user clicks to sign a template now.\n */\n @Event({composed: true}) submittedData: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user selects to create a preview link for a template.\n */\n // @Event({composed: true}) createLink: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user chooses the Edit option from the dropdown menu.\n */\n @Event({composed: true}) editTemplate: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user chooses the Delete option from the dropdown menu. When this is fired, the template\n * will already have been deleted. The host application should remove it from the list or refresh the list.\n */\n @Event({composed: true}) templateDeleted: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate}>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeSort: EventEmitter<string>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeVisibility: EventEmitter<'private_shared' | 'private' | 'shared' | 'public'>;\n\n /**\n * Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.\n */\n @Event({composed: true}) changeStarred: EventEmitter<'all' | 'starred' | 'unstarred'>;\n\n /**\n * Event fired when the user changes the name filter. This is fired for every inputChange event (every character\n * typed). This event is provided for balance with the other events, but host applications should generally not\n * save this value. Users might appreciate applications remembering their sorting or filtering preferences, but\n * probably not their search terms.\n */\n @Event({composed: true}) changeName: EventEmitter<string>;\n\n @State() count = 0;\n @State() initiallyLoaded = false;\n @State() loading = true;\n @State() confirmDelete: ITemplate | null = null;\n @State() templates: ITemplate[] = [];\n @State() localNameFilter = '';\n\n @Watch('sharing')\n handleSharingUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('starred')\n handleStarredUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('sort')\n handleSortUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('name')\n handleNameUpdated() {\n return this.queryTemplates();\n }\n\n @Watch('selectedPage')\n handlePageUpdated() {\n return this.queryTemplates();\n }\n\n componentWillLoad() {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[TEMPLATES] Must be authenticated');\n return;\n }\n }\n\n async componentDidLoad() {\n await this.queryTemplates();\n this.initiallyLoaded = true;\n }\n\n async queryTemplates() {\n console.log('[TEMPLATES] Querying templates');\n this.loading = true;\n try {\n let queryParams: IGetTemplatesParams = {\n visibility: this.visibility,\n // starred: this.starred,\n page: this.selectedPage,\n // sort: this.sort,\n rows: this.rowsPerPage,\n // ascending: this.sort === 'name' || this.sort === 'star_counter',\n };\n\n if (this.name.trim() !== '') {\n queryParams.q = this.name.trim();\n }\n\n const response = await getTemplates(this.endpoint, queryParams);\n this.templates = response.templates;\n this.count = response.count;\n this.loading = false;\n } catch (e) {\n this.loading = false;\n console.log('[TEMPLATES] Error listing templates', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleOptionSelected = (option: string, template: ITemplate) => {\n if (option === 'send') {\n this.viewTemplate?.emit({endpoint: this.endpoint, template: template});\n // } else if (option === 'createlink') {\n // VerdocsToast('This feature is coming soon!');\n } else if (option === 'signnow') {\n this.signNow?.emit({endpoint: this.endpoint, template: template});\n } else if (option === 'submitted') {\n this.submittedData?.emit({endpoint: this.endpoint, template: template});\n // } else if (option === 'link') {\n // VerdocsToast('This feature is coming soon!');\n } else if (option === 'edit') {\n this.editTemplate?.emit({endpoint: this.endpoint, template: template});\n } else if (option === 'delete') {\n this.confirmDelete = template;\n }\n };\n\n deleteTemplate(template: ITemplate) {\n this.confirmDelete = null;\n deleteTemplate(this.endpoint, template.id)\n .then(() => {\n console.log('[TEMPLATES] Deleted template', template);\n this.templateDeleted?.emit({endpoint: this.endpoint, template: template});\n return this.queryTemplates();\n })\n .catch(e => {\n console.log('[TEMPLATES] Error deleting template', template);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n render() {\n // In addition to the server query we also filter locally. This provides a faster UI update\n // while the onBlur re-queries the server for any new records that now qualify by the filter.\n const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));\n\n return (\n <Host>\n <div class=\"header\">\n <div class=\"filter\">\n <verdocs-text-input\n id=\"verdocs-filter-name\"\n value={this.name}\n clearable={true}\n autocomplete=\"off\"\n placeholder=\"Filter by Name...\"\n onInput={(e: any) => (this.localNameFilter = e.target.value.trim())}\n onFocusout={(e: any) => {\n this.name = e.target.value.trim();\n this.localNameFilter = e.target.value.trim();\n this.changeName?.emit(this.name);\n }}\n />\n </div>\n\n <verdocs-quick-filter\n label=\"Visibility\"\n value={this.visibility}\n options={VisibilityFilters}\n onOptionSelected={e => {\n this.visibility = e.detail.value as any;\n this.changeVisibility?.emit(this.visibility);\n }}\n />\n\n <verdocs-quick-filter\n label=\"Starred\"\n value={this.starred}\n options={StarredFilters}\n onOptionSelected={e => {\n this.starred = e.detail.value as any;\n this.changeStarred?.emit(this.starred);\n }}\n />\n\n <verdocs-quick-filter\n label=\"Sort By\"\n value={this.sort}\n options={SortOptions}\n onOptionSelected={e => {\n this.sort = e.detail.value as any;\n this.changeSort?.emit(this.sort);\n }}\n />\n {this.loading && <verdocs-spinner mode=\"dark\" size={24} />}\n <div style={{display: 'flex', flex: '1'}} />\n </div>\n\n {/*<verdocs-table*/}\n {/* data={locallyFilteredTemplates}*/}\n {/* onRowClick={(template: any) => this.viewTemplate?.emit({endpoint: this.endpoint, template: template as ITemplate})}*/}\n {/* columns={[*/}\n {/* {*/}\n {/* id: 'starred',*/}\n {/* renderCell: (_, row) => <verdocs-template-star template={row} endpoint={this.endpoint} />,*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'name',*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'usage',*/}\n {/* renderCell: (_, row) => (*/}\n {/* <div>*/}\n {/* <span innerHTML={EnvelopeIcon} title=\"Usage Counter\" />*/}\n {/* {row.counter || '--'}*/}\n {/* </div>*/}\n {/* ),*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'created_at',*/}\n {/* renderCell: (_, row) => {*/}\n {/* const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';*/}\n {/* const date = row[dateToShow];*/}\n\n {/* return (*/}\n {/* <div class=\"last-used\">*/}\n {/* {dateToShow === 'created_at' && <span innerHTML={CreatedIcon} title=\"Created\" />}*/}\n {/* {dateToShow === 'updated_at' && <span innerHTML={UpdatedIcon} title=\"Last Updated\" />}*/}\n {/* {dateToShow === 'last_used_at' && <span innerHTML={LastUsedIcon} title=\"Last Used\" />}*/}\n {/* {date ? format(new Date(date), 'P') : 'Never'}*/}\n {/* </div>*/}\n {/* );*/}\n {/* },*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'ownership',*/}\n {/* renderCell: (_, row) => (*/}\n {/* <div>*/}\n {/* {row.is_public && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={GlobeAltIcon} /> Public*/}\n {/* </div>*/}\n {/* )}*/}\n {/* {!row.is_public && !row.is_personal && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={LockClosedIcon} /> Private*/}\n {/* </div>*/}\n {/* )}*/}\n {/* {!row.is_public && row.is_personal && (*/}\n {/* <div class=\"ownership\">*/}\n {/* <span innerHTML={BuildingOfficeIcon} /> Shared*/}\n {/* </div>*/}\n {/* )}*/}\n {/* </div>*/}\n {/* ),*/}\n {/* },*/}\n {/* {*/}\n {/* id: 'actions',*/}\n {/* renderCell: (_, row) => {*/}\n {/* const MENU_OPTIONS: IMenuOption[] = [];*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.READ) && this.allowedActions.includes('send')) {*/}\n {/* MENU_OPTIONS.push({label: 'Preview / Send', id: 'send', disabled: !row.allowed_operations.includes(TemplateActions.READ)});*/}\n {/* }*/}\n\n {/* // if (this.allowedActions.includes('createlink')) {*/}\n {/* // MENU_OPTIONS.push({label: 'Create Link', id: 'createlink', disabled: true});*/}\n {/* // }*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.CREATE_PERSONAL) && this.allowedActions.includes('signnow')) {*/}\n {/* MENU_OPTIONS.push({label: 'Sign Now', id: 'signnow', disabled: true});*/}\n {/* }*/}\n\n {/* if (row.allowed_operations.includes(TemplateActions.READ) && this.allowedActions.includes('submitted')) {*/}\n {/* MENU_OPTIONS.push({label: ''});*/}\n {/* MENU_OPTIONS.push({label: 'Submissions', id: 'submitted'});*/}\n {/* }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({label: ''});*/}\n\n {/* // TODO: The preview link used to be just an internal route in the main Web application, but*/}\n {/* // that's not suitable for embeddding. Disabling until this gets re-requested as a feature,*/}\n {/* // in which case we'll want to move this to an API-driven function.*/}\n {/* // if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* // MENU_OPTIONS.push({label: 'Get Preview Link', id: 'link', disabled: !this.canPreview(template)});*/}\n {/* // }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({label: 'Edit', id: 'edit', disabled: !row.allowed_operations.includes(TemplateActions.WRITE)});*/}\n {/* }*/}\n\n {/* if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {*/}\n {/* MENU_OPTIONS.push({*/}\n {/* label: 'Delete',*/}\n {/* id: 'delete',*/}\n {/* disabled: !row.allowed_operations.includes(TemplateActions.DELETE),*/}\n {/* });*/}\n {/* }*/}\n {/* }*/}\n\n {/* return <verdocs-dropdown options={MENU_OPTIONS} onOptionSelected={e => this.handleOptionSelected(e.detail.id, row)} />;*/}\n {/* },*/}\n {/* },*/}\n {/* ]}*/}\n {/*/>*/}\n\n {locallyFilteredTemplates.map(template => {\n const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';\n const date = template[dateToShow];\n\n const MENU_OPTIONS: IMenuOption[] = [];\n\n const allowed_operations: TTemplateAction[] = [];\n\n // serverless/src/functions/getTemplates.ts: allowed_operations: [] as string[],\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_personal', record) && record.allowed_operations.push('create_personal');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_org', record) && record.allowed_operations.push('create_org');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'create_public', record) && record.allowed_operations.push('create_public');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'read', record) && record.allowed_operations.push('read');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'write', record) && record.allowed_operations.push('write');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'delete', record) && record.allowed_operations.push('delete');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_personal', record) && record.allowed_operations.push('change_visibility_personal');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_org', record) && record.allowed_operations.push('change_visibility_org');\n // serverless/src/functions/getTemplates.ts: canPerformTemplateAction(request.session, 'change_visibility_public', record) && record.allowed_operations.push('change_visibility_public');\n\n if (this.allowedActions.includes('send')) {\n MENU_OPTIONS.push({label: 'Preview / Send', id: 'send', disabled: !canPerformTemplateAction(this.endpoint.profile, 'read', template)});\n }\n\n // if (this.allowedActions.includes('createlink')) {\n // MENU_OPTIONS.push({label: 'Create Link', id: 'createlink', disabled: true});\n // }\n\n if (this.allowedActions.includes('signnow')) {\n MENU_OPTIONS.push({label: 'Sign Now', id: 'signnow', disabled: true});\n }\n\n if (this.allowedActions.includes('submitted')) {\n MENU_OPTIONS.push({label: ''});\n MENU_OPTIONS.push({label: 'Submissions', id: 'submitted', disabled: !canPerformTemplateAction(this.endpoint.profile, 'read', template)});\n }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: ''});\n\n // TODO: The preview link used to be just an internal route in the main Web application, but\n // that's not suitable for embeddding. Disabling until this gets re-requested as a feature,\n // in which case we'll want to move this to an API-driven function.\n // if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n // MENU_OPTIONS.push({label: 'Get Preview Link', id: 'link', disabled: !this.canPreview(template)});\n // }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: 'Edit', id: 'edit', disabled: !allowed_operations.includes('write')});\n }\n\n if (this.allowedActions.includes('link') || this.allowedActions.includes('edit') || this.allowedActions.includes('delete')) {\n MENU_OPTIONS.push({label: 'Delete', id: 'delete', disabled: !allowed_operations.includes('delete')});\n }\n }\n\n return (\n <div\n class=\"template\"\n onClick={() => {\n this.viewTemplate?.emit({endpoint: this.endpoint, template});\n }}\n >\n <div class=\"inner\">\n <verdocs-template-star template={template} endpoint={this.endpoint} />\n\n <div class=\"spacer icon-spacer\" />\n <div class=\"name\">{template.name}</div>\n\n <div class=\"spacer usage-spacer\" />\n <div class=\"usage\">\n <span innerHTML={EnvelopeIcon} title=\"Usage Counter\" />\n {template.counter || '--'}\n </div>\n\n <div class=\"spacer last-used-spacer\" />\n <div class=\"last-used\">\n {dateToShow === 'created_at' && <span innerHTML={CreatedIcon} title=\"Created\" />}\n {dateToShow === 'updated_at' && <span innerHTML={UpdatedIcon} title=\"Last Updated\" />}\n {dateToShow === 'last_used_at' && <span innerHTML={LastUsedIcon} title=\"Last Used\" />}\n {date ? format(new Date(date), 'P') : 'Never'}\n </div>\n\n <div class=\"spacer ownership-spacer\" />\n {template.is_public && (\n <div class=\"ownership\">\n <span innerHTML={GlobeAltIcon} /> Public\n </div>\n )}\n {!template.is_public && !template.is_personal && (\n <div class=\"ownership\">\n <span innerHTML={LockClosedIcon} /> Private\n </div>\n )}\n {!template.is_public && template.is_personal && (\n <div class=\"ownership\">\n <span innerHTML={BuildingOfficeIcon} /> Shared\n </div>\n )}\n\n <verdocs-dropdown options={MENU_OPTIONS} onOptionSelected={e => this.handleOptionSelected(e.detail.id, template)} />\n </div>\n </div>\n );\n })}\n\n {!this.initiallyLoaded && (\n <div>\n {integerSequence(0, this.rowsPerPage).map(() => (\n <div class=\"template-placeholder\" />\n ))}\n </div>\n )}\n\n {this.initiallyLoaded && !this.templates.length && <div class=\"empty-text\">No matching templates found. Please adjust your filters and try again.</div>}\n\n {this.initiallyLoaded && this.templates.length && this.showPagination ? (\n <div style={{marginTop: '20px'}}>\n <verdocs-pagination\n selectedPage={this.selectedPage}\n perPage={this.rowsPerPage}\n itemCount={this.count}\n onSelectPage={e => {\n this.selectedPage = e.detail.selectedPage;\n }}\n />\n </div>\n ) : (\n <div />\n )}\n\n {this.confirmDelete && (\n <verdocs-ok-dialog\n heading=\"Delete this Template?\"\n message=\"This operation cannot be undone.\"\n onNext={() => this.deleteTemplate(this.confirmDelete)}\n onExit={() => (this.confirmDelete = null)}\n showCancel={true}\n />\n )}\n </Host>\n );\n }\n}\n"],"mappings":"s1DAAA,IAAMA,EAA0B,uuJCQhC,IAAMC,EAAe,moBACrB,IAAMC,EAAiB,8VACvB,IAAMC,EAAqB,2WAC3B,IAAMC,EAAe,4aACrB,IAAMC,EAAc,mtFACpB,IAAMC,EAAe,o9GACrB,IAAMC,EAAc,02FAEpB,IAAMC,EAAqC,CACzC,CAACC,MAAO,iBAAkBC,MAAO,qBACjC,CAACD,MAAO,UAAWC,MAAO,YAC1B,CAACD,MAAO,SAAUC,MAAO,UACzB,CAACD,MAAO,SAAUC,MAAO,WAG3B,IAAMC,EAAkC,CACtC,CAACF,MAAO,MAAOC,MAAO,OACtB,CAACD,MAAO,UAAWC,MAAO,WAC1B,CAACD,MAAO,YAAaC,MAAO,gBAG9B,IAAME,EAA+B,CACnC,CAACH,MAAO,OAAQC,MAAO,QACvB,CAACD,MAAO,aAAcC,MAAO,WAC7B,CAACD,MAAO,aAAcC,MAAO,gBAC7B,CAACD,MAAO,eAAgBC,MAAO,aAC/B,CAACD,MAAO,UAAWC,MAAO,aAC1B,CAACD,MAAO,eAAgBC,MAAO,iB,IAmBpBG,EAAoBC,EAAA,oCAJ9B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,4ZAQOA,KAAAC,SAA4BC,EAAgBC,aAKdH,KAAUI,WAAwD,iBAKlEJ,KAAOK,QAAoC,MAK3CL,KAAIM,KAAW,aAKfN,KAAIO,KAAW,GAKfP,KAAAQ,eAA2C,CAAC,OAAQ,YAAa,OAAQ,OAAQ,UAM/GR,KAAcS,eAAG,KAKjBT,KAAWU,YAAG,GAMdV,KAAYW,aAAG,EA+DdX,KAAKY,MAAG,EACRZ,KAAea,gBAAG,MAClBb,KAAOc,QAAG,KACVd,KAAae,cAAqB,KAClCf,KAASgB,UAAgB,GACzBhB,KAAeiB,gBAAG,GAoE3BjB,KAAAkB,qBAAuB,SAACC,EAAgBC,G,YACtC,GAAID,IAAW,OAAQ,EACrBE,EAAAtB,EAAKuB,gBAAY,MAAAD,SAAA,SAAAA,EAAEE,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAUA,G,MAGvD,GAAID,IAAW,UAAW,EAC/BK,EAAAzB,EAAK0B,WAAO,MAAAD,SAAA,SAAAA,EAAED,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAUA,G,MAClD,GAAID,IAAW,YAAa,EACjCO,EAAA3B,EAAK4B,iBAAa,MAAAD,SAAA,SAAAA,EAAEH,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAUA,G,MAGxD,GAAID,IAAW,OAAQ,EAC5BS,EAAA7B,EAAK8B,gBAAY,MAAAD,SAAA,SAAAA,EAAEL,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAUA,G,MACvD,GAAID,IAAW,SAAU,CAC9BpB,EAAKgB,cAAgBK,C,CAEzB,CAoUD,CArZCvB,EAAAiC,UAAAC,qBAAA,WACE,OAAO/B,KAAKgC,gB,EAIdnC,EAAAiC,UAAAG,qBAAA,WACE,OAAOjC,KAAKgC,gB,EAIdnC,EAAAiC,UAAAI,kBAAA,WACE,OAAOlC,KAAKgC,gB,EAIdnC,EAAAiC,UAAAK,kBAAA,WACE,OAAOnC,KAAKgC,gB,EAIdnC,EAAAiC,UAAAM,kBAAA,WACE,OAAOpC,KAAKgC,gB,EAGdnC,EAAAiC,UAAAO,kBAAA,WACErC,KAAKC,SAASqC,cACd,IAAKtC,KAAKC,SAASsC,QAAS,CAC1BC,QAAQC,IAAI,qCACZ,M,GAIE5C,EAAAiC,UAAAY,iBAAN,W,4GACE,SAAM1C,KAAKgC,kB,OAAXW,EAAAC,OACA5C,KAAKa,gBAAkB,K,kBAGnBhB,EAAAiC,UAAAE,eAAN,W,4HACEQ,QAAQC,IAAI,kCACZzC,KAAKc,QAAU,K,uCAET+B,EAAmC,CACrCzC,WAAYJ,KAAKI,WAEjB0C,KAAM9C,KAAKW,aAEXoC,KAAM/C,KAAKU,aAIb,GAAIV,KAAKO,KAAKyC,SAAW,GAAI,CAC3BH,EAAYI,EAAIjD,KAAKO,KAAKyC,M,CAGX,SAAME,EAAalD,KAAKC,SAAU4C,I,OAA7CM,EAAWR,EAAAC,OACjB5C,KAAKgB,UAAYmC,EAASnC,UAC1BhB,KAAKY,MAAQuC,EAASvC,MACtBZ,KAAKc,QAAU,M,8BAEfd,KAAKc,QAAU,MACf0B,QAAQC,IAAI,sCAAuCW,IACnD/B,EAAArB,KAAKqD,YAAQ,MAAAhC,SAAA,SAAAA,EAAEE,KAAK,IAAI+B,EAASF,EAAEG,SAAS/B,EAAA4B,EAAED,YAAQ,MAAA3B,SAAA,SAAAA,EAAEgC,QAAQ9B,EAAA0B,EAAED,YAAU,MAAAzB,SAAA,SAAAA,EAAA+B,O,qCAsBhF5D,EAAAiC,UAAA4B,eAAA,SAAetC,GAAf,IAAArB,EAAAC,KACEA,KAAKe,cAAgB,KACrB2C,EAAe1D,KAAKC,SAAUmB,EAASuC,IACpCC,MAAK,W,MACJpB,QAAQC,IAAI,+BAAgCrB,IAC5CC,EAAAtB,EAAK8D,mBAAe,MAAAxC,SAAA,SAAAA,EAAEE,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAUA,IAC/D,OAAOrB,EAAKiC,gBACd,IACC8B,OAAM,SAAAC,G,UACLvB,QAAQC,IAAI,sCAAuCrB,IACnDC,EAAAtB,EAAKsD,YAAQ,MAAAhC,SAAA,SAAAA,EAAEE,KAAK,IAAI+B,EAASS,EAAER,SAAS/B,EAAAuC,EAAEZ,YAAQ,MAAA3B,SAAA,SAAAA,EAAEgC,QAAQ9B,EAAAqC,EAAEZ,YAAU,MAAAzB,SAAA,SAAAA,EAAA+B,MAC9E,G,EAGJ5D,EAAAiC,UAAAkC,OAAA,eAAAjE,EAAAC,KAGE,IAAMiE,GAA4BjE,KAAKiB,gBAAkBjB,KAAKgB,UAAYhB,KAAKgB,UAAUkD,QAAO,SAAAC,GAAK,OAAAA,EAAE5D,KAAK6D,cAAcC,SAAStE,EAAKkB,gBAAgBmD,cAAnD,IAErG,OACEE,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAK,OAAAE,IAAA,2CAAAC,MAAM,UACTH,EAAK,OAAAE,IAAA,2CAAAC,MAAM,UACTH,EACE,sBAAAE,IAAA,2CAAAb,GAAG,sBACHpE,MAAOS,KAAKO,KACZmE,UAAW,KACXC,aAAa,MACbC,YAAY,oBACZC,QAAS,SAACd,GAAM,OAAMhE,EAAKkB,gBAAkB8C,EAAEe,OAAOvF,MAAMyD,MAA5C,EAChB+B,WAAY,SAAChB,G,MACXhE,EAAKQ,KAAOwD,EAAEe,OAAOvF,MAAMyD,OAC3BjD,EAAKkB,gBAAkB8C,EAAEe,OAAOvF,MAAMyD,QACtC3B,EAAAtB,EAAKiF,cAAY,MAAA3D,SAAA,SAAAA,EAAAE,KAAKxB,EAAKQ,KAC7B,KAIJ+D,EAAA,wBAAAE,IAAA,2CACEhF,MAAM,aACND,MAAOS,KAAKI,WACZ6E,QAAS3F,EACT4F,iBAAkB,SAAAnB,G,MAChBhE,EAAKK,WAAa2D,EAAEoB,OAAO5F,OAC3B8B,EAAAtB,EAAKqF,oBAAkB,MAAA/D,SAAA,SAAAA,EAAAE,KAAKxB,EAAKK,WACnC,IAGFkE,EAAA,wBAAAE,IAAA,2CACEhF,MAAM,UACND,MAAOS,KAAKK,QACZ4E,QAASxF,EACTyF,iBAAkB,SAAAnB,G,MAChBhE,EAAKM,QAAU0D,EAAEoB,OAAO5F,OACxB8B,EAAAtB,EAAKsF,iBAAe,MAAAhE,SAAA,SAAAA,EAAAE,KAAKxB,EAAKM,QAChC,IAGFiE,EAAA,wBAAAE,IAAA,2CACEhF,MAAM,UACND,MAAOS,KAAKM,KACZ2E,QAASvF,EACTwF,iBAAkB,SAAAnB,G,MAChBhE,EAAKO,KAAOyD,EAAEoB,OAAO5F,OACrB8B,EAAAtB,EAAKuF,cAAY,MAAAjE,SAAA,SAAAA,EAAAE,KAAKxB,EAAKO,K,IAG9BN,KAAKc,SAAWwD,EAAiB,mBAAAE,IAAA,2CAAAe,KAAK,OAAOC,KAAM,KACpDlB,EAAA,OAAAE,IAAA,2CAAKiB,MAAO,CAACC,QAAS,OAAQC,KAAM,QAgHrC1B,EAAyB2B,KAAI,SAAAxE,GAC5B,IAAMyE,EAAa9F,EAAKO,OAAS,aAAe,aAAeP,EAAKO,OAAS,aAAe,aAAe,eAC3G,IAAMwF,EAAO1E,EAASyE,GAEtB,IAAME,EAA8B,GAEpC,IAAMC,EAAwC,GAa9C,GAAIjG,EAAKS,eAAe6D,SAAS,QAAS,CACxC0B,EAAaE,KAAK,CAACzG,MAAO,iBAAkBmE,GAAI,OAAQuC,UAAWC,EAAyBpG,EAAKE,SAASmG,QAAS,OAAQhF,I,CAO7H,GAAIrB,EAAKS,eAAe6D,SAAS,WAAY,CAC3C0B,EAAaE,KAAK,CAACzG,MAAO,WAAYmE,GAAI,UAAWuC,SAAU,M,CAGjE,GAAInG,EAAKS,eAAe6D,SAAS,aAAc,CAC7C0B,EAAaE,KAAK,CAACzG,MAAO,KAC1BuG,EAAaE,KAAK,CAACzG,MAAO,cAAemE,GAAI,YAAauC,UAAWC,EAAyBpG,EAAKE,SAASmG,QAAS,OAAQhF,I,CAG/H,GAAIrB,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,UAAW,CAC1H0B,EAAaE,KAAK,CAACzG,MAAO,KAS1B,GAAIO,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,UAAW,CAC1H0B,EAAaE,KAAK,CAACzG,MAAO,OAAQmE,GAAI,OAAQuC,UAAWF,EAAmB3B,SAAS,U,CAGvF,GAAItE,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,SAAWtE,EAAKS,eAAe6D,SAAS,UAAW,CAC1H0B,EAAaE,KAAK,CAACzG,MAAO,SAAUmE,GAAI,SAAUuC,UAAWF,EAAmB3B,SAAS,W,EAI7F,OACEC,EAAA,OACEG,MAAM,WACN4B,QAAS,W,OACPhF,EAAAtB,EAAKuB,gBAAc,MAAAD,SAAA,SAAAA,EAAAE,KAAK,CAACtB,SAAUF,EAAKE,SAAUmB,SAAQA,GAC5D,GAEAkD,EAAK,OAAAG,MAAM,SACTH,EAAuB,yBAAAlD,SAAUA,EAAUnB,SAAUF,EAAKE,WAE1DqE,EAAK,OAAAG,MAAM,uBACXH,EAAA,OAAKG,MAAM,QAAQrD,EAASb,MAE5B+D,EAAK,OAAAG,MAAM,wBACXH,EAAK,OAAAG,MAAM,SACTH,EAAA,QAAMgC,UAAWpH,EAAcqH,MAAM,kBACpCnF,EAASoF,SAAW,MAGvBlC,EAAK,OAAAG,MAAM,4BACXH,EAAK,OAAAG,MAAM,aACRoB,IAAe,cAAgBvB,EAAM,QAAAgC,UAAWnH,EAAaoH,MAAM,YACnEV,IAAe,cAAgBvB,EAAM,QAAAgC,UAAWjH,EAAakH,MAAM,iBACnEV,IAAe,gBAAkBvB,EAAM,QAAAgC,UAAWlH,EAAcmH,MAAM,cACtET,EAAOW,SAAO,IAAIC,KAAKZ,GAAO,KAAO,SAGxCxB,EAAK,OAAAG,MAAM,4BACVrD,EAASuF,WACRrC,EAAK,OAAAG,MAAM,aACTH,EAAM,QAAAgC,UAAWvH,IAAgB,YAGnCqC,EAASuF,YAAcvF,EAASwF,aAChCtC,EAAK,OAAAG,MAAM,aACTH,EAAM,QAAAgC,UAAWtH,IAAkB,aAGrCoC,EAASuF,WAAavF,EAASwF,aAC/BtC,EAAA,OAAKG,MAAM,aACTH,EAAM,QAAAgC,UAAWrH,IAAsB,WAI3CqF,EAAkB,oBAAAW,QAASc,EAAcb,iBAAkB,SAAAnB,GAAK,OAAAhE,EAAKmB,qBAAqB6C,EAAEoB,OAAOxB,GAAIvC,EAAvC,KAIxE,KAEEpB,KAAKa,iBACLyD,EAAA,OAAAE,IAAA,4CACGqC,EAAgB,EAAG7G,KAAKU,aAAakF,KAAI,kBACxCtB,EAAA,OAAKG,MAAM,wBAD6B,KAM7CzE,KAAKa,kBAAoBb,KAAKgB,UAAU8F,QAAUxC,EAAA,OAAAE,IAAA,2CAAKC,MAAM,cAAyF,0EAEtJzE,KAAKa,iBAAmBb,KAAKgB,UAAU8F,QAAU9G,KAAKS,eACrD6D,EAAK,OAAAmB,MAAO,CAACsB,UAAW,SACtBzC,EACE,sBAAA3D,aAAcX,KAAKW,aACnBqG,QAAShH,KAAKU,YACduG,UAAWjH,KAAKY,MAChBsG,aAAc,SAAAnD,GACZhE,EAAKY,aAAeoD,EAAEoB,OAAOxE,YAC/B,KAIJ2D,EAAA,YAGDtE,KAAKe,eACJuD,EAAA,qBAAAE,IAAA,2CACE2C,QAAQ,wBACR5D,QAAQ,mCACR6D,OAAQ,WAAM,OAAArH,EAAK2D,eAAe3D,EAAKgB,cAAzB,EACdsG,OAAQ,kBAAOtH,EAAKgB,cAAgB,IAA5B,EACRuG,WAAY,O,uQApgBS,I","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as e,H as s,c as r}from"./p-CF7i8guW.js";import{d as c}from"./p-dzBXqXlK.js";const a='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';const i='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';const d=class{constructor(e){o(this,e);this.hovered=false}onMouseOver(){this.hovered=true}onMouseOut(){this.hovered=false}render(){var o,r,a,d,t,l;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);const n=i;const p=`verdocs-org-card-${this.organization.id}`;return e(s,{key:"97272d216497af502a3cb2d6e0952bda802249e1",id:p},this.organization.thumbnail_url?e("img",{class:"icon",src:this.organization.thumbnail_url,alt:"Logo"}):e("span",{class:"icon",innerHTML:n}),e("span",{key:"e5f71759e662b6a1ad04ee9acf2710b9d7904a22",class:"content"},(o=this.organization)===null||o===void 0?void 0:o.name),e("verdocs-portal",{key:"0496b9a82bca4289e6fb226e24c5fed23c4e8fb3",anchor:p},e("div",{key:"991b528de45afb90d6c54f4ce6d6c415e9e2bc81",class:"verdocs-org-card-popup",style:{display:this.hovered?"block":"none"}},this.organization.full_logo_url?e("div",{class:"popup-header-with-logo"},e("img",{src:this.organization.full_logo_url,alt:"Logo"}),e("div",{class:"title"},(r=this.organization)===null||r===void 0?void 0:r.name)):e("div",{class:"popup-header"},e("span",{class:"status"},e("span",{class:"icon",innerHTML:n})),e("span",{class:"title"},(a=this.organization)===null||a===void 0?void 0:a.name)),e("div",{key:"54c746473d12e7428b2982c0f627d2d5ac078875",class:"popup-body"},e("div",{key:"a291de045b2cd5f6431e795b3b0da2a2187ec019",class:"field"},e("strong",{key:"86cfad50f43e266fcbca1934458de84c6af791bf"},"Joined"),c.format(new Date(((d=this.organization)===null||d===void 0?void 0:d.created_at)||undefined),"LLL d, Y")),this.organization.url&&e("div",{key:"743cc0af65238631e94353b1c0a09718d556a3e5",class:"field"},e("strong",{key:"55b51d9b2d4256ff4462ba28940331e3aff22e95"},"Website"),e("a",{key:"d6f11530ba3adc9c897fd2f26f47de8b9d17b807",href:(t=this.organization)===null||t===void 0?void 0:t.url,target:"_blank",rel:"nofollow"},(l=this.organization)===null||l===void 0?void 0:l.url))))))}};d.style=a;const t="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";const l="10001";const n=class{constructor(e){o(this,e);this.clickAway=r(this,"clickAway");this.moved=false;this.voffset=0}handleScroll(){this.calculatePosition()}handleResize(){this.calculatePosition()}handleClick(o){var e;const s=o.target.closest(".verdocs-portal");if(!this.element.contains(o.target)&&!s){(e=this.clickAway)===null||e===void 0?void 0:e.emit()}document.querySelectorAll(".verdocs-multiselect-dropdown").forEach((o=>o.remove()))}calculateLeft(){var o;const e=document.getElementById(this.anchor);if(!e)return 0;const s=e.getBoundingClientRect();const r=document.documentElement.clientWidth+document.documentElement.scrollLeft;const c=Math.max(s.left,0);const a=((o=this.element)===null||o===void 0?void 0:o.offsetWidth)||400;const i=c+a>r;return i?r-a-20:c}calculateTop(){var o;const e=document.getElementById(this.anchor);if(!e)return 0;const s=e.getBoundingClientRect();const r=document.documentElement.clientHeight+document.documentElement.scrollTop;const c=s.bottom+this.voffset+document.documentElement.scrollTop;const a=((o=this.element)===null||o===void 0?void 0:o.offsetHeight)||300;const i=c+a>r;return i?c-a-s.height:c}calculatePosition(){this.portal.style.top=`${this.calculateTop()}px`;this.portal.style.left=`${this.calculateLeft()}px`}componentWillLoad(){var o;const e=`${this.anchor}-portal`;(o=document.getElementById(e))===null||o===void 0?void 0:o.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",e);this.portal.style.zIndex=l;this.portal.style.position="absolute";this.portal.className="verdocs-portal-wrapper";document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element);this.calculatePosition()}disconnectedCallback(){this.moved?this.portal.remove():this.moved=true}render(){return e(s,{key:"6496c55ff467085e8d1d660f749abb2e70eb8c95",ref:o=>this.element=o,class:"verdocs-portal"},e("slot",{key:"731cefa0a79a520279e255455a95e22d1255f424"}))}};n.style=t;export{d as verdocs_organization_card,n as verdocs_portal};
2
+ //# sourceMappingURL=p-9b1b273c.entry.js.map