@duetds/components 4.34.2 → 4.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/hydrate/index.js +12 -1
  2. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-button_2.cjs.entry.js +3 -2
  5. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-editable-table-button.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-editable-table_4.cjs.entry.js +10 -1
  15. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  26. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-tab_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  40. package/lib/cjs/duet.cjs.js +2 -2
  41. package/lib/cjs/{focus-utils-b57facfe.js → focus-utils-3d73245e.js} +1 -1
  42. package/lib/cjs/{index-e2021bf7.js → index-b8c8ebe4.js} +1 -1
  43. package/lib/cjs/loader.cjs.js +2 -2
  44. package/lib/collection/components/duet-button/duet-button.css +21 -4
  45. package/lib/collection/components/duet-button/duet-button.js +5 -1
  46. package/lib/collection/components/duet-upload/duet-upload.js +25 -0
  47. package/lib/custom-elements-bundle/index.js +12 -2
  48. package/lib/duet/duet.esm.js +1 -1
  49. package/lib/duet/duet.js +1 -1
  50. package/lib/duet/{p-a900d55b.entry.js → p-01927eb0.entry.js} +1 -1
  51. package/lib/duet/{p-4db07868.entry.js → p-032607e4.entry.js} +1 -1
  52. package/lib/duet/{p-3e0a774d.entry.js → p-04597b37.entry.js} +1 -1
  53. package/lib/duet/{p-d1adeb76.entry.js → p-061d59b3.entry.js} +1 -1
  54. package/lib/duet/{p-1fff32a9.system.entry.js → p-08a34bd4.system.entry.js} +1 -1
  55. package/lib/duet/{p-a58f0665.system.entry.js → p-0b64cf3d.system.entry.js} +1 -1
  56. package/lib/duet/{p-66c35cd2.entry.js → p-117e0339.entry.js} +1 -1
  57. package/lib/duet/{p-746b3bee.entry.js → p-11f389cd.entry.js} +1 -1
  58. package/lib/duet/{p-cdaa629d.system.entry.js → p-129bc252.system.entry.js} +1 -1
  59. package/lib/duet/{p-f7f4f98a.system.entry.js → p-13058dc6.system.entry.js} +1 -1
  60. package/lib/duet/{p-ec5d0cda.entry.js → p-16de4b21.entry.js} +1 -1
  61. package/lib/duet/{p-69133107.system.entry.js → p-1e3ec7dc.system.entry.js} +1 -1
  62. package/lib/duet/{p-c67a63cc.system.entry.js → p-25aa7ac3.system.entry.js} +1 -1
  63. package/lib/duet/{p-db87c4b1.system.entry.js → p-279aa668.system.entry.js} +1 -1
  64. package/lib/duet/{p-6a8b3cf0.system.entry.js → p-2ce50cc6.system.entry.js} +1 -1
  65. package/lib/duet/{p-f01494f9.system.entry.js → p-3211cb0d.system.entry.js} +1 -1
  66. package/lib/duet/{p-eed6f9cc.system.entry.js → p-349c6990.system.entry.js} +1 -1
  67. package/lib/duet/{p-72ad7798.entry.js → p-3839858e.entry.js} +1 -1
  68. package/lib/duet/{p-4a742d83.entry.js → p-3c173e89.entry.js} +1 -1
  69. package/lib/duet/{p-a52d436c.entry.js → p-3dc1e5c7.entry.js} +1 -1
  70. package/lib/duet/{p-ae46a7d2.system.entry.js → p-414a29ba.system.entry.js} +1 -1
  71. package/lib/duet/{p-5f866721.entry.js → p-4bb35e6f.entry.js} +1 -1
  72. package/lib/duet/{p-488addbc.entry.js → p-4eca4ef3.entry.js} +1 -1
  73. package/lib/duet/{p-5f813e15.entry.js → p-5152f1e4.entry.js} +1 -1
  74. package/lib/duet/{p-354bf924.entry.js → p-53fb919f.entry.js} +1 -1
  75. package/lib/duet/{p-58d7f2d1.entry.js → p-59d4e6b8.entry.js} +1 -1
  76. package/lib/duet/{p-8e16057d.system.entry.js → p-5a6e464a.system.entry.js} +1 -1
  77. package/lib/duet/{p-00bf3bbb.system.entry.js → p-5d2ec61d.system.entry.js} +1 -1
  78. package/lib/duet/{p-ffd449ef.system.entry.js → p-5e6e0547.system.entry.js} +1 -1
  79. package/lib/duet/{p-08d1abc7.entry.js → p-61a0e3f7.entry.js} +1 -1
  80. package/lib/duet/{p-3998eed6.entry.js → p-62b3e73e.entry.js} +1 -1
  81. package/lib/duet/{p-e0038277.system.entry.js → p-64f8c8e0.system.entry.js} +1 -1
  82. package/lib/duet/{p-baef2241.entry.js → p-6aaf4be0.entry.js} +1 -1
  83. package/lib/duet/{p-62de4645.system.entry.js → p-6f288b44.system.entry.js} +1 -1
  84. package/lib/duet/{p-8d42cb7c.entry.js → p-6f35218d.entry.js} +1 -1
  85. package/lib/duet/{p-30d13a27.system.js → p-715eb86e.system.js} +1 -1
  86. package/lib/duet/{p-0dc01111.system.entry.js → p-7232506d.system.entry.js} +1 -1
  87. package/lib/duet/{p-0e742087.system.entry.js → p-7241b006.system.entry.js} +1 -1
  88. package/lib/duet/{p-582f9135.system.entry.js → p-75c48ba1.system.entry.js} +1 -1
  89. package/lib/duet/{p-9d487a0d.entry.js → p-77434f16.entry.js} +1 -1
  90. package/lib/duet/{p-60aa83c0.js → p-79cc24ee.js} +1 -1
  91. package/lib/duet/{p-e3973f41.system.js → p-7b4d646d.system.js} +1 -1
  92. package/lib/duet/{p-d3b5d2ef.system.entry.js → p-7cdfbafd.system.entry.js} +1 -1
  93. package/lib/duet/{p-760d2226.entry.js → p-7dadfd66.entry.js} +1 -1
  94. package/lib/duet/{p-939bf739.system.entry.js → p-8402709a.system.entry.js} +1 -1
  95. package/lib/duet/{p-2862054c.entry.js → p-8e70de92.entry.js} +1 -1
  96. package/lib/duet/{p-4836f66d.entry.js → p-8fda2b95.entry.js} +1 -1
  97. package/lib/duet/{p-13bc14a6.system.js → p-942856d9.system.js} +1 -1
  98. package/lib/duet/{p-90e7e876.entry.js → p-9d8421d4.entry.js} +1 -1
  99. package/lib/duet/{p-2524481a.system.entry.js → p-a01664b5.system.entry.js} +1 -1
  100. package/lib/duet/{p-f2c402a9.system.entry.js → p-a2373348.system.entry.js} +2 -2
  101. package/lib/duet/{p-5a5e7977.entry.js → p-a35f849e.entry.js} +1 -1
  102. package/lib/duet/{p-c50bbff5.entry.js → p-a43ed343.entry.js} +1 -1
  103. package/lib/duet/{p-5e03b63f.system.entry.js → p-a76ae6e9.system.entry.js} +1 -1
  104. package/lib/duet/{p-de23ae41.entry.js → p-accaacf9.entry.js} +1 -1
  105. package/lib/duet/{p-13d5fe80.system.entry.js → p-aefca63e.system.entry.js} +1 -1
  106. package/lib/duet/{p-b70f164d.entry.js → p-b2e9e246.entry.js} +1 -1
  107. package/lib/duet/{p-75261615.system.entry.js → p-bf246e5d.system.entry.js} +1 -1
  108. package/lib/duet/{p-3e47c910.entry.js → p-c414a7d0.entry.js} +1 -1
  109. package/lib/duet/{p-7a0a375e.system.entry.js → p-c75bf5dd.system.entry.js} +1 -1
  110. package/lib/duet/{p-5f2fb5db.entry.js → p-c90c17c7.entry.js} +1 -1
  111. package/lib/duet/{p-8b01f978.system.entry.js → p-c95b0a0e.system.entry.js} +1 -1
  112. package/lib/duet/{p-f9a096a9.system.entry.js → p-cb7921b9.system.entry.js} +1 -1
  113. package/lib/duet/{p-f3c258d8.system.entry.js → p-cd795dee.system.entry.js} +1 -1
  114. package/lib/duet/{p-9849a4ab.system.entry.js → p-d30c3f2c.system.entry.js} +1 -1
  115. package/lib/duet/{p-ddbdac54.entry.js → p-d855249b.entry.js} +1 -1
  116. package/lib/duet/{p-9793f3d8.entry.js → p-d8ac3d77.entry.js} +1 -1
  117. package/lib/duet/{p-e1c6f74b.entry.js → p-d992e2b5.entry.js} +1 -1
  118. package/lib/duet/{p-b8dde0c8.system.entry.js → p-daeb205a.system.entry.js} +1 -1
  119. package/lib/duet/{p-e242bf98.entry.js → p-db33afbe.entry.js} +1 -1
  120. package/lib/duet/{p-c92b1af1.system.entry.js → p-dd1bc83c.system.entry.js} +1 -1
  121. package/lib/duet/{p-ae8401c9.system.entry.js → p-de658899.system.entry.js} +1 -1
  122. package/lib/duet/{p-5c67bb73.system.entry.js → p-e1a40bab.system.entry.js} +1 -1
  123. package/lib/duet/{p-3e273d8d.entry.js → p-e9b95f7c.entry.js} +1 -1
  124. package/lib/duet/{p-12941c46.system.entry.js → p-ed57e786.system.entry.js} +1 -1
  125. package/lib/duet/{p-45a6838d.system.entry.js → p-f137fdb6.system.entry.js} +1 -1
  126. package/lib/duet/{p-4d5531be.entry.js → p-f96efcb6.entry.js} +1 -1
  127. package/lib/duet/{p-ee74ff67.entry.js → p-fae44e29.entry.js} +1 -1
  128. package/lib/duet/{p-ce566b2b.js → p-fceb0df8.js} +1 -1
  129. package/lib/duet/{p-c6ba80c6.entry.js → p-fdc358b8.entry.js} +1 -1
  130. package/lib/duet/{p-f6e1fb0f.system.entry.js → p-fefe12f8.system.entry.js} +1 -1
  131. package/lib/esm/duet-alert.entry.js +1 -1
  132. package/lib/esm/duet-badge.entry.js +1 -1
  133. package/lib/esm/duet-button_2.entry.js +3 -2
  134. package/lib/esm/duet-caption_4.entry.js +1 -1
  135. package/lib/esm/duet-card.entry.js +1 -1
  136. package/lib/esm/duet-checkbox.entry.js +1 -1
  137. package/lib/esm/duet-choice_2.entry.js +2 -2
  138. package/lib/esm/duet-collapsible.entry.js +1 -1
  139. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  140. package/lib/esm/duet-date-picker.entry.js +2 -2
  141. package/lib/esm/duet-divider_2.entry.js +1 -1
  142. package/lib/esm/duet-editable-table-button.entry.js +1 -1
  143. package/lib/esm/duet-editable-table_4.entry.js +10 -1
  144. package/lib/esm/duet-empty-state.entry.js +1 -1
  145. package/lib/esm/duet-fieldset.entry.js +1 -1
  146. package/lib/esm/duet-footer.entry.js +1 -1
  147. package/lib/esm/duet-grid_2.entry.js +1 -1
  148. package/lib/esm/duet-header_2.entry.js +1 -1
  149. package/lib/esm/duet-hero.entry.js +1 -1
  150. package/lib/esm/duet-icon.entry.js +1 -1
  151. package/lib/esm/duet-input_2.entry.js +1 -1
  152. package/lib/esm/duet-layout.entry.js +1 -1
  153. package/lib/esm/duet-list_2.entry.js +1 -1
  154. package/lib/esm/duet-modal.entry.js +2 -2
  155. package/lib/esm/duet-notification_2.entry.js +1 -1
  156. package/lib/esm/duet-number-input.entry.js +1 -1
  157. package/lib/esm/duet-progress.entry.js +1 -1
  158. package/lib/esm/duet-radio_2.entry.js +1 -1
  159. package/lib/esm/duet-range-slider.entry.js +1 -1
  160. package/lib/esm/duet-select.entry.js +1 -1
  161. package/lib/esm/duet-step_2.entry.js +1 -1
  162. package/lib/esm/duet-tab_2.entry.js +1 -1
  163. package/lib/esm/duet-textarea.entry.js +1 -1
  164. package/lib/esm/duet-toggle.entry.js +1 -1
  165. package/lib/esm/duet-tooltip.entry.js +1 -1
  166. package/lib/esm/duet-tray.entry.js +1 -1
  167. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  168. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  169. package/lib/esm/duet.js +2 -2
  170. package/lib/esm/{focus-utils-fc14cf36.js → focus-utils-6989cada.js} +1 -1
  171. package/lib/esm/{index-9ef5d3bc.js → index-ddb14345.js} +1 -1
  172. package/lib/esm/loader.js +2 -2
  173. package/lib/esm-es5/duet-alert.entry.js +1 -1
  174. package/lib/esm-es5/duet-badge.entry.js +1 -1
  175. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  176. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  177. package/lib/esm-es5/duet-card.entry.js +1 -1
  178. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  179. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  180. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  181. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  182. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  183. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  184. package/lib/esm-es5/duet-editable-table-button.entry.js +1 -1
  185. package/lib/esm-es5/duet-editable-table_4.entry.js +1 -1
  186. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  187. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  188. package/lib/esm-es5/duet-footer.entry.js +1 -1
  189. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  190. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  191. package/lib/esm-es5/duet-hero.entry.js +1 -1
  192. package/lib/esm-es5/duet-icon.entry.js +1 -1
  193. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  194. package/lib/esm-es5/duet-layout.entry.js +1 -1
  195. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  196. package/lib/esm-es5/duet-modal.entry.js +1 -1
  197. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  198. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  199. package/lib/esm-es5/duet-progress.entry.js +1 -1
  200. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  201. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  202. package/lib/esm-es5/duet-select.entry.js +1 -1
  203. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  204. package/lib/esm-es5/duet-tab_2.entry.js +1 -1
  205. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  206. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  207. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  208. package/lib/esm-es5/duet-tray.entry.js +1 -1
  209. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  210. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  211. package/lib/esm-es5/duet.js +1 -1
  212. package/lib/esm-es5/focus-utils-6989cada.js +4 -0
  213. package/lib/esm-es5/{index-9ef5d3bc.js → index-ddb14345.js} +1 -1
  214. package/lib/esm-es5/loader.js +1 -1
  215. package/lib/html.html-data.json +7 -1
  216. package/lib/types/components/duet-button/duet-button.d.ts +2 -1
  217. package/lib/types/components/duet-upload/duet-upload.d.ts +6 -0
  218. package/lib/types/components.d.ts +6 -0
  219. package/package.json +5 -5
  220. package/lib/esm-es5/focus-utils-fc14cf36.js +0 -4
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function o(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?a(e.value):n(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(s[0]===6&&a.label<r[1]){a.label=r[1];r=s;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(s);break}if(r[2])a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(o){s=[6,o];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */System.register(["./p-13bc14a6.system.js","./p-70fafc98.system.js","./p-efaa0c04.system.js","./p-ddb6344c.system.js","./p-5f6bd5db.system.js","./p-9a945278.system.js"],(function(e){"use strict";var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g;return{setters:[function(e){t=e.r;a=e.h;i=e.H;n=e.g;r=e.c},function(e){s=e.s;o=e.g},function(e){l=e.i},function(e){d=e.m;u=e.h;p=e.i;f=e.j;h=e.k;c=e.l;m=e.n;b=e.s},function(e){g=e.c},function(){}],execute:function(){var y=function(e,t){if(t===void 0){t=50}var a;return function(){var i=[];for(var n=0;n<arguments.length;n++){i[n]=arguments[n]}clearTimeout(a);a=setTimeout((function(){e.apply(undefined,i)}),t)}};var v=function(){var e={};function t(t){if(typeof t!=="string"){t=t.outerHTML}var a=e[t];if(!a){var i=t.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g,(function(e,t){return"${map."+t.trim()+"}"})).replace(/(\$\{(?!map\.)[^}]+\})/g,"");a=Function("map","return `"+i+"`")}return a}return t}();var x="duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";var k=e("duet_editable_table",function(){function e(e){var a=this;t(this,e);this.template=undefined;this.tick=Date.now();this.items=new Map;this.alignment="middle";this.groupsLabelDefaults={fi:"Kaikki",en:"All items",sv:"Alla objekt"};this.actionLabelDefaults={fi:"Toiminnot",en:"Actions",sv:"Handlingar"};this.groups=[{id:"all",label:this.groupsLabelDefaults,actionLabel:this.actionLabelDefaults}];this.actions=undefined;this.hideGroups=false;this.accessibleRole=undefined;this.theme="";this.kick=y((function(){a.tick=Date.now()}),100);this.getTemplate=function(){var e=a.element.getElementsByTagName("template");if(e===null||e===void 0?void 0:e.length){var t=e[0].content.firstElementChild.outerHTML;return v(t)}else{return false}};this.getItemData=function(e){var t=e.item,i=e.group,n=e.uid;if(a.template){return{group:i,uid:n,item:a.template(t)}}return{item:t,group:i,uid:n}};this.filterMap=function(e){if(e==="all"){return Array.from(a.items)}return Array.from(a.items).filter((function(t){return e===t[1].group}))}}e.prototype.componentWillLoad=function(){this.template=this.getTemplate();if(typeof this.groups==="string"){this.internalGroupArray=s(this.groups)}else{this.internalGroupArray=this.groups}if(typeof this.actions==="string"){this.internalActionsArray=s(this.actions)}else{this.internalActionsArray=this.actions}l(this)};e.prototype.updateTable=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.items=new Map(e||this.items);this.kick();return[2]}))}))};e.prototype.render=function(){var e=this;return a(i,{class:{"duet-theme-turva":this.theme==="turva"}},this.internalGroupArray.map((function(t){var i=e.filterMap(t.id);if(!i.length){return}return a("duet-table",{variation:"plain",breakpoint:"none",role:"",margin:e.hideGroups?"none":"auto"},a("table",{class:"duet-editable-table","aria-role":e.accessibleRole},a("thead",{class:"duet-editable-table-header"},a("tr",null,a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},!e.hideGroups?o(t.label):a("duet-visually-hidden",null,o(t.label))),a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},a("duet-visually-hidden",null,t.actionLabel?o(t.actionLabel):o(e.actionLabelDefaults))))),a("tbody",null,i.map((function(i){var n=i[0],r=i[1];return a("duet-editable-table-item",{theme:e.theme,keyName:n,data:e.getItemData(r),groupId:t.id,part:t.id,alignment:e.alignment,actions:e.internalActionsArray})})))))})))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());k.style=x;var w=function(e,t){var i=e.data,n=e.groupId,r=e.alignment;if(typeof i==="string"){return a("td",{innerHTML:i,class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}})}else{return a("td",{class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}},i)}};var M="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";var D=e("duet_editable_table_item",function(){function e(e){t(this,e);this.duetEditableItemAction=r(this,"duetEditableItemAction",7);this.isHovering=false;this.theme="";this.actions=undefined;this.groupId="";this.alignment="middle";this.keyName="";this.data=undefined}e.prototype.watchPropHandler=function(e,t){};e.prototype.componentWillLoad=function(){l(this)};e.prototype.render=function(){var e=this;return a(i,{role:"row"},a(w,{data:this.data.item,alignment:this.alignment,groupId:this.groupId}),a("td",{class:"duet-editable-table-actions",style:{verticalAlign:this.alignment}},a("div",{class:"duet-editable-table-actions-items",part:this.groupId+"actions"},this.actions.map((function(t){var i=t.map,n=i===void 0?undefined:i;if(n&&!n.includes(e.groupId)){return}return a("duet-editable-table-button",{keyName:e.keyName,group:e.data.group,uid:e.data.uid,actions:t,theme:e.theme})})))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{data:["watchPropHandler"]}},enumerable:false,configurable:true});return e}());D.style=M;var E='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}';var I=function(e){return e.substring(1,e.length-1)};var T={none:"all","none-scrollable":"all",small:I(c),medium:I(d),large:I(u),"x-large":I(p),"xx-large":I(f),"xxx-large":I(h)};var L={none:0,"with-links":parseFloat(m)*16,"without-links":parseFloat(b)*16};var _=e("duet_table",function(){function e(e){var a=this;t(this,e);this.matchesBreakpoint=true;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.handleMediaQueryChange=function(e){a.matchesBreakpoint=e.matches}}e.prototype.connectedCallback=function(){var e=this;this.mq=matchMedia(T[this.breakpoint]);this.mq.addEventListener("change",this.handleMediaQueryChange);this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return e.copyHeadingsToCells()}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=L[this.stickyDistance];var t=this.element.querySelectorAll("thead th");t.forEach((function(t){return t.style.top=e+"px"}))}};e.prototype.componentDidLoad=function(){this.observer.takeRecords()};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll("thead th");var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return a(i,{class:(e={},e["duet-table-"+this.variation]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},a("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());_.style=E;var z=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}];var F=function(e){var t={type:undefined,system_message:undefined,message:undefined};t=z.filter((function(t){return t.type==e}))[0];if(!t){t=z.filter((function(e){return e.type==="default"}))[0]}return t};var A=function(e){var t=F(e);var a=o(t.message);if(a===""||!a){return t.system_message}else{return a}};var S=function(e){var t=e.data;var i=t.item,n=t.error;var r=i.name;var s=n.type;return a("span",{class:"duet-upload-item-error",role:"status"},a("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"})," ",r),a("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},A(s)))};var P=function(e){var t=e.progress,i=e.name;return a("span",null,a("duet-paragraph",{color:"secondary",margin:"none",size:"small"},i),a("duet-spacer",{size:"xx-small"}),a("duet-progress",{progress:Math.ceil(t),"aria-hidden":true}))};var j=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var B=function(e){var t=e.data,i=e.showLinks;var n=t.item,r=t.size,s=t.uploaded,o=t.url,l=t.meta;var d=n.name;var u=a("span",{class:"duet-upload-item-name"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"}),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var p=a("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",j(r),")");var f=s&&o&&i?a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},a("duet-link",{url:o,external:true},u),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var h=l&&l.badges?a("span",null,a("duet-spacer",{size:"xx-small"}),l.badges.map((function(e){return a("duet-badge",{color:"primary"},e)}))):undefined;return a("span",{class:"duet-upload-item-success"},a("div",null,f),h)};var R=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var C=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var H=function(e,t){if(!t||!e){return true}return t>=e};var q=function(e,t){var a=t.allowedMimetypes,i=t.allowedExtensions,n=t.maxBytes;var r=false;var s=F("default");if(e){var l=e.name,d=e.type,u=e.size;var p=C(d,a);var f=R(l,i);var h=H(u,n);if(!p){s=F("duet-upload-101")}if(!f){s=F("duet-upload-100")}if(!h){s=F("duet-upload-201")}r=p&&f&&h}else{r=false}return{valid:r,errorMessage:r?undefined:o(s.message),errorSystem:r?undefined:s.system_message,errorType:r?undefined:s.type}};var U=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a<t){return true}}return false};var V=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var G=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var s=a.type,o=s===void 0?"POST":s,l=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,h=f===void 0?null:f;l.open(o,""+d+(p||""),true);var c=t.data,m=t.name;if(h){Object.keys(h).forEach((function(e){l.setRequestHeader(e,h[e])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,m,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){i(l,m,l.status)}};r(m)}l.send(c);return l};var W="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";var N=e("duet_upload",function(){function e(e){var i=this;t(this,e);this.duetChange=r(this,"duetChange",3);this.duetBlur=r(this,"duetBlur",7);this.duetFocus=r(this,"duetFocus",7);this.duetDone=r(this,"duetDone",3);this.duetState=r(this,"duetState",3);this.duetDelete=r(this,"duetDelete",3);this.duetCancel=r(this,"duetCancel",3);this.duetProgress=r(this,"duetProgress",3);this.duetUpload=r(this,"duetUpload",3);this.buttonId=g("DuetButton");this.labelId=g("DuetLabel");this.uploadId=g("DuetUpload");this.editableTableId=g("DuetEditableTable");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",failure:"failure"};this.tick=Date.now();this.external=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",color_hover:"primary-dark",id:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",color_hover:"primary-dark",id:"cancel",map:["inprogress"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.showLinks=false;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"tiedostoa",file:"tiedosto"}};this.statusMessageLabel=o(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=o(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=o(this.labelDefaults);this.descriptionDefaults={fi:"Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",sv:"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time."};this.description=o(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=o(this.fileListEmptyDefaults);this.error="";this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.listenForActionEvents=function(){i.element.addEventListener("duetEditableItemAction",(function(e){var t=e.detail;var a=t.action,n=t.keyName,r=t.originalEvent;switch(a){case"delete":i.onDelete(n,r);break;case"cancel":i.onCancel(n,r);break}}))};this.verifyValidity=function(){var e=i.getFilesAsArray(),t=e.invalid,a=e.valid;var n=i.valid;i.valid=t.length===0&&a.length!==0;if(i.valid!==n){i.duetState.emit({originalEvent:undefined,data:{valid:i.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){if(e.group){return e.group}return i.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return i.DefaultGroups.inprogress}else if(!e.valid){return i.DefaultGroups.failure}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,t){if(t===i.DefaultGroups.success){return a(B,{data:e,showLinks:i.showLinks})}else if(t===i.DefaultGroups.inprogress){return a(P,{progress:e.progress,name:e.item.name})}else if(t===i.DefaultGroups.failure){return a(S,{data:e})}else if(e.group){return e.html}else{return"none"}};this.convertToDuetEditableTableItems=function(){var e=new Map;i.files.forEach((function(t,a,n){var r=i.getGroupFromItemData(t);var s=i.getItemHTMLFromItemData(t,r);e.set(a,{uid:t.uid,item:s,group:r})}));return e};this.kick=y((function(){i.tick=Date.now()}),30);this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,n){if(n===void 0){n=true}var r=i.files.get(e);r[t]=a;i.files.set(e,r);if(n){i.kick()}};this.updateProgress=function(e,t){var a=function(a){i.updateValueInMap(t,"progress",a);i.onProgress(t,a,e)};if(e.lengthComputable){var n=e.loaded/e.total*100;a(n)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){i.filesInProgress.delete(e)}else{i.filesInProgress.set(e,"inprogress")}if(i.filesInProgress.size===0){i.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];i.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){i.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(i,void 0,void 0,(function(){return __generator(this,(function(a){switch(a.label){case 0:return[4,this.setFocus()];case 1:a.sent();this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}}))}))};this.transferComplete=function(e){i.updateValueInMap(e,"progress",100,false);i.trackProgress(e,true)};this.transferDone=function(e,t,a){i.updateValueInMap(t,"status",a,false);i.updateValueInMap(t,"uploaded",true,false);try{var n=JSON.parse(e.response);i.updateValueInMap(t,"url",n.url)}catch(r){i.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var n=JSON.parse(e.response).error;i.updateValueInMap(t,"error",{message:n.message,type:n.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");i.updateValueInMap(t,"error",{type:a},false)}i.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){i.updateValueInMap(e,"error",F("duet-upload-001"))};this.transferCanceled=function(e){i.files.delete(e);i.validateTotals(e);i.kick()};this.validateTotals=function(e){var t=U(i.files,i.maxBytesTotal);var a=V(i.files,i.maxFiles);if(t&&e){i.updateValueInMap(e,"error",F("duet-upload-202"),false)}if(a&&e){i.updateValueInMap(e,"error",F("duet-upload-301"),false)}i.bytesMaxReached=t;i.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.onDelete=function(e,t){var a=i.files.get(e);i.files.delete(e);i.validateTotals();i.kick();i.duetDelete.emit({originalEvent:t,data:{deletion:a},component:"duet-upload"});if(!i.external){i.makeXHRDeleteRequest(a)}i.resetFormFields()};this.onCancel=function(e,t){var a=i.files.get(e);i.files.delete(e);if(!i.external){var n=a.xhr;n.abort()}else{i.kick()}i.resetFormFields();i.duetCancel.emit({originalEvent:t,data:{cancelled:a},component:"duet-upload"})};this.onUpload=function(e,t){i.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){i.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){i.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){i.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onDone=function(){i.duetDone.emit({component:"duet-upload",data:{files:i.files}})}}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=s(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));return G({payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:null},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;return G({payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,arguments:"?key="+t+"&name="+a.name,headers:{"x-fileuid":t,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g,y;return __generator(this,(function(v){switch(v.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,9];i=0,n=a;v.label=1;case 1:if(!(i<n.length))return[3,9];r=n[i];s=q(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes}),o=s.valid,l=s.errorMessage,d=s.errorType,u=s.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);h=this.validateTotals(r.name),c=h.bytesMaxReached,m=h.fileMaxReached;if(!c)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 2:if(!m)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 3:if(!(o&&!this.external))return[3,7];b=new FormData;b.append("file",r);b.append("uid",p);b.append("name",r.name);b.append("metadata",JSON.stringify({uid:p,url:this.uri,size:r.size,meta:f.meta}));v.label=4;case 4:v.trys.push([4,6,,7]);g=f;return[4,this.makeXHRPostRequest(b)];case 5:g.xhr=v.sent();return[3,7];case 6:y=v.sent();this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 7:this.kick();v.label=8;case 8:i++;return[3,1];case 9:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var n=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());n=n.replace(/{maxbytes}/g,Math.floor(this.maxBytes/1024/1024)+" MB");n=n.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return a(i,{class:{"duet-m-0":this.margin==="none"}},a("duet-fieldset",{label:this.label,caption:n},a("slot",{name:"header"}),!this.files.size&&a("duet-label",{theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},this.fileListEmpty),!!this.files.size&&a("slot",{name:"fileheader"}),!!this.files.size&&a("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&a("duet-editable-table",{"aria-live":"polite","aria-relevant":"removals",accessibleRole:"log",id:this.editableTableId,groups:this.groups,actions:this.actions,hideGroups:this.hideGroups,alignment:this.alignment,items:this.convertToDuetEditableTableItems()}),!!this.files.size&&a("slot",{name:"filefooter"}),a("duet-spacer",{size:"large"}),!this.hideButton&&a("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle"},this.buttonLabel),a("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&a("duet-alert",null,this.fileMaxReached&&A("duet-upload-301"),this.bytesMaxReached&&A("duet-upload-202")),a("duet-spacer",{size:"medium"}),a("duet-visually-hidden",null,a("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:this.allowedMimetypes+","+this.allowedExtensions,onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,capture:"user"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());N.style=W}}}));
4
+ */System.register(["./p-942856d9.system.js","./p-70fafc98.system.js","./p-efaa0c04.system.js","./p-ddb6344c.system.js","./p-5f6bd5db.system.js","./p-9a945278.system.js"],(function(e){"use strict";var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g;return{setters:[function(e){t=e.r;a=e.h;i=e.H;n=e.g;r=e.c},function(e){s=e.s;o=e.g},function(e){l=e.i},function(e){d=e.m;u=e.h;p=e.i;f=e.j;h=e.k;c=e.l;m=e.n;b=e.s},function(e){g=e.c},function(){}],execute:function(){var y=function(e,t){if(t===void 0){t=50}var a;return function(){var i=[];for(var n=0;n<arguments.length;n++){i[n]=arguments[n]}clearTimeout(a);a=setTimeout((function(){e.apply(undefined,i)}),t)}};var v=function(){var e={};function t(t){if(typeof t!=="string"){t=t.outerHTML}var a=e[t];if(!a){var i=t.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g,(function(e,t){return"${map."+t.trim()+"}"})).replace(/(\$\{(?!map\.)[^}]+\})/g,"");a=Function("map","return `"+i+"`")}return a}return t}();var x="duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";var k=e("duet_editable_table",function(){function e(e){var a=this;t(this,e);this.template=undefined;this.tick=Date.now();this.items=new Map;this.alignment="middle";this.groupsLabelDefaults={fi:"Kaikki",en:"All items",sv:"Alla objekt"};this.actionLabelDefaults={fi:"Toiminnot",en:"Actions",sv:"Handlingar"};this.groups=[{id:"all",label:this.groupsLabelDefaults,actionLabel:this.actionLabelDefaults}];this.actions=undefined;this.hideGroups=false;this.accessibleRole=undefined;this.theme="";this.kick=y((function(){a.tick=Date.now()}),100);this.getTemplate=function(){var e=a.element.getElementsByTagName("template");if(e===null||e===void 0?void 0:e.length){var t=e[0].content.firstElementChild.outerHTML;return v(t)}else{return false}};this.getItemData=function(e){var t=e.item,i=e.group,n=e.uid;if(a.template){return{group:i,uid:n,item:a.template(t)}}return{item:t,group:i,uid:n}};this.filterMap=function(e){if(e==="all"){return Array.from(a.items)}return Array.from(a.items).filter((function(t){return e===t[1].group}))}}e.prototype.componentWillLoad=function(){this.template=this.getTemplate();if(typeof this.groups==="string"){this.internalGroupArray=s(this.groups)}else{this.internalGroupArray=this.groups}if(typeof this.actions==="string"){this.internalActionsArray=s(this.actions)}else{this.internalActionsArray=this.actions}l(this)};e.prototype.updateTable=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.items=new Map(e||this.items);this.kick();return[2]}))}))};e.prototype.render=function(){var e=this;return a(i,{class:{"duet-theme-turva":this.theme==="turva"}},this.internalGroupArray.map((function(t){var i=e.filterMap(t.id);if(!i.length){return}return a("duet-table",{variation:"plain",breakpoint:"none",role:"",margin:e.hideGroups?"none":"auto"},a("table",{class:"duet-editable-table","aria-role":e.accessibleRole},a("thead",{class:"duet-editable-table-header"},a("tr",null,a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},!e.hideGroups?o(t.label):a("duet-visually-hidden",null,o(t.label))),a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},a("duet-visually-hidden",null,t.actionLabel?o(t.actionLabel):o(e.actionLabelDefaults))))),a("tbody",null,i.map((function(i){var n=i[0],r=i[1];return a("duet-editable-table-item",{theme:e.theme,keyName:n,data:e.getItemData(r),groupId:t.id,part:t.id,alignment:e.alignment,actions:e.internalActionsArray})})))))})))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());k.style=x;var w=function(e,t){var i=e.data,n=e.groupId,r=e.alignment;if(typeof i==="string"){return a("td",{innerHTML:i,class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}})}else{return a("td",{class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}},i)}};var M="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";var D=e("duet_editable_table_item",function(){function e(e){t(this,e);this.duetEditableItemAction=r(this,"duetEditableItemAction",7);this.isHovering=false;this.theme="";this.actions=undefined;this.groupId="";this.alignment="middle";this.keyName="";this.data=undefined}e.prototype.watchPropHandler=function(e,t){};e.prototype.componentWillLoad=function(){l(this)};e.prototype.render=function(){var e=this;return a(i,{role:"row"},a(w,{data:this.data.item,alignment:this.alignment,groupId:this.groupId}),a("td",{class:"duet-editable-table-actions",style:{verticalAlign:this.alignment}},a("div",{class:"duet-editable-table-actions-items",part:this.groupId+"actions"},this.actions.map((function(t){var i=t.map,n=i===void 0?undefined:i;if(n&&!n.includes(e.groupId)){return}return a("duet-editable-table-button",{keyName:e.keyName,group:e.data.group,uid:e.data.uid,actions:t,theme:e.theme})})))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{data:["watchPropHandler"]}},enumerable:false,configurable:true});return e}());D.style=M;var E='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}';var I=function(e){return e.substring(1,e.length-1)};var T={none:"all","none-scrollable":"all",small:I(c),medium:I(d),large:I(u),"x-large":I(p),"xx-large":I(f),"xxx-large":I(h)};var _={none:0,"with-links":parseFloat(m)*16,"without-links":parseFloat(b)*16};var L=e("duet_table",function(){function e(e){var a=this;t(this,e);this.matchesBreakpoint=true;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.handleMediaQueryChange=function(e){a.matchesBreakpoint=e.matches}}e.prototype.connectedCallback=function(){var e=this;this.mq=matchMedia(T[this.breakpoint]);this.mq.addEventListener("change",this.handleMediaQueryChange);this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return e.copyHeadingsToCells()}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=_[this.stickyDistance];var t=this.element.querySelectorAll("thead th");t.forEach((function(t){return t.style.top=e+"px"}))}};e.prototype.componentDidLoad=function(){this.observer.takeRecords()};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll("thead th");var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return a(i,{class:(e={},e["duet-table-"+this.variation]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},a("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());L.style=E;var z=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}];var F=function(e){var t={type:undefined,system_message:undefined,message:undefined};t=z.filter((function(t){return t.type==e}))[0];if(!t){t=z.filter((function(e){return e.type==="default"}))[0]}return t};var A=function(e){var t=F(e);var a=o(t.message);if(a===""||!a){return t.system_message}else{return a}};var S=function(e){var t=e.data;var i=t.item,n=t.error;var r=i.name;var s=n.type;return a("span",{class:"duet-upload-item-error",role:"status"},a("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"})," ",r),a("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},A(s)))};var P=function(e){var t=e.progress,i=e.name;return a("span",null,a("duet-paragraph",{color:"secondary",margin:"none",size:"small"},i),a("duet-spacer",{size:"xx-small"}),a("duet-progress",{progress:Math.ceil(t),"aria-hidden":true}))};var j=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var B=function(e){var t=e.data,i=e.showLinks;var n=t.item,r=t.size,s=t.uploaded,o=t.url,l=t.meta;var d=n.name;var u=a("span",{class:"duet-upload-item-name"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"}),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var p=a("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",j(r),")");var f=s&&o&&i?a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},a("duet-link",{url:o,external:true},u),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var h=l&&l.badges?a("span",null,a("duet-spacer",{size:"xx-small"}),l.badges.map((function(e){return a("duet-badge",{color:"primary"},e)}))):undefined;return a("span",{class:"duet-upload-item-success"},a("div",null,f),h)};var R=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var C=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var H=function(e,t){if(!t||!e){return true}return t>=e};var q=function(e,t){var a=t.allowedMimetypes,i=t.allowedExtensions,n=t.maxBytes;var r=false;var s=F("default");if(e){var l=e.name,d=e.type,u=e.size;var p=C(d,a);var f=R(l,i);var h=H(u,n);if(!p){s=F("duet-upload-101")}if(!f){s=F("duet-upload-100")}if(!h){s=F("duet-upload-201")}r=p&&f&&h}else{r=false}return{valid:r,errorMessage:r?undefined:o(s.message),errorSystem:r?undefined:s.system_message,errorType:r?undefined:s.type}};var U=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a<t){return true}}return false};var V=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var G=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var s=a.type,o=s===void 0?"POST":s,l=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,h=f===void 0?null:f;l.open(o,""+d+(p||""),true);var c=t.data,m=t.name;if(h){Object.keys(h).forEach((function(e){l.setRequestHeader(e,h[e])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,m,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){i(l,m,l.status)}};r(m)}l.send(c);return l};var W="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";var N=e("duet_upload",function(){function e(e){var i=this;t(this,e);this.duetChange=r(this,"duetChange",3);this.duetBlur=r(this,"duetBlur",7);this.duetFocus=r(this,"duetFocus",7);this.duetDone=r(this,"duetDone",3);this.duetState=r(this,"duetState",3);this.duetDelete=r(this,"duetDelete",3);this.duetCancel=r(this,"duetCancel",3);this.duetProgress=r(this,"duetProgress",3);this.duetUpload=r(this,"duetUpload",3);this.buttonId=g("DuetButton");this.labelId=g("DuetLabel");this.uploadId=g("DuetUpload");this.editableTableId=g("DuetEditableTable");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",failure:"failure"};this.tick=Date.now();this.external=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",color_hover:"primary-dark",id:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",color_hover:"primary-dark",id:"cancel",map:["inprogress"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.showLinks=false;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"tiedostoa",file:"tiedosto"}};this.statusMessageLabel=o(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=o(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=o(this.labelDefaults);this.descriptionDefaults={fi:"Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",sv:"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time."};this.description=o(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=o(this.fileListEmptyDefaults);this.error="";this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.listenForActionEvents=function(){i.element.addEventListener("duetEditableItemAction",(function(e){var t=e.detail;var a=t.action,n=t.keyName,r=t.originalEvent;switch(a){case"delete":i.onDelete(n,r);break;case"cancel":i.onCancel(n,r);break}}))};this.verifyValidity=function(){var e=i.getFilesAsArray(),t=e.invalid,a=e.valid;var n=i.valid;i.valid=t.length===0&&a.length!==0;if(i.valid!==n){i.duetState.emit({originalEvent:undefined,data:{valid:i.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){if(e.group){return e.group}return i.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return i.DefaultGroups.inprogress}else if(!e.valid){return i.DefaultGroups.failure}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,t){if(t===i.DefaultGroups.success){return a(B,{data:e,showLinks:i.showLinks})}else if(t===i.DefaultGroups.inprogress){return a(P,{progress:e.progress,name:e.item.name})}else if(t===i.DefaultGroups.failure){return a(S,{data:e})}else if(e.group){return e.html}else{return"none"}};this.convertToDuetEditableTableItems=function(){var e=new Map;i.files.forEach((function(t,a,n){var r=i.getGroupFromItemData(t);var s=i.getItemHTMLFromItemData(t,r);e.set(a,{uid:t.uid,item:s,group:r})}));return e};this.kick=y((function(){i.tick=Date.now()}),30);this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,n){if(n===void 0){n=true}var r=i.files.get(e);r[t]=a;i.files.set(e,r);if(n){i.kick()}};this.updateProgress=function(e,t){var a=function(a){i.updateValueInMap(t,"progress",a);i.onProgress(t,a,e)};if(e.lengthComputable){var n=e.loaded/e.total*100;a(n)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){i.filesInProgress.delete(e)}else{i.filesInProgress.set(e,"inprogress")}if(i.filesInProgress.size===0){i.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];i.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){i.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(i,void 0,void 0,(function(){return __generator(this,(function(a){switch(a.label){case 0:return[4,this.setFocus()];case 1:a.sent();this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}}))}))};this.transferComplete=function(e){i.updateValueInMap(e,"progress",100,false);i.trackProgress(e,true)};this.transferDone=function(e,t,a){i.updateValueInMap(t,"status",a,false);i.updateValueInMap(t,"uploaded",true,false);try{var n=JSON.parse(e.response);i.updateValueInMap(t,"url",n.url)}catch(r){i.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var n=JSON.parse(e.response).error;i.updateValueInMap(t,"error",{message:n.message,type:n.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");i.updateValueInMap(t,"error",{type:a},false)}i.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){i.updateValueInMap(e,"error",F("duet-upload-001"))};this.transferCanceled=function(e){i.files.delete(e);i.validateTotals(e);i.kick()};this.validateTotals=function(e){var t=U(i.files,i.maxBytesTotal);var a=V(i.files,i.maxFiles);if(t&&e){i.updateValueInMap(e,"error",F("duet-upload-202"),false)}if(a&&e){i.updateValueInMap(e,"error",F("duet-upload-301"),false)}i.bytesMaxReached=t;i.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.onDelete=function(e,t){var a=i.files.get(e);i.files.delete(e);i.validateTotals();i.kick();i.duetDelete.emit({originalEvent:t,data:{deletion:a},component:"duet-upload"});if(!i.external){i.makeXHRDeleteRequest(a)}i.resetFormFields()};this.onCancel=function(e,t){var a=i.files.get(e);i.files.delete(e);if(!i.external){var n=a.xhr;n.abort()}else{i.kick()}i.resetFormFields();i.duetCancel.emit({originalEvent:t,data:{cancelled:a},component:"duet-upload"})};this.onUpload=function(e,t){i.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){i.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){i.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){i.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onDone=function(){i.duetDone.emit({component:"duet-upload",data:{files:i.files}})}}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=s(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));return G({payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:null},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;return G({payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,arguments:"?key="+t+"&name="+a.name,headers:{"x-fileuid":t,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g,y;return __generator(this,(function(v){switch(v.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,9];i=0,n=a;v.label=1;case 1:if(!(i<n.length))return[3,9];r=n[i];s=q(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes}),o=s.valid,l=s.errorMessage,d=s.errorType,u=s.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);h=this.validateTotals(r.name),c=h.bytesMaxReached,m=h.fileMaxReached;if(!c)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 2:if(!m)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 3:if(!(o&&!this.external))return[3,7];b=new FormData;b.append("file",r);b.append("uid",p);b.append("name",r.name);b.append("metadata",JSON.stringify({uid:p,url:this.uri,size:r.size,meta:f.meta}));v.label=4;case 4:v.trys.push([4,6,,7]);g=f;return[4,this.makeXHRPostRequest(b)];case 5:g.xhr=v.sent();return[3,7];case 6:y=v.sent();this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 7:this.kick();v.label=8;case 8:i++;return[3,1];case 9:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var n=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());n=n.replace(/{maxbytes}/g,Math.floor(this.maxBytes/1024/1024)+" MB");n=n.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return a(i,{class:{"duet-m-0":this.margin==="none"}},a("duet-fieldset",{label:this.label,caption:n},a("slot",{name:"header"}),!this.files.size&&a("duet-label",{theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},this.fileListEmpty),!!this.files.size&&a("slot",{name:"fileheader"}),!!this.files.size&&a("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&a("duet-editable-table",{"aria-live":"polite","aria-relevant":"removals",accessibleRole:"log",id:this.editableTableId,groups:this.groups,actions:this.actions,hideGroups:this.hideGroups,alignment:this.alignment,items:this.convertToDuetEditableTableItems()}),!!this.files.size&&a("slot",{name:"filefooter"}),a("duet-spacer",{size:"large"}),!this.hideButton&&a("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle"},this.buttonLabel),a("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&a("duet-alert",null,this.fileMaxReached&&A("duet-upload-301"),this.bytesMaxReached&&A("duet-upload-202")),a("duet-spacer",{size:"medium"}),a("duet-visually-hidden",null,a("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:this.allowedMimetypes+","+this.allowedExtensions,onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,capture:"user"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());N.style=W}}}));
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,r,a){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function d(e){try{u(a.next(e))}catch(t){i(t)}}function s(e){try{u(a["throw"](e))}catch(t){i(t)}}function u(e){e.done?r(e.value):n(e.value).then(d,s)}u((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return u([e,t])}}function u(d){if(a)throw new TypeError("Generator is already executing.");while(r)try{if(a=1,n&&(i=d[0]&2?n["return"]:d[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;if(n=0,i)d=[d[0]&2,i.value];switch(d[0]){case 0:case 1:i=d;break;case 4:r.label++;return{value:d[1],done:false};case 5:r.label++;n=d[1];d=[0];continue;case 7:d=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1];i=d;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(d);break}if(i[2])r.ops.pop();r.trys.pop();continue}d=t.call(e,r)}catch(s){d=[6,s];n=0}finally{a=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */System.register(["./p-13bc14a6.system.js","./p-ddb6344c.system.js","./p-5f6bd5db.system.js","./p-e566ff11.system.js","./p-efaa0c04.system.js"],(function(e){"use strict";var t,r,a,n,i,d,s,u,o,l,c,g;return{setters:[function(e){t=e.r;r=e.c;a=e.h;n=e.H;i=e.g},function(e){d=e.c;s=e.a;u=e.b;o=e.d},function(e){l=e.c},function(e){c=e.i},function(e){g=e.i}],execute:function(){var h='*.sc-duet-range-slider,*.sc-duet-range-slider::after,*.sc-duet-range-slider::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-range-slider-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-range-slider-h:last-child,.sc-duet-range-slider-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-range-slider-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-range-slider-h{width:100% !important}}.duet-m-0.sc-duet-range-slider-h{margin:0 !important}.duet-range-container.sc-duet-range-slider{position:relative;width:100%}.duet-output.sc-duet-range-slider{position:absolute;top:12px;right:0;z-index:200;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;background:white}.duet-theme-turva.sc-duet-range-slider .duet-output.sc-duet-range-slider{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-range-disabled.sc-duet-range-slider .duet-output.sc-duet-range-slider{color:#909599}.duet-range-disabled.duet-theme-turva.sc-duet-range-slider .duet-output.sc-duet-range-slider{color:#747475}.duet-range.sc-duet-range-slider{position:relative;z-index:100;width:100%;height:4px;background:#cfd2d4;border-radius:4px}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider{background:#cfcfd1}.duet-ie.sc-duet-range-slider .duet-range.sc-duet-range-slider{display:block;width:auto;height:26px;background:transparent !important}.duet-range.sc-duet-range-slider::-moz-range-track{height:1px;background:transparent !important;border:0;-moz-appearance:none}.duet-range.sc-duet-range-slider::-ms-track{color:transparent;background:transparent;border:0}.duet-range.sc-duet-range-slider:focus,.duet-range.sc-duet-range-slider:active{outline:0}.user-is-tabbing.sc-duet-range-slider-h .duet-range.sc-duet-range-slider:focus{box-shadow:0 0 0 1px white, 0 0 0 3px rgba(0, 119, 179, 0.75)}.user-is-tabbing.sc-duet-range-slider-h .duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:focus{box-shadow:0 0 0 1px white, 0 0 0 3px #171c3a}.duet-range.sc-duet-range-slider::-webkit-slider-runnable-track{background:transparent}.duet-range.sc-duet-range-slider::-webkit-slider-thumb{position:relative;width:24px;height:24px;cursor:-webkit-grab;background:white;border:1px solid #909599;border-radius:50%;transition:box-shadow 300ms ease;-webkit-appearance:none}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-webkit-slider-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:active::-webkit-slider-thumb{cursor:-webkit-grabbing}.duet-range.sc-duet-range-slider::-moz-range-thumb{position:relative;width:24px;height:24px;cursor:-moz-grab;background:white;border:1px solid #909599;border-radius:50%;appearance:none}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-moz-range-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:active::-moz-range-thumb{cursor:-moz-grabbing}.duet-range.sc-duet-range-slider::-ms-thumb{position:relative;width:24px;height:24px;overflow:visible;background:white;border:1px solid #909599;border-radius:50%}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:disabled{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled{background:#cfcfd1 !important}.duet-range.sc-duet-range-slider:disabled::-webkit-slider-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-webkit-slider-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider:disabled::-moz-range-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-moz-range-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider:disabled::-ms-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-ms-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider::-ms-fill-lower{height:4px;background:#0077b3}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-fill-lower{background:#c60c30}.duet-range.sc-duet-range-slider::-ms-fill-upper{height:4px;background:#cfd2d4}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-fill-upper{background:#cfcfd1}.duet-label-hidden.sc-duet-range-slider duet-label.sc-duet-range-slider,.duet-label-hidden.sc-duet-range-slider output.sc-duet-range-slider{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var b={turva:{active:d,inactive:s},default:{active:u,inactive:o}};var p=e("duet_range_slider",function(){function e(e){var a=this;t(this,e);this.duetChange=r(this,"duetChange",3);this.duetInput=r(this,"duetInput",7);this.rangeId=l("DuetRange");this.theme="";this.margin="auto";this.expand=false;this.required=false;this.disabled=false;this.min=0;this.label="label";this.labelHidden=false;this.unit="";this.max=100;this.step=1;this.locale="fi-FI";this.value=0;this.debounce=0;this.onInput=function(e){var t=e.target;if(t){a.value=parseFloat(t.value)||0}a.duetInput.emit({originalEvent:e,value:a.value,component:"duet-range-slider"})};this.onChange=function(e){var t=e.target;if(t){a.value=parseFloat(t.value)||0}clearTimeout(a.timeoutId);a.timeoutId=setTimeout((function(){a.duetChange.emit({originalEvent:e,value:a.value,component:"duet-range-slider"})}),a.debounce)}}e.prototype.componentWillLoad=function(){g(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.calculatePercentage=function(){return(this.value-this.min)/(this.max-this.min)*100};e.prototype.render=function(){var e=this;var t=this.identifier||this.rangeId;var r=this.theme==="turva"?"turva":"default";var i=b[r],d=i.inactive,s=i.active;var u=this.calculatePercentage();var o={background:"-webkit-linear-gradient(left,"+s+" 0%,"+s+" "+u+"%,"+d+" "+u+"%)"};return a(n,{class:{"duet-m-0":this.margin==="none","duet-expand":this.expand}},a("div",{class:{"duet-range-container":true,"duet-label-hidden":this.labelHidden,"duet-theme-turva":this.theme==="turva","duet-ie":c(),"duet-range-disabled":this.disabled}},a("duet-label",{theme:r,margin:"small",for:t},this.label),a("output",{"aria-hidden":"true",htmlFor:t,class:"duet-output"},this.value.toLocaleString(this.locale),this.unit),a("input",{onInput:this.onInput,onChange:this.onChange,ref:function(t){return e.nativeInput=t},type:"range",min:this.min,max:this.max,step:this.step,value:this.value,style:o,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this.value,"aria-valuetext":this.value+" "+this.unit,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":this.accessibleDescribedBy,id:t,name:this.name,disabled:this.disabled,required:this.required,class:"duet-range"})))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());p.style=h}}}));
4
+ */System.register(["./p-942856d9.system.js","./p-ddb6344c.system.js","./p-5f6bd5db.system.js","./p-e566ff11.system.js","./p-efaa0c04.system.js"],(function(e){"use strict";var t,r,a,n,i,d,s,u,o,l,c,g;return{setters:[function(e){t=e.r;r=e.c;a=e.h;n=e.H;i=e.g},function(e){d=e.c;s=e.a;u=e.b;o=e.d},function(e){l=e.c},function(e){c=e.i},function(e){g=e.i}],execute:function(){var h='*.sc-duet-range-slider,*.sc-duet-range-slider::after,*.sc-duet-range-slider::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-range-slider-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-range-slider-h:last-child,.sc-duet-range-slider-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-range-slider-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-range-slider-h{width:100% !important}}.duet-m-0.sc-duet-range-slider-h{margin:0 !important}.duet-range-container.sc-duet-range-slider{position:relative;width:100%}.duet-output.sc-duet-range-slider{position:absolute;top:12px;right:0;z-index:200;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;background:white}.duet-theme-turva.sc-duet-range-slider .duet-output.sc-duet-range-slider{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-range-disabled.sc-duet-range-slider .duet-output.sc-duet-range-slider{color:#909599}.duet-range-disabled.duet-theme-turva.sc-duet-range-slider .duet-output.sc-duet-range-slider{color:#747475}.duet-range.sc-duet-range-slider{position:relative;z-index:100;width:100%;height:4px;background:#cfd2d4;border-radius:4px}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider{background:#cfcfd1}.duet-ie.sc-duet-range-slider .duet-range.sc-duet-range-slider{display:block;width:auto;height:26px;background:transparent !important}.duet-range.sc-duet-range-slider::-moz-range-track{height:1px;background:transparent !important;border:0;-moz-appearance:none}.duet-range.sc-duet-range-slider::-ms-track{color:transparent;background:transparent;border:0}.duet-range.sc-duet-range-slider:focus,.duet-range.sc-duet-range-slider:active{outline:0}.user-is-tabbing.sc-duet-range-slider-h .duet-range.sc-duet-range-slider:focus{box-shadow:0 0 0 1px white, 0 0 0 3px rgba(0, 119, 179, 0.75)}.user-is-tabbing.sc-duet-range-slider-h .duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:focus{box-shadow:0 0 0 1px white, 0 0 0 3px #171c3a}.duet-range.sc-duet-range-slider::-webkit-slider-runnable-track{background:transparent}.duet-range.sc-duet-range-slider::-webkit-slider-thumb{position:relative;width:24px;height:24px;cursor:-webkit-grab;background:white;border:1px solid #909599;border-radius:50%;transition:box-shadow 300ms ease;-webkit-appearance:none}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-webkit-slider-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:active::-webkit-slider-thumb{cursor:-webkit-grabbing}.duet-range.sc-duet-range-slider::-moz-range-thumb{position:relative;width:24px;height:24px;cursor:-moz-grab;background:white;border:1px solid #909599;border-radius:50%;appearance:none}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-moz-range-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:active::-moz-range-thumb{cursor:-moz-grabbing}.duet-range.sc-duet-range-slider::-ms-thumb{position:relative;width:24px;height:24px;overflow:visible;background:white;border:1px solid #909599;border-radius:50%}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-thumb{border-color:#747475}.duet-range.sc-duet-range-slider:disabled{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled{background:#cfcfd1 !important}.duet-range.sc-duet-range-slider:disabled::-webkit-slider-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-webkit-slider-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider:disabled::-moz-range-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-moz-range-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider:disabled::-ms-thumb{cursor:default;background:#cfd2d4;border-color:transparent}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider:disabled::-ms-thumb{background:#cfcfd1;border-color:transparent}.duet-range.sc-duet-range-slider::-ms-fill-lower{height:4px;background:#0077b3}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-fill-lower{background:#c60c30}.duet-range.sc-duet-range-slider::-ms-fill-upper{height:4px;background:#cfd2d4}.duet-theme-turva.sc-duet-range-slider .duet-range.sc-duet-range-slider::-ms-fill-upper{background:#cfcfd1}.duet-label-hidden.sc-duet-range-slider duet-label.sc-duet-range-slider,.duet-label-hidden.sc-duet-range-slider output.sc-duet-range-slider{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var b={turva:{active:d,inactive:s},default:{active:u,inactive:o}};var p=e("duet_range_slider",function(){function e(e){var a=this;t(this,e);this.duetChange=r(this,"duetChange",3);this.duetInput=r(this,"duetInput",7);this.rangeId=l("DuetRange");this.theme="";this.margin="auto";this.expand=false;this.required=false;this.disabled=false;this.min=0;this.label="label";this.labelHidden=false;this.unit="";this.max=100;this.step=1;this.locale="fi-FI";this.value=0;this.debounce=0;this.onInput=function(e){var t=e.target;if(t){a.value=parseFloat(t.value)||0}a.duetInput.emit({originalEvent:e,value:a.value,component:"duet-range-slider"})};this.onChange=function(e){var t=e.target;if(t){a.value=parseFloat(t.value)||0}clearTimeout(a.timeoutId);a.timeoutId=setTimeout((function(){a.duetChange.emit({originalEvent:e,value:a.value,component:"duet-range-slider"})}),a.debounce)}}e.prototype.componentWillLoad=function(){g(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.calculatePercentage=function(){return(this.value-this.min)/(this.max-this.min)*100};e.prototype.render=function(){var e=this;var t=this.identifier||this.rangeId;var r=this.theme==="turva"?"turva":"default";var i=b[r],d=i.inactive,s=i.active;var u=this.calculatePercentage();var o={background:"-webkit-linear-gradient(left,"+s+" 0%,"+s+" "+u+"%,"+d+" "+u+"%)"};return a(n,{class:{"duet-m-0":this.margin==="none","duet-expand":this.expand}},a("div",{class:{"duet-range-container":true,"duet-label-hidden":this.labelHidden,"duet-theme-turva":this.theme==="turva","duet-ie":c(),"duet-range-disabled":this.disabled}},a("duet-label",{theme:r,margin:"small",for:t},this.label),a("output",{"aria-hidden":"true",htmlFor:t,class:"duet-output"},this.value.toLocaleString(this.locale),this.unit),a("input",{onInput:this.onInput,onChange:this.onChange,ref:function(t){return e.nativeInput=t},type:"range",min:this.min,max:this.max,step:this.step,value:this.value,style:o,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this.value,"aria-valuetext":this.value+" "+this.unit,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":this.accessibleDescribedBy,id:t,name:this.name,disabled:this.disabled,required:this.required,class:"duet-range"})))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());p.style=h}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-13bc14a6.system.js","./p-efaa0c04.system.js"],(function(e){"use strict";var t,n,a,r;return{setters:[function(e){t=e.r;n=e.h;a=e.H},function(e){r=e.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";var i=e("duet_empty_state",function(){function e(e){t(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){r(this)};e.prototype.render=function(){return n(a,null,n("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},n("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),n("div",null,n("slot",null))))};return e}());i.style=o}}}));
4
+ System.register(["./p-942856d9.system.js","./p-efaa0c04.system.js"],(function(e){"use strict";var t,n,a,r;return{setters:[function(e){t=e.r;n=e.h;a=e.H},function(e){r=e.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";var i=e("duet_empty_state",function(){function e(e){t(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){r(this)};e.prototype.render=function(){return n(a,null,n("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},n("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),n("div",null,n("slot",null))))};return e}());i.style=o}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as e,c as t,h as s,g as i,H as d}from"./p-ce566b2b.js";import{c as o}from"./p-c1325e35.js";import{i as r}from"./p-04f9f1bf.js";import{i as p}from"./p-a28cf57b.js";let n=class{constructor(s){e(this,s),this.duetStepClick=t(this,"duetStepClick",7),this.buttonId=o("DuetStepButton"),this.contentId=o("DuetStepContent"),this.theme="",this.roundedTop=!1,this.roundedBottom=!1,this.handleKeyDown=e=>{this.isClickDisabled()||r(e)&&(e.preventDefault(),this.handleStepClick(e))},this.handleClick=e=>{this.isClickDisabled()||this.handleStepClick(e)}}handleStepClick(e){this.duetStepClick.emit({originalEvent:e,component:"duet-step",stepIndex:this.stepIndex})}componentWillLoad(){p(this)}async setFocus(e={preventScroll:!0}){this.buttonElement.focus(e)}isClickDisabled(){return"complete"!==this.state}headingColor(){return"incomplete"!==this.state?"":"turva"!==this.theme?"gray-darker":"gray-dark-turva"}renderStepCounter(){return"complete"===this.state||"disabled"===this.state?s("div",{class:"duet-step-icon"},s("duet-icon",{margin:"none",size:"auto",color:"gray-lightest",icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.748 24a.755.755 0 0 1-.531-.22.754.754 0 0 1-.196-.716l1.77-6.905a.84.84 0 0 1 .045-.121.73.73 0 0 1 .151-.223L16.513 1.289A4.355 4.355 0 0 1 19.611 0c1.178 0 2.277.454 3.106 1.279l.029.029a4.367 4.367 0 0 1 1.251 3.121 4.356 4.356 0 0 1-1.32 3.087L8.183 22.01a.735.735 0 0 1-.231.154.784.784 0 0 1-.111.042L.933 23.978A.773.773 0 0 1 .748 24zm1.041-1.791 4.41-1.131-3.281-3.275zm5.868-1.795 13.02-13.02-4.074-4.074L3.58 16.344zM21.736 6.332a2.893 2.893 0 0 0-.059-3.972l-.02-.02a2.872 2.872 0 0 0-2.037-.84v-.375l-.001.375a2.873 2.873 0 0 0-1.954.762z"/></svg>'})):`${this.stepIndex+1} `}render(){return s("div",{class:{"duet-step":!0,[`is-${this.state}`]:!0,"rounded-top":this.roundedTop,"rounded-bottom":this.roundedBottom,"duet-theme-turva":"turva"===this.theme}},s("div",{class:"duet-step-heading",id:this.buttonId,role:"button",tabindex:"incomplete"!==this.state?"0":void 0,"aria-disabled":this.isClickDisabled().toString(),"aria-expanded":("current"===this.state).toString(),"aria-controls":this.contentId,onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:e=>this.buttonElement=e},s("div",{"aria-hidden":"true"},s("div",{class:"duet-step-counter"},this.renderStepCounter())),s("duet-spacer",{direction:"horizontal",size:"large",breakpoint:"small"}),s("duet-spacer",{direction:"horizontal",size:"medium",breakpoint:"x-small"}),s("div",null,s("duet-heading",{theme:this.theme,level:this.headingLevel,visualLevel:"h4",color:this.headingColor(),margin:"none"},this.heading)),s("duet-spacer",{direction:"horizontal",size:"large"}),s("div",{class:"duet-step-heading-slot"},s("slot",{name:"heading-content"}))),s("div",{class:"duet-step-content-wrapper"},s("div",{class:"duet-step-content",role:"region","aria-labelledby":this.buttonId,id:this.contentId},s("slot",null))))}get element(){return i(this)}};n.style='*.sc-duet-step,*.sc-duet-step::after,*.sc-duet-step::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-step-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block}.duet-step.sc-duet-step{padding:20px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;background:white;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.duet-theme-turva.sc-duet-step{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.rounded-top.sc-duet-step{border-top-left-radius:4px;border-top-right-radius:4px}.duet-step.rounded-bottom.sc-duet-step{margin-bottom:20px !important;border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-step.rounded-bottom.sc-duet-step{margin-bottom:0 !important}}@media (min-width: 36em){.duet-step.sc-duet-step{padding:0 20px 0 0 !important;margin:0 !important;font-size:1.25rem;box-shadow:none !important}}.duet-step-heading.sc-duet-step{display:flex;align-items:center;border-radius:4px}.duet-step-heading[aria-disabled=false].sc-duet-step{cursor:pointer}.duet-step-heading.sc-duet-step:focus{outline:0}.duet-step-heading.sc-duet-step:active{opacity:0.75}.user-is-tabbing.sc-duet-step-h .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-step-h .duet-theme-turva.sc-duet-step .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#005f8f}.duet-theme-turva.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#9e0a26}.is-current.sc-duet-step .duet-step-heading.sc-duet-step{margin-bottom:20px}@media (min-width: 36em){.duet-step-heading.sc-duet-step{margin-top:8px;margin-bottom:8px !important}.sc-duet-step-h:first-of-type .duet-step-heading.sc-duet-step{margin-top:0}.sc-duet-step-h:last-of-type .duet-step-heading.sc-duet-step{margin-bottom:0 !important}}.duet-step-counter.sc-duet-step{-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:30px;color:white;text-align:center;border-radius:50%;transition:background-color 300ms ease}@media (min-width: 36em){.duet-step-counter.sc-duet-step{width:40px;height:40px;line-height:40px}}.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#0077b3}.duet-theme-turva.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#c60c30}.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#657787}.duet-theme-turva.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#747475}.duet-step-icon.sc-duet-step{display:flex;align-items:center;justify-content:center;width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step{width:20px;height:20px}}.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:20px;height:20px}}@media (min-width: 36em){.duet-step-content-wrapper.sc-duet-step{min-height:20px;padding-left:40px;margin-left:19px;border-left:2px solid #e1e3e6}.duet-theme-turva.sc-duet-step .duet-step-content-wrapper.sc-duet-step{border-color:#e4e4e6}.sc-duet-step-h:last-of-type .duet-step-content-wrapper.sc-duet-step{min-height:0;border:transparent}}.duet-step-content.sc-duet-step{display:none;padding-bottom:16px}@media (min-width: 36em){.duet-step-content.sc-duet-step{padding-bottom:28px}}.is-current.sc-duet-step .duet-step-content.sc-duet-step{display:block}.duet-step-heading-slot.sc-duet-step{display:none;margin-top:2px}@media (min-width: 48em){.duet-step-heading-slot.sc-duet-step{display:block}}';let a=class{constructor(s){e(this,s),this.duetStepChange=t(this,"duetStepChange",7),this.theme="",this.accessibleLive="Lista jossa {total} kohtaa. Olet kohdassa {current}.",this.margin="auto",this.backDisabled=!1,this.selected=0}currentStepChanged(e){if(isNaN(e))throw new Error(`step must be a number. got: ${e}`);if(e<0)throw new Error(`step must be not be less than zero. got: ${e}`);if(e>this.getSteps().length)throw new Error("step must not exceed total number of steps");this.updateStepState(),setTimeout((()=>this.setStepFocus()),50)}currentStepInvokedDisable(){this.updateStepState()}onDuetStepClick(e){this.duetStepChange.emit({fromStep:this.selected,toStep:e.detail.stepIndex,component:"duet-stepper"})}componentWillLoad(){p(this)}async connectedCallback(){this.updateStepState()}getSteps(){return Array.from(this.element.querySelectorAll("duet-step"))}setStepFocus(){this.getSteps()[this.selected].setFocus()}updateStepState(){const e=this.getSteps();e.forEach(((e,t)=>{let s;s=t<this.selected?this.backDisabled?"disabled":"complete":t>this.selected?"incomplete":"current",e.theme=this.theme,e.state=s,e.stepIndex=t}));const t=function(e,t){const s={};return t.forEach((e=>{const t=e.state;s[t]||(s[t]=[]),s[t].push(e)})),s}(0,e);Object.values(t).forEach((e=>{e.forEach(((t,s)=>{t.roundedTop=0===s,t.roundedBottom=s===e.length-1}))}))}formatAnnouncement(){const e=this.getSteps(),t=(this.selected+1).toString(10),s=e.length.toString(10);return this.accessibleLive.replace("{current}",t).replace("{total}",s)}render(){return s(d,{class:{"duet-m-0":"none"===this.margin}},s("div",{class:{"duet-stepper":!0,"duet-theme-turva":"turva"===this.theme}},s("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true","aria-relevant":"all"},this.formatAnnouncement()),s("slot",null)))}get element(){return i(this)}static get watchers(){return{selected:["currentStepChanged"],backDisabled:["currentStepInvokedDisable"]}}};a.style=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}.duet-stepper{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-stepper{padding:28px !important;padding-top:36px !important;padding-bottom:36px !important;background:white;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}}";export{n as duet_step,a as duet_stepper}
4
+ import{r as e,c as t,h as s,g as i,H as d}from"./p-fceb0df8.js";import{c as o}from"./p-c1325e35.js";import{i as r}from"./p-04f9f1bf.js";import{i as p}from"./p-a28cf57b.js";let n=class{constructor(s){e(this,s),this.duetStepClick=t(this,"duetStepClick",7),this.buttonId=o("DuetStepButton"),this.contentId=o("DuetStepContent"),this.theme="",this.roundedTop=!1,this.roundedBottom=!1,this.handleKeyDown=e=>{this.isClickDisabled()||r(e)&&(e.preventDefault(),this.handleStepClick(e))},this.handleClick=e=>{this.isClickDisabled()||this.handleStepClick(e)}}handleStepClick(e){this.duetStepClick.emit({originalEvent:e,component:"duet-step",stepIndex:this.stepIndex})}componentWillLoad(){p(this)}async setFocus(e={preventScroll:!0}){this.buttonElement.focus(e)}isClickDisabled(){return"complete"!==this.state}headingColor(){return"incomplete"!==this.state?"":"turva"!==this.theme?"gray-darker":"gray-dark-turva"}renderStepCounter(){return"complete"===this.state||"disabled"===this.state?s("div",{class:"duet-step-icon"},s("duet-icon",{margin:"none",size:"auto",color:"gray-lightest",icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.748 24a.755.755 0 0 1-.531-.22.754.754 0 0 1-.196-.716l1.77-6.905a.84.84 0 0 1 .045-.121.73.73 0 0 1 .151-.223L16.513 1.289A4.355 4.355 0 0 1 19.611 0c1.178 0 2.277.454 3.106 1.279l.029.029a4.367 4.367 0 0 1 1.251 3.121 4.356 4.356 0 0 1-1.32 3.087L8.183 22.01a.735.735 0 0 1-.231.154.784.784 0 0 1-.111.042L.933 23.978A.773.773 0 0 1 .748 24zm1.041-1.791 4.41-1.131-3.281-3.275zm5.868-1.795 13.02-13.02-4.074-4.074L3.58 16.344zM21.736 6.332a2.893 2.893 0 0 0-.059-3.972l-.02-.02a2.872 2.872 0 0 0-2.037-.84v-.375l-.001.375a2.873 2.873 0 0 0-1.954.762z"/></svg>'})):`${this.stepIndex+1} `}render(){return s("div",{class:{"duet-step":!0,[`is-${this.state}`]:!0,"rounded-top":this.roundedTop,"rounded-bottom":this.roundedBottom,"duet-theme-turva":"turva"===this.theme}},s("div",{class:"duet-step-heading",id:this.buttonId,role:"button",tabindex:"incomplete"!==this.state?"0":void 0,"aria-disabled":this.isClickDisabled().toString(),"aria-expanded":("current"===this.state).toString(),"aria-controls":this.contentId,onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:e=>this.buttonElement=e},s("div",{"aria-hidden":"true"},s("div",{class:"duet-step-counter"},this.renderStepCounter())),s("duet-spacer",{direction:"horizontal",size:"large",breakpoint:"small"}),s("duet-spacer",{direction:"horizontal",size:"medium",breakpoint:"x-small"}),s("div",null,s("duet-heading",{theme:this.theme,level:this.headingLevel,visualLevel:"h4",color:this.headingColor(),margin:"none"},this.heading)),s("duet-spacer",{direction:"horizontal",size:"large"}),s("div",{class:"duet-step-heading-slot"},s("slot",{name:"heading-content"}))),s("div",{class:"duet-step-content-wrapper"},s("div",{class:"duet-step-content",role:"region","aria-labelledby":this.buttonId,id:this.contentId},s("slot",null))))}get element(){return i(this)}};n.style='*.sc-duet-step,*.sc-duet-step::after,*.sc-duet-step::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-step-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block}.duet-step.sc-duet-step{padding:20px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;background:white;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.duet-theme-turva.sc-duet-step{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.rounded-top.sc-duet-step{border-top-left-radius:4px;border-top-right-radius:4px}.duet-step.rounded-bottom.sc-duet-step{margin-bottom:20px !important;border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-step.rounded-bottom.sc-duet-step{margin-bottom:0 !important}}@media (min-width: 36em){.duet-step.sc-duet-step{padding:0 20px 0 0 !important;margin:0 !important;font-size:1.25rem;box-shadow:none !important}}.duet-step-heading.sc-duet-step{display:flex;align-items:center;border-radius:4px}.duet-step-heading[aria-disabled=false].sc-duet-step{cursor:pointer}.duet-step-heading.sc-duet-step:focus{outline:0}.duet-step-heading.sc-duet-step:active{opacity:0.75}.user-is-tabbing.sc-duet-step-h .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-step-h .duet-theme-turva.sc-duet-step .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#005f8f}.duet-theme-turva.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#9e0a26}.is-current.sc-duet-step .duet-step-heading.sc-duet-step{margin-bottom:20px}@media (min-width: 36em){.duet-step-heading.sc-duet-step{margin-top:8px;margin-bottom:8px !important}.sc-duet-step-h:first-of-type .duet-step-heading.sc-duet-step{margin-top:0}.sc-duet-step-h:last-of-type .duet-step-heading.sc-duet-step{margin-bottom:0 !important}}.duet-step-counter.sc-duet-step{-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:30px;color:white;text-align:center;border-radius:50%;transition:background-color 300ms ease}@media (min-width: 36em){.duet-step-counter.sc-duet-step{width:40px;height:40px;line-height:40px}}.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#0077b3}.duet-theme-turva.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#c60c30}.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#657787}.duet-theme-turva.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#747475}.duet-step-icon.sc-duet-step{display:flex;align-items:center;justify-content:center;width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step{width:20px;height:20px}}.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:20px;height:20px}}@media (min-width: 36em){.duet-step-content-wrapper.sc-duet-step{min-height:20px;padding-left:40px;margin-left:19px;border-left:2px solid #e1e3e6}.duet-theme-turva.sc-duet-step .duet-step-content-wrapper.sc-duet-step{border-color:#e4e4e6}.sc-duet-step-h:last-of-type .duet-step-content-wrapper.sc-duet-step{min-height:0;border:transparent}}.duet-step-content.sc-duet-step{display:none;padding-bottom:16px}@media (min-width: 36em){.duet-step-content.sc-duet-step{padding-bottom:28px}}.is-current.sc-duet-step .duet-step-content.sc-duet-step{display:block}.duet-step-heading-slot.sc-duet-step{display:none;margin-top:2px}@media (min-width: 48em){.duet-step-heading-slot.sc-duet-step{display:block}}';let a=class{constructor(s){e(this,s),this.duetStepChange=t(this,"duetStepChange",7),this.theme="",this.accessibleLive="Lista jossa {total} kohtaa. Olet kohdassa {current}.",this.margin="auto",this.backDisabled=!1,this.selected=0}currentStepChanged(e){if(isNaN(e))throw new Error(`step must be a number. got: ${e}`);if(e<0)throw new Error(`step must be not be less than zero. got: ${e}`);if(e>this.getSteps().length)throw new Error("step must not exceed total number of steps");this.updateStepState(),setTimeout((()=>this.setStepFocus()),50)}currentStepInvokedDisable(){this.updateStepState()}onDuetStepClick(e){this.duetStepChange.emit({fromStep:this.selected,toStep:e.detail.stepIndex,component:"duet-stepper"})}componentWillLoad(){p(this)}async connectedCallback(){this.updateStepState()}getSteps(){return Array.from(this.element.querySelectorAll("duet-step"))}setStepFocus(){this.getSteps()[this.selected].setFocus()}updateStepState(){const e=this.getSteps();e.forEach(((e,t)=>{let s;s=t<this.selected?this.backDisabled?"disabled":"complete":t>this.selected?"incomplete":"current",e.theme=this.theme,e.state=s,e.stepIndex=t}));const t=function(e,t){const s={};return t.forEach((e=>{const t=e.state;s[t]||(s[t]=[]),s[t].push(e)})),s}(0,e);Object.values(t).forEach((e=>{e.forEach(((t,s)=>{t.roundedTop=0===s,t.roundedBottom=s===e.length-1}))}))}formatAnnouncement(){const e=this.getSteps(),t=(this.selected+1).toString(10),s=e.length.toString(10);return this.accessibleLive.replace("{current}",t).replace("{total}",s)}render(){return s(d,{class:{"duet-m-0":"none"===this.margin}},s("div",{class:{"duet-stepper":!0,"duet-theme-turva":"turva"===this.theme}},s("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true","aria-relevant":"all"},this.formatAnnouncement()),s("slot",null)))}get element(){return i(this)}static get watchers(){return{selected:["currentStepChanged"],backDisabled:["currentStepInvokedDisable"]}}};a.style=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}.duet-stepper{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-stepper{padding:28px !important;padding-top:36px !important;padding-bottom:36px !important;background:white;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}}";export{n as duet_step,a as duet_stepper}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as e,c as t,h as i,g as o}from"./p-ce566b2b.js";import{a as r}from"./p-f11208c3.js";import{D as a}from"./p-76f00bd5.js";import{a as h,g as d}from"./p-2764f081.js";import{p as n}from"./p-986779fb.js";import{i as m}from"./p-a28cf57b.js";let s=class{constructor(i){e(this,i),this.duetClick=t(this,"duetClick",7),this.duetAnalytics=t(this,"duetAnalytics",7),this.processedListItems=null,this.processedActions=null,this.processedBack=null,this.theme="",this.heading="",this.preHeading="",this.level="h1",this.description="",this.icon="",this.iconSize="medium",this.iconRight=!1,this.categoryIcon="",this.categoryIconColor="category-pet",this.buttonLabel="",this.language=h(),this.accessibleLabelExternalDefaults=a,this.accessibleLabelExternal=d(this.accessibleLabelExternalDefaults),this.buttonUrl="#",this.buttonId="",this.textCenter=!1,this.leftAlign=!1,this.image="",this.variation="default",this.handleClick=(e,t)=>{t&&t.analytics&&this.duetAnalytics.emit({component:"duet-hero",analyticsId:t.analytics}),this.emitChange(e,t)}}componentWillLoad(){m(this),this.refresh()}async refresh(){this.processedListItems=n(this.listItems),this.processedActions=n(this.actions),this.processedBack=n(this.back)}emitChange(e,t){t||(t={}),this.buttonLabel&&(t.label=this.buttonLabel,t.href=this.buttonUrl,t.id=this.buttonId||"No ID defined via buttonId prop"),this.duetClick.emit({originalEvent:e,data:t,component:"duet-hero"})}render(){const e={backgroundImage:`url(${this.image})`};let t="turva"===this.theme?"negative":"primary",o="primary-blue",a="gray-lightest",h="primary";return"light"!==this.variation&&"image"!==this.variation&&"gray"!==this.variation&&"minimal"!==this.variation||(a="secondary","turva"===this.theme&&(a="secondary-turva",t="primary",h="color-primary-turva",o="color-primary-turva")),i("div",{role:"region",class:{"duet-hero":!0,"duet-theme-turva":"turva"===this.theme,"duet-has-category-icon":!!this.categoryIcon,"duet-hero-light":"light"===this.variation,"duet-hero-gray":"gray"===this.variation||"minimal"===this.variation,"duet-hero-minimal":"minimal"===this.variation,"duet-hero-with-image":"image"===this.variation,"duet-hero-gray-with-actions":!!this.processedActions,"duet-hero-gray-with-back":!!this.processedBack,"duet-hero-text-center":this.textCenter&&!this.leftAlign,"duet-hero-left-align":this.leftAlign}},i("div",{class:"duet-hero-wrapper"},this.image&&"image"===this.variation&&i("div",{class:"duet-hero-image-mask"},i("div",{class:"duet-hero-image-wrapper"},i("div",{class:"duet-hero-image",style:e}))),("gray"===this.variation||"light"===this.variation||"minimal"===this.variation)&&this.processedBack&&i("div",{class:"duet-hero-back"},i("duet-button",{style:{transform:"translateX(-8px)"},variation:"plain",icon:"action-arrow-left-small",theme:this.theme,iconSize:"small",color:h,padding:"none",margin:"none",fixed:!0,url:this.processedBack.href,identifier:this.processedBack.id,onClick:e=>this.handleClick(e,{label:this.processedBack.label,href:this.processedBack.href,id:this.processedBack.id,analyticsId:this.processedBack.analyticsId})},this.processedBack.label)),("gray"===this.variation||"minimal"===this.variation)&&this.categoryIcon&&i("duet-icon",{class:{"duet-hero-icon":!0,"duet-hero-icon-has-heading":""!==this.preHeading},size:"x-large",background:this.categoryIconColor,name:this.categoryIcon}),i("div",{class:"duet-hero-text"},this.preHeading&&i("duet-paragraph",{margin:"none",class:"duet-hero-pre"},this.preHeading),i("slot",{name:"badge"}),i("duet-heading",{theme:this.theme,level:this.level,class:{"duet-hero-heading":!0,"duet-hero-heading-has-pre":""!==this.preHeading},color:"default"===this.variation?"gray-lightest":"",visualLevel:"gray"===this.variation||"minimal"===this.variation?"h2":"h1"},this.heading),this.description&&i("duet-paragraph",{theme:this.theme,color:a,variation:"intro"},this.description),("gray"===this.variation||"minimal"===this.variation)&&this.processedListItems&&i("duet-list",{theme:this.theme,"label-width":"30",breakpoint:"large",mobile:this.leftAlign?void 0:"center"},this.processedListItems.map((e=>i("duet-list-item",null,i("span",{slot:"label"},e.label),i("span",{slot:"value"},e.value))))),this.buttonLabel&&i("duet-button",{url:this.buttonUrl,icon:this.icon,iconRight:this.iconRight,iconSize:this.iconSize,variation:t,theme:this.theme,identifier:this.buttonId,onClick:e=>this.handleClick(e,this.buttonData),fixed:!0},this.buttonLabel),i("span",{class:"duet-hero-slot-unnamed"},i("slot",null))),("gray"===this.variation||"minimal"===this.variation)&&this.processedActions&&i("div",{class:"duet-hero-links"},this.processedActions.map((e=>i("a",{class:"duet-hero-link",href:e.href,id:e.id,target:e.external?"_blank":"_self",onClick:t=>this.handleClick(t,e)},i("div",{class:"duet-hero-action-icon"},i("duet-icon",{size:"small",margin:"none",name:e.icon,color:"currentColor",outline:o})),i("span",null,e.label),e.external&&i("duet-visually-hidden",null,", ",this.accessibleLabelExternal),e.external&&i("div",{class:"duet-hero-action-arrow"},i("duet-icon",{icon:r.svg,size:"xx-small",margin:"none",color:"currentColor"})))))),this.image&&"image"!==this.variation&&i("div",{class:"duet-hero-image",style:e})))}get element(){return o(this)}static get watchers(){return{back:["refresh"],listItems:["refresh"],actions:["refresh"]}}};s.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-hero{position:relative;display:block;width:100%;padding:48px 28px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;text-decoration:none;text-shadow:none;text-transform:none;background:#00294d}.duet-hero.duet-p-0{padding:0 !important}.duet-hero.duet-m-0{margin:0 !important}.duet-hero.duet-hero-text-center{text-align:center !important}.duet-hero.duet-hero-light{padding-bottom:0 !important}@media (min-width: 62em){.duet-hero.duet-hero-light{padding-bottom:28px !important}}.duet-hero.duet-hero-with-image{padding-bottom:20px !important;margin-bottom:-36px}@media (min-width: 48em){.duet-hero.duet-hero-with-image{padding-bottom:28px !important}}@media (min-width: 62em){.duet-hero.duet-hero-with-image{padding-bottom:36px !important;margin-bottom:-20px}}.duet-hero.duet-hero-light,.duet-hero.duet-hero-with-image{color:#00294d;background-color:white;background-image:linear-gradient(#f3f9fc, #f9fcfe)}.duet-hero.duet-hero-light::before,.duet-hero.duet-hero-with-image::before{position:absolute;top:100%;left:0;z-index:-1;width:100%;height:400px;content:"";background-image:linear-gradient(#f9fcfe, white)}.duet-hero.duet-hero-light.duet-theme-turva,.duet-hero.duet-hero-with-image.duet-theme-turva{color:#171c3a;background-image:linear-gradient(#f5f5f7, #fafafb)}.duet-hero.duet-hero-light.duet-theme-turva::before,.duet-hero.duet-hero-with-image.duet-theme-turva::before{background-image:linear-gradient(#fafafb, white)}.duet-hero.duet-hero-gray{color:#00294d;background:#f5f8fa}.duet-hero.duet-hero-gray.duet-theme-turva{background:#f5f5f7}@media (min-width: 62em){.duet-hero.duet-hero-gray .duet-hero-text{display:inline-block;vertical-align:top}.duet-hero.duet-hero-gray .duet-hero-icon+.duet-hero-text{margin-left:28px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-actions{padding-bottom:65.4545454545px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-back{padding-top:72px}}.duet-hero.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:#c60c30}@media (min-width: 62em){.duet-hero{min-height:290px;padding:111.6px 56px;overflow:visible}}.duet-hero-icon{display:inline-block;vertical-align:top}@media (min-width: 62em){.duet-hero-icon{margin-top:-8px}}@media (min-width: 62em){.duet-hero-heading{margin-top:12px}}@media (min-width: 62em){.duet-hero-heading-has-pre{margin-top:0}}.duet-hero-wrapper{position:relative;width:100%;max-width:1110px;margin:0 auto;text-align:center}.duet-hero-left-align .duet-hero-wrapper{text-align:left}.duet-hero-with-image .duet-hero-wrapper{position:static}@media (min-width: 62em){.duet-hero-wrapper{text-align:left}}.duet-hero-text{max-width:50rem;margin:0 auto}.duet-hero-text-center .duet-hero-text{text-align:center !important}@media (min-width: 48em){.duet-hero-text{width:80%}.duet-hero-left-align .duet-hero-text{margin:0}}@media (min-width: 62em){.duet-hero-text{width:52%;max-width:none;margin-top:-10px;margin-left:0}.duet-hero-text-center .duet-hero-text{margin-left:auto}}.duet-hero:not(.duet-hero-with-image) .duet-hero-image{width:100%;max-width:400px;height:0;padding-bottom:50%;margin:28px auto 0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain}@media (min-width: 36em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{padding-bottom:40%}}@media (min-width: 48em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:420px;padding-bottom:34%}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:540px}}@media (min-width: 62em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{position:absolute;top:50%;right:0;padding-bottom:30%;margin:0;transform:translateY(-50%)}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-60px;padding-bottom:26%}.duet-hero-gray .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}@media (min-width: 62em){.duet-hero-gray:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}.duet-hero-image-wrapper{position:relative;width:80%;height:0;padding-bottom:80%;margin:-30px auto 36px;overflow:hidden;border-radius:28%;box-shadow:0 0 20px rgba(255, 255, 255, 0.5);transform:rotate(10deg)}.duet-theme-turva .duet-hero-image-wrapper{padding-bottom:68%;border-radius:44% 47% 38% 54%;transform:none}@media screen and (min-width: 440px){.duet-hero-image-wrapper{width:300px;padding-bottom:300px}.duet-theme-turva .duet-hero-image-wrapper{width:80%;padding-bottom:68%}}@media (min-width: 62em){.duet-hero-image-wrapper{position:absolute;top:-60px;right:-50px;width:470px;padding-bottom:470px;margin:0}.duet-theme-turva .duet-hero-image-wrapper{top:-40px;right:-80px;width:536px;padding-bottom:470px}}@media (min-width: 76.25em){.duet-hero-image-wrapper{top:-70px;right:-60px;width:600px;padding-bottom:600px}.duet-theme-turva .duet-hero-image-wrapper{top:-70px;right:-60px;width:650px;padding-bottom:600px}}@media screen and (min-width: 1450px){.duet-hero-image-wrapper{top:-70px;right:25px}.duet-theme-turva .duet-hero-image-wrapper{right:0}}.duet-hero-image-wrapper .duet-hero-image{position:absolute;top:-5%;left:-5%;width:110%;height:110%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;transform:rotate(-10deg)}.duet-theme-turva .duet-hero-image-wrapper .duet-hero-image{top:0;left:0;width:100%;height:100%;transform:none}.duet-hero-image-mask{position:relative;margin:-48px auto 0;overflow:hidden}@media (min-width: 62em){.duet-hero-image-mask{position:absolute;top:0;right:0;width:470px;height:460px;margin:0}}@media (min-width: 76.25em){.duet-hero-image-mask{width:650px;height:580px}}@media screen and (min-width: 1450px){.duet-hero-image-mask{right:50%;transform:translateX(110%)}.duet-theme-turva .duet-hero-image-mask{transform:translateX(108%)}}duet-heading+duet-button{margin-top:12px !important}.duet-hero-links{width:calc(100% + 56px);margin-top:48px;margin-left:-28px}.duet-hero-minimal .duet-hero-links{margin-top:28px}@media (min-width: 36em){.duet-hero-links{margin-top:72px}.duet-hero-minimal .duet-hero-links{margin-top:28px}}@media (min-width: 62em){.duet-hero-links{width:auto;margin:36px 0 0}.duet-hero-minimal .duet-hero-links{margin-top:28px}}.duet-hero-link{display:flex;align-items:center;width:100%;padding:16px 16px 8px;font-weight:600;-webkit-hyphens:auto;hyphens:auto;line-height:1.25;color:#0077b3;text-align:left;text-decoration:none;border-bottom:1px solid #e1e3e6;transition:background-color 300ms ease}.duet-hero-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-hero-link:focus,.duet-hero-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-hero-link:hover,.duet-hero-link:hover .duet-hero-action-arrow{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-hero-link:hover,.duet-theme-turva .duet-hero-link:hover .duet-hero-action-arrow{color:#940925 !important}.duet-theme-turva .duet-hero-link{color:#c60c30}@media (min-width: 36em){.duet-hero-link{padding:16px 16px 16px 28px}}@media (min-width: 62em){.duet-hero-link{display:inline-flex;width:auto;max-width:350px;padding:0;margin:0 28px 16px 0;border:0;border-radius:4px}}.duet-hero-link:hover{background:rgba(0, 0, 0, 0.02)}@media (min-width: 62em){.duet-hero-link:hover{background:transparent}}.duet-hero-link:first-of-type{border-top:1px solid #e1e3e6}@media (min-width: 62em){.duet-hero-link:first-of-type{margin-top:0;border:0}}.duet-hero-link:last-of-type{margin-bottom:-48px}@media (min-width: 62em){.duet-hero-link:last-of-type{margin-right:0;margin-bottom:0}}.duet-hero-link span{margin-top:-8px}@media (min-width: 36em){.duet-hero-link span{margin:0}}.duet-hero-action-icon{margin-right:8px}@media (min-width: 36em){.duet-hero-action-icon{margin-right:12px}}.duet-hero-action-arrow{margin:0 0 0 8px;color:#0077b3}@media (max-width: 35.9375em){.duet-hero-action-arrow{margin-top:-9px}}.duet-theme-turva .duet-hero-action-arrow{color:#c60c30}.duet-hero-back{margin-bottom:28px !important;display:flex;align-items:center;justify-content:center}.duet-hero-left-align .duet-hero-back{align-items:self-start;justify-content:flex-start}@media (min-width: 36em){.duet-hero-back{margin-bottom:36px !important}.duet-hero-minimal .duet-hero-back{margin-bottom:28px !important}}@media (min-width: 62em){.duet-hero-back{display:block}}.duet-hero-pre{display:inline-block;width:auto;margin-right:8px}.duet-hero-pre+duet-heading{margin-top:0 !important}';export{s as duet_hero}
4
+ import{r as e,c as t,h as i,g as o}from"./p-fceb0df8.js";import{a as r}from"./p-f11208c3.js";import{D as a}from"./p-76f00bd5.js";import{a as h,g as d}from"./p-2764f081.js";import{p as n}from"./p-986779fb.js";import{i as m}from"./p-a28cf57b.js";let s=class{constructor(i){e(this,i),this.duetClick=t(this,"duetClick",7),this.duetAnalytics=t(this,"duetAnalytics",7),this.processedListItems=null,this.processedActions=null,this.processedBack=null,this.theme="",this.heading="",this.preHeading="",this.level="h1",this.description="",this.icon="",this.iconSize="medium",this.iconRight=!1,this.categoryIcon="",this.categoryIconColor="category-pet",this.buttonLabel="",this.language=h(),this.accessibleLabelExternalDefaults=a,this.accessibleLabelExternal=d(this.accessibleLabelExternalDefaults),this.buttonUrl="#",this.buttonId="",this.textCenter=!1,this.leftAlign=!1,this.image="",this.variation="default",this.handleClick=(e,t)=>{t&&t.analytics&&this.duetAnalytics.emit({component:"duet-hero",analyticsId:t.analytics}),this.emitChange(e,t)}}componentWillLoad(){m(this),this.refresh()}async refresh(){this.processedListItems=n(this.listItems),this.processedActions=n(this.actions),this.processedBack=n(this.back)}emitChange(e,t){t||(t={}),this.buttonLabel&&(t.label=this.buttonLabel,t.href=this.buttonUrl,t.id=this.buttonId||"No ID defined via buttonId prop"),this.duetClick.emit({originalEvent:e,data:t,component:"duet-hero"})}render(){const e={backgroundImage:`url(${this.image})`};let t="turva"===this.theme?"negative":"primary",o="primary-blue",a="gray-lightest",h="primary";return"light"!==this.variation&&"image"!==this.variation&&"gray"!==this.variation&&"minimal"!==this.variation||(a="secondary","turva"===this.theme&&(a="secondary-turva",t="primary",h="color-primary-turva",o="color-primary-turva")),i("div",{role:"region",class:{"duet-hero":!0,"duet-theme-turva":"turva"===this.theme,"duet-has-category-icon":!!this.categoryIcon,"duet-hero-light":"light"===this.variation,"duet-hero-gray":"gray"===this.variation||"minimal"===this.variation,"duet-hero-minimal":"minimal"===this.variation,"duet-hero-with-image":"image"===this.variation,"duet-hero-gray-with-actions":!!this.processedActions,"duet-hero-gray-with-back":!!this.processedBack,"duet-hero-text-center":this.textCenter&&!this.leftAlign,"duet-hero-left-align":this.leftAlign}},i("div",{class:"duet-hero-wrapper"},this.image&&"image"===this.variation&&i("div",{class:"duet-hero-image-mask"},i("div",{class:"duet-hero-image-wrapper"},i("div",{class:"duet-hero-image",style:e}))),("gray"===this.variation||"light"===this.variation||"minimal"===this.variation)&&this.processedBack&&i("div",{class:"duet-hero-back"},i("duet-button",{style:{transform:"translateX(-8px)"},variation:"plain",icon:"action-arrow-left-small",theme:this.theme,iconSize:"small",color:h,padding:"none",margin:"none",fixed:!0,url:this.processedBack.href,identifier:this.processedBack.id,onClick:e=>this.handleClick(e,{label:this.processedBack.label,href:this.processedBack.href,id:this.processedBack.id,analyticsId:this.processedBack.analyticsId})},this.processedBack.label)),("gray"===this.variation||"minimal"===this.variation)&&this.categoryIcon&&i("duet-icon",{class:{"duet-hero-icon":!0,"duet-hero-icon-has-heading":""!==this.preHeading},size:"x-large",background:this.categoryIconColor,name:this.categoryIcon}),i("div",{class:"duet-hero-text"},this.preHeading&&i("duet-paragraph",{margin:"none",class:"duet-hero-pre"},this.preHeading),i("slot",{name:"badge"}),i("duet-heading",{theme:this.theme,level:this.level,class:{"duet-hero-heading":!0,"duet-hero-heading-has-pre":""!==this.preHeading},color:"default"===this.variation?"gray-lightest":"",visualLevel:"gray"===this.variation||"minimal"===this.variation?"h2":"h1"},this.heading),this.description&&i("duet-paragraph",{theme:this.theme,color:a,variation:"intro"},this.description),("gray"===this.variation||"minimal"===this.variation)&&this.processedListItems&&i("duet-list",{theme:this.theme,"label-width":"30",breakpoint:"large",mobile:this.leftAlign?void 0:"center"},this.processedListItems.map((e=>i("duet-list-item",null,i("span",{slot:"label"},e.label),i("span",{slot:"value"},e.value))))),this.buttonLabel&&i("duet-button",{url:this.buttonUrl,icon:this.icon,iconRight:this.iconRight,iconSize:this.iconSize,variation:t,theme:this.theme,identifier:this.buttonId,onClick:e=>this.handleClick(e,this.buttonData),fixed:!0},this.buttonLabel),i("span",{class:"duet-hero-slot-unnamed"},i("slot",null))),("gray"===this.variation||"minimal"===this.variation)&&this.processedActions&&i("div",{class:"duet-hero-links"},this.processedActions.map((e=>i("a",{class:"duet-hero-link",href:e.href,id:e.id,target:e.external?"_blank":"_self",onClick:t=>this.handleClick(t,e)},i("div",{class:"duet-hero-action-icon"},i("duet-icon",{size:"small",margin:"none",name:e.icon,color:"currentColor",outline:o})),i("span",null,e.label),e.external&&i("duet-visually-hidden",null,", ",this.accessibleLabelExternal),e.external&&i("div",{class:"duet-hero-action-arrow"},i("duet-icon",{icon:r.svg,size:"xx-small",margin:"none",color:"currentColor"})))))),this.image&&"image"!==this.variation&&i("div",{class:"duet-hero-image",style:e})))}get element(){return o(this)}static get watchers(){return{back:["refresh"],listItems:["refresh"],actions:["refresh"]}}};s.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-hero{position:relative;display:block;width:100%;padding:48px 28px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;text-decoration:none;text-shadow:none;text-transform:none;background:#00294d}.duet-hero.duet-p-0{padding:0 !important}.duet-hero.duet-m-0{margin:0 !important}.duet-hero.duet-hero-text-center{text-align:center !important}.duet-hero.duet-hero-light{padding-bottom:0 !important}@media (min-width: 62em){.duet-hero.duet-hero-light{padding-bottom:28px !important}}.duet-hero.duet-hero-with-image{padding-bottom:20px !important;margin-bottom:-36px}@media (min-width: 48em){.duet-hero.duet-hero-with-image{padding-bottom:28px !important}}@media (min-width: 62em){.duet-hero.duet-hero-with-image{padding-bottom:36px !important;margin-bottom:-20px}}.duet-hero.duet-hero-light,.duet-hero.duet-hero-with-image{color:#00294d;background-color:white;background-image:linear-gradient(#f3f9fc, #f9fcfe)}.duet-hero.duet-hero-light::before,.duet-hero.duet-hero-with-image::before{position:absolute;top:100%;left:0;z-index:-1;width:100%;height:400px;content:"";background-image:linear-gradient(#f9fcfe, white)}.duet-hero.duet-hero-light.duet-theme-turva,.duet-hero.duet-hero-with-image.duet-theme-turva{color:#171c3a;background-image:linear-gradient(#f5f5f7, #fafafb)}.duet-hero.duet-hero-light.duet-theme-turva::before,.duet-hero.duet-hero-with-image.duet-theme-turva::before{background-image:linear-gradient(#fafafb, white)}.duet-hero.duet-hero-gray{color:#00294d;background:#f5f8fa}.duet-hero.duet-hero-gray.duet-theme-turva{background:#f5f5f7}@media (min-width: 62em){.duet-hero.duet-hero-gray .duet-hero-text{display:inline-block;vertical-align:top}.duet-hero.duet-hero-gray .duet-hero-icon+.duet-hero-text{margin-left:28px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-actions{padding-bottom:65.4545454545px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-back{padding-top:72px}}.duet-hero.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:#c60c30}@media (min-width: 62em){.duet-hero{min-height:290px;padding:111.6px 56px;overflow:visible}}.duet-hero-icon{display:inline-block;vertical-align:top}@media (min-width: 62em){.duet-hero-icon{margin-top:-8px}}@media (min-width: 62em){.duet-hero-heading{margin-top:12px}}@media (min-width: 62em){.duet-hero-heading-has-pre{margin-top:0}}.duet-hero-wrapper{position:relative;width:100%;max-width:1110px;margin:0 auto;text-align:center}.duet-hero-left-align .duet-hero-wrapper{text-align:left}.duet-hero-with-image .duet-hero-wrapper{position:static}@media (min-width: 62em){.duet-hero-wrapper{text-align:left}}.duet-hero-text{max-width:50rem;margin:0 auto}.duet-hero-text-center .duet-hero-text{text-align:center !important}@media (min-width: 48em){.duet-hero-text{width:80%}.duet-hero-left-align .duet-hero-text{margin:0}}@media (min-width: 62em){.duet-hero-text{width:52%;max-width:none;margin-top:-10px;margin-left:0}.duet-hero-text-center .duet-hero-text{margin-left:auto}}.duet-hero:not(.duet-hero-with-image) .duet-hero-image{width:100%;max-width:400px;height:0;padding-bottom:50%;margin:28px auto 0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain}@media (min-width: 36em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{padding-bottom:40%}}@media (min-width: 48em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:420px;padding-bottom:34%}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:540px}}@media (min-width: 62em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{position:absolute;top:50%;right:0;padding-bottom:30%;margin:0;transform:translateY(-50%)}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-60px;padding-bottom:26%}.duet-hero-gray .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}@media (min-width: 62em){.duet-hero-gray:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}.duet-hero-image-wrapper{position:relative;width:80%;height:0;padding-bottom:80%;margin:-30px auto 36px;overflow:hidden;border-radius:28%;box-shadow:0 0 20px rgba(255, 255, 255, 0.5);transform:rotate(10deg)}.duet-theme-turva .duet-hero-image-wrapper{padding-bottom:68%;border-radius:44% 47% 38% 54%;transform:none}@media screen and (min-width: 440px){.duet-hero-image-wrapper{width:300px;padding-bottom:300px}.duet-theme-turva .duet-hero-image-wrapper{width:80%;padding-bottom:68%}}@media (min-width: 62em){.duet-hero-image-wrapper{position:absolute;top:-60px;right:-50px;width:470px;padding-bottom:470px;margin:0}.duet-theme-turva .duet-hero-image-wrapper{top:-40px;right:-80px;width:536px;padding-bottom:470px}}@media (min-width: 76.25em){.duet-hero-image-wrapper{top:-70px;right:-60px;width:600px;padding-bottom:600px}.duet-theme-turva .duet-hero-image-wrapper{top:-70px;right:-60px;width:650px;padding-bottom:600px}}@media screen and (min-width: 1450px){.duet-hero-image-wrapper{top:-70px;right:25px}.duet-theme-turva .duet-hero-image-wrapper{right:0}}.duet-hero-image-wrapper .duet-hero-image{position:absolute;top:-5%;left:-5%;width:110%;height:110%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;transform:rotate(-10deg)}.duet-theme-turva .duet-hero-image-wrapper .duet-hero-image{top:0;left:0;width:100%;height:100%;transform:none}.duet-hero-image-mask{position:relative;margin:-48px auto 0;overflow:hidden}@media (min-width: 62em){.duet-hero-image-mask{position:absolute;top:0;right:0;width:470px;height:460px;margin:0}}@media (min-width: 76.25em){.duet-hero-image-mask{width:650px;height:580px}}@media screen and (min-width: 1450px){.duet-hero-image-mask{right:50%;transform:translateX(110%)}.duet-theme-turva .duet-hero-image-mask{transform:translateX(108%)}}duet-heading+duet-button{margin-top:12px !important}.duet-hero-links{width:calc(100% + 56px);margin-top:48px;margin-left:-28px}.duet-hero-minimal .duet-hero-links{margin-top:28px}@media (min-width: 36em){.duet-hero-links{margin-top:72px}.duet-hero-minimal .duet-hero-links{margin-top:28px}}@media (min-width: 62em){.duet-hero-links{width:auto;margin:36px 0 0}.duet-hero-minimal .duet-hero-links{margin-top:28px}}.duet-hero-link{display:flex;align-items:center;width:100%;padding:16px 16px 8px;font-weight:600;-webkit-hyphens:auto;hyphens:auto;line-height:1.25;color:#0077b3;text-align:left;text-decoration:none;border-bottom:1px solid #e1e3e6;transition:background-color 300ms ease}.duet-hero-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-hero-link:focus,.duet-hero-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-hero-link:hover,.duet-hero-link:hover .duet-hero-action-arrow{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-hero-link:hover,.duet-theme-turva .duet-hero-link:hover .duet-hero-action-arrow{color:#940925 !important}.duet-theme-turva .duet-hero-link{color:#c60c30}@media (min-width: 36em){.duet-hero-link{padding:16px 16px 16px 28px}}@media (min-width: 62em){.duet-hero-link{display:inline-flex;width:auto;max-width:350px;padding:0;margin:0 28px 16px 0;border:0;border-radius:4px}}.duet-hero-link:hover{background:rgba(0, 0, 0, 0.02)}@media (min-width: 62em){.duet-hero-link:hover{background:transparent}}.duet-hero-link:first-of-type{border-top:1px solid #e1e3e6}@media (min-width: 62em){.duet-hero-link:first-of-type{margin-top:0;border:0}}.duet-hero-link:last-of-type{margin-bottom:-48px}@media (min-width: 62em){.duet-hero-link:last-of-type{margin-right:0;margin-bottom:0}}.duet-hero-link span{margin-top:-8px}@media (min-width: 36em){.duet-hero-link span{margin:0}}.duet-hero-action-icon{margin-right:8px}@media (min-width: 36em){.duet-hero-action-icon{margin-right:12px}}.duet-hero-action-arrow{margin:0 0 0 8px;color:#0077b3}@media (max-width: 35.9375em){.duet-hero-action-arrow{margin-top:-9px}}.duet-theme-turva .duet-hero-action-arrow{color:#c60c30}.duet-hero-back{margin-bottom:28px !important;display:flex;align-items:center;justify-content:center}.duet-hero-left-align .duet-hero-back{align-items:self-start;justify-content:flex-start}@media (min-width: 36em){.duet-hero-back{margin-bottom:36px !important}.duet-hero-minimal .duet-hero-back{margin-bottom:28px !important}}@media (min-width: 62em){.duet-hero-back{display:block}}.duet-hero-pre{display:inline-block;width:auto;margin-right:8px}.duet-hero-pre+duet-heading{margin-top:0 !important}';export{s as duet_hero}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-13bc14a6.system.js"],(function(e){"use strict";var s,t,a;return{setters:[function(e){s=e.r;t=e.h;a=e.H}],execute:function(){var r=e("duet_upload_aria_status",function(){function e(e){var t=this;s(this,e);this.statusMessage=null;this.statusMessageLabel=null;this.accessibleAriaLive="polite";this.valid=undefined;this.total=undefined;this.invalid=undefined;this.inprogress=undefined;this.replacePlaceHolders=function(e){var s=function(e){return e>1?e+" "+t.statusMessageLabel.files:e+" "+t.statusMessageLabel.file};return e.replace("{filesUploaded}",s(t.valid)).replace("{filesInProgress}",s(t.inprogress)).replace("{filesTotal}",s(t.total)).replace("{filesWithErrors}",s(t.invalid))};this.getStatusMessage=function(){var e=t.statusMessageLabel,s=e.done,a=e.inProgress,r=e.doneWithErrors,i=e.inProgressWithErrors;var l=t.invalid>0;var n=t.inprogress>0;var u=t.inprogress>0&&l;var o=t.valid===t.total&&!n&&!l;var c=t.valid+t.invalid===t.total&&!n;if(o){t.statusMessage=t.replacePlaceHolders(s);return}else if(u){t.statusMessage=t.replacePlaceHolders(i);return}else if(n){t.statusMessage=t.replacePlaceHolders(a);return}else if(c){t.statusMessage=t.replacePlaceHolders(r);return}return}}e.prototype.watchHandler=function(e,s){if(e!==s){this.getStatusMessage()}};e.prototype.render=function(){return t(a,{role:"status","aria-live":"assertive","aria-atomic":"true","aria-relevant":"all"},t("duet-visually-hidden",null,this.statusMessage))};Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchHandler"],invalid:["watchHandler"],inprogress:["watchHandler"],total:["watchHandler"]}},enumerable:false,configurable:true});return e}())}}}));
4
+ System.register(["./p-942856d9.system.js"],(function(e){"use strict";var s,t,a;return{setters:[function(e){s=e.r;t=e.h;a=e.H}],execute:function(){var r=e("duet_upload_aria_status",function(){function e(e){var t=this;s(this,e);this.statusMessage=null;this.statusMessageLabel=null;this.accessibleAriaLive="polite";this.valid=undefined;this.total=undefined;this.invalid=undefined;this.inprogress=undefined;this.replacePlaceHolders=function(e){var s=function(e){return e>1?e+" "+t.statusMessageLabel.files:e+" "+t.statusMessageLabel.file};return e.replace("{filesUploaded}",s(t.valid)).replace("{filesInProgress}",s(t.inprogress)).replace("{filesTotal}",s(t.total)).replace("{filesWithErrors}",s(t.invalid))};this.getStatusMessage=function(){var e=t.statusMessageLabel,s=e.done,a=e.inProgress,r=e.doneWithErrors,i=e.inProgressWithErrors;var l=t.invalid>0;var n=t.inprogress>0;var u=t.inprogress>0&&l;var o=t.valid===t.total&&!n&&!l;var d=t.valid+t.invalid===t.total&&!n;if(o){t.statusMessage=t.replacePlaceHolders(s);return}else if(u){t.statusMessage=t.replacePlaceHolders(i);return}else if(n){t.statusMessage=t.replacePlaceHolders(a);return}else if(d){t.statusMessage=t.replacePlaceHolders(r);return}return}}e.prototype.watchHandler=function(e,s){if(e!==s){this.getStatusMessage()}};e.prototype.render=function(){return t(a,{role:"status","aria-live":"assertive","aria-atomic":"true","aria-relevant":"all"},t("duet-visually-hidden",null,this.statusMessage))};Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchHandler"],invalid:["watchHandler"],inprogress:["watchHandler"],total:["watchHandler"]}},enumerable:false,configurable:true});return e}())}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as t,h as s,H as i}from"./p-ce566b2b.js";let h=class{constructor(s){t(this,s),this.statusMessage=null,this.statusMessageLabel=null,this.accessibleAriaLive="polite",this.valid=void 0,this.total=void 0,this.invalid=void 0,this.inprogress=void 0,this.replacePlaceHolders=t=>{const s=t=>t>1?`${t} ${this.statusMessageLabel.files}`:`${t} ${this.statusMessageLabel.file}`;return t.replace("{filesUploaded}",s(this.valid)).replace("{filesInProgress}",s(this.inprogress)).replace("{filesTotal}",s(this.total)).replace("{filesWithErrors}",s(this.invalid))},this.getStatusMessage=()=>{const{done:t,inProgress:s,doneWithErrors:i,inProgressWithErrors:h}=this.statusMessageLabel,r=this.invalid>0,a=this.inprogress>0,e=this.valid+this.invalid===this.total&&!a;this.valid!==this.total||a||r?this.inprogress>0&&r?this.statusMessage=this.replacePlaceHolders(h):a?this.statusMessage=this.replacePlaceHolders(s):e&&(this.statusMessage=this.replacePlaceHolders(i)):this.statusMessage=this.replacePlaceHolders(t)}}watchHandler(t,s){t!==s&&this.getStatusMessage()}render(){return s(i,{role:"status","aria-live":"assertive","aria-atomic":"true","aria-relevant":"all"},s("duet-visually-hidden",null,this.statusMessage))}static get watchers(){return{valid:["watchHandler"],invalid:["watchHandler"],inprogress:["watchHandler"],total:["watchHandler"]}}};export{h as duet_upload_aria_status}
4
+ import{r as t,h as s,H as i}from"./p-fceb0df8.js";let h=class{constructor(s){t(this,s),this.statusMessage=null,this.statusMessageLabel=null,this.accessibleAriaLive="polite",this.valid=void 0,this.total=void 0,this.invalid=void 0,this.inprogress=void 0,this.replacePlaceHolders=t=>{const s=t=>t>1?`${t} ${this.statusMessageLabel.files}`:`${t} ${this.statusMessageLabel.file}`;return t.replace("{filesUploaded}",s(this.valid)).replace("{filesInProgress}",s(this.inprogress)).replace("{filesTotal}",s(this.total)).replace("{filesWithErrors}",s(this.invalid))},this.getStatusMessage=()=>{const{done:t,inProgress:s,doneWithErrors:i,inProgressWithErrors:h}=this.statusMessageLabel,r=this.invalid>0,a=this.inprogress>0,e=this.valid+this.invalid===this.total&&!a;this.valid!==this.total||a||r?this.inprogress>0&&r?this.statusMessage=this.replacePlaceHolders(h):a?this.statusMessage=this.replacePlaceHolders(s):e&&(this.statusMessage=this.replacePlaceHolders(i)):this.statusMessage=this.replacePlaceHolders(t)}}watchHandler(t,s){t!==s&&this.getStatusMessage()}render(){return s(i,{role:"status","aria-live":"assertive","aria-atomic":"true","aria-relevant":"all"},s("duet-visually-hidden",null,this.statusMessage))}static get watchers(){return{valid:["watchHandler"],invalid:["watchHandler"],inprogress:["watchHandler"],total:["watchHandler"]}}};export{h as duet_upload_aria_status}