@peculiar/certificates-viewer 4.1.0 → 4.2.1

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 (662) hide show
  1. package/components/actions.js +3 -3
  2. package/components/actions.js.map +1 -1
  3. package/components/arrow_top.js +6 -6
  4. package/components/arrow_top.js.map +1 -1
  5. package/components/attribute-certificate-viewer.js +222 -220
  6. package/components/attribute-certificate-viewer.js.map +1 -1
  7. package/components/button-menu.js +36 -35
  8. package/components/button-menu.js.map +1 -1
  9. package/components/button.js +42 -42
  10. package/components/button.js.map +1 -1
  11. package/components/certificate-viewer.js +250 -249
  12. package/components/certificate-viewer.js.map +1 -1
  13. package/components/circular-progress.js +34 -33
  14. package/components/circular-progress.js.map +1 -1
  15. package/components/crl-viewer.js +214 -213
  16. package/components/crl-viewer.js.map +1 -1
  17. package/components/cross.js +9 -9
  18. package/components/cross.js.map +1 -1
  19. package/components/csr-viewer.js +200 -202
  20. package/components/csr-viewer.js.map +1 -1
  21. package/components/download.js +56 -56
  22. package/components/download.js.map +1 -1
  23. package/components/highlight-words.js +45 -44
  24. package/components/highlight-words.js.map +1 -1
  25. package/components/index2.js +146 -156
  26. package/components/index2.js.map +1 -1
  27. package/components/issuer_name.js +6 -6
  28. package/components/issuer_name.js.map +1 -1
  29. package/components/miscellaneous.js +4049 -4037
  30. package/components/miscellaneous.js.map +1 -1
  31. package/components/peculiar-attribute-certificate-viewer.d.ts +2 -2
  32. package/components/peculiar-button-menu.d.ts +2 -2
  33. package/components/peculiar-certificate-decoder.d.ts +2 -2
  34. package/components/peculiar-certificate-decoder.js +183 -182
  35. package/components/peculiar-certificate-decoder.js.map +1 -1
  36. package/components/peculiar-certificate-viewer.d.ts +2 -2
  37. package/components/peculiar-certificates-viewer.d.ts +2 -2
  38. package/components/peculiar-certificates-viewer.js +297 -296
  39. package/components/peculiar-certificates-viewer.js.map +1 -1
  40. package/components/peculiar-circular-progress.d.ts +2 -2
  41. package/components/peculiar-crl-viewer.d.ts +2 -2
  42. package/components/peculiar-csr-viewer.d.ts +2 -2
  43. package/components/peculiar-highlight-words.d.ts +2 -2
  44. package/components/peculiar-text-hider.d.ts +2 -2
  45. package/components/peculiar-text-hider.js +23 -22
  46. package/components/peculiar-text-hider.js.map +1 -1
  47. package/components/subject_name.js +35 -35
  48. package/components/subject_name.js.map +1 -1
  49. package/dist/cjs/actions-789906f5.js +23 -0
  50. package/dist/cjs/{actions-19013d4a.js.map → actions-789906f5.js.map} +1 -1
  51. package/dist/cjs/app-globals-c20ffa41.js +10 -0
  52. package/dist/cjs/app-globals-c20ffa41.js.map +1 -0
  53. package/dist/cjs/arrow_top-76e4261e.js +37 -0
  54. package/dist/cjs/{arrow_top-834fb7ec.js.map → arrow_top-76e4261e.js.map} +1 -1
  55. package/dist/cjs/button-87086210.js +77 -0
  56. package/dist/cjs/{button-14e2b73f.js.map → button-87086210.js.map} +1 -1
  57. package/dist/cjs/{certification_request-bf416170.js → certification_request-b0d72620.js} +3326 -3331
  58. package/dist/cjs/certification_request-b0d72620.js.map +1 -0
  59. package/dist/cjs/crl-812dd7a1.js +312 -0
  60. package/dist/cjs/crl-812dd7a1.js.map +1 -0
  61. package/dist/cjs/cross-bd099933.js +51 -0
  62. package/dist/cjs/{cross-9872c473.js.map → cross-bd099933.js.map} +1 -1
  63. package/dist/cjs/{download-0fa5b33c.js → download-6f550549.js} +50 -50
  64. package/dist/cjs/download-6f550549.js.map +1 -0
  65. package/dist/cjs/download-820d66ba.js +23 -0
  66. package/dist/cjs/{download-254ddc57.js.map → download-820d66ba.js.map} +1 -1
  67. package/dist/cjs/{index-efd561e9.js → index-e2ae280a.js} +398 -145
  68. package/dist/cjs/index-e2ae280a.js.map +1 -0
  69. package/dist/cjs/index.cjs.js +8 -8
  70. package/dist/cjs/link-a3d3799d.js +25 -0
  71. package/dist/cjs/{link-6aea0be4.js.map → link-a3d3799d.js.map} +1 -1
  72. package/dist/cjs/loader.cjs.js +4 -2
  73. package/dist/cjs/loader.cjs.js.map +1 -1
  74. package/dist/cjs/miscellaneous-dcb93a5b.js +1419 -0
  75. package/dist/cjs/miscellaneous-dcb93a5b.js.map +1 -0
  76. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +481 -480
  77. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
  78. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +72 -69
  79. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
  80. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +151 -150
  81. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  82. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +107 -106
  83. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  84. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +258 -257
  85. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  86. package/dist/cjs/peculiar-text-hider.cjs.entry.js +12 -11
  87. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
  88. package/dist/cjs/peculiar.cjs.js +5 -3
  89. package/dist/cjs/peculiar.cjs.js.map +1 -1
  90. package/dist/cjs/x509_certificate-ebf4cbd4.js +160 -0
  91. package/dist/cjs/x509_certificate-ebf4cbd4.js.map +1 -0
  92. package/dist/collection/collection-manifest.json +2 -2
  93. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +259 -259
  94. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
  95. package/dist/collection/components/button/button.js +9 -9
  96. package/dist/collection/components/button/button.js.map +1 -1
  97. package/dist/collection/components/button-menu/button-menu.js +60 -60
  98. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  99. package/dist/collection/components/certificate-decoder/certificate-decoder.js +211 -211
  100. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  101. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +4 -3
  102. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -1
  103. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +2 -2
  104. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -1
  105. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +6 -6
  106. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -1
  107. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +2 -2
  108. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -1
  109. package/dist/collection/components/certificate-details-parts/attributes/index.js +42 -42
  110. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  111. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +3 -3
  112. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -1
  113. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +2 -2
  114. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -1
  115. package/dist/collection/components/certificate-details-parts/attributes/name_part.js +5 -5
  116. package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -1
  117. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +2 -2
  118. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -1
  119. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +2 -2
  120. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -1
  121. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +14 -14
  122. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -1
  123. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +4 -3
  124. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -1
  125. package/dist/collection/components/certificate-details-parts/basic_information.js +12 -12
  126. package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -1
  127. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +2 -2
  128. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -1
  129. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +2 -2
  130. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -1
  131. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +1 -1
  132. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -1
  133. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +8 -8
  134. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -1
  135. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +2 -2
  136. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -1
  137. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +7 -7
  138. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -1
  139. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +5 -5
  140. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -1
  141. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +3 -3
  142. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -1
  143. package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js +19 -0
  144. package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js.map +1 -0
  145. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +23 -23
  146. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -1
  147. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +2 -2
  148. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -1
  149. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +5 -5
  150. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -1
  151. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +8 -8
  152. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -1
  153. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +2 -2
  154. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -1
  155. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +2 -2
  156. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -1
  157. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +2 -2
  158. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -1
  159. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +2 -2
  160. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -1
  161. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +5 -5
  162. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -1
  163. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +52 -52
  164. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -1
  165. package/dist/collection/components/certificate-details-parts/extensions/index.js +123 -118
  166. package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -1
  167. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +5 -5
  168. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -1
  169. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +4 -4
  170. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -1
  171. package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js +58 -58
  172. package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js.map +1 -1
  173. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +2 -2
  174. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -1
  175. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +2 -2
  176. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -1
  177. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +2 -2
  178. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -1
  179. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +42 -42
  180. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -1
  181. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +5 -5
  182. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -1
  183. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +2 -2
  184. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -1
  185. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +2 -2
  186. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -1
  187. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +2 -2
  188. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -1
  189. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +6 -7
  190. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -1
  191. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +2 -2
  192. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -1
  193. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +29 -29
  194. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -1
  195. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +2 -2
  196. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -1
  197. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +5 -5
  198. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -1
  199. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +8 -8
  200. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -1
  201. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +2 -2
  202. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -1
  203. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +6 -8
  204. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -1
  205. package/dist/collection/components/certificate-details-parts/holder.js +19 -21
  206. package/dist/collection/components/certificate-details-parts/holder.js.map +1 -1
  207. package/dist/collection/components/certificate-details-parts/issuer.js +8 -8
  208. package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -1
  209. package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -6
  210. package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -1
  211. package/dist/collection/components/certificate-details-parts/miscellaneous.js +6 -6
  212. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
  213. package/dist/collection/components/certificate-details-parts/public_key.js +29 -29
  214. package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -1
  215. package/dist/collection/components/certificate-details-parts/revoked_certificates.js +30 -30
  216. package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -1
  217. package/dist/collection/components/certificate-details-parts/row.js +26 -26
  218. package/dist/collection/components/certificate-details-parts/row.js.map +1 -1
  219. package/dist/collection/components/certificate-details-parts/signature.js +13 -13
  220. package/dist/collection/components/certificate-details-parts/signature.js.map +1 -1
  221. package/dist/collection/components/certificate-details-parts/subject_name.js +5 -5
  222. package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -1
  223. package/dist/collection/components/certificate-details-parts/thumbprints.js +12 -12
  224. package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -1
  225. package/dist/collection/components/certificate-summary/certificate-summary.js +3 -3
  226. package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -1
  227. package/dist/collection/components/certificate-viewer/certificate-viewer.js +278 -278
  228. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
  229. package/dist/collection/components/certificates-viewer/certificates-viewer.js +374 -374
  230. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  231. package/dist/collection/components/circular-progress/circular-progress.js +67 -67
  232. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
  233. package/dist/collection/components/crl-viewer/crl-viewer.js +229 -229
  234. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  235. package/dist/collection/components/csr-viewer/csr-viewer.js +211 -219
  236. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  237. package/dist/collection/components/highlight-words/highlight-words.js +60 -60
  238. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
  239. package/dist/collection/components/icons/actions.js +2 -2
  240. package/dist/collection/components/icons/actions.js.map +1 -1
  241. package/dist/collection/components/icons/arrow_bottom.js +2 -2
  242. package/dist/collection/components/icons/arrow_bottom.js.map +1 -1
  243. package/dist/collection/components/icons/arrow_top.js +2 -2
  244. package/dist/collection/components/icons/arrow_top.js.map +1 -1
  245. package/dist/collection/components/icons/cross.js +2 -2
  246. package/dist/collection/components/icons/cross.js.map +1 -1
  247. package/dist/collection/components/icons/details.js +2 -2
  248. package/dist/collection/components/icons/details.js.map +1 -1
  249. package/dist/collection/components/icons/download.js +2 -2
  250. package/dist/collection/components/icons/download.js.map +1 -1
  251. package/dist/collection/components/icons/link.js +2 -2
  252. package/dist/collection/components/icons/link.js.map +1 -1
  253. package/dist/collection/components/link/link.js +4 -4
  254. package/dist/collection/components/link/link.js.map +1 -1
  255. package/dist/collection/components/text-hider/text-hider.js +23 -23
  256. package/dist/collection/components/text-hider/text-hider.js.map +1 -1
  257. package/dist/collection/components/typography/typography.js +32 -32
  258. package/dist/collection/components/typography/typography.js.map +1 -1
  259. package/dist/collection/constants/logs.js +77 -76
  260. package/dist/collection/constants/logs.js.map +1 -1
  261. package/dist/collection/constants/oids.js +2334 -2314
  262. package/dist/collection/constants/oids.js.map +1 -1
  263. package/dist/collection/crypto/asn_data.js +31 -31
  264. package/dist/collection/crypto/asn_data.js.map +1 -1
  265. package/dist/collection/crypto/attribute.js +35 -51
  266. package/dist/collection/crypto/attribute.js.map +1 -1
  267. package/dist/collection/crypto/crl.js +66 -66
  268. package/dist/collection/crypto/crl.js.map +1 -1
  269. package/dist/collection/crypto/csr.js +76 -69
  270. package/dist/collection/crypto/csr.js.map +1 -1
  271. package/dist/collection/crypto/extension.js +64 -135
  272. package/dist/collection/crypto/extension.js.map +1 -1
  273. package/dist/collection/crypto/extensions/cabforganization_identifier.js +54 -0
  274. package/dist/collection/crypto/extensions/cabforganization_identifier.js.map +1 -0
  275. package/dist/collection/crypto/extensions/index.js +5 -0
  276. package/dist/collection/crypto/extensions/index.js.map +1 -0
  277. package/dist/collection/crypto/name.js +31 -31
  278. package/dist/collection/crypto/name.js.map +1 -1
  279. package/dist/collection/crypto/provider.js +26 -26
  280. package/dist/collection/crypto/provider.js.map +1 -1
  281. package/dist/collection/crypto/utils.js +23 -23
  282. package/dist/collection/crypto/utils.js.map +1 -1
  283. package/dist/collection/crypto/x509_attribute_certificate.js +66 -66
  284. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
  285. package/dist/collection/crypto/x509_certificate.js +139 -139
  286. package/dist/collection/crypto/x509_certificate.js.map +1 -1
  287. package/dist/collection/utils/camel_case_to_words.js +2 -2
  288. package/dist/collection/utils/camel_case_to_words.js.map +1 -1
  289. package/dist/collection/utils/date_formatter.js +6 -6
  290. package/dist/collection/utils/date_formatter.js.map +1 -1
  291. package/dist/collection/utils/download.js +24 -24
  292. package/dist/collection/utils/download.js.map +1 -1
  293. package/dist/collection/utils/download_from_buffer.js +25 -25
  294. package/dist/collection/utils/download_from_buffer.js.map +1 -1
  295. package/dist/collection/utils/get_string_by_oid.js +5 -5
  296. package/dist/collection/utils/get_string_by_oid.js.map +1 -1
  297. package/dist/collection/utils/is_link.js +1 -1
  298. package/dist/collection/utils/is_link.js.map +1 -1
  299. package/dist/collection/utils/l10n.js +25 -25
  300. package/dist/collection/utils/l10n.js.map +1 -1
  301. package/dist/collection/utils/read_file.js +40 -40
  302. package/dist/collection/utils/read_file.js.map +1 -1
  303. package/dist/collection/utils/validator.js +13 -13
  304. package/dist/collection/utils/validator.js.map +1 -1
  305. package/dist/esm/actions-aebcbc9d.js +21 -0
  306. package/dist/esm/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +1 -1
  307. package/dist/esm/app-globals-5e9b67e0.js +8 -0
  308. package/dist/esm/app-globals-5e9b67e0.js.map +1 -0
  309. package/dist/esm/arrow_top-aee1ee02.js +34 -0
  310. package/dist/esm/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +1 -1
  311. package/dist/esm/button-a2fabf9a.js +74 -0
  312. package/dist/esm/{button-35146bdd.js.map → button-a2fabf9a.js.map} +1 -1
  313. package/dist/esm/{certification_request-c9dc8e9c.js → certification_request-2c054ece.js} +3325 -3331
  314. package/dist/esm/certification_request-2c054ece.js.map +1 -0
  315. package/dist/esm/crl-a7318483.js +308 -0
  316. package/dist/esm/crl-a7318483.js.map +1 -0
  317. package/dist/esm/cross-1377606f.js +47 -0
  318. package/dist/esm/{cross-9ec9a759.js.map → cross-1377606f.js.map} +1 -1
  319. package/dist/esm/download-14dc1047.js +21 -0
  320. package/dist/esm/{download-0cc3077a.js.map → download-14dc1047.js.map} +1 -1
  321. package/dist/esm/{download-aacb6eff.js → download-8c128e2e.js} +50 -50
  322. package/dist/esm/download-8c128e2e.js.map +1 -0
  323. package/dist/esm/{index-4079bbb5.js → index-ae188432.js} +398 -145
  324. package/dist/esm/index-ae188432.js.map +1 -0
  325. package/dist/esm/index.js +8 -8
  326. package/dist/esm/link-7e4e9060.js +23 -0
  327. package/dist/esm/{link-ad24c3be.js.map → link-7e4e9060.js.map} +1 -1
  328. package/dist/esm/loader.js +5 -3
  329. package/dist/esm/loader.js.map +1 -1
  330. package/dist/esm/miscellaneous-0e98b5bc.js +1401 -0
  331. package/dist/esm/miscellaneous-0e98b5bc.js.map +1 -0
  332. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +481 -480
  333. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  334. package/dist/esm/peculiar-button-menu_3.entry.js +72 -69
  335. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
  336. package/dist/esm/peculiar-certificate-decoder.entry.js +151 -150
  337. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  338. package/dist/esm/peculiar-certificate-viewer.entry.js +107 -106
  339. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  340. package/dist/esm/peculiar-certificates-viewer.entry.js +258 -257
  341. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  342. package/dist/esm/peculiar-text-hider.entry.js +12 -11
  343. package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
  344. package/dist/esm/peculiar.js +6 -4
  345. package/dist/esm/peculiar.js.map +1 -1
  346. package/dist/esm/x509_certificate-ad568d3a.js +158 -0
  347. package/dist/esm/x509_certificate-ad568d3a.js.map +1 -0
  348. package/dist/esm-es5/{actions-8d745b2a.js → actions-aebcbc9d.js} +2 -2
  349. package/dist/esm-es5/app-globals-5e9b67e0.js +5 -0
  350. package/dist/esm-es5/app-globals-5e9b67e0.js.map +1 -0
  351. package/dist/esm-es5/{arrow_top-fc298828.js → arrow_top-aee1ee02.js} +2 -2
  352. package/dist/esm-es5/button-a2fabf9a.js +19 -0
  353. package/dist/esm-es5/certification_request-2c054ece.js +97 -0
  354. package/dist/esm-es5/certification_request-2c054ece.js.map +1 -0
  355. package/dist/esm-es5/crl-a7318483.js +33 -0
  356. package/dist/esm-es5/crl-a7318483.js.map +1 -0
  357. package/dist/esm-es5/{cross-9ec9a759.js → cross-1377606f.js} +2 -2
  358. package/dist/esm-es5/{download-0cc3077a.js → download-14dc1047.js} +2 -2
  359. package/dist/esm-es5/{download-aacb6eff.js → download-8c128e2e.js} +3 -3
  360. package/dist/esm-es5/{download-aacb6eff.js.map → download-8c128e2e.js.map} +1 -1
  361. package/dist/esm-es5/index-ae188432.js +6 -0
  362. package/dist/esm-es5/index-ae188432.js.map +1 -0
  363. package/dist/esm-es5/index.js +1 -1
  364. package/dist/esm-es5/{link-ad24c3be.js → link-7e4e9060.js} +3 -3
  365. package/dist/esm-es5/loader.js +2 -2
  366. package/dist/esm-es5/loader.js.map +1 -1
  367. package/dist/esm-es5/miscellaneous-0e98b5bc.js +369 -0
  368. package/dist/esm-es5/miscellaneous-0e98b5bc.js.map +1 -0
  369. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +17 -17
  370. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  371. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  372. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  373. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +3 -3
  374. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  375. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
  376. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  377. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +3 -3
  378. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  379. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  380. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
  381. package/dist/esm-es5/peculiar.js +2 -2
  382. package/dist/esm-es5/peculiar.js.map +1 -1
  383. package/dist/esm-es5/x509_certificate-ad568d3a.js +12 -0
  384. package/dist/esm-es5/{x509_certificate-8cf268d1.js.map → x509_certificate-ad568d3a.js.map} +1 -1
  385. package/dist/peculiar/index.esm.js +1 -1
  386. package/dist/peculiar/{p-5e49b881.system.entry.js → p-00302a20.system.entry.js} +3 -3
  387. package/dist/peculiar/p-00302a20.system.entry.js.map +1 -0
  388. package/dist/peculiar/p-0dbc8238.system.js +13 -0
  389. package/dist/peculiar/{p-cfca7dae.system.js.map → p-0dbc8238.system.js.map} +1 -1
  390. package/dist/peculiar/{p-1ef997ee.js → p-1302bd67.js} +11 -11
  391. package/dist/peculiar/p-1302bd67.js.map +1 -0
  392. package/dist/peculiar/{p-59e5ac12.js → p-1f766dd5.js} +1 -1
  393. package/dist/peculiar/p-243244af.system.js +13 -0
  394. package/dist/peculiar/{p-0fc2e2b4.js → p-27ca6743.js} +2 -2
  395. package/dist/peculiar/p-3cb79cd9.js +6 -0
  396. package/dist/peculiar/p-3cb79cd9.js.map +1 -0
  397. package/dist/peculiar/{p-72f53d81.js → p-3d44cbd2.js} +3 -3
  398. package/dist/peculiar/p-3f9af5f5.system.js +97 -0
  399. package/dist/peculiar/p-3f9af5f5.system.js.map +1 -0
  400. package/dist/peculiar/{p-0bd7c6bc.system.entry.js → p-496449cf.system.entry.js} +10 -10
  401. package/dist/peculiar/p-496449cf.system.entry.js.map +1 -0
  402. package/dist/peculiar/p-4bc5ddbe.js +19 -0
  403. package/dist/peculiar/{p-025b3cfb.entry.js → p-54b37ef9.entry.js} +2 -2
  404. package/dist/peculiar/p-54b37ef9.entry.js.map +1 -0
  405. package/dist/peculiar/p-5a662d6f.system.js +13 -0
  406. package/dist/peculiar/{p-e5b18cd1.entry.js → p-5c6f9a14.entry.js} +3 -3
  407. package/dist/peculiar/p-5c6f9a14.entry.js.map +1 -0
  408. package/dist/peculiar/p-5cf4562f.system.entry.js +111 -0
  409. package/dist/peculiar/p-5cf4562f.system.entry.js.map +1 -0
  410. package/dist/peculiar/{p-2f48fe70.entry.js → p-5f3b0fc7.entry.js} +3 -3
  411. package/dist/peculiar/p-5f3b0fc7.entry.js.map +1 -0
  412. package/dist/peculiar/{p-24050d82.system.entry.js → p-6680f277.system.entry.js} +10 -10
  413. package/dist/peculiar/p-6680f277.system.entry.js.map +1 -0
  414. package/dist/peculiar/p-713563fb.entry.js +5 -0
  415. package/dist/peculiar/p-713563fb.entry.js.map +1 -0
  416. package/dist/peculiar/{p-ca02a823.js → p-75166532.js} +60 -53
  417. package/dist/peculiar/p-75166532.js.map +1 -0
  418. package/dist/peculiar/p-821bdcdc.system.js +6 -0
  419. package/dist/peculiar/p-821bdcdc.system.js.map +1 -0
  420. package/dist/peculiar/p-8393399a.system.js +5 -0
  421. package/dist/peculiar/p-8393399a.system.js.map +1 -0
  422. package/dist/peculiar/p-8bbee8f4.system.js +13 -0
  423. package/dist/peculiar/p-924790f5.js +33 -0
  424. package/dist/peculiar/p-924790f5.js.map +1 -0
  425. package/dist/peculiar/p-9712b827.system.js +20 -0
  426. package/dist/peculiar/{p-2fcad8cb.system.js.map → p-9712b827.system.js.map} +1 -1
  427. package/dist/peculiar/{p-370cee20.js → p-99efefea.js} +2 -2
  428. package/dist/peculiar/{p-1ceb0fe3.js → p-a9487007.js} +2 -2
  429. package/dist/peculiar/{p-17e3c47b.js → p-ae91d778.js} +2 -2
  430. package/dist/peculiar/p-afbd1c8e.entry.js +5 -0
  431. package/dist/peculiar/p-afbd1c8e.entry.js.map +1 -0
  432. package/dist/peculiar/p-b2890eb8.system.js +5 -0
  433. package/dist/peculiar/p-b5389885.system.entry.js +5 -0
  434. package/dist/peculiar/p-b5389885.system.entry.js.map +1 -0
  435. package/dist/peculiar/p-c156b495.system.js +33 -0
  436. package/dist/peculiar/p-c156b495.system.js.map +1 -0
  437. package/dist/peculiar/p-c23fd001.entry.js +110 -0
  438. package/dist/peculiar/p-c23fd001.entry.js.map +1 -0
  439. package/dist/peculiar/p-c241e4ba.system.js +20 -0
  440. package/dist/peculiar/{p-c99507d4.system.js.map → p-c241e4ba.system.js.map} +1 -1
  441. package/dist/peculiar/p-c2995a63.system.js +5 -0
  442. package/dist/peculiar/p-c2995a63.system.js.map +1 -0
  443. package/dist/peculiar/p-dac867e8.js +5 -0
  444. package/dist/peculiar/p-dac867e8.js.map +1 -0
  445. package/dist/peculiar/p-dde511c8.system.js +43 -0
  446. package/dist/{cjs/download-0fa5b33c.js.map → peculiar/p-dde511c8.system.js.map} +1 -1
  447. package/dist/peculiar/p-e4ad4f13.system.entry.js +5 -0
  448. package/dist/peculiar/p-e4ad4f13.system.entry.js.map +1 -0
  449. package/dist/peculiar/p-e6a6e602.js +12 -0
  450. package/dist/peculiar/p-eea904d7.system.js +27 -0
  451. package/dist/peculiar/{p-ddae2f8e.system.js.map → p-eea904d7.system.js.map} +1 -1
  452. package/dist/peculiar/p-ff3ced3c.system.js +369 -0
  453. package/dist/peculiar/p-ff3ced3c.system.js.map +1 -0
  454. package/dist/peculiar/peculiar.esm.js +1 -1
  455. package/dist/peculiar/peculiar.esm.js.map +1 -1
  456. package/dist/peculiar/peculiar.js +15 -15
  457. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +68 -68
  458. package/dist/types/components/button/button.d.ts +4 -4
  459. package/dist/types/components/button-menu/button-menu.d.ts +7 -7
  460. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +31 -31
  461. package/dist/types/components/certificate-details-parts/attributes/activity_description_attribute.d.ts +1 -1
  462. package/dist/types/components/certificate-details-parts/attributes/as_string_attribute.d.ts +1 -1
  463. package/dist/types/components/certificate-details-parts/attributes/basic_attribute.d.ts +1 -1
  464. package/dist/types/components/certificate-details-parts/attributes/challenge_password_attribute.d.ts +1 -1
  465. package/dist/types/components/certificate-details-parts/attributes/index.d.ts +1 -1
  466. package/dist/types/components/certificate-details-parts/attributes/insurance_value_attribute.d.ts +1 -1
  467. package/dist/types/components/certificate-details-parts/attributes/name_attribute.d.ts +1 -1
  468. package/dist/types/components/certificate-details-parts/attributes/name_part.d.ts +1 -1
  469. package/dist/types/components/certificate-details-parts/attributes/type_relationship_attribute.d.ts +1 -1
  470. package/dist/types/components/certificate-details-parts/attributes/unstructured_name_attribute.d.ts +1 -1
  471. package/dist/types/components/certificate-details-parts/attributes/valuation_ranking_attribute.d.ts +1 -1
  472. package/dist/types/components/certificate-details-parts/attributes/web_gdpr_attribute.d.ts +1 -1
  473. package/dist/types/components/certificate-details-parts/basic_information.d.ts +8 -8
  474. package/dist/types/components/certificate-details-parts/extensions/archive_rev_info_extension.d.ts +1 -1
  475. package/dist/types/components/certificate-details-parts/extensions/as_string_extension.d.ts +1 -1
  476. package/dist/types/components/certificate-details-parts/extensions/authority_key_identifier_extension.d.ts +1 -1
  477. package/dist/types/components/certificate-details-parts/extensions/basic_constraints_extension.d.ts +1 -1
  478. package/dist/types/components/certificate-details-parts/extensions/basic_extension.d.ts +1 -1
  479. package/dist/types/components/certificate-details-parts/extensions/biometric_syntax_extension.d.ts +1 -1
  480. package/dist/types/components/certificate-details-parts/extensions/ca_version_extension.d.ts +1 -1
  481. package/dist/types/components/certificate-details-parts/extensions/cabforganization_identifier_extension.d.ts +15 -0
  482. package/dist/types/components/certificate-details-parts/extensions/certificate_policies_extension.d.ts +1 -1
  483. package/dist/types/components/certificate-details-parts/extensions/certificate_template_extension.d.ts +1 -1
  484. package/dist/types/components/certificate-details-parts/extensions/certificate_transparency_extension.d.ts +1 -1
  485. package/dist/types/components/certificate-details-parts/extensions/crl_distribution_points_extension.d.ts +1 -1
  486. package/dist/types/components/certificate-details-parts/extensions/crl_number_extension.d.ts +1 -1
  487. package/dist/types/components/certificate-details-parts/extensions/crl_reason_extension.d.ts +1 -1
  488. package/dist/types/components/certificate-details-parts/extensions/enroll_cert_type_extension.d.ts +1 -1
  489. package/dist/types/components/certificate-details-parts/extensions/entrust_version_info_extension.d.ts +1 -1
  490. package/dist/types/components/certificate-details-parts/extensions/extended_key_usage_extension.d.ts +1 -1
  491. package/dist/types/components/certificate-details-parts/extensions/general_name_part.d.ts +1 -1
  492. package/dist/types/components/certificate-details-parts/extensions/index.d.ts +2 -2
  493. package/dist/types/components/certificate-details-parts/extensions/info_access_syntax_extension.d.ts +1 -1
  494. package/dist/types/components/certificate-details-parts/extensions/issuing_distribution_point_extension.d.ts +1 -1
  495. package/dist/types/components/certificate-details-parts/extensions/key_description_extension.d.ts +1 -1
  496. package/dist/types/components/certificate-details-parts/extensions/key_usage_extension.d.ts +1 -1
  497. package/dist/types/components/certificate-details-parts/extensions/lei_extension.d.ts +1 -1
  498. package/dist/types/components/certificate-details-parts/extensions/lei_role_extennsion.d.ts +1 -1
  499. package/dist/types/components/certificate-details-parts/extensions/logotype_extension.d.ts +1 -1
  500. package/dist/types/components/certificate-details-parts/extensions/name_constraints_extension.d.ts +1 -1
  501. package/dist/types/components/certificate-details-parts/extensions/netscape_cert_type_extension.d.ts +1 -1
  502. package/dist/types/components/certificate-details-parts/extensions/netscape_comment_extension.d.ts +1 -1
  503. package/dist/types/components/certificate-details-parts/extensions/policy_constraints_extension.d.ts +1 -1
  504. package/dist/types/components/certificate-details-parts/extensions/policy_mappings_extension.d.ts +1 -1
  505. package/dist/types/components/certificate-details-parts/extensions/private_key_usage_period_extension.d.ts +1 -1
  506. package/dist/types/components/certificate-details-parts/extensions/qc_statements_extension.d.ts +1 -1
  507. package/dist/types/components/certificate-details-parts/extensions/subject_alternative_name_extension.d.ts +1 -1
  508. package/dist/types/components/certificate-details-parts/extensions/subject_directory_attributes_extension.d.ts +1 -1
  509. package/dist/types/components/certificate-details-parts/extensions/subject_key_identifier_extension.d.ts +1 -1
  510. package/dist/types/components/certificate-details-parts/extensions/timestamp_extension.d.ts +1 -1
  511. package/dist/types/components/certificate-details-parts/extensions/tn_auth_list_extension.d.ts +1 -1
  512. package/dist/types/components/certificate-details-parts/holder.d.ts +1 -1
  513. package/dist/types/components/certificate-details-parts/issuer.d.ts +1 -1
  514. package/dist/types/components/certificate-details-parts/issuer_name.d.ts +2 -2
  515. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
  516. package/dist/types/components/certificate-details-parts/public_key.d.ts +1 -1
  517. package/dist/types/components/certificate-details-parts/revoked_certificates.d.ts +1 -1
  518. package/dist/types/components/certificate-details-parts/row.d.ts +7 -7
  519. package/dist/types/components/certificate-details-parts/signature.d.ts +1 -1
  520. package/dist/types/components/certificate-details-parts/subject_name.d.ts +1 -1
  521. package/dist/types/components/certificate-details-parts/thumbprints.d.ts +1 -1
  522. package/dist/types/components/certificate-summary/certificate-summary.d.ts +2 -2
  523. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +74 -74
  524. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +75 -75
  525. package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
  526. package/dist/types/components/crl-viewer/crl-viewer.d.ts +56 -56
  527. package/dist/types/components/csr-viewer/csr-viewer.d.ts +52 -53
  528. package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
  529. package/dist/types/components/icons/actions.d.ts +1 -1
  530. package/dist/types/components/icons/arrow_bottom.d.ts +1 -1
  531. package/dist/types/components/icons/arrow_top.d.ts +1 -1
  532. package/dist/types/components/icons/cross.d.ts +1 -1
  533. package/dist/types/components/icons/details.d.ts +1 -1
  534. package/dist/types/components/icons/download.d.ts +1 -1
  535. package/dist/types/components/icons/link.d.ts +1 -1
  536. package/dist/types/components/link/link.d.ts +2 -2
  537. package/dist/types/components/text-hider/text-hider.d.ts +2 -2
  538. package/dist/types/components/typography/typography.d.ts +4 -4
  539. package/dist/types/components.d.ts +24 -0
  540. package/dist/types/constants/logs.d.ts +77 -76
  541. package/dist/types/constants/oids.d.ts +2326 -2307
  542. package/dist/types/crypto/asn_data.d.ts +6 -6
  543. package/dist/types/crypto/attribute.d.ts +21 -6
  544. package/dist/types/crypto/crl.d.ts +23 -23
  545. package/dist/types/crypto/csr.d.ts +23 -21
  546. package/dist/types/crypto/extension.d.ts +52 -5
  547. package/dist/types/crypto/extensions/cabforganization_identifier.d.ts +23 -0
  548. package/dist/types/crypto/extensions/index.d.ts +1 -0
  549. package/dist/types/crypto/name.d.ts +7 -7
  550. package/dist/types/crypto/provider.d.ts +15 -15
  551. package/dist/types/crypto/x509_attribute_certificate.d.ts +24 -24
  552. package/dist/types/crypto/x509_certificate.d.ts +33 -33
  553. package/dist/types/stencil-public-runtime.d.ts +29 -0
  554. package/dist/types/utils/download.d.ts +16 -16
  555. package/dist/types/utils/l10n.d.ts +56 -56
  556. package/dist/types/utils/read_file.d.ts +7 -7
  557. package/hydrate/index.d.ts +2 -2
  558. package/hydrate/index.js +12072 -10170
  559. package/package.json +21 -13
  560. package/dist/cjs/actions-19013d4a.js +0 -23
  561. package/dist/cjs/arrow_top-834fb7ec.js +0 -37
  562. package/dist/cjs/button-14e2b73f.js +0 -77
  563. package/dist/cjs/certification_request-bf416170.js.map +0 -1
  564. package/dist/cjs/crl-d9591b95.js +0 -322
  565. package/dist/cjs/crl-d9591b95.js.map +0 -1
  566. package/dist/cjs/cross-9872c473.js +0 -51
  567. package/dist/cjs/download-254ddc57.js +0 -23
  568. package/dist/cjs/index-efd561e9.js.map +0 -1
  569. package/dist/cjs/link-6aea0be4.js +0 -25
  570. package/dist/cjs/miscellaneous-6e800553.js +0 -1400
  571. package/dist/cjs/miscellaneous-6e800553.js.map +0 -1
  572. package/dist/cjs/x509_certificate-53feebd3.js +0 -160
  573. package/dist/cjs/x509_certificate-53feebd3.js.map +0 -1
  574. package/dist/esm/actions-8d745b2a.js +0 -21
  575. package/dist/esm/arrow_top-fc298828.js +0 -34
  576. package/dist/esm/button-35146bdd.js +0 -74
  577. package/dist/esm/certification_request-c9dc8e9c.js.map +0 -1
  578. package/dist/esm/crl-70e85374.js +0 -318
  579. package/dist/esm/crl-70e85374.js.map +0 -1
  580. package/dist/esm/cross-9ec9a759.js +0 -47
  581. package/dist/esm/download-0cc3077a.js +0 -21
  582. package/dist/esm/download-aacb6eff.js.map +0 -1
  583. package/dist/esm/index-4079bbb5.js.map +0 -1
  584. package/dist/esm/link-ad24c3be.js +0 -23
  585. package/dist/esm/miscellaneous-0763f98e.js +0 -1383
  586. package/dist/esm/miscellaneous-0763f98e.js.map +0 -1
  587. package/dist/esm/x509_certificate-8cf268d1.js +0 -158
  588. package/dist/esm/x509_certificate-8cf268d1.js.map +0 -1
  589. package/dist/esm-es5/button-35146bdd.js +0 -19
  590. package/dist/esm-es5/certification_request-c9dc8e9c.js +0 -97
  591. package/dist/esm-es5/certification_request-c9dc8e9c.js.map +0 -1
  592. package/dist/esm-es5/crl-70e85374.js +0 -33
  593. package/dist/esm-es5/crl-70e85374.js.map +0 -1
  594. package/dist/esm-es5/index-4079bbb5.js +0 -6
  595. package/dist/esm-es5/index-4079bbb5.js.map +0 -1
  596. package/dist/esm-es5/miscellaneous-0763f98e.js +0 -362
  597. package/dist/esm-es5/miscellaneous-0763f98e.js.map +0 -1
  598. package/dist/esm-es5/x509_certificate-8cf268d1.js +0 -12
  599. package/dist/peculiar/p-025b3cfb.entry.js.map +0 -1
  600. package/dist/peculiar/p-0b356bb5.js +0 -6
  601. package/dist/peculiar/p-0b356bb5.js.map +0 -1
  602. package/dist/peculiar/p-0bd7c6bc.system.entry.js.map +0 -1
  603. package/dist/peculiar/p-10d2d400.system.js +0 -34
  604. package/dist/peculiar/p-10d2d400.system.js.map +0 -1
  605. package/dist/peculiar/p-14f281b0.system.js +0 -43
  606. package/dist/peculiar/p-14f281b0.system.js.map +0 -1
  607. package/dist/peculiar/p-15cb92b5.system.js +0 -97
  608. package/dist/peculiar/p-15cb92b5.system.js.map +0 -1
  609. package/dist/peculiar/p-1ef997ee.js.map +0 -1
  610. package/dist/peculiar/p-24050d82.system.entry.js.map +0 -1
  611. package/dist/peculiar/p-2f48fe70.entry.js.map +0 -1
  612. package/dist/peculiar/p-2fcad8cb.system.js +0 -20
  613. package/dist/peculiar/p-31b60224.system.js +0 -362
  614. package/dist/peculiar/p-31b60224.system.js.map +0 -1
  615. package/dist/peculiar/p-33196289.entry.js +0 -5
  616. package/dist/peculiar/p-33196289.entry.js.map +0 -1
  617. package/dist/peculiar/p-4ab9673f.system.entry.js +0 -111
  618. package/dist/peculiar/p-4ab9673f.system.entry.js.map +0 -1
  619. package/dist/peculiar/p-5151cb6f.system.entry.js +0 -5
  620. package/dist/peculiar/p-5151cb6f.system.entry.js.map +0 -1
  621. package/dist/peculiar/p-53784f15.system.entry.js +0 -5
  622. package/dist/peculiar/p-53784f15.system.entry.js.map +0 -1
  623. package/dist/peculiar/p-542412ae.js +0 -33
  624. package/dist/peculiar/p-542412ae.js.map +0 -1
  625. package/dist/peculiar/p-5aabeba7.system.js +0 -6
  626. package/dist/peculiar/p-5aabeba7.system.js.map +0 -1
  627. package/dist/peculiar/p-5ab007e9.entry.js +0 -5
  628. package/dist/peculiar/p-5ab007e9.entry.js.map +0 -1
  629. package/dist/peculiar/p-5e49b881.system.entry.js.map +0 -1
  630. package/dist/peculiar/p-6cb88fd6.system.js +0 -13
  631. package/dist/peculiar/p-7f9beaa8.js +0 -19
  632. package/dist/peculiar/p-80832207.system.js +0 -5
  633. package/dist/peculiar/p-80832207.system.js.map +0 -1
  634. package/dist/peculiar/p-94a453d7.js +0 -12
  635. package/dist/peculiar/p-9c91dd68.entry.js +0 -110
  636. package/dist/peculiar/p-9c91dd68.entry.js.map +0 -1
  637. package/dist/peculiar/p-a3eeb94b.system.js +0 -5
  638. package/dist/peculiar/p-b313be9e.system.js +0 -13
  639. package/dist/peculiar/p-c99507d4.system.js +0 -20
  640. package/dist/peculiar/p-ca02a823.js.map +0 -1
  641. package/dist/peculiar/p-cfca7dae.system.js +0 -13
  642. package/dist/peculiar/p-ddae2f8e.system.js +0 -27
  643. package/dist/peculiar/p-e5b18cd1.entry.js.map +0 -1
  644. package/dist/peculiar/p-e6a3b4d4.system.js +0 -13
  645. /package/dist/esm-es5/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +0 -0
  646. /package/dist/esm-es5/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +0 -0
  647. /package/dist/esm-es5/{button-35146bdd.js.map → button-a2fabf9a.js.map} +0 -0
  648. /package/dist/esm-es5/{cross-9ec9a759.js.map → cross-1377606f.js.map} +0 -0
  649. /package/dist/esm-es5/{download-0cc3077a.js.map → download-14dc1047.js.map} +0 -0
  650. /package/dist/esm-es5/{link-ad24c3be.js.map → link-7e4e9060.js.map} +0 -0
  651. /package/dist/peculiar/{p-59e5ac12.js.map → p-1f766dd5.js.map} +0 -0
  652. /package/dist/peculiar/{p-6cb88fd6.system.js.map → p-243244af.system.js.map} +0 -0
  653. /package/dist/peculiar/{p-0fc2e2b4.js.map → p-27ca6743.js.map} +0 -0
  654. /package/dist/peculiar/{p-72f53d81.js.map → p-3d44cbd2.js.map} +0 -0
  655. /package/dist/peculiar/{p-7f9beaa8.js.map → p-4bc5ddbe.js.map} +0 -0
  656. /package/dist/peculiar/{p-b313be9e.system.js.map → p-5a662d6f.system.js.map} +0 -0
  657. /package/dist/peculiar/{p-e6a3b4d4.system.js.map → p-8bbee8f4.system.js.map} +0 -0
  658. /package/dist/peculiar/{p-370cee20.js.map → p-99efefea.js.map} +0 -0
  659. /package/dist/peculiar/{p-1ceb0fe3.js.map → p-a9487007.js.map} +0 -0
  660. /package/dist/peculiar/{p-17e3c47b.js.map → p-ae91d778.js.map} +0 -0
  661. /package/dist/peculiar/{p-a3eeb94b.system.js.map → p-b2890eb8.system.js.map} +0 -0
  662. /package/dist/peculiar/{p-94a453d7.js.map → p-e6a6e602.js.map} +0 -0
@@ -2,6 +2,7 @@
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
4
  const NAMESPACE = 'peculiar';
5
+ const BUILD = /* peculiar */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
5
6
 
6
7
  /**
7
8
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -41,6 +42,13 @@ const HYDRATE_ID = 's-id';
41
42
  const HYDRATED_STYLE_ID = 'sty-id';
42
43
  const HYDRATE_CHILD_ID = 'c-id';
43
44
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
45
+ /**
46
+ * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
47
+ *
48
+ * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
49
+ * support as of Stencil v4.
50
+ */
51
+ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
44
52
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
45
53
  /**
46
54
  * Default style mode id
@@ -245,6 +253,17 @@ const convertToPrivate = (node) => {
245
253
  vnode.$name$ = node.vname;
246
254
  return vnode;
247
255
  };
256
+ /**
257
+ * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
258
+ * document and all its nodes.
259
+ *
260
+ * This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.
261
+ *
262
+ * @param hostElm The element to hydrate.
263
+ * @param tagName The element's tag name.
264
+ * @param hostId The host ID assigned to the element by the server.
265
+ * @param hostRef The host reference for the element.
266
+ */
248
267
  const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
249
268
  const endHydrate = createTime('hydrateClient', tagName);
250
269
  const shadowRoot = hostElm.shadowRoot;
@@ -262,6 +281,8 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
262
281
  const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
263
282
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
264
283
  const node = c.$elm$;
284
+ // Put the node back in its original location since the native Shadow DOM
285
+ // can handle rendering it its correct location now
265
286
  if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
266
287
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
267
288
  }
@@ -283,6 +304,22 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
283
304
  }
284
305
  endHydrate();
285
306
  };
307
+ /**
308
+ * Recursively constructs the virtual node tree for a host element and its children.
309
+ * The tree is constructed by parsing the annotations set on the nodes by the server.
310
+ *
311
+ * In addition to constructing the vNode tree, we also track information about the node's
312
+ * descendants like which are slots, which should exist in the shadow root, and which
313
+ * are nodes that should be rendered as children of the parent node.
314
+ *
315
+ * @param parentVNode The vNode representing the parent node.
316
+ * @param childRenderNodes An array of all child nodes in the parent's node tree.
317
+ * @param slotNodes An array of all slot nodes in the parent's node tree.
318
+ * @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.
319
+ * @param hostElm The parent element.
320
+ * @param node The node to construct the vNode tree for.
321
+ * @param hostId The host ID assigned to the element by the server.
322
+ */
286
323
  const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
287
324
  let childNodeType;
288
325
  let childIdSplt;
@@ -427,6 +464,13 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
427
464
  parentVNode.$children$ = [vnode];
428
465
  }
429
466
  };
467
+ /**
468
+ * Recursively locate any comments representing an original location for a node in a node's
469
+ * children or shadowRoot children.
470
+ *
471
+ * @param node The node to search.
472
+ * @param orgLocNodes A map of the original location annotation and the current node being searched.
473
+ */
430
474
  const initializeDocumentHydrate = (node, orgLocNodes) => {
431
475
  if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
432
476
  let i = 0;
@@ -571,6 +615,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
571
615
  }
572
616
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
573
617
  }
618
+ // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
619
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
620
+ styleElm.innerHTML += SLOT_FB_CSS;
621
+ }
574
622
  if (appliedStyles) {
575
623
  appliedStyles.add(scopeId);
576
624
  }
@@ -705,11 +753,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
705
753
  // except for the first character, we keep the event name case
706
754
  memberName = ln[2] + memberName.slice(3);
707
755
  }
708
- if (oldValue) {
709
- plt.rel(elm, memberName, oldValue, false);
710
- }
711
- if (newValue) {
712
- plt.ael(elm, memberName, newValue, false);
756
+ if (oldValue || newValue) {
757
+ // Need to account for "capture" events.
758
+ // If the event name ends with "Capture", we'll update the name to remove
759
+ // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
760
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
761
+ // Make sure we only replace the last instance of "Capture"
762
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
763
+ if (oldValue) {
764
+ plt.rel(elm, memberName, oldValue, capture);
765
+ }
766
+ if (newValue) {
767
+ plt.ael(elm, memberName, newValue, capture);
768
+ }
713
769
  }
714
770
  }
715
771
  else {
@@ -731,7 +787,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
731
787
  elm[memberName] = newValue;
732
788
  }
733
789
  }
734
- catch (e) { }
790
+ catch (e) {
791
+ /**
792
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
793
+ */
794
+ }
735
795
  }
736
796
  /**
737
797
  * Need to manually update attribute if:
@@ -770,7 +830,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
770
830
  }
771
831
  };
772
832
  const parseClassListRegex = /\s/;
833
+ /**
834
+ * Parsed a string of classnames into an array
835
+ * @param value className string, e.g. "foo bar baz"
836
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
837
+ */
773
838
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
839
+ const CAPTURE_EVENT_SUFFIX = 'Capture';
840
+ const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
774
841
  const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
775
842
  // if the element passed in is a shadow root, which is a document fragment
776
843
  // then we want to be adding attrs/props to the shadow root's "host" element
@@ -804,6 +871,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
804
871
  * @returns the newly created node
805
872
  */
806
873
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
874
+ var _a;
807
875
  // tslint:disable-next-line: prefer-const
808
876
  const newVNode = newParentVNode.$children$[childIndex];
809
877
  let i = 0;
@@ -877,8 +945,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
877
945
  }
878
946
  }
879
947
  }
948
+ // This needs to always happen so we can hide nodes that are projected
949
+ // to another component but don't end up in a slot
950
+ elm['s-hn'] = hostTagName;
880
951
  {
881
- elm['s-hn'] = hostTagName;
882
952
  if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
883
953
  // remember the content reference comment
884
954
  elm['s-sr'] = true;
@@ -886,12 +956,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
886
956
  elm['s-cr'] = contentRef;
887
957
  // remember the slot name, or empty string for default slot
888
958
  elm['s-sn'] = newVNode.$name$ || '';
959
+ // remember the ref callback function
960
+ elm['s-rf'] = (_a = newVNode.$attrs$) === null || _a === void 0 ? void 0 : _a.ref;
889
961
  // check if we've got an old vnode for this slot
890
962
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
891
963
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
892
- // we've got an old slot vnode and the wrapper is being replaced
893
- // so let's move the old slot content back to it's original location
894
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
964
+ {
965
+ // we've got an old slot vnode and the wrapper is being replaced
966
+ // so let's move the old slot content back to its original location
967
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
968
+ }
895
969
  }
896
970
  }
897
971
  }
@@ -899,20 +973,27 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
899
973
  };
900
974
  const putBackInOriginalLocation = (parentElm, recursive) => {
901
975
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
902
- const oldSlotChildNodes = parentElm.childNodes;
976
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
977
+ if (parentElm['s-sr'] && BUILD.experimentalSlotFixes) {
978
+ let node = parentElm;
979
+ while ((node = node.nextSibling)) {
980
+ if (node && node['s-sn'] === parentElm['s-sn'] && node['s-sh'] === hostTagName) {
981
+ oldSlotChildNodes.push(node);
982
+ }
983
+ }
984
+ }
903
985
  for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
904
986
  const childNode = oldSlotChildNodes[i];
905
987
  if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
906
- // // this child node in the old element is from another component
907
- // // remove this node from the old slot's parent
908
- // childNode.remove();
909
988
  // and relocate it back to it's original location
910
989
  parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
911
990
  // remove the old original location comment entirely
912
991
  // later on the patch function will know what to do
913
- // and move this to the correct spot in need be
992
+ // and move this to the correct spot if need be
914
993
  childNode['s-ol'].remove();
915
994
  childNode['s-ol'] = undefined;
995
+ // Reset so we can correctly move the node around again.
996
+ childNode['s-sh'] = undefined;
916
997
  checkSlotRelocate = true;
917
998
  }
918
999
  if (recursive) {
@@ -1057,8 +1138,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
1057
1138
  * @param oldCh the old children of the parent node
1058
1139
  * @param newVNode the new VNode which will replace the parent
1059
1140
  * @param newCh the new children of the parent node
1141
+ * @param isInitialRender whether or not this is the first render of the vdom
1060
1142
  */
1061
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1143
+ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
1062
1144
  let oldStartIdx = 0;
1063
1145
  let newStartIdx = 0;
1064
1146
  let idxInOld = 0;
@@ -1085,24 +1167,24 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1085
1167
  else if (newEndVnode == null) {
1086
1168
  newEndVnode = newCh[--newEndIdx];
1087
1169
  }
1088
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
1170
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1089
1171
  // if the start nodes are the same then we should patch the new VNode
1090
1172
  // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
1091
1173
  // indices to reflect that. We don't need to move any DOM Nodes around
1092
1174
  // since things are matched up in order.
1093
- patch(oldStartVnode, newStartVnode);
1175
+ patch(oldStartVnode, newStartVnode, isInitialRender);
1094
1176
  oldStartVnode = oldCh[++oldStartIdx];
1095
1177
  newStartVnode = newCh[++newStartIdx];
1096
1178
  }
1097
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
1179
+ else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1098
1180
  // likewise, if the end nodes are the same we patch new onto old and
1099
1181
  // decrement our end indices, and also likewise in this case we don't
1100
1182
  // need to move any DOM Nodes.
1101
- patch(oldEndVnode, newEndVnode);
1183
+ patch(oldEndVnode, newEndVnode, isInitialRender);
1102
1184
  oldEndVnode = oldCh[--oldEndIdx];
1103
1185
  newEndVnode = newCh[--newEndIdx];
1104
1186
  }
1105
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
1187
+ else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1106
1188
  // case: "Vnode moved right"
1107
1189
  //
1108
1190
  // We've found that the last node in our window on the new children is
@@ -1120,7 +1202,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1120
1202
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1121
1203
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1122
1204
  }
1123
- patch(oldStartVnode, newEndVnode);
1205
+ patch(oldStartVnode, newEndVnode, isInitialRender);
1124
1206
  // We need to move the element for `oldStartVnode` into a position which
1125
1207
  // will be appropriate for `newEndVnode`. For this we can use
1126
1208
  // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
@@ -1142,7 +1224,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1142
1224
  oldStartVnode = oldCh[++oldStartIdx];
1143
1225
  newEndVnode = newCh[--newEndIdx];
1144
1226
  }
1145
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
1227
+ else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1146
1228
  // case: "Vnode moved left"
1147
1229
  //
1148
1230
  // We've found that the first node in our window on the new children is
@@ -1161,7 +1243,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1161
1243
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1162
1244
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1163
1245
  }
1164
- patch(oldEndVnode, newStartVnode);
1246
+ patch(oldEndVnode, newStartVnode, isInitialRender);
1165
1247
  // We've already checked above if `oldStartVnode` and `newStartVnode` are
1166
1248
  // the same node, so since we're here we know that they are not. Thus we
1167
1249
  // can move the element for `oldEndVnode` _before_ the element for
@@ -1198,7 +1280,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1198
1280
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
1199
1281
  }
1200
1282
  else {
1201
- patch(elmToMove, newStartVnode);
1283
+ patch(elmToMove, newStartVnode, isInitialRender);
1202
1284
  // invalidate the matching old node so that we won't try to update it
1203
1285
  // again later on
1204
1286
  oldCh[idxInOld] = undefined;
@@ -1249,19 +1331,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1249
1331
  *
1250
1332
  * @param leftVNode the first VNode to check
1251
1333
  * @param rightVNode the second VNode to check
1334
+ * @param isInitialRender whether or not this is the first render of the vdom
1252
1335
  * @returns whether they're equal or not
1253
1336
  */
1254
- const isSameVnode = (leftVNode, rightVNode) => {
1337
+ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1255
1338
  // compare if two vnode to see if they're "technically" the same
1256
1339
  // need to have the same element tag, and same key to be the same
1257
1340
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1258
1341
  if (leftVNode.$tag$ === 'slot') {
1259
1342
  return leftVNode.$name$ === rightVNode.$name$;
1260
1343
  }
1261
- // this will be set if components in the build have `key` attrs set on them
1262
- {
1344
+ // this will be set if JSX tags in the build have `key` attrs set on them
1345
+ // we only want to check this if we're not on the first render since on
1346
+ // first render `leftVNode.$key$` will always be `null`, so we can be led
1347
+ // astray and, for instance, accidentally delete a DOM node that we want to
1348
+ // keep around.
1349
+ if (!isInitialRender) {
1263
1350
  return leftVNode.$key$ === rightVNode.$key$;
1264
1351
  }
1352
+ return true;
1265
1353
  }
1266
1354
  return false;
1267
1355
  };
@@ -1280,8 +1368,9 @@ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).paren
1280
1368
  *
1281
1369
  * @param oldVNode an old VNode whose DOM element and children we want to update
1282
1370
  * @param newVNode a new VNode representing an updated version of the old one
1371
+ * @param isInitialRender whether or not this is the first render of the vdom
1283
1372
  */
1284
- const patch = (oldVNode, newVNode) => {
1373
+ const patch = (oldVNode, newVNode, isInitialRender = false) => {
1285
1374
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
1286
1375
  const oldChildren = oldVNode.$children$;
1287
1376
  const newChildren = newVNode.$children$;
@@ -1295,8 +1384,7 @@ const patch = (oldVNode, newVNode) => {
1295
1384
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1296
1385
  }
1297
1386
  {
1298
- if (tag === 'slot')
1299
- ;
1387
+ if (tag === 'slot' && !useNativeShadowDom) ;
1300
1388
  else {
1301
1389
  // either this is the first render of an element OR it's an update
1302
1390
  // AND we already know it's possible it could have changed
@@ -1307,7 +1395,7 @@ const patch = (oldVNode, newVNode) => {
1307
1395
  if (oldChildren !== null && newChildren !== null) {
1308
1396
  // looks like there's child vnodes for both the old and new vnodes
1309
1397
  // so we need to call `updateChildren` to reconcile them
1310
- updateChildren(elm, oldChildren, newVNode, newChildren);
1398
+ updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
1311
1399
  }
1312
1400
  else if (newChildren !== null) {
1313
1401
  // no old child vnodes, but there are new child vnodes to add
@@ -1336,42 +1424,53 @@ const patch = (oldVNode, newVNode) => {
1336
1424
  elm.data = text;
1337
1425
  }
1338
1426
  };
1427
+ /**
1428
+ * Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
1429
+ * are slot fallbacks nodes.
1430
+ *
1431
+ * A slot fallback node should be visible by default. Then, it should be
1432
+ * conditionally hidden if:
1433
+ *
1434
+ * - it has a sibling with a `slot` property set to its slot name or if
1435
+ * - it is a default fallback slot node, in which case we hide if it has any
1436
+ * content
1437
+ *
1438
+ * @param elm the element of interest
1439
+ */
1339
1440
  const updateFallbackSlotVisibility = (elm) => {
1340
- // tslint:disable-next-line: prefer-const
1341
1441
  const childNodes = elm.childNodes;
1342
- let childNode;
1343
- let i;
1344
- let ilen;
1345
- let j;
1346
- let slotNameAttr;
1347
- let nodeType;
1348
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1349
- childNode = childNodes[i];
1442
+ for (const childNode of childNodes) {
1350
1443
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1351
1444
  if (childNode['s-sr']) {
1352
1445
  // this is a slot fallback node
1353
1446
  // get the slot name for this slot reference node
1354
- slotNameAttr = childNode['s-sn'];
1447
+ const slotName = childNode['s-sn'];
1355
1448
  // by default always show a fallback slot node
1356
1449
  // then hide it if there are other slots in the light dom
1357
1450
  childNode.hidden = false;
1358
- for (j = 0; j < ilen; j++) {
1359
- nodeType = childNodes[j].nodeType;
1360
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1361
- // this sibling node is from a different component OR is a named fallback slot node
1362
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1363
- childNode.hidden = true;
1364
- break;
1451
+ // we need to check all of its sibling nodes in order to see if
1452
+ // `childNode` should be hidden
1453
+ for (const siblingNode of childNodes) {
1454
+ // Don't check the node against itself
1455
+ if (siblingNode !== childNode) {
1456
+ if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
1457
+ // this sibling node is from a different component OR is a named
1458
+ // fallback slot node
1459
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1460
+ (slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
1461
+ childNode.hidden = true;
1462
+ break;
1463
+ }
1365
1464
  }
1366
- }
1367
- else {
1368
- // this is a default fallback slot node
1369
- // any element or text node (with content)
1370
- // should hide the default fallback slot node
1371
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1372
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1373
- childNode.hidden = true;
1374
- break;
1465
+ else {
1466
+ // this is a default fallback slot node
1467
+ // any element or text node (with content)
1468
+ // should hide the default fallback slot node
1469
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1470
+ (siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
1471
+ childNode.hidden = true;
1472
+ break;
1473
+ }
1375
1474
  }
1376
1475
  }
1377
1476
  }
@@ -1381,45 +1480,67 @@ const updateFallbackSlotVisibility = (elm) => {
1381
1480
  }
1382
1481
  }
1383
1482
  };
1483
+ /**
1484
+ * Component-global information about nodes which are either currently being
1485
+ * relocated or will be shortly.
1486
+ */
1384
1487
  const relocateNodes = [];
1385
- const relocateSlotContent = (elm) => {
1488
+ /**
1489
+ * Mark the contents of a slot for relocation via adding references to them to
1490
+ * the {@link relocateNodes} data structure. The actual work of relocating them
1491
+ * will then be handled in {@link renderVdom}.
1492
+ *
1493
+ * @param elm a render node whose child nodes need to be relocated
1494
+ */
1495
+ const markSlotContentForRelocation = (elm) => {
1386
1496
  // tslint:disable-next-line: prefer-const
1387
- let childNode;
1388
1497
  let node;
1389
1498
  let hostContentNodes;
1390
- let slotNameAttr;
1391
- let relocateNodeData;
1392
1499
  let j;
1393
- let i = 0;
1394
- const childNodes = elm.childNodes;
1395
- const ilen = childNodes.length;
1396
- for (; i < ilen; i++) {
1397
- childNode = childNodes[i];
1500
+ for (const childNode of elm.childNodes) {
1501
+ // we need to find child nodes which are slot references so we can then try
1502
+ // to match them up with nodes that need to be relocated
1398
1503
  if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1399
- // first got the content reference comment node
1400
- // then we got it's parent, which is where all the host content is in now
1504
+ // first get the content reference comment node ('s-cr'), then we get
1505
+ // its parent, which is where all the host content is now
1401
1506
  hostContentNodes = node.parentNode.childNodes;
1402
- slotNameAttr = childNode['s-sn'];
1507
+ const slotName = childNode['s-sn'];
1508
+ // iterate through all the nodes under the location where the host was
1509
+ // originally rendered
1403
1510
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1404
1511
  node = hostContentNodes[j];
1405
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1406
- // let's do some relocating to its new home
1407
- // but never relocate a content reference node
1408
- // that is suppose to always represent the original content location
1409
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
1512
+ // check that the node is not a content reference node or a node
1513
+ // reference and then check that the host name does not match that of
1514
+ // childNode.
1515
+ // In addition, check that the slot either has not already been relocated, or
1516
+ // that its current location's host is not childNode's host. This is essentially
1517
+ // a check so that we don't try to relocate (and then hide) a node that is already
1518
+ // where it should be.
1519
+ if (!node['s-cn'] &&
1520
+ !node['s-nr'] &&
1521
+ node['s-hn'] !== childNode['s-hn'] &&
1522
+ (!BUILD.experimentalSlotFixes )) {
1523
+ // if `node` is located in the slot that `childNode` refers to (via the
1524
+ // `'s-sn'` property) then we need to relocate it from it's current spot
1525
+ // (under the host element parent) to the right slot location
1526
+ if (isNodeLocatedInSlot(node, slotName)) {
1410
1527
  // it's possible we've already decided to relocate this node
1411
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1528
+ let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1412
1529
  // made some changes to slots
1413
1530
  // let's make sure we also double check
1414
1531
  // fallbacks are correctly hidden or shown
1415
1532
  checkSlotFallbackVisibility = true;
1416
- node['s-sn'] = node['s-sn'] || slotNameAttr;
1533
+ // ensure that the slot-name attr is correct
1534
+ node['s-sn'] = node['s-sn'] || slotName;
1417
1535
  if (relocateNodeData) {
1418
- // previously we never found a slot home for this node
1419
- // but turns out we did, so let's remember it now
1536
+ relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
1537
+ // we marked this node for relocation previously but didn't find
1538
+ // out the slot reference node to which it needs to be relocated
1539
+ // so write it down now!
1420
1540
  relocateNodeData.$slotRefNode$ = childNode;
1421
1541
  }
1422
1542
  else {
1543
+ node['s-sh'] = childNode['s-hn'];
1423
1544
  // add to our list of nodes to relocate
1424
1545
  relocateNodes.push({
1425
1546
  $slotRefNode$: childNode,
@@ -1438,8 +1559,10 @@ const relocateSlotContent = (elm) => {
1438
1559
  }
1439
1560
  }
1440
1561
  else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1441
- // so far this element does not have a slot home, not setting slotRefNode on purpose
1442
- // if we never find a home for this element then we'll need to hide it
1562
+ // the node is not found within the slot (`childNode`) that we're
1563
+ // currently looking at, so we stick it into `relocateNodes` to
1564
+ // handle later. If we never find a home for this element then
1565
+ // we'll need to hide it
1443
1566
  relocateNodes.push({
1444
1567
  $nodeToRelocate$: node,
1445
1568
  });
@@ -1447,30 +1570,41 @@ const relocateSlotContent = (elm) => {
1447
1570
  }
1448
1571
  }
1449
1572
  }
1573
+ // if we're dealing with any type of element (capable of itself being a
1574
+ // slot reference or containing one) then we recur
1450
1575
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1451
- relocateSlotContent(childNode);
1576
+ markSlotContentForRelocation(childNode);
1452
1577
  }
1453
1578
  }
1454
1579
  };
1455
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1580
+ /**
1581
+ * Check whether a node is located in a given named slot.
1582
+ *
1583
+ * @param nodeToRelocate the node of interest
1584
+ * @param slotName the slot name to check
1585
+ * @returns whether the node is located in the slot or not
1586
+ */
1587
+ const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1456
1588
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1457
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1589
+ if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
1590
+ // if the node doesn't have a slot attribute, and the slot we're checking
1591
+ // is not a named slot, then we assume the node should be within the slot
1458
1592
  return true;
1459
1593
  }
1460
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1594
+ if (nodeToRelocate.getAttribute('slot') === slotName) {
1461
1595
  return true;
1462
1596
  }
1463
1597
  return false;
1464
1598
  }
1465
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
1599
+ if (nodeToRelocate['s-sn'] === slotName) {
1466
1600
  return true;
1467
1601
  }
1468
- return slotNameAttr === '';
1602
+ return slotName === '';
1469
1603
  };
1470
1604
  /**
1471
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1472
- * calling them with `null`. This signals that the DOM element corresponding to
1473
- * the VDom node has been removed from the DOM.
1605
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1606
+ * them with `null`. This signals that the DOM element corresponding to the VDom
1607
+ * node has been removed from the DOM.
1474
1608
  *
1475
1609
  * @param vNode a virtual DOM node
1476
1610
  */
@@ -1494,6 +1628,7 @@ const nullifyVNodeRefs = (vNode) => {
1494
1628
  * @param isInitialLoad whether or not this is the first call after page load
1495
1629
  */
1496
1630
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1631
+ var _a, _b, _c, _d;
1497
1632
  const hostElm = hostRef.$hostElement$;
1498
1633
  const cmpMeta = hostRef.$cmpMeta$;
1499
1634
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1536,56 +1671,61 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1536
1671
  {
1537
1672
  scopeId = hostElm['s-sc'];
1538
1673
  }
1674
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1539
1675
  {
1540
1676
  contentRef = hostElm['s-cr'];
1541
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1542
1677
  // always reset
1543
1678
  checkSlotFallbackVisibility = false;
1544
1679
  }
1545
1680
  // synchronous patch
1546
- patch(oldVNode, rootVnode);
1681
+ patch(oldVNode, rootVnode, isInitialLoad);
1547
1682
  {
1548
1683
  // while we're moving nodes around existing nodes, temporarily disable
1549
1684
  // the disconnectCallback from working
1550
1685
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1551
1686
  if (checkSlotRelocate) {
1552
- relocateSlotContent(rootVnode.$elm$);
1553
- let relocateData;
1554
- let nodeToRelocate;
1555
- let orgLocationNode;
1556
- let parentNodeRef;
1557
- let insertBeforeNode;
1558
- let refNode;
1559
- let i = 0;
1560
- for (; i < relocateNodes.length; i++) {
1561
- relocateData = relocateNodes[i];
1562
- nodeToRelocate = relocateData.$nodeToRelocate$;
1687
+ markSlotContentForRelocation(rootVnode.$elm$);
1688
+ for (const relocateData of relocateNodes) {
1689
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1563
1690
  if (!nodeToRelocate['s-ol']) {
1564
1691
  // add a reference node marking this node's original location
1565
1692
  // keep a reference to this node for later lookups
1566
- orgLocationNode =
1567
- doc.createTextNode('');
1693
+ const orgLocationNode = doc.createTextNode('');
1568
1694
  orgLocationNode['s-nr'] = nodeToRelocate;
1569
1695
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1570
1696
  }
1571
1697
  }
1572
- for (i = 0; i < relocateNodes.length; i++) {
1573
- relocateData = relocateNodes[i];
1574
- nodeToRelocate = relocateData.$nodeToRelocate$;
1575
- if (relocateData.$slotRefNode$) {
1576
- // by default we're just going to insert it directly
1577
- // after the slot reference node
1578
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
1579
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1580
- orgLocationNode = nodeToRelocate['s-ol'];
1581
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
1582
- refNode = orgLocationNode['s-nr'];
1583
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1584
- refNode = refNode.nextSibling;
1585
- if (!refNode || !refNode['s-nr']) {
1586
- insertBeforeNode = refNode;
1587
- break;
1698
+ for (const relocateData of relocateNodes) {
1699
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1700
+ const slotRefNode = relocateData.$slotRefNode$;
1701
+ if (slotRefNode) {
1702
+ const parentNodeRef = slotRefNode.parentNode;
1703
+ // When determining where to insert content, the most simple case would be
1704
+ // to relocate the node immediately following the slot reference node. We do this
1705
+ // by getting a reference to the node immediately following the slot reference node
1706
+ // since we will use `insertBefore` to manipulate the DOM.
1707
+ //
1708
+ // If there is no node immediately following the slot reference node, then we will just
1709
+ // end up appending the node as the last child of the parent.
1710
+ let insertBeforeNode = slotRefNode.nextSibling;
1711
+ // If the node we're currently planning on inserting the new node before is an element,
1712
+ // we need to do some additional checks to make sure we're inserting the node in the correct order.
1713
+ // The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
1714
+ // to make sure they get inserted into their new home in the same order they were declared in their original location.
1715
+ //
1716
+ // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1717
+ {
1718
+ let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1719
+ while (orgLocationNode) {
1720
+ let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
1721
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1722
+ refNode = refNode.nextSibling;
1723
+ if (!refNode || !refNode['s-nr']) {
1724
+ insertBeforeNode = refNode;
1725
+ break;
1726
+ }
1588
1727
  }
1728
+ orgLocationNode = orgLocationNode.previousSibling;
1589
1729
  }
1590
1730
  }
1591
1731
  if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
@@ -1598,14 +1738,30 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1598
1738
  // probably a component in the index.html that doesn't have its hostname set
1599
1739
  nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1600
1740
  }
1601
- // add it back to the dom but in its new home
1741
+ // Add it back to the dom but in its new home
1742
+ // If we get to this point and `insertBeforeNode` is `null`, that means
1743
+ // we're just going to append the node as the last child of the parent. Passing
1744
+ // `null` as the second arg here will trigger that behavior.
1602
1745
  parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1746
+ // Reset the `hidden` value back to what it was defined as originally
1747
+ // This solves a problem where a `slot` is dynamically rendered and `hidden` may have
1748
+ // been set on content originally, but now it has a slot to go to so it should have
1749
+ // the value it was defined as having in the DOM, not what we overrode it to.
1750
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1751
+ nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
1752
+ }
1603
1753
  }
1604
1754
  }
1755
+ nodeToRelocate && typeof slotRefNode['s-rf'] === 'function' && slotRefNode['s-rf'](nodeToRelocate);
1605
1756
  }
1606
1757
  else {
1607
1758
  // this node doesn't have a slot home to go to, so let's hide it
1608
1759
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1760
+ // Store the initial value of `hidden` so we can reset it later when
1761
+ // moving nodes around.
1762
+ if (isInitialLoad) {
1763
+ nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
1764
+ }
1609
1765
  nodeToRelocate.hidden = true;
1610
1766
  }
1611
1767
  }
@@ -1620,6 +1776,8 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1620
1776
  // always reset
1621
1777
  relocateNodes.length = 0;
1622
1778
  }
1779
+ // Clear the content ref so we don't create a memory leak
1780
+ contentRef = undefined;
1623
1781
  };
1624
1782
  const attachToAncestor = (hostRef, ancestorComponent) => {
1625
1783
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -1768,6 +1926,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1768
1926
  */
1769
1927
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
1770
1928
  try {
1929
+ /**
1930
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1931
+ * method, so we can call the method immediately. If not, check before calling it.
1932
+ */
1771
1933
  instance = instance.render() ;
1772
1934
  {
1773
1935
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -1844,6 +2006,16 @@ const appDidLoad = (who) => {
1844
2006
  }
1845
2007
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1846
2008
  };
2009
+ /**
2010
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
2011
+ * e.g. custom element node. If a build figures out that e.g. no component
2012
+ * has a `componentDidLoad` method, the instance method gets removed from the
2013
+ * output bundle and this function returns `undefined`.
2014
+ * @param instance any object that may or may not contain methods
2015
+ * @param method method name
2016
+ * @param arg single arbitrary argument
2017
+ * @returns result of method call if it exists, otherwise `undefined`
2018
+ */
1847
2019
  const safeCall = (instance, method, arg) => {
1848
2020
  if (instance && instance[method]) {
1849
2021
  try {
@@ -1912,13 +2084,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1912
2084
  */
1913
2085
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1914
2086
  var _a;
2087
+ const prototype = Cstr.prototype;
1915
2088
  if (cmpMeta.$members$) {
1916
2089
  if (Cstr.watchers) {
1917
2090
  cmpMeta.$watchers$ = Cstr.watchers;
1918
2091
  }
1919
2092
  // It's better to have a const than two Object.entries()
1920
2093
  const members = Object.entries(cmpMeta.$members$);
1921
- const prototype = Cstr.prototype;
1922
2094
  members.map(([memberName, [memberFlags]]) => {
1923
2095
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1924
2096
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1941,6 +2113,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1941
2113
  const attrNameToPropName = new Map();
1942
2114
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1943
2115
  plt.jmp(() => {
2116
+ var _a;
1944
2117
  const propName = attrNameToPropName.get(attrName);
1945
2118
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1946
2119
  // in the case where an attribute was set inline.
@@ -1996,11 +2169,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1996
2169
  // 1. The instance is ready
1997
2170
  // 2. The watchers are ready
1998
2171
  // 3. The value has changed
1999
- if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2172
+ if (flags &&
2173
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2000
2174
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
2001
2175
  newValue !== oldValue) {
2002
2176
  const instance = hostRef.$lazyInstance$ ;
2003
- const entry = cmpMeta.$watchers$[attrName];
2177
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
2004
2178
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
2005
2179
  if (instance[callbackName] != null) {
2006
2180
  instance[callbackName].call(instance, newValue, oldValue, attrName);
@@ -2022,10 +2196,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2022
2196
  ...members
2023
2197
  .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
2024
2198
  .map(([propName, m]) => {
2199
+ var _a;
2025
2200
  const attrName = m[1] || propName;
2026
2201
  attrNameToPropName.set(attrName, propName);
2027
2202
  if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
2028
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
2203
+ (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
2029
2204
  }
2030
2205
  return attrName;
2031
2206
  }),
@@ -2034,12 +2209,24 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2034
2209
  }
2035
2210
  return Cstr;
2036
2211
  };
2037
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
2212
+ /**
2213
+ * Initialize a Stencil component given a reference to its host element, its
2214
+ * runtime bookkeeping data structure, runtime metadata about the component,
2215
+ * and (optionally) an HMR version ID.
2216
+ *
2217
+ * @param elm a host element
2218
+ * @param hostRef the element's runtime bookkeeping object
2219
+ * @param cmpMeta runtime metadata for the Stencil component
2220
+ * @param hmrVersionId an (optional) HMR version ID
2221
+ */
2222
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2223
+ let Cstr;
2038
2224
  // initializeComponent
2039
2225
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
2040
2226
  // Let the runtime know that the component has been initialized
2041
2227
  hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
2042
- {
2228
+ const bundleId = cmpMeta.$lazyBundleId$;
2229
+ if (bundleId) {
2043
2230
  // lazy loaded components
2044
2231
  // request the component's implementation to be
2045
2232
  // wired up with the host element
@@ -2085,6 +2272,14 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2085
2272
  }
2086
2273
  endNewInstance();
2087
2274
  }
2275
+ else {
2276
+ // sync constructor component
2277
+ Cstr = elm.constructor;
2278
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
2279
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
2280
+ // Stencil has completed instantiating the component.
2281
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
2282
+ }
2088
2283
  if (Cstr.style) {
2089
2284
  // this component has styles but we haven't registered them yet
2090
2285
  let style = Cstr.style;
@@ -2221,7 +2416,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2221
2416
  const customElements = win.customElements;
2222
2417
  const head = doc.head;
2223
2418
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
2224
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
2419
+ const dataStyles = /*@__PURE__*/ doc.createElement('style');
2225
2420
  const deferredConnectedCallbacks = [];
2226
2421
  const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2227
2422
  let appLoadFallback;
@@ -2239,6 +2434,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2239
2434
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2240
2435
  }
2241
2436
  }
2437
+ let hasSlotRelocation = false;
2242
2438
  lazyBundles.map((lazyBundle) => {
2243
2439
  lazyBundle[1].map((compactMeta) => {
2244
2440
  var _a;
@@ -2248,6 +2444,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2248
2444
  $members$: compactMeta[2],
2249
2445
  $listeners$: compactMeta[3],
2250
2446
  };
2447
+ // Check if we are using slots outside the shadow DOM in this component.
2448
+ // We'll use this information later to add styles for `slot-fb` elements
2449
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
2450
+ hasSlotRelocation = true;
2451
+ }
2251
2452
  {
2252
2453
  cmpMeta.$members$ = compactMeta[2];
2253
2454
  }
@@ -2304,15 +2505,29 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2304
2505
  }
2305
2506
  });
2306
2507
  });
2307
- {
2308
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2309
- visibilityStyle.setAttribute('data-styles', '');
2310
- // Apply CSP nonce to the style tag if it exists
2311
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2312
- if (nonce != null) {
2313
- visibilityStyle.setAttribute('nonce', nonce);
2508
+ // Only bother generating CSS if we have components
2509
+ // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
2510
+ if (cmpTags.length > 0) {
2511
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
2512
+ if (hasSlotRelocation) {
2513
+ dataStyles.textContent += SLOT_FB_CSS;
2514
+ }
2515
+ // Add hydration styles
2516
+ {
2517
+ dataStyles.textContent += cmpTags + HYDRATED_CSS;
2518
+ }
2519
+ // If we have styles, add them to the DOM
2520
+ if (dataStyles.innerHTML.length) {
2521
+ dataStyles.setAttribute('data-styles', '');
2522
+ // Apply CSP nonce to the style tag if it exists
2523
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2524
+ if (nonce != null) {
2525
+ dataStyles.setAttribute('nonce', nonce);
2526
+ }
2527
+ // Insert the styles into the document head
2528
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
2529
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
2314
2530
  }
2315
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
2316
2531
  }
2317
2532
  // Process deferred connectedCallbacks now all components have been registered
2318
2533
  isBootstrapping = false;
@@ -2334,22 +2549,60 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2334
2549
  * @returns void
2335
2550
  */
2336
2551
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
2337
- const hostRefs = /*@__PURE__*/ new WeakMap();
2552
+ /**
2553
+ * A WeakMap mapping runtime component references to their corresponding host reference
2554
+ * instances.
2555
+ *
2556
+ * **Note**: If we're in an HMR context we need to store a reference to this
2557
+ * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
2558
+ * to {@link d.HostRef} across HMR updates.
2559
+ *
2560
+ * This is necessary because when HMR updates for a component are processed by
2561
+ * the browser-side dev server client the JS bundle for that component is
2562
+ * re-fetched. Since the module containing {@link hostRefs} is included in
2563
+ * that bundle, if we do not store a reference to it the new iteration of the
2564
+ * component will not have access to the previous hostRef map, leading to a
2565
+ * bug where the new version of the component cannot properly initialize.
2566
+ */
2567
+ const hostRefs = new WeakMap();
2568
+ /**
2569
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2570
+ *
2571
+ * @param ref the runtime ref of interest
2572
+ * @returns the Host reference (if found) or undefined
2573
+ */
2338
2574
  const getHostRef = (ref) => hostRefs.get(ref);
2575
+ /**
2576
+ * Register a lazy instance with the {@link hostRefs} object so it's
2577
+ * corresponding {@link d.HostRef} can be retrieved later.
2578
+ *
2579
+ * @param lazyInstance the lazy instance of interest
2580
+ * @param hostRef that instances `HostRef` object
2581
+ * @returns a reference to the host ref WeakMap
2582
+ */
2339
2583
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2340
- const registerHost = (elm, cmpMeta) => {
2584
+ /**
2585
+ * Register a host element for a Stencil component, setting up various metadata
2586
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
2587
+ * metadata.
2588
+ *
2589
+ * @param hostElement the host element to register
2590
+ * @param cmpMeta runtime metadata for that component
2591
+ * @returns a reference to the host ref WeakMap
2592
+ */
2593
+ const registerHost = (hostElement, cmpMeta) => {
2341
2594
  const hostRef = {
2342
2595
  $flags$: 0,
2343
- $hostElement$: elm,
2596
+ $hostElement$: hostElement,
2344
2597
  $cmpMeta$: cmpMeta,
2345
2598
  $instanceValues$: new Map(),
2346
2599
  };
2347
2600
  {
2348
2601
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2349
- elm['s-p'] = [];
2350
- elm['s-rc'] = [];
2602
+ hostElement['s-p'] = [];
2603
+ hostElement['s-rc'] = [];
2351
2604
  }
2352
- return hostRefs.set(elm, hostRef);
2605
+ return hostRefs.set(hostElement, hostRef);
2353
2606
  };
2354
2607
  const isMemberInElement = (elm, memberName) => memberName in elm;
2355
2608
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -2440,9 +2693,9 @@ const flush = () => {
2440
2693
  }
2441
2694
  }
2442
2695
  };
2443
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2696
+ const nextTick = (cb) => promiseResolve().then(cb);
2444
2697
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2445
2698
 
2446
2699
  export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2447
2700
 
2448
- //# sourceMappingURL=index-4079bbb5.js.map
2701
+ //# sourceMappingURL=index-ae188432.js.map