@postnord/pn-marketweb-components 2.0.140 → 2.0.142

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 (665) hide show
  1. package/cjs/{index-e3e27c79.js → index-4199ff85.js} +595 -278
  2. package/cjs/{index-28bbc937.js → index-95e5b7f9.js} +1 -1
  3. package/cjs/loader.cjs.js +3 -2
  4. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  5. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  6. package/cjs/pn-breakpoints.cjs.entry.js +2 -2
  7. package/cjs/pn-chart.cjs.entry.js +8 -7
  8. package/cjs/pn-charts-card.cjs.entry.js +9 -2
  9. package/cjs/pn-choice-button.cjs.entry.js +5 -2
  10. package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
  11. package/cjs/pn-customernumber-selector.cjs.entry.js +2 -2
  12. package/cjs/pn-filter-checkbox.cjs.entry.js +5 -2
  13. package/cjs/pn-find-price-result.cjs.entry.js +7 -4
  14. package/cjs/{pn-find-price-store-0b8c195c.js → pn-find-price-store-6b418730.js} +1 -1
  15. package/cjs/pn-find-price.cjs.entry.js +4 -4
  16. package/cjs/pn-find-service-and-price-result.cjs.entry.js +4 -4
  17. package/cjs/{pn-find-service-and-price-store-16a7936c.js → pn-find-service-and-price-store-6e26630d.js} +1 -1
  18. package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
  19. package/cjs/pn-language-selector_9.cjs.entry.js +16 -39
  20. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  21. package/cjs/pn-mainnav-link.cjs.entry.js +4 -10
  22. package/cjs/{pn-mainnav-store-61a75ea0.js → pn-mainnav-store-8c337865.js} +1 -1
  23. package/cjs/pn-market-web-components.cjs.js +6 -2
  24. package/cjs/pn-marketweb-input.cjs.entry.js +2 -7
  25. package/cjs/pn-marketweb-search.cjs.entry.js +2 -6
  26. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +10 -15
  27. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +2 -2
  28. package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +3 -5
  29. package/cjs/pn-marketweb-siteheader.cjs.entry.js +8 -35
  30. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  31. package/cjs/pn-pex-pricefinder.cjs.entry.js +2 -5
  32. package/cjs/pn-product-card_4.cjs.entry.js +16 -7
  33. package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
  34. package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
  35. package/cjs/pn-product-tile-info_2.cjs.entry.js +10 -3
  36. package/cjs/pn-product-tile.cjs.entry.js +2 -2
  37. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -2
  38. package/cjs/pn-profile-modal-profile.cjs.entry.js +4 -4
  39. package/cjs/{pn-profile-modal-store-6117e304.js → pn-profile-modal-store-947b08ae.js} +1 -1
  40. package/cjs/pn-profile-modal-type.cjs.entry.js +4 -4
  41. package/cjs/pn-profile-modal.cjs.entry.js +4 -4
  42. package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
  43. package/cjs/pn-profile-selector.cjs.entry.js +5 -5
  44. package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -5
  45. package/cjs/pn-proxio-productcard_4.cjs.entry.js +12 -5
  46. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  47. package/cjs/pn-quote-card.cjs.entry.js +2 -3
  48. package/cjs/pn-sidenav-level.cjs.entry.js +4 -4
  49. package/cjs/pn-sidenav-link.cjs.entry.js +4 -12
  50. package/cjs/{pn-sidenav-store-d9bd9e00.js → pn-sidenav-store-d2389306.js} +1 -1
  51. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +4 -5
  52. package/cjs/pn-sidenav.cjs.entry.js +4 -6
  53. package/cjs/pn-site-footer_2.cjs.entry.js +4 -5
  54. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  55. package/cjs/pn-stats-info-data.cjs.entry.js +8 -8
  56. package/cjs/pn-stats-info.cjs.entry.js +2 -2
  57. package/cjs/pn-teaser-card.cjs.entry.js +3 -4
  58. package/collection/collection-manifest.json +2 -2
  59. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +12 -11
  60. package/collection/components/cards/pn-quote-card/pn-quote-card.js +68 -79
  61. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +109 -113
  62. package/collection/components/charts/pn-chart/pn-chart.js +81 -74
  63. package/collection/components/charts/pn-charts-card/pn-charts-card.js +142 -146
  64. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +133 -128
  65. package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +51 -49
  66. package/collection/components/cta/pn-spotlight/pn-spotlight.js +51 -51
  67. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +119 -114
  68. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +82 -77
  69. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +93 -87
  70. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +193 -195
  71. package/collection/components/input/pn-choice-button/pn-choice-button.js +145 -137
  72. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +128 -122
  73. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +347 -355
  74. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +258 -260
  75. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +0 -3
  76. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +201 -221
  77. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +95 -90
  78. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +122 -117
  79. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +195 -204
  80. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +212 -205
  81. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +170 -172
  82. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +474 -524
  83. package/collection/components/minor/pn-titletag/pn-titletag.js +51 -49
  84. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +119 -123
  85. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +71 -64
  86. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +58 -58
  87. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +92 -97
  88. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +39 -33
  89. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +182 -183
  90. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +29 -22
  91. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +128 -134
  92. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +39 -34
  93. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +71 -66
  94. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +11 -29
  95. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +34 -29
  96. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +68 -75
  97. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +85 -89
  98. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +73 -73
  99. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +68 -67
  100. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +90 -90
  101. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +85 -79
  102. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +182 -188
  103. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +91 -84
  104. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +116 -115
  105. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +68 -67
  106. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +78 -76
  107. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +48 -42
  108. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +163 -179
  109. package/collection/components/widgets/pn-find-price/pn-find-price.js +99 -113
  110. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +66 -67
  111. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +133 -148
  112. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +87 -102
  113. package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -94
  114. package/collection/components/widgets/pn-product-card/pn-product-card-price.js +138 -131
  115. package/collection/components/widgets/pn-product-card/pn-product-card.js +12 -21
  116. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +101 -108
  117. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +137 -140
  118. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +70 -62
  119. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +87 -83
  120. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +12 -16
  121. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +130 -145
  122. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +87 -82
  123. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +55 -57
  124. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +70 -61
  125. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +12 -20
  126. package/collection/docs/installation/installation.stories.js +21 -0
  127. package/custom-elements/index.js +142 -193
  128. package/esm/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  129. package/esm/{index-5397620b.js → index-c118284d.js} +595 -279
  130. package/esm/loader.js +3 -2
  131. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  132. package/esm/pn-bonus-progressbar.entry.js +2 -2
  133. package/esm/pn-breakpoints.entry.js +2 -2
  134. package/esm/pn-chart.entry.js +8 -7
  135. package/esm/pn-charts-card.entry.js +9 -2
  136. package/esm/pn-choice-button.entry.js +5 -2
  137. package/esm/pn-customernumber-selector-option.entry.js +2 -2
  138. package/esm/pn-customernumber-selector.entry.js +2 -2
  139. package/esm/pn-filter-checkbox.entry.js +5 -2
  140. package/esm/pn-find-price-result.entry.js +7 -4
  141. package/esm/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  142. package/esm/pn-find-price.entry.js +4 -4
  143. package/esm/pn-find-service-and-price-result.entry.js +4 -4
  144. package/esm/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  145. package/esm/pn-find-service-and-price.entry.js +4 -4
  146. package/esm/pn-language-selector_9.entry.js +16 -39
  147. package/esm/pn-line-shape.entry.js +2 -2
  148. package/esm/pn-mainnav-link.entry.js +4 -10
  149. package/esm/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  150. package/esm/pn-market-web-components.js +3 -2
  151. package/esm/pn-marketweb-input.entry.js +2 -7
  152. package/esm/pn-marketweb-search.entry.js +2 -6
  153. package/esm/pn-marketweb-sitefooter.entry.js +10 -15
  154. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +2 -2
  155. package/esm/pn-marketweb-siteheader-login-links_2.entry.js +3 -5
  156. package/esm/pn-marketweb-siteheader.entry.js +8 -35
  157. package/esm/pn-parcel-tracker.entry.js +2 -2
  158. package/esm/pn-pex-pricefinder.entry.js +2 -5
  159. package/esm/pn-product-card_4.entry.js +16 -7
  160. package/esm/pn-product-pricelist-result.entry.js +3 -3
  161. package/esm/pn-product-pricelist.entry.js +4 -4
  162. package/esm/pn-product-tile-info_2.entry.js +10 -3
  163. package/esm/pn-product-tile.entry.js +2 -2
  164. package/esm/pn-profile-modal-customernumber.entry.js +2 -2
  165. package/esm/pn-profile-modal-profile.entry.js +4 -4
  166. package/esm/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  167. package/esm/pn-profile-modal-type.entry.js +4 -4
  168. package/esm/pn-profile-modal.entry.js +4 -4
  169. package/esm/pn-profile-selector-option.entry.js +2 -2
  170. package/esm/pn-profile-selector.entry.js +5 -5
  171. package/esm/pn-proxio-pricegroup.entry.js +3 -5
  172. package/esm/pn-proxio-productcard_4.entry.js +12 -5
  173. package/esm/pn-quick-cta.entry.js +2 -2
  174. package/esm/pn-quote-card.entry.js +2 -3
  175. package/esm/pn-sidenav-level.entry.js +4 -4
  176. package/esm/pn-sidenav-link.entry.js +4 -12
  177. package/esm/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  178. package/esm/pn-sidenav-togglebutton.entry.js +4 -5
  179. package/esm/pn-sidenav.entry.js +4 -6
  180. package/esm/pn-site-footer_2.entry.js +4 -5
  181. package/esm/pn-spotlight.entry.js +2 -2
  182. package/esm/pn-stats-info-data.entry.js +8 -8
  183. package/esm/pn-stats-info.entry.js +2 -2
  184. package/esm/pn-teaser-card.entry.js +3 -4
  185. package/esm/polyfills/css-shim.js +1 -1
  186. package/esm-es5/MarketWebContextService-872043cc.js +1 -1
  187. package/esm-es5/MarketWebLoginManager-9499bd89.js +1 -1
  188. package/esm-es5/convert-f6377d13.js +1 -1
  189. package/esm-es5/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  190. package/esm-es5/index-c118284d.js +2 -0
  191. package/esm-es5/loader.js +1 -1
  192. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  193. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  194. package/esm-es5/pn-breakpoints.entry.js +1 -1
  195. package/esm-es5/pn-chart.entry.js +2 -2
  196. package/esm-es5/pn-charts-card.entry.js +1 -1
  197. package/esm-es5/pn-choice-button.entry.js +1 -1
  198. package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
  199. package/esm-es5/pn-customernumber-selector.entry.js +1 -1
  200. package/esm-es5/pn-filter-checkbox.entry.js +1 -1
  201. package/esm-es5/pn-find-price-result.entry.js +1 -1
  202. package/esm-es5/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  203. package/esm-es5/pn-find-price.entry.js +1 -1
  204. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  205. package/esm-es5/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  206. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  207. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  208. package/esm-es5/pn-line-shape.entry.js +1 -1
  209. package/esm-es5/pn-mainnav-link.entry.js +1 -1
  210. package/esm-es5/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  211. package/esm-es5/pn-market-web-components.js +1 -1
  212. package/esm-es5/pn-marketweb-input.entry.js +1 -1
  213. package/esm-es5/pn-marketweb-search.entry.js +1 -1
  214. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  215. package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
  216. package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -1
  217. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  218. package/esm-es5/pn-parcel-tracker.entry.js +1 -1
  219. package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
  220. package/esm-es5/pn-product-card_4.entry.js +1 -1
  221. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  222. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  223. package/esm-es5/pn-product-tile-info_2.entry.js +1 -1
  224. package/esm-es5/pn-product-tile.entry.js +1 -1
  225. package/esm-es5/pn-profile-modal-customernumber.entry.js +1 -1
  226. package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
  227. package/esm-es5/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  228. package/esm-es5/pn-profile-modal-type.entry.js +1 -1
  229. package/esm-es5/pn-profile-modal.entry.js +1 -1
  230. package/esm-es5/pn-profile-selector-option.entry.js +1 -1
  231. package/esm-es5/pn-profile-selector.entry.js +1 -1
  232. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  233. package/esm-es5/pn-proxio-productcard_4.entry.js +1 -1
  234. package/esm-es5/pn-quick-cta.entry.js +1 -1
  235. package/esm-es5/pn-quote-card.entry.js +1 -1
  236. package/esm-es5/pn-sidenav-level.entry.js +1 -1
  237. package/esm-es5/pn-sidenav-link.entry.js +1 -1
  238. package/esm-es5/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  239. package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
  240. package/esm-es5/pn-sidenav.entry.js +1 -1
  241. package/esm-es5/pn-site-footer_2.entry.js +1 -1
  242. package/esm-es5/pn-spotlight.entry.js +1 -1
  243. package/esm-es5/pn-stats-info-data.entry.js +1 -1
  244. package/esm-es5/pn-stats-info.entry.js +1 -1
  245. package/esm-es5/pn-teaser-card.entry.js +1 -1
  246. package/package.json +3 -2
  247. package/pn-market-web-components/p-09d66012.system.entry.js +1 -0
  248. package/pn-market-web-components/{p-1c38553b.system.entry.js → p-0c46847e.system.entry.js} +1 -1
  249. package/pn-market-web-components/p-0fbcacf3.system.entry.js +1 -0
  250. package/pn-market-web-components/p-0ffa3353.entry.js +1 -0
  251. package/pn-market-web-components/p-1545fb34.entry.js +1 -0
  252. package/pn-market-web-components/p-156fedd7.entry.js +1 -0
  253. package/pn-market-web-components/p-15e680a8.entry.js +1 -0
  254. package/pn-market-web-components/{p-28bad7f5.system.entry.js → p-16afb058.system.entry.js} +1 -1
  255. package/pn-market-web-components/p-17fb8d9e.entry.js +1 -0
  256. package/pn-market-web-components/p-19b622e7.entry.js +1 -0
  257. package/pn-market-web-components/p-1a9b2a0e.system.entry.js +1 -0
  258. package/pn-market-web-components/{p-a43543e5.system.entry.js → p-1ae6cc5f.system.entry.js} +1 -1
  259. package/pn-market-web-components/p-1c382898.entry.js +1 -0
  260. package/pn-market-web-components/{p-fc1083d2.system.entry.js → p-1d50340b.system.entry.js} +1 -1
  261. package/pn-market-web-components/p-1f8423d6.entry.js +1 -0
  262. package/pn-market-web-components/{p-1ce871c5.system.entry.js → p-1fb4eae4.system.entry.js} +1 -1
  263. package/pn-market-web-components/{p-80dce81e.system.entry.js → p-2145d5e0.system.entry.js} +1 -1
  264. package/pn-market-web-components/p-22a60cb6.system.entry.js +1 -0
  265. package/pn-market-web-components/p-247cd393.entry.js +1 -0
  266. package/pn-market-web-components/p-2967a563.entry.js +1 -0
  267. package/pn-market-web-components/p-31fd7a95.system.js +1 -1
  268. package/pn-market-web-components/p-34c0b146.entry.js +1 -0
  269. package/pn-market-web-components/p-34fefe22.entry.js +1 -0
  270. package/pn-market-web-components/p-37d26cef.entry.js +1 -0
  271. package/pn-market-web-components/p-38f135fd.entry.js +1 -0
  272. package/pn-market-web-components/{p-a5f75560.system.js → p-396b254a.system.js} +1 -1
  273. package/pn-market-web-components/{p-94958580.system.js → p-3a450371.system.js} +1 -1
  274. package/pn-market-web-components/p-41b34b21.entry.js +1 -0
  275. package/pn-market-web-components/p-4305724d.entry.js +1 -0
  276. package/pn-market-web-components/{p-add7d76c.system.js → p-441249d9.system.js} +1 -1
  277. package/pn-market-web-components/p-44c05fba.entry.js +1 -0
  278. package/pn-market-web-components/p-44f58f15.js +1 -0
  279. package/pn-market-web-components/p-4653f5db.system.entry.js +1 -0
  280. package/pn-market-web-components/p-47d717a3.entry.js +1 -0
  281. package/pn-market-web-components/{p-18380cb2.system.entry.js → p-488a5506.system.entry.js} +1 -1
  282. package/pn-market-web-components/p-48c74c53.entry.js +1 -0
  283. package/pn-market-web-components/p-49f60496.entry.js +1 -0
  284. package/pn-market-web-components/p-4a8e35d3.system.entry.js +1 -0
  285. package/pn-market-web-components/{p-198d9c77.system.entry.js → p-4ccf1b55.system.entry.js} +1 -1
  286. package/pn-market-web-components/{p-7079df88.system.entry.js → p-4d561de4.system.entry.js} +1 -1
  287. package/pn-market-web-components/p-4ef54288.entry.js +1 -0
  288. package/pn-market-web-components/p-507f8886.entry.js +1 -0
  289. package/pn-market-web-components/{p-74d35edf.system.entry.js → p-545a40a7.system.entry.js} +1 -1
  290. package/pn-market-web-components/{p-2b67469f.system.entry.js → p-5a41c1bb.system.entry.js} +1 -1
  291. package/pn-market-web-components/{p-723b9901.system.entry.js → p-5a506356.system.entry.js} +1 -1
  292. package/pn-market-web-components/p-5a6761da.js +1 -0
  293. package/pn-market-web-components/{p-8117b79e.system.entry.js → p-68324e6f.system.entry.js} +1 -1
  294. package/pn-market-web-components/{p-7b9fb94f.system.entry.js → p-6d050c3a.system.entry.js} +1 -1
  295. package/pn-market-web-components/{p-a275bffb.system.entry.js → p-6e43a937.system.entry.js} +1 -1
  296. package/pn-market-web-components/{p-02ea55ad.system.js → p-6f1d6a1a.system.js} +1 -1
  297. package/pn-market-web-components/p-73ee3141.entry.js +1 -0
  298. package/pn-market-web-components/p-7c1b31e8.js +2 -0
  299. package/pn-market-web-components/p-7d992089.entry.js +1 -0
  300. package/pn-market-web-components/p-7decf8dd.entry.js +1 -0
  301. package/pn-market-web-components/p-7dff99ed.entry.js +1 -0
  302. package/pn-market-web-components/p-8079dfd5.system.entry.js +1 -0
  303. package/pn-market-web-components/p-82db879c.entry.js +1 -0
  304. package/pn-market-web-components/p-833bab34.entry.js +1 -0
  305. package/pn-market-web-components/{p-290d5824.system.entry.js → p-853e6559.system.entry.js} +1 -1
  306. package/pn-market-web-components/p-8766fa86.system.js +1 -1
  307. package/pn-market-web-components/{p-cd68d0e8.system.entry.js → p-8879ac54.system.entry.js} +1 -1
  308. package/pn-market-web-components/{p-679ebd2a.system.entry.js → p-8a834594.system.entry.js} +1 -1
  309. package/pn-market-web-components/p-8acb60c5.entry.js +1 -0
  310. package/pn-market-web-components/p-8b28ac30.entry.js +1 -0
  311. package/pn-market-web-components/{p-450cbe76.system.entry.js → p-8ca063a9.system.entry.js} +1 -1
  312. package/pn-market-web-components/{p-9edaf6b6.system.entry.js → p-8cefd900.system.entry.js} +1 -1
  313. package/pn-market-web-components/{p-58a57436.system.entry.js → p-8fee0115.system.entry.js} +1 -1
  314. package/pn-market-web-components/{p-aa271997.system.entry.js → p-9010c32a.system.entry.js} +1 -1
  315. package/pn-market-web-components/p-9a6af82e.entry.js +1 -0
  316. package/pn-market-web-components/{p-4f67721e.system.entry.js → p-9f95b3c9.system.entry.js} +1 -1
  317. package/pn-market-web-components/{p-0cacf9fb.js → p-a1a58fe4.js} +1 -1
  318. package/pn-market-web-components/p-a3b8ec51.system.entry.js +1 -0
  319. package/pn-market-web-components/p-a5faec68.system.js +2 -0
  320. package/pn-market-web-components/p-a61101e6.entry.js +1 -0
  321. package/pn-market-web-components/p-a781c8dd.entry.js +1 -0
  322. package/pn-market-web-components/p-a799fee1.entry.js +1 -0
  323. package/pn-market-web-components/{p-1610d018.system.entry.js → p-ab5fdc81.system.entry.js} +1 -1
  324. package/pn-market-web-components/{p-2718b89a.system.entry.js → p-abfed655.system.entry.js} +1 -1
  325. package/pn-market-web-components/p-ad1f57dc.entry.js +1 -0
  326. package/pn-market-web-components/p-b0102ff6.entry.js +1 -0
  327. package/pn-market-web-components/{p-625fb7fb.system.entry.js → p-b890f3f9.system.entry.js} +1 -1
  328. package/pn-market-web-components/p-beefd9f7.entry.js +1 -0
  329. package/pn-market-web-components/p-bfe239ca.js +1 -1
  330. package/pn-market-web-components/p-c229035c.entry.js +1 -0
  331. package/pn-market-web-components/{p-84699999.js → p-c5727e83.js} +1 -1
  332. package/pn-market-web-components/{p-447ef543.system.entry.js → p-c576ac3e.system.entry.js} +1 -1
  333. package/pn-market-web-components/p-c5bb2237.system.entry.js +1 -0
  334. package/pn-market-web-components/p-c7e8ab14.entry.js +1 -0
  335. package/pn-market-web-components/{p-af415c1a.system.entry.js → p-ca1f0abc.system.entry.js} +1 -1
  336. package/pn-market-web-components/p-ccf891fc.entry.js +16 -0
  337. package/pn-market-web-components/p-cd6b402e.system.entry.js +1 -0
  338. package/pn-market-web-components/p-ced9727b.system.js +1 -1
  339. package/pn-market-web-components/p-d295ef71.system.js +1 -0
  340. package/pn-market-web-components/{p-825b8fb8.system.js → p-d34c9be2.system.js} +1 -1
  341. package/pn-market-web-components/p-d5ae9797.entry.js +1 -0
  342. package/pn-market-web-components/p-d70e685c.entry.js +1 -0
  343. package/pn-market-web-components/p-d9dec5b8.entry.js +1 -0
  344. package/pn-market-web-components/p-dbd7837e.entry.js +1 -0
  345. package/pn-market-web-components/p-dc598ef8.entry.js +1 -0
  346. package/pn-market-web-components/p-e0e45eb0.system.entry.js +1 -0
  347. package/pn-market-web-components/p-e1513762.entry.js +1 -0
  348. package/pn-market-web-components/p-e4754d3b.system.entry.js +1 -0
  349. package/pn-market-web-components/{p-36a1b8e1.system.entry.js → p-e4961116.system.entry.js} +1 -1
  350. package/pn-market-web-components/p-e4fbd06c.entry.js +1 -0
  351. package/pn-market-web-components/{p-93cecc43.system.entry.js → p-e737c51d.system.entry.js} +1 -1
  352. package/pn-market-web-components/{p-86f06e26.js → p-ecaad0c1.js} +1 -1
  353. package/pn-market-web-components/p-ed5e91eb.system.entry.js +1 -0
  354. package/pn-market-web-components/{p-e6fa11ad.system.entry.js → p-ef721555.system.entry.js} +1 -1
  355. package/pn-market-web-components/{p-c4254e9e.js → p-f04afb39.js} +1 -1
  356. package/pn-market-web-components/{p-37017f68.system.js → p-f4a6d005.system.js} +1 -1
  357. package/pn-market-web-components/{p-1151bf60.system.entry.js → p-f7cb2ef9.system.entry.js} +1 -1
  358. package/pn-market-web-components/{p-e66a8bb8.system.entry.js → p-f9725e57.system.entry.js} +1 -1
  359. package/pn-market-web-components/{p-c7d886d7.system.entry.js → p-fdec849a.system.entry.js} +2 -2
  360. package/pn-market-web-components/p-ff975b67.entry.js +1 -0
  361. package/pn-market-web-components/{p-b88337dd.system.entry.js → p-ffe18938.system.entry.js} +1 -1
  362. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  363. package/pn-market-web-components/pn-market-web-components.js +2 -1
  364. package/types/components.d.ts +53 -21
  365. package/types/stencil-public-runtime.d.ts +79 -7
  366. package/umd/pn-marketweb-init.js +1 -1
  367. package/umd/pn-marketweb-salesforce.js +2 -2
  368. package/esm-es5/index-5397620b.js +0 -1
  369. package/pn-market-web-components/p-022d9a78.entry.js +0 -1
  370. package/pn-market-web-components/p-0796f9b2.entry.js +0 -1
  371. package/pn-market-web-components/p-08411f5e.entry.js +0 -1
  372. package/pn-market-web-components/p-0fce4494.entry.js +0 -1
  373. package/pn-market-web-components/p-15112837.entry.js +0 -1
  374. package/pn-market-web-components/p-16c4bc50.entry.js +0 -1
  375. package/pn-market-web-components/p-17c4004f.entry.js +0 -1
  376. package/pn-market-web-components/p-227e1d46.entry.js +0 -1
  377. package/pn-market-web-components/p-249964b5.entry.js +0 -1
  378. package/pn-market-web-components/p-2878af00.system.entry.js +0 -1
  379. package/pn-market-web-components/p-2a23d908.entry.js +0 -1
  380. package/pn-market-web-components/p-2a598ee8.entry.js +0 -1
  381. package/pn-market-web-components/p-2da8e5e8.system.entry.js +0 -1
  382. package/pn-market-web-components/p-332e9005.entry.js +0 -1
  383. package/pn-market-web-components/p-35af1c4a.entry.js +0 -1
  384. package/pn-market-web-components/p-35fcd76c.system.entry.js +0 -1
  385. package/pn-market-web-components/p-36654f2a.system.js +0 -1
  386. package/pn-market-web-components/p-381b3ec0.entry.js +0 -1
  387. package/pn-market-web-components/p-3ae38e63.entry.js +0 -1
  388. package/pn-market-web-components/p-3c0d63fb.system.entry.js +0 -1
  389. package/pn-market-web-components/p-4bef1bf3.entry.js +0 -1
  390. package/pn-market-web-components/p-4efe43e9.entry.js +0 -1
  391. package/pn-market-web-components/p-5117ac1f.entry.js +0 -1
  392. package/pn-market-web-components/p-58e8d7d5.js +0 -1
  393. package/pn-market-web-components/p-5b05ceb5.system.entry.js +0 -1
  394. package/pn-market-web-components/p-61dbe832.entry.js +0 -1
  395. package/pn-market-web-components/p-67380aa4.entry.js +0 -1
  396. package/pn-market-web-components/p-67887512.system.js +0 -1
  397. package/pn-market-web-components/p-715d1ef7.entry.js +0 -1
  398. package/pn-market-web-components/p-736e5b84.system.entry.js +0 -1
  399. package/pn-market-web-components/p-77557da8.entry.js +0 -1
  400. package/pn-market-web-components/p-7ce41d14.entry.js +0 -1
  401. package/pn-market-web-components/p-7fd8b012.entry.js +0 -1
  402. package/pn-market-web-components/p-81426cd9.entry.js +0 -1
  403. package/pn-market-web-components/p-81773857.entry.js +0 -1
  404. package/pn-market-web-components/p-81d764a0.entry.js +0 -1
  405. package/pn-market-web-components/p-88185835.entry.js +0 -1
  406. package/pn-market-web-components/p-885bc8d7.system.entry.js +0 -1
  407. package/pn-market-web-components/p-8db654e0.system.entry.js +0 -1
  408. package/pn-market-web-components/p-8e146205.entry.js +0 -1
  409. package/pn-market-web-components/p-8e38c337.entry.js +0 -1
  410. package/pn-market-web-components/p-8e4d292f.entry.js +0 -1
  411. package/pn-market-web-components/p-8fe91339.entry.js +0 -1
  412. package/pn-market-web-components/p-9344cd23.js +0 -1
  413. package/pn-market-web-components/p-996d8a6a.entry.js +0 -1
  414. package/pn-market-web-components/p-a247058b.system.entry.js +0 -1
  415. package/pn-market-web-components/p-a27836fc.entry.js +0 -1
  416. package/pn-market-web-components/p-a7bb94a0.entry.js +0 -1
  417. package/pn-market-web-components/p-a921d3fd.system.entry.js +0 -1
  418. package/pn-market-web-components/p-aab2e28f.entry.js +0 -1
  419. package/pn-market-web-components/p-ac0e3c22.system.entry.js +0 -1
  420. package/pn-market-web-components/p-b60a151b.entry.js +0 -16
  421. package/pn-market-web-components/p-bb626ab4.js +0 -1
  422. package/pn-market-web-components/p-bd22aaac.entry.js +0 -1
  423. package/pn-market-web-components/p-c714a790.entry.js +0 -1
  424. package/pn-market-web-components/p-d0155ddf.entry.js +0 -1
  425. package/pn-market-web-components/p-d57f4246.system.entry.js +0 -1
  426. package/pn-market-web-components/p-d7e3d918.entry.js +0 -1
  427. package/pn-market-web-components/p-e32dc098.entry.js +0 -1
  428. package/pn-market-web-components/p-e4a4e68f.system.entry.js +0 -1
  429. package/pn-market-web-components/p-e9576f26.entry.js +0 -1
  430. package/pn-market-web-components/p-e9fe5c54.entry.js +0 -1
  431. package/pn-market-web-components/p-f774e2cc.entry.js +0 -1
  432. package/pn-market-web-components/p-fc974bca.entry.js +0 -1
  433. package/pn-market-web-components/p-fd4bb638.entry.js +0 -1
  434. package/pn-market-web-components/p-fea72975.entry.js +0 -1
  435. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/LICENSE.md +0 -27
  436. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/bin/stencil +0 -57
  437. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/config-flags.d.ts +0 -102
  438. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +0 -2325
  439. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.d.ts +0 -16
  440. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +0 -2299
  441. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +0 -14
  442. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.d.ts +0 -24
  443. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.d.ts +0 -17791
  444. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.iterable.d.ts +0 -323
  445. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.collection.d.ts +0 -89
  446. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.core.d.ts +0 -559
  447. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.d.ts +0 -30
  448. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.generator.d.ts +0 -79
  449. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.iterable.d.ts +0 -497
  450. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.promise.d.ts +0 -78
  451. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.proxy.d.ts +0 -41
  452. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.reflect.d.ts +0 -123
  453. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.d.ts +0 -48
  454. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.wellknown.d.ts +0 -324
  455. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.array.include.d.ts +0 -118
  456. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.d.ts +0 -22
  457. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.full.d.ts +0 -25
  458. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.d.ts +0 -26
  459. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.full.d.ts +0 -25
  460. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.intl.d.ts +0 -32
  461. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.object.d.ts +0 -51
  462. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.sharedmemory.d.ts +0 -137
  463. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.string.d.ts +0 -47
  464. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.typedarrays.d.ts +0 -55
  465. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asyncgenerator.d.ts +0 -79
  466. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asynciterable.d.ts +0 -45
  467. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.d.ts +0 -26
  468. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.full.d.ts +0 -25
  469. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.intl.d.ts +0 -73
  470. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.promise.d.ts +0 -32
  471. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.regexp.d.ts +0 -39
  472. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.array.d.ts +0 -85
  473. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.d.ts +0 -25
  474. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.full.d.ts +0 -25
  475. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.object.d.ts +0 -35
  476. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.string.d.ts +0 -39
  477. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.symbol.d.ts +0 -26
  478. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.bigint.d.ts +0 -728
  479. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.d.ts +0 -27
  480. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.full.d.ts +0 -25
  481. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.intl.d.ts +0 -368
  482. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.promise.d.ts +0 -49
  483. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.sharedmemory.d.ts +0 -99
  484. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.string.d.ts +0 -30
  485. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.symbol.wellknown.d.ts +0 -39
  486. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.d.ts +0 -25
  487. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.full.d.ts +0 -25
  488. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.intl.d.ts +0 -44
  489. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.promise.d.ts +0 -50
  490. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.string.d.ts +0 -35
  491. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.weakref.d.ts +0 -75
  492. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es5.d.ts +0 -4495
  493. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es6.d.ts +0 -25
  494. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.d.ts +0 -22
  495. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.full.d.ts +0 -25
  496. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.intl.d.ts +0 -23
  497. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.promise.d.ts +0 -43
  498. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.string.d.ts +0 -35
  499. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.weakref.d.ts +0 -75
  500. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.scripthost.d.ts +0 -327
  501. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.d.ts +0 -5733
  502. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.importscripts.d.ts +0 -26
  503. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.iterable.d.ts +0 -160
  504. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +0 -8
  505. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.d.ts +0 -95
  506. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +0 -67330
  507. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.min.js +0 -4
  508. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dependencies.json +0 -109
  509. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/app-error.d.ts +0 -18
  510. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/events.d.ts +0 -6
  511. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-components.d.ts +0 -1
  512. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-external-styles.d.ts +0 -1
  513. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-images.d.ts +0 -1
  514. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-inline-styles.d.ts +0 -1
  515. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-util.d.ts +0 -9
  516. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-window.d.ts +0 -10
  517. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.d.ts +0 -6
  518. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +0 -808
  519. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/logger.d.ts +0 -5
  520. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +0 -8
  521. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/progress.d.ts +0 -3
  522. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/status.d.ts +0 -4
  523. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/hmr-util.spec.d.ts +0 -1
  524. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/status.spec.d.ts +0 -1
  525. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +0 -6
  526. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.d.ts +0 -3
  527. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +0 -264
  528. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/open-in-editor-api.js +0 -1
  529. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +0 -8
  530. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +0 -1765
  531. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-worker-thread.js +0 -39
  532. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/static/favicon.ico +0 -0
  533. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/directory-index.html +0 -132
  534. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/initial-load.html +0 -160
  535. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/visualstudio.vbs +0 -82
  536. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/ws.js +0 -1
  537. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/xdg-open +0 -1066
  538. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.cjs +0 -92
  539. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.d.ts +0 -4
  540. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.js +0 -88
  541. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +0 -15
  542. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/css-shim.js +0 -4
  543. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/dom.js +0 -73
  544. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +0 -3064
  545. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +0 -8
  546. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +0 -124
  547. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-esm.js +0 -23
  548. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/core-js.js +0 -11
  549. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/css-shim.js +0 -1
  550. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/dom.js +0 -79
  551. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/es5-html-element.js +0 -1
  552. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/index.js +0 -34
  553. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/system.js +0 -6
  554. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +0 -387
  555. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +0 -1132
  556. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +0 -7
  557. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.d.ts +0 -217
  558. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +0 -777
  559. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/shadow-css.js +0 -143
  560. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.d.ts +0 -4
  561. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.js +0 -2
  562. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +0 -9
  563. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.cjs +0 -1
  564. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +0 -52
  565. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.js +0 -16
  566. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +0 -41
  567. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +0 -2293
  568. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +0 -2293
  569. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +0 -116
  570. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +0 -1565
  571. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +0 -1093
  572. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +0 -7
  573. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/shadow-css.js +0 -143
  574. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +0 -4794
  575. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +0 -1004
  576. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +0 -4758
  577. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +0 -15
  578. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +0 -200
  579. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/readme.md +0 -105
  580. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/favicon.ico +0 -0
  581. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/logo.png +0 -0
  582. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.css +0 -1
  583. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.esm.js +0 -1
  584. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.js +0 -33
  585. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/index.esm.js +0 -0
  586. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-081b0641.js +0 -1
  587. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-227a1e18.entry.js +0 -1
  588. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-2c298727.entry.js +0 -1
  589. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-5479268c.entry.js +0 -1
  590. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
  591. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6ba08604.entry.js +0 -1
  592. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6bc63295.entry.js +0 -1
  593. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
  594. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7b4e3ba7.js +0 -1
  595. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-988eb362.css +0 -1
  596. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-9b6a9315.js +0 -1
  597. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
  598. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
  599. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e2efe0df.js +0 -1
  600. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
  601. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
  602. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f0b99977.entry.js +0 -1
  603. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
  604. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-fbbae598.js +0 -1
  605. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/host.config.json +0 -15
  606. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/index.html +0 -1
  607. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/manifest.json +0 -13
  608. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/connector.js +0 -2
  609. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +0 -661
  610. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/local-connector.js +0 -2
  611. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +0 -15
  612. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +0 -2673
  613. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +0 -8
  614. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +0 -1
  615. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +0 -1
  616. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.d.ts +0 -18
  617. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +0 -6135
  618. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +0 -1
  619. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +0 -8
  620. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +0 -1
  621. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +0 -52
  622. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.d.ts +0 -12
  623. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +0 -4140
  624. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-config.d.ts +0 -16
  625. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-environment.d.ts +0 -15
  626. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-preprocessor.d.ts +0 -59
  627. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-runner.d.ts +0 -10
  628. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-screenshot.d.ts +0 -2
  629. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-serializer.d.ts +0 -5
  630. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-setup-test-framework.d.ts +0 -1
  631. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-config.spec.d.ts +0 -1
  632. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-preprocessor.spec.d.ts +0 -1
  633. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-runner.spec.d.ts +0 -1
  634. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-serializer.spec.d.ts +0 -1
  635. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-environment.js +0 -3
  636. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preprocessor.js +0 -3
  637. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preset.js +0 -37
  638. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-runner.js +0 -3
  639. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-setuptestframework.js +0 -3
  640. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/attributes.d.ts +0 -14
  641. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/class-list.d.ts +0 -12
  642. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/events.d.ts +0 -21
  643. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/html.d.ts +0 -12
  644. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/index.d.ts +0 -23
  645. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/screenshot.d.ts +0 -5
  646. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/text.d.ts +0 -4
  647. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mock-fetch.d.ts +0 -11
  648. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mocks.d.ts +0 -55
  649. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +0 -8
  650. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/index.d.ts +0 -2
  651. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-browser.d.ts +0 -6
  652. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-declarations.d.ts +0 -429
  653. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-element.d.ts +0 -67
  654. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  655. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-events.d.ts +0 -21
  656. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-page.d.ts +0 -2
  657. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  658. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/reset-build-conditionals.d.ts +0 -2
  659. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/spec-page.d.ts +0 -2
  660. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test/testing-utils.spec.d.ts +0 -1
  661. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test-transpile.d.ts +0 -2
  662. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-logger.d.ts +0 -25
  663. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-sys.d.ts +0 -6
  664. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-utils.d.ts +0 -78
  665. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing.d.ts +0 -2
@@ -1,1765 +0,0 @@
1
- /*!
2
- Stencil Dev Server Process v2.17.1 | MIT Licensed | https://stenciljs.com
3
- */
4
- 'use strict';
5
-
6
- const fs$1 = require('../sys/node/graceful-fs.js');
7
- const path = require('path');
8
- const util = require('util');
9
- const zlib = require('zlib');
10
- const buffer = require('buffer');
11
- const openInEditorApi = require('./open-in-editor-api.js');
12
- const http = require('http');
13
- const https = require('https');
14
- const net = require('net');
15
- const index_js = require('../sys/node/index.js');
16
- const ws = require('./ws.js');
17
- const childProcess = require('child_process');
18
- const fs$2 = require('fs');
19
- const os = require('os');
20
-
21
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
-
23
- function _interopNamespace(e) {
24
- if (e && e.__esModule) return e;
25
- var n = Object.create(null);
26
- if (e) {
27
- Object.keys(e).forEach(function (k) {
28
- if (k !== 'default') {
29
- var d = Object.getOwnPropertyDescriptor(e, k);
30
- Object.defineProperty(n, k, d.get ? d : {
31
- enumerable: true,
32
- get: function () {
33
- return e[k];
34
- }
35
- });
36
- }
37
- });
38
- }
39
- n['default'] = e;
40
- return Object.freeze(n);
41
- }
42
-
43
- const fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$1);
44
- const path__default = /*#__PURE__*/_interopDefaultLegacy(path);
45
- const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
46
- const zlib__namespace = /*#__PURE__*/_interopNamespace(zlib);
47
- const openInEditorApi__default = /*#__PURE__*/_interopDefaultLegacy(openInEditorApi);
48
- const http__namespace = /*#__PURE__*/_interopNamespace(http);
49
- const https__namespace = /*#__PURE__*/_interopNamespace(https);
50
- const net__namespace = /*#__PURE__*/_interopNamespace(net);
51
- const ws__namespace = /*#__PURE__*/_interopNamespace(ws);
52
- const childProcess__default = /*#__PURE__*/_interopDefaultLegacy(childProcess);
53
- const fs__default$1 = /*#__PURE__*/_interopDefaultLegacy(fs$2);
54
- const os__default = /*#__PURE__*/_interopDefaultLegacy(os);
55
-
56
- const DEV_SERVER_URL = '/~dev-server';
57
- const DEV_MODULE_URL = '/~dev-module';
58
- const DEV_SERVER_INIT_URL = `${DEV_SERVER_URL}-init`;
59
- const OPEN_IN_EDITOR_URL = `${DEV_SERVER_URL}-open-in-editor`;
60
-
61
- const contentTypes = {"123":"application/vnd.lotus-1-2-3","1km":"application/vnd.1000minds.decision-model+xml","3dml":"text/vnd.in3d.3dml","3ds":"image/x-3ds","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf","7z":"application/x-7z-compressed","aab":"application/x-authorware-bin","aac":"audio/x-aac","aam":"application/x-authorware-map","aas":"application/x-authorware-seg","abw":"application/x-abiword","ac":"application/vnd.nokia.n-gage.ac+xml","acc":"application/vnd.americandynamics.acc","ace":"application/x-ace-compressed","acu":"application/vnd.acucobol","acutc":"application/vnd.acucorp","adp":"audio/adpcm","aep":"application/vnd.audiograph","afm":"application/x-font-type1","afp":"application/vnd.ibm.modcap","ahead":"application/vnd.ahead.space","ai":"application/postscript","aif":"audio/x-aiff","aifc":"audio/x-aiff","aiff":"audio/x-aiff","air":"application/vnd.adobe.air-application-installer-package+zip","ait":"application/vnd.dvb.ait","ami":"application/vnd.amiga.ami","amr":"audio/amr","apk":"application/vnd.android.package-archive","apng":"image/apng","appcache":"text/cache-manifest","application":"application/x-ms-application","apr":"application/vnd.lotus-approach","arc":"application/x-freearc","arj":"application/x-arj","asc":"application/pgp-signature","asf":"video/x-ms-asf","asm":"text/x-asm","aso":"application/vnd.accpac.simply.aso","asx":"video/x-ms-asf","atc":"application/vnd.acucorp","atom":"application/atom+xml","atomcat":"application/atomcat+xml","atomdeleted":"application/atomdeleted+xml","atomsvc":"application/atomsvc+xml","atx":"application/vnd.antix.game-component","au":"audio/basic","avi":"video/x-msvideo","avif":"image/avif","aw":"application/applixware","azf":"application/vnd.airzip.filesecure.azf","azs":"application/vnd.airzip.filesecure.azs","azv":"image/vnd.airzip.accelerator.azv","azw":"application/vnd.amazon.ebook","b16":"image/vnd.pco.b16","bat":"application/x-msdownload","bcpio":"application/x-bcpio","bdf":"application/x-font-bdf","bdm":"application/vnd.syncml.dm+wbxml","bdoc":"application/x-bdoc","bed":"application/vnd.realvnc.bed","bh2":"application/vnd.fujitsu.oasysprs","bin":"application/octet-stream","blb":"application/x-blorb","blorb":"application/x-blorb","bmi":"application/vnd.bmi","bmml":"application/vnd.balsamiq.bmml+xml","bmp":"image/x-ms-bmp","book":"application/vnd.framemaker","box":"application/vnd.previewsystems.box","boz":"application/x-bzip2","bpk":"application/octet-stream","bsp":"model/vnd.valve.source.compiled-map","btif":"image/prs.btif","buffer":"application/octet-stream","bz":"application/x-bzip","bz2":"application/x-bzip2","c":"text/x-c","c11amc":"application/vnd.cluetrust.cartomobile-config","c11amz":"application/vnd.cluetrust.cartomobile-config-pkg","c4d":"application/vnd.clonk.c4group","c4f":"application/vnd.clonk.c4group","c4g":"application/vnd.clonk.c4group","c4p":"application/vnd.clonk.c4group","c4u":"application/vnd.clonk.c4group","cab":"application/vnd.ms-cab-compressed","caf":"audio/x-caf","cap":"application/vnd.tcpdump.pcap","car":"application/vnd.curl.car","cat":"application/vnd.ms-pki.seccat","cb7":"application/x-cbr","cba":"application/x-cbr","cbr":"application/x-cbr","cbt":"application/x-cbr","cbz":"application/x-cbr","cc":"text/x-c","cco":"application/x-cocoa","cct":"application/x-director","ccxml":"application/ccxml+xml","cdbcmsg":"application/vnd.contact.cmsg","cdf":"application/x-netcdf","cdfx":"application/cdfx+xml","cdkey":"application/vnd.mediastation.cdkey","cdmia":"application/cdmi-capability","cdmic":"application/cdmi-container","cdmid":"application/cdmi-domain","cdmio":"application/cdmi-object","cdmiq":"application/cdmi-queue","cdx":"chemical/x-cdx","cdxml":"application/vnd.chemdraw+xml","cdy":"application/vnd.cinderella","cer":"application/pkix-cert","cfs":"application/x-cfs-compressed","cgm":"image/cgm","chat":"application/x-chat","chm":"application/vnd.ms-htmlhelp","chrt":"application/vnd.kde.kchart","cif":"chemical/x-cif","cii":"application/vnd.anser-web-certificate-issue-initiation","cil":"application/vnd.ms-artgalry","cjs":"application/node","cla":"application/vnd.claymore","class":"application/java-vm","clkk":"application/vnd.crick.clicker.keyboard","clkp":"application/vnd.crick.clicker.palette","clkt":"application/vnd.crick.clicker.template","clkw":"application/vnd.crick.clicker.wordbank","clkx":"application/vnd.crick.clicker","clp":"application/x-msclip","cmc":"application/vnd.cosmocaller","cmdf":"chemical/x-cmdf","cml":"chemical/x-cml","cmp":"application/vnd.yellowriver-custom-menu","cmx":"image/x-cmx","cod":"application/vnd.rim.cod","coffee":"text/coffeescript","com":"application/x-msdownload","conf":"text/plain","cpio":"application/x-cpio","cpp":"text/x-c","cpt":"application/mac-compactpro","crd":"application/x-mscardfile","crl":"application/pkix-crl","crt":"application/x-x509-ca-cert","crx":"application/x-chrome-extension","cryptonote":"application/vnd.rig.cryptonote","csh":"application/x-csh","csl":"application/vnd.citationstyles.style+xml","csml":"chemical/x-csml","csp":"application/vnd.commonspace","css":"text/css","cst":"application/x-director","csv":"text/csv","cu":"application/cu-seeme","curl":"text/vnd.curl","cww":"application/prs.cww","cxt":"application/x-director","cxx":"text/x-c","dae":"model/vnd.collada+xml","daf":"application/vnd.mobius.daf","dart":"application/vnd.dart","dataless":"application/vnd.fdsn.seed","davmount":"application/davmount+xml","dbf":"application/vnd.dbf","dbk":"application/docbook+xml","dcr":"application/x-director","dcurl":"text/vnd.curl.dcurl","dd2":"application/vnd.oma.dd2+xml","ddd":"application/vnd.fujixerox.ddd","ddf":"application/vnd.syncml.dmddf+xml","dds":"image/vnd.ms-dds","deb":"application/x-debian-package","def":"text/plain","deploy":"application/octet-stream","der":"application/x-x509-ca-cert","dfac":"application/vnd.dreamfactory","dgc":"application/x-dgc-compressed","dic":"text/x-c","dir":"application/x-director","dis":"application/vnd.mobius.dis","disposition-notification":"message/disposition-notification","dist":"application/octet-stream","distz":"application/octet-stream","djv":"image/vnd.djvu","djvu":"image/vnd.djvu","dll":"application/x-msdownload","dmg":"application/x-apple-diskimage","dmp":"application/vnd.tcpdump.pcap","dms":"application/octet-stream","dna":"application/vnd.dna","doc":"application/msword","docm":"application/vnd.ms-word.document.macroenabled.12","docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","dot":"application/msword","dotm":"application/vnd.ms-word.template.macroenabled.12","dotx":"application/vnd.openxmlformats-officedocument.wordprocessingml.template","dp":"application/vnd.osgi.dp","dpg":"application/vnd.dpgraph","dra":"audio/vnd.dra","drle":"image/dicom-rle","dsc":"text/prs.lines.tag","dssc":"application/dssc+der","dtb":"application/x-dtbook+xml","dtd":"application/xml-dtd","dts":"audio/vnd.dts","dtshd":"audio/vnd.dts.hd","dump":"application/octet-stream","dvb":"video/vnd.dvb.file","dvi":"application/x-dvi","dwd":"application/atsc-dwd+xml","dwf":"model/vnd.dwf","dwg":"image/vnd.dwg","dxf":"image/vnd.dxf","dxp":"application/vnd.spotfire.dxp","dxr":"application/x-director","ear":"application/java-archive","ecelp4800":"audio/vnd.nuera.ecelp4800","ecelp7470":"audio/vnd.nuera.ecelp7470","ecelp9600":"audio/vnd.nuera.ecelp9600","ecma":"application/ecmascript","edm":"application/vnd.novadigm.edm","edx":"application/vnd.novadigm.edx","efif":"application/vnd.picsel","ei6":"application/vnd.pg.osasli","elc":"application/octet-stream","emf":"image/emf","eml":"message/rfc822","emma":"application/emma+xml","emotionml":"application/emotionml+xml","emz":"application/x-msmetafile","eol":"audio/vnd.digital-winds","eot":"application/vnd.ms-fontobject","eps":"application/postscript","epub":"application/epub+zip","es":"application/ecmascript","es3":"application/vnd.eszigno3+xml","esa":"application/vnd.osgi.subsystem","esf":"application/vnd.epson.esf","et3":"application/vnd.eszigno3+xml","etx":"text/x-setext","eva":"application/x-eva","evy":"application/x-envoy","exe":"application/x-msdownload","exi":"application/exi","exr":"image/aces","ext":"application/vnd.novadigm.ext","ez":"application/andrew-inset","ez2":"application/vnd.ezpix-album","ez3":"application/vnd.ezpix-package","f":"text/x-fortran","f4v":"video/x-f4v","f77":"text/x-fortran","f90":"text/x-fortran","fbs":"image/vnd.fastbidsheet","fcdt":"application/vnd.adobe.formscentral.fcdt","fcs":"application/vnd.isac.fcs","fdf":"application/vnd.fdf","fdt":"application/fdt+xml","fe_launch":"application/vnd.denovo.fcselayout-link","fg5":"application/vnd.fujitsu.oasysgp","fgd":"application/x-director","fh":"image/x-freehand","fh4":"image/x-freehand","fh5":"image/x-freehand","fh7":"image/x-freehand","fhc":"image/x-freehand","fig":"application/x-xfig","fits":"image/fits","flac":"audio/x-flac","fli":"video/x-fli","flo":"application/vnd.micrografx.flo","flv":"video/x-flv","flw":"application/vnd.kde.kivio","flx":"text/vnd.fmi.flexstor","fly":"text/vnd.fly","fm":"application/vnd.framemaker","fnc":"application/vnd.frogans.fnc","fo":"application/vnd.software602.filler.form+xml","for":"text/x-fortran","fpx":"image/vnd.fpx","frame":"application/vnd.framemaker","fsc":"application/vnd.fsc.weblaunch","fst":"image/vnd.fst","ftc":"application/vnd.fluxtime.clip","fti":"application/vnd.anser-web-funds-transfer-initiation","fvt":"video/vnd.fvt","fxp":"application/vnd.adobe.fxp","fxpl":"application/vnd.adobe.fxp","fzs":"application/vnd.fuzzysheet","g2w":"application/vnd.geoplan","g3":"image/g3fax","g3w":"application/vnd.geospace","gac":"application/vnd.groove-account","gam":"application/x-tads","gbr":"application/rpki-ghostbusters","gca":"application/x-gca-compressed","gdl":"model/vnd.gdl","gdoc":"application/vnd.google-apps.document","geo":"application/vnd.dynageo","geojson":"application/geo+json","gex":"application/vnd.geometry-explorer","ggb":"application/vnd.geogebra.file","ggt":"application/vnd.geogebra.tool","ghf":"application/vnd.groove-help","gif":"image/gif","gim":"application/vnd.groove-identity-message","glb":"model/gltf-binary","gltf":"model/gltf+json","gml":"application/gml+xml","gmx":"application/vnd.gmx","gnumeric":"application/x-gnumeric","gph":"application/vnd.flographit","gpx":"application/gpx+xml","gqf":"application/vnd.grafeq","gqs":"application/vnd.grafeq","gram":"application/srgs","gramps":"application/x-gramps-xml","gre":"application/vnd.geometry-explorer","grv":"application/vnd.groove-injector","grxml":"application/srgs+xml","gsf":"application/x-font-ghostscript","gsheet":"application/vnd.google-apps.spreadsheet","gslides":"application/vnd.google-apps.presentation","gtar":"application/x-gtar","gtm":"application/vnd.groove-tool-message","gtw":"model/vnd.gtw","gv":"text/vnd.graphviz","gxf":"application/gxf","gxt":"application/vnd.geonext","gz":"application/gzip","h":"text/x-c","h261":"video/h261","h263":"video/h263","h264":"video/h264","hal":"application/vnd.hal+xml","hbci":"application/vnd.hbci","hbs":"text/x-handlebars-template","hdd":"application/x-virtualbox-hdd","hdf":"application/x-hdf","heic":"image/heic","heics":"image/heic-sequence","heif":"image/heif","heifs":"image/heif-sequence","hej2":"image/hej2k","held":"application/atsc-held+xml","hh":"text/x-c","hjson":"application/hjson","hlp":"application/winhlp","hpgl":"application/vnd.hp-hpgl","hpid":"application/vnd.hp-hpid","hps":"application/vnd.hp-hps","hqx":"application/mac-binhex40","hsj2":"image/hsj2","htc":"text/x-component","htke":"application/vnd.kenameaapp","htm":"text/html","html":"text/html","hvd":"application/vnd.yamaha.hv-dic","hvp":"application/vnd.yamaha.hv-voice","hvs":"application/vnd.yamaha.hv-script","i2g":"application/vnd.intergeo","icc":"application/vnd.iccprofile","ice":"x-conference/x-cooltalk","icm":"application/vnd.iccprofile","ico":"image/x-icon","ics":"text/calendar","ief":"image/ief","ifb":"text/calendar","ifm":"application/vnd.shana.informed.formdata","iges":"model/iges","igl":"application/vnd.igloader","igm":"application/vnd.insors.igm","igs":"model/iges","igx":"application/vnd.micrografx.igx","iif":"application/vnd.shana.informed.interchange","img":"application/octet-stream","imp":"application/vnd.accpac.simply.imp","ims":"application/vnd.ms-ims","in":"text/plain","ini":"text/plain","ink":"application/inkml+xml","inkml":"application/inkml+xml","install":"application/x-install-instructions","iota":"application/vnd.astraea-software.iota","ipfix":"application/ipfix","ipk":"application/vnd.shana.informed.package","irm":"application/vnd.ibm.rights-management","irp":"application/vnd.irepository.package+xml","iso":"application/x-iso9660-image","itp":"application/vnd.shana.informed.formtemplate","its":"application/its+xml","ivp":"application/vnd.immervision-ivp","ivu":"application/vnd.immervision-ivu","jad":"text/vnd.sun.j2me.app-descriptor","jade":"text/jade","jam":"application/vnd.jam","jar":"application/java-archive","jardiff":"application/x-java-archive-diff","java":"text/x-java-source","jhc":"image/jphc","jisp":"application/vnd.jisp","jls":"image/jls","jlt":"application/vnd.hp-jlyt","jng":"image/x-jng","jnlp":"application/x-java-jnlp-file","joda":"application/vnd.joost.joda-archive","jp2":"image/jp2","jpe":"image/jpeg","jpeg":"image/jpeg","jpf":"image/jpx","jpg":"image/jpeg","jpg2":"image/jp2","jpgm":"video/jpm","jpgv":"video/jpeg","jph":"image/jph","jpm":"video/jpm","jpx":"image/jpx","js":"application/javascript","json":"application/json","json5":"application/json5","jsonld":"application/ld+json","jsonml":"application/jsonml+json","jsx":"text/jsx","jxr":"image/jxr","jxra":"image/jxra","jxrs":"image/jxrs","jxs":"image/jxs","jxsc":"image/jxsc","jxsi":"image/jxsi","jxss":"image/jxss","kar":"audio/midi","karbon":"application/vnd.kde.karbon","kdbx":"application/x-keepass2","key":"application/vnd.apple.keynote","kfo":"application/vnd.kde.kformula","kia":"application/vnd.kidspiration","kml":"application/vnd.google-earth.kml+xml","kmz":"application/vnd.google-earth.kmz","kne":"application/vnd.kinar","knp":"application/vnd.kinar","kon":"application/vnd.kde.kontour","kpr":"application/vnd.kde.kpresenter","kpt":"application/vnd.kde.kpresenter","kpxx":"application/vnd.ds-keypoint","ksp":"application/vnd.kde.kspread","ktr":"application/vnd.kahootz","ktx":"image/ktx","ktx2":"image/ktx2","ktz":"application/vnd.kahootz","kwd":"application/vnd.kde.kword","kwt":"application/vnd.kde.kword","lasxml":"application/vnd.las.las+xml","latex":"application/x-latex","lbd":"application/vnd.llamagraphics.life-balance.desktop","lbe":"application/vnd.llamagraphics.life-balance.exchange+xml","les":"application/vnd.hhe.lesson-player","less":"text/less","lgr":"application/lgr+xml","lha":"application/x-lzh-compressed","link66":"application/vnd.route66.link66+xml","list":"text/plain","list3820":"application/vnd.ibm.modcap","listafp":"application/vnd.ibm.modcap","litcoffee":"text/coffeescript","lnk":"application/x-ms-shortcut","log":"text/plain","lostxml":"application/lost+xml","lrf":"application/octet-stream","lrm":"application/vnd.ms-lrm","ltf":"application/vnd.frogans.ltf","lua":"text/x-lua","luac":"application/x-lua-bytecode","lvp":"audio/vnd.lucent.voice","lwp":"application/vnd.lotus-wordpro","lzh":"application/x-lzh-compressed","m13":"application/x-msmediaview","m14":"application/x-msmediaview","m1v":"video/mpeg","m21":"application/mp21","m2a":"audio/mpeg","m2v":"video/mpeg","m3a":"audio/mpeg","m3u":"audio/x-mpegurl","m3u8":"application/vnd.apple.mpegurl","m4a":"audio/x-m4a","m4p":"application/mp4","m4s":"video/iso.segment","m4u":"video/vnd.mpegurl","m4v":"video/x-m4v","ma":"application/mathematica","mads":"application/mads+xml","maei":"application/mmt-aei+xml","mag":"application/vnd.ecowin.chart","maker":"application/vnd.framemaker","man":"text/troff","manifest":"text/cache-manifest","map":"application/json","mar":"application/octet-stream","markdown":"text/markdown","mathml":"application/mathml+xml","mb":"application/mathematica","mbk":"application/vnd.mobius.mbk","mbox":"application/mbox","mc1":"application/vnd.medcalcdata","mcd":"application/vnd.mcd","mcurl":"text/vnd.curl.mcurl","md":"text/markdown","mdb":"application/x-msaccess","mdi":"image/vnd.ms-modi","mdx":"text/mdx","me":"text/troff","mesh":"model/mesh","meta4":"application/metalink4+xml","metalink":"application/metalink+xml","mets":"application/mets+xml","mfm":"application/vnd.mfmp","mft":"application/rpki-manifest","mgp":"application/vnd.osgeo.mapguide.package","mgz":"application/vnd.proteus.magazine","mid":"audio/midi","midi":"audio/midi","mie":"application/x-mie","mif":"application/vnd.mif","mime":"message/rfc822","mj2":"video/mj2","mjp2":"video/mj2","mjs":"application/javascript","mk3d":"video/x-matroska","mka":"audio/x-matroska","mkd":"text/x-markdown","mks":"video/x-matroska","mkv":"video/x-matroska","mlp":"application/vnd.dolby.mlp","mmd":"application/vnd.chipnuts.karaoke-mmd","mmf":"application/vnd.smaf","mml":"text/mathml","mmr":"image/vnd.fujixerox.edmics-mmr","mng":"video/x-mng","mny":"application/x-msmoney","mobi":"application/x-mobipocket-ebook","mods":"application/mods+xml","mov":"video/quicktime","movie":"video/x-sgi-movie","mp2":"audio/mpeg","mp21":"application/mp21","mp2a":"audio/mpeg","mp3":"audio/mpeg","mp4":"video/mp4","mp4a":"audio/mp4","mp4s":"application/mp4","mp4v":"video/mp4","mpc":"application/vnd.mophun.certificate","mpd":"application/dash+xml","mpe":"video/mpeg","mpeg":"video/mpeg","mpg":"video/mpeg","mpg4":"video/mp4","mpga":"audio/mpeg","mpkg":"application/vnd.apple.installer+xml","mpm":"application/vnd.blueice.multipass","mpn":"application/vnd.mophun.application","mpp":"application/vnd.ms-project","mpt":"application/vnd.ms-project","mpy":"application/vnd.ibm.minipay","mqy":"application/vnd.mobius.mqy","mrc":"application/marc","mrcx":"application/marcxml+xml","ms":"text/troff","mscml":"application/mediaservercontrol+xml","mseed":"application/vnd.fdsn.mseed","mseq":"application/vnd.mseq","msf":"application/vnd.epson.msf","msg":"application/vnd.ms-outlook","msh":"model/mesh","msi":"application/x-msdownload","msl":"application/vnd.mobius.msl","msm":"application/octet-stream","msp":"application/octet-stream","msty":"application/vnd.muvee.style","mtl":"model/mtl","mts":"model/vnd.mts","mus":"application/vnd.musician","musd":"application/mmt-usd+xml","musicxml":"application/vnd.recordare.musicxml+xml","mvb":"application/x-msmediaview","mwf":"application/vnd.mfer","mxf":"application/mxf","mxl":"application/vnd.recordare.musicxml","mxmf":"audio/mobile-xmf","mxml":"application/xv+xml","mxs":"application/vnd.triscape.mxs","mxu":"video/vnd.mpegurl","n-gage":"application/vnd.nokia.n-gage.symbian.install","n3":"text/n3","nb":"application/mathematica","nbp":"application/vnd.wolfram.player","nc":"application/x-netcdf","ncx":"application/x-dtbncx+xml","nfo":"text/x-nfo","ngdat":"application/vnd.nokia.n-gage.data","nitf":"application/vnd.nitf","nlu":"application/vnd.neurolanguage.nlu","nml":"application/vnd.enliven","nnd":"application/vnd.noblenet-directory","nns":"application/vnd.noblenet-sealer","nnw":"application/vnd.noblenet-web","npx":"image/vnd.net-fpx","nq":"application/n-quads","nsc":"application/x-conference","nsf":"application/vnd.lotus-notes","nt":"application/n-triples","ntf":"application/vnd.nitf","numbers":"application/vnd.apple.numbers","nzb":"application/x-nzb","oa2":"application/vnd.fujitsu.oasys2","oa3":"application/vnd.fujitsu.oasys3","oas":"application/vnd.fujitsu.oasys","obd":"application/x-msbinder","obgx":"application/vnd.openblox.game+xml","obj":"model/obj","oda":"application/oda","odb":"application/vnd.oasis.opendocument.database","odc":"application/vnd.oasis.opendocument.chart","odf":"application/vnd.oasis.opendocument.formula","odft":"application/vnd.oasis.opendocument.formula-template","odg":"application/vnd.oasis.opendocument.graphics","odi":"application/vnd.oasis.opendocument.image","odm":"application/vnd.oasis.opendocument.text-master","odp":"application/vnd.oasis.opendocument.presentation","ods":"application/vnd.oasis.opendocument.spreadsheet","odt":"application/vnd.oasis.opendocument.text","oga":"audio/ogg","ogex":"model/vnd.opengex","ogg":"audio/ogg","ogv":"video/ogg","ogx":"application/ogg","omdoc":"application/omdoc+xml","onepkg":"application/onenote","onetmp":"application/onenote","onetoc":"application/onenote","onetoc2":"application/onenote","opf":"application/oebps-package+xml","opml":"text/x-opml","oprc":"application/vnd.palm","opus":"audio/ogg","org":"text/x-org","osf":"application/vnd.yamaha.openscoreformat","osfpvg":"application/vnd.yamaha.openscoreformat.osfpvg+xml","osm":"application/vnd.openstreetmap.data+xml","otc":"application/vnd.oasis.opendocument.chart-template","otf":"font/otf","otg":"application/vnd.oasis.opendocument.graphics-template","oth":"application/vnd.oasis.opendocument.text-web","oti":"application/vnd.oasis.opendocument.image-template","otp":"application/vnd.oasis.opendocument.presentation-template","ots":"application/vnd.oasis.opendocument.spreadsheet-template","ott":"application/vnd.oasis.opendocument.text-template","ova":"application/x-virtualbox-ova","ovf":"application/x-virtualbox-ovf","owl":"application/rdf+xml","oxps":"application/oxps","oxt":"application/vnd.openofficeorg.extension","p":"text/x-pascal","p10":"application/pkcs10","p12":"application/x-pkcs12","p7b":"application/x-pkcs7-certificates","p7c":"application/pkcs7-mime","p7m":"application/pkcs7-mime","p7r":"application/x-pkcs7-certreqresp","p7s":"application/pkcs7-signature","p8":"application/pkcs8","pac":"application/x-ns-proxy-autoconfig","pages":"application/vnd.apple.pages","pas":"text/x-pascal","paw":"application/vnd.pawaafile","pbd":"application/vnd.powerbuilder6","pbm":"image/x-portable-bitmap","pcap":"application/vnd.tcpdump.pcap","pcf":"application/x-font-pcf","pcl":"application/vnd.hp-pcl","pclxl":"application/vnd.hp-pclxl","pct":"image/x-pict","pcurl":"application/vnd.curl.pcurl","pcx":"image/x-pcx","pdb":"application/x-pilot","pde":"text/x-processing","pdf":"application/pdf","pem":"application/x-x509-ca-cert","pfa":"application/x-font-type1","pfb":"application/x-font-type1","pfm":"application/x-font-type1","pfr":"application/font-tdpfr","pfx":"application/x-pkcs12","pgm":"image/x-portable-graymap","pgn":"application/x-chess-pgn","pgp":"application/pgp-encrypted","php":"application/x-httpd-php","pic":"image/x-pict","pkg":"application/octet-stream","pki":"application/pkixcmp","pkipath":"application/pkix-pkipath","pkpass":"application/vnd.apple.pkpass","pl":"application/x-perl","plb":"application/vnd.3gpp.pic-bw-large","plc":"application/vnd.mobius.plc","plf":"application/vnd.pocketlearn","pls":"application/pls+xml","pm":"application/x-perl","pml":"application/vnd.ctc-posml","png":"image/png","pnm":"image/x-portable-anymap","portpkg":"application/vnd.macports.portpkg","pot":"application/vnd.ms-powerpoint","potm":"application/vnd.ms-powerpoint.template.macroenabled.12","potx":"application/vnd.openxmlformats-officedocument.presentationml.template","ppam":"application/vnd.ms-powerpoint.addin.macroenabled.12","ppd":"application/vnd.cups-ppd","ppm":"image/x-portable-pixmap","pps":"application/vnd.ms-powerpoint","ppsm":"application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsx":"application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppt":"application/vnd.ms-powerpoint","pptm":"application/vnd.ms-powerpoint.presentation.macroenabled.12","pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation","pqa":"application/vnd.palm","prc":"application/x-pilot","pre":"application/vnd.lotus-freelance","prf":"application/pics-rules","provx":"application/provenance+xml","ps":"application/postscript","psb":"application/vnd.3gpp.pic-bw-small","psd":"image/vnd.adobe.photoshop","psf":"application/x-font-linux-psf","pskcxml":"application/pskc+xml","pti":"image/prs.pti","ptid":"application/vnd.pvi.ptid1","pub":"application/x-mspublisher","pvb":"application/vnd.3gpp.pic-bw-var","pwn":"application/vnd.3m.post-it-notes","pya":"audio/vnd.ms-playready.media.pya","pyv":"video/vnd.ms-playready.media.pyv","qam":"application/vnd.epson.quickanime","qbo":"application/vnd.intu.qbo","qfx":"application/vnd.intu.qfx","qps":"application/vnd.publishare-delta-tree","qt":"video/quicktime","qwd":"application/vnd.quark.quarkxpress","qwt":"application/vnd.quark.quarkxpress","qxb":"application/vnd.quark.quarkxpress","qxd":"application/vnd.quark.quarkxpress","qxl":"application/vnd.quark.quarkxpress","qxt":"application/vnd.quark.quarkxpress","ra":"audio/x-realaudio","ram":"audio/x-pn-realaudio","raml":"application/raml+yaml","rapd":"application/route-apd+xml","rar":"application/x-rar-compressed","ras":"image/x-cmu-raster","rcprofile":"application/vnd.ipunplugged.rcprofile","rdf":"application/rdf+xml","rdz":"application/vnd.data-vision.rdz","relo":"application/p2p-overlay+xml","rep":"application/vnd.businessobjects","res":"application/x-dtbresource+xml","rgb":"image/x-rgb","rif":"application/reginfo+xml","rip":"audio/vnd.rip","ris":"application/x-research-info-systems","rl":"application/resource-lists+xml","rlc":"image/vnd.fujixerox.edmics-rlc","rld":"application/resource-lists-diff+xml","rm":"application/vnd.rn-realmedia","rmi":"audio/midi","rmp":"audio/x-pn-realaudio-plugin","rms":"application/vnd.jcp.javame.midlet-rms","rmvb":"application/vnd.rn-realmedia-vbr","rnc":"application/relax-ng-compact-syntax","rng":"application/xml","roa":"application/rpki-roa","roff":"text/troff","rp9":"application/vnd.cloanto.rp9","rpm":"application/x-redhat-package-manager","rpss":"application/vnd.nokia.radio-presets","rpst":"application/vnd.nokia.radio-preset","rq":"application/sparql-query","rs":"application/rls-services+xml","rsat":"application/atsc-rsat+xml","rsd":"application/rsd+xml","rsheet":"application/urc-ressheet+xml","rss":"application/rss+xml","rtf":"text/rtf","rtx":"text/richtext","run":"application/x-makeself","rusd":"application/route-usd+xml","s":"text/x-asm","s3m":"audio/s3m","saf":"application/vnd.yamaha.smaf-audio","sass":"text/x-sass","sbml":"application/sbml+xml","sc":"application/vnd.ibm.secure-container","scd":"application/x-msschedule","scm":"application/vnd.lotus-screencam","scq":"application/scvp-cv-request","scs":"application/scvp-cv-response","scss":"text/x-scss","scurl":"text/vnd.curl.scurl","sda":"application/vnd.stardivision.draw","sdc":"application/vnd.stardivision.calc","sdd":"application/vnd.stardivision.impress","sdkd":"application/vnd.solent.sdkm+xml","sdkm":"application/vnd.solent.sdkm+xml","sdp":"application/sdp","sdw":"application/vnd.stardivision.writer","sea":"application/x-sea","see":"application/vnd.seemail","seed":"application/vnd.fdsn.seed","sema":"application/vnd.sema","semd":"application/vnd.semd","semf":"application/vnd.semf","senmlx":"application/senml+xml","sensmlx":"application/sensml+xml","ser":"application/java-serialized-object","setpay":"application/set-payment-initiation","setreg":"application/set-registration-initiation","sfd-hdstx":"application/vnd.hydrostatix.sof-data","sfs":"application/vnd.spotfire.sfs","sfv":"text/x-sfv","sgi":"image/sgi","sgl":"application/vnd.stardivision.writer-global","sgm":"text/sgml","sgml":"text/sgml","sh":"application/x-sh","shar":"application/x-shar","shex":"text/shex","shf":"application/shf+xml","shtml":"text/html","sid":"image/x-mrsid-image","sieve":"application/sieve","sig":"application/pgp-signature","sil":"audio/silk","silo":"model/mesh","sis":"application/vnd.symbian.install","sisx":"application/vnd.symbian.install","sit":"application/x-stuffit","sitx":"application/x-stuffitx","siv":"application/sieve","skd":"application/vnd.koan","skm":"application/vnd.koan","skp":"application/vnd.koan","skt":"application/vnd.koan","sldm":"application/vnd.ms-powerpoint.slide.macroenabled.12","sldx":"application/vnd.openxmlformats-officedocument.presentationml.slide","slim":"text/slim","slm":"text/slim","sls":"application/route-s-tsid+xml","slt":"application/vnd.epson.salt","sm":"application/vnd.stepmania.stepchart","smf":"application/vnd.stardivision.math","smi":"application/smil+xml","smil":"application/smil+xml","smv":"video/x-smv","smzip":"application/vnd.stepmania.package","snd":"audio/basic","snf":"application/x-font-snf","so":"application/octet-stream","spc":"application/x-pkcs7-certificates","spdx":"text/spdx","spf":"application/vnd.yamaha.smaf-phrase","spl":"application/x-futuresplash","spot":"text/vnd.in3d.spot","spp":"application/scvp-vp-response","spq":"application/scvp-vp-request","spx":"audio/ogg","sql":"application/x-sql","src":"application/x-wais-source","srt":"application/x-subrip","sru":"application/sru+xml","srx":"application/sparql-results+xml","ssdl":"application/ssdl+xml","sse":"application/vnd.kodak-descriptor","ssf":"application/vnd.epson.ssf","ssml":"application/ssml+xml","st":"application/vnd.sailingtracker.track","stc":"application/vnd.sun.xml.calc.template","std":"application/vnd.sun.xml.draw.template","stf":"application/vnd.wt.stf","sti":"application/vnd.sun.xml.impress.template","stk":"application/hyperstudio","stl":"model/stl","str":"application/vnd.pg.format","stw":"application/vnd.sun.xml.writer.template","styl":"text/stylus","stylus":"text/stylus","sub":"text/vnd.dvb.subtitle","sus":"application/vnd.sus-calendar","susp":"application/vnd.sus-calendar","sv4cpio":"application/x-sv4cpio","sv4crc":"application/x-sv4crc","svc":"application/vnd.dvb.service","svd":"application/vnd.svd","svg":"image/svg+xml","svgz":"image/svg+xml","swa":"application/x-director","swf":"application/x-shockwave-flash","swi":"application/vnd.aristanetworks.swi","swidtag":"application/swid+xml","sxc":"application/vnd.sun.xml.calc","sxd":"application/vnd.sun.xml.draw","sxg":"application/vnd.sun.xml.writer.global","sxi":"application/vnd.sun.xml.impress","sxm":"application/vnd.sun.xml.math","sxw":"application/vnd.sun.xml.writer","t":"text/troff","t3":"application/x-t3vm-image","t38":"image/t38","taglet":"application/vnd.mynfc","tao":"application/vnd.tao.intent-module-archive","tap":"image/vnd.tencent.tap","tar":"application/x-tar","tcap":"application/vnd.3gpp2.tcap","tcl":"application/x-tcl","td":"application/urc-targetdesc+xml","teacher":"application/vnd.smart.teacher","tei":"application/tei+xml","teicorpus":"application/tei+xml","tex":"application/x-tex","texi":"application/x-texinfo","texinfo":"application/x-texinfo","text":"text/plain","tfi":"application/thraud+xml","tfm":"application/x-tex-tfm","tfx":"image/tiff-fx","tga":"image/x-tga","thmx":"application/vnd.ms-officetheme","tif":"image/tiff","tiff":"image/tiff","tk":"application/x-tcl","tmo":"application/vnd.tmobile-livetv","toml":"application/toml","torrent":"application/x-bittorrent","tpl":"application/vnd.groove-tool-template","tpt":"application/vnd.trid.tpt","tr":"text/troff","tra":"application/vnd.trueapp","trm":"application/x-msterminal","ts":"video/mp2t","tsd":"application/timestamped-data","tsv":"text/tab-separated-values","ttc":"font/collection","ttf":"font/ttf","ttl":"text/turtle","ttml":"application/ttml+xml","twd":"application/vnd.simtech-mindmapper","twds":"application/vnd.simtech-mindmapper","txd":"application/vnd.genomatix.tuxedo","txf":"application/vnd.mobius.txf","txt":"text/plain","u32":"application/x-authorware-bin","u8dsn":"message/global-delivery-status","u8hdr":"message/global-headers","u8mdn":"message/global-disposition-notification","u8msg":"message/global","ubj":"application/ubjson","udeb":"application/x-debian-package","ufd":"application/vnd.ufdl","ufdl":"application/vnd.ufdl","ulx":"application/x-glulx","umj":"application/vnd.umajin","unityweb":"application/vnd.unity","uoml":"application/vnd.uoml+xml","uri":"text/uri-list","uris":"text/uri-list","urls":"text/uri-list","usdz":"model/vnd.usdz+zip","ustar":"application/x-ustar","utz":"application/vnd.uiq.theme","uu":"text/x-uuencode","uva":"audio/vnd.dece.audio","uvd":"application/vnd.dece.data","uvf":"application/vnd.dece.data","uvg":"image/vnd.dece.graphic","uvh":"video/vnd.dece.hd","uvi":"image/vnd.dece.graphic","uvm":"video/vnd.dece.mobile","uvp":"video/vnd.dece.pd","uvs":"video/vnd.dece.sd","uvt":"application/vnd.dece.ttml+xml","uvu":"video/vnd.uvvu.mp4","uvv":"video/vnd.dece.video","uvva":"audio/vnd.dece.audio","uvvd":"application/vnd.dece.data","uvvf":"application/vnd.dece.data","uvvg":"image/vnd.dece.graphic","uvvh":"video/vnd.dece.hd","uvvi":"image/vnd.dece.graphic","uvvm":"video/vnd.dece.mobile","uvvp":"video/vnd.dece.pd","uvvs":"video/vnd.dece.sd","uvvt":"application/vnd.dece.ttml+xml","uvvu":"video/vnd.uvvu.mp4","uvvv":"video/vnd.dece.video","uvvx":"application/vnd.dece.unspecified","uvvz":"application/vnd.dece.zip","uvx":"application/vnd.dece.unspecified","uvz":"application/vnd.dece.zip","vbox":"application/x-virtualbox-vbox","vbox-extpack":"application/x-virtualbox-vbox-extpack","vcard":"text/vcard","vcd":"application/x-cdlink","vcf":"text/x-vcard","vcg":"application/vnd.groove-vcard","vcs":"text/x-vcalendar","vcx":"application/vnd.vcx","vdi":"application/x-virtualbox-vdi","vhd":"application/x-virtualbox-vhd","vis":"application/vnd.visionary","viv":"video/vnd.vivo","vmdk":"application/x-virtualbox-vmdk","vob":"video/x-ms-vob","vor":"application/vnd.stardivision.writer","vox":"application/x-authorware-bin","vrml":"model/vrml","vsd":"application/vnd.visio","vsf":"application/vnd.vsf","vss":"application/vnd.visio","vst":"application/vnd.visio","vsw":"application/vnd.visio","vtf":"image/vnd.valve.source.texture","vtt":"text/vtt","vtu":"model/vnd.vtu","vxml":"application/voicexml+xml","w3d":"application/x-director","wad":"application/x-doom","wadl":"application/vnd.sun.wadl+xml","war":"application/java-archive","wasm":"application/wasm","wav":"audio/x-wav","wax":"audio/x-ms-wax","wbmp":"image/vnd.wap.wbmp","wbs":"application/vnd.criticaltools.wbs+xml","wbxml":"application/vnd.wap.wbxml","wcm":"application/vnd.ms-works","wdb":"application/vnd.ms-works","wdp":"image/vnd.ms-photo","weba":"audio/webm","webapp":"application/x-web-app-manifest+json","webm":"video/webm","webmanifest":"application/manifest+json","webp":"image/webp","wg":"application/vnd.pmi.widget","wgt":"application/widget","wks":"application/vnd.ms-works","wm":"video/x-ms-wm","wma":"audio/x-ms-wma","wmd":"application/x-ms-wmd","wmf":"image/wmf","wml":"text/vnd.wap.wml","wmlc":"application/vnd.wap.wmlc","wmls":"text/vnd.wap.wmlscript","wmlsc":"application/vnd.wap.wmlscriptc","wmv":"video/x-ms-wmv","wmx":"video/x-ms-wmx","wmz":"application/x-msmetafile","woff":"font/woff","woff2":"font/woff2","wpd":"application/vnd.wordperfect","wpl":"application/vnd.ms-wpl","wps":"application/vnd.ms-works","wqd":"application/vnd.wqd","wri":"application/x-mswrite","wrl":"model/vrml","wsc":"message/vnd.wfa.wsc","wsdl":"application/wsdl+xml","wspolicy":"application/wspolicy+xml","wtb":"application/vnd.webturbo","wvx":"video/x-ms-wvx","x32":"application/x-authorware-bin","x3d":"model/x3d+xml","x3db":"model/x3d+fastinfoset","x3dbz":"model/x3d+binary","x3dv":"model/x3d-vrml","x3dvz":"model/x3d+vrml","x3dz":"model/x3d+xml","x_b":"model/vnd.parasolid.transmit.binary","x_t":"model/vnd.parasolid.transmit.text","xaml":"application/xaml+xml","xap":"application/x-silverlight-app","xar":"application/vnd.xara","xav":"application/xcap-att+xml","xbap":"application/x-ms-xbap","xbd":"application/vnd.fujixerox.docuworks.binder","xbm":"image/x-xbitmap","xca":"application/xcap-caps+xml","xcs":"application/calendar+xml","xdf":"application/xcap-diff+xml","xdm":"application/vnd.syncml.dm+xml","xdp":"application/vnd.adobe.xdp+xml","xdssc":"application/dssc+xml","xdw":"application/vnd.fujixerox.docuworks","xel":"application/xcap-el+xml","xenc":"application/xenc+xml","xer":"application/xcap-error+xml","xfdf":"application/vnd.adobe.xfdf","xfdl":"application/vnd.xfdl","xht":"application/xhtml+xml","xhtml":"application/xhtml+xml","xhvml":"application/xv+xml","xif":"image/vnd.xiff","xla":"application/vnd.ms-excel","xlam":"application/vnd.ms-excel.addin.macroenabled.12","xlc":"application/vnd.ms-excel","xlf":"application/xliff+xml","xlm":"application/vnd.ms-excel","xls":"application/vnd.ms-excel","xlsb":"application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsm":"application/vnd.ms-excel.sheet.macroenabled.12","xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlt":"application/vnd.ms-excel","xltm":"application/vnd.ms-excel.template.macroenabled.12","xltx":"application/vnd.openxmlformats-officedocument.spreadsheetml.template","xlw":"application/vnd.ms-excel","xm":"audio/xm","xml":"text/xml","xns":"application/xcap-ns+xml","xo":"application/vnd.olpc-sugar","xop":"application/xop+xml","xpi":"application/x-xpinstall","xpl":"application/xproc+xml","xpm":"image/x-xpixmap","xpr":"application/vnd.is-xpr","xps":"application/vnd.ms-xpsdocument","xpw":"application/vnd.intercon.formnet","xpx":"application/vnd.intercon.formnet","xsd":"application/xml","xsl":"application/xslt+xml","xslt":"application/xslt+xml","xsm":"application/vnd.syncml+xml","xspf":"application/xspf+xml","xul":"application/vnd.mozilla.xul+xml","xvm":"application/xv+xml","xvml":"application/xv+xml","xwd":"image/x-xwindowdump","xyz":"chemical/x-xyz","xz":"application/x-xz","yaml":"text/yaml","yang":"application/yang","yin":"application/yin+xml","yml":"text/yaml","ymp":"text/x-suse-ymp","z1":"application/x-zmachine","z2":"application/x-zmachine","z3":"application/x-zmachine","z4":"application/x-zmachine","z5":"application/x-zmachine","z6":"application/x-zmachine","z7":"application/x-zmachine","z8":"application/x-zmachine","zaz":"application/vnd.zzazz.deck+xml","zip":"application/zip","zir":"application/vnd.zul","zirz":"application/vnd.zul","zmm":"application/vnd.handheld-entertainment+xml"};
62
-
63
- const version = '2.17.1';
64
-
65
- function responseHeaders(headers, httpCache = false) {
66
- headers = { ...DEFAULT_HEADERS, ...headers };
67
- if (httpCache) {
68
- headers['cache-control'] = 'max-age=3600';
69
- delete headers['date'];
70
- delete headers['expires'];
71
- }
72
- return headers;
73
- }
74
- const DEFAULT_HEADERS = {
75
- 'cache-control': 'no-cache, no-store, must-revalidate, max-age=0',
76
- expires: '0',
77
- date: 'Wed, 1 Jan 2000 00:00:00 GMT',
78
- server: 'Stencil Dev Server ' + version,
79
- 'access-control-allow-origin': '*',
80
- 'access-control-expose-headers': '*',
81
- };
82
- function getBrowserUrl(protocol, address, port, basePath, pathname) {
83
- address = address === `0.0.0.0` ? `localhost` : address;
84
- const portSuffix = !port || port === 80 || port === 443 ? '' : ':' + port;
85
- let path = basePath;
86
- if (pathname.startsWith('/')) {
87
- pathname = pathname.substring(1);
88
- }
89
- path += pathname;
90
- protocol = protocol.replace(/\:/g, '');
91
- return `${protocol}://${address}${portSuffix}${path}`;
92
- }
93
- function getDevServerClientUrl(devServerConfig, host, protocol) {
94
- let address = devServerConfig.address;
95
- let port = devServerConfig.port;
96
- if (host) {
97
- address = host;
98
- port = null;
99
- }
100
- return getBrowserUrl(protocol !== null && protocol !== void 0 ? protocol : devServerConfig.protocol, address, port, devServerConfig.basePath, DEV_SERVER_URL);
101
- }
102
- function getContentType(filePath) {
103
- const last = filePath.replace(/^.*[/\\]/, '').toLowerCase();
104
- const ext = last.replace(/^.*\./, '').toLowerCase();
105
- const hasPath = last.length < filePath.length;
106
- const hasDot = ext.length < last.length - 1;
107
- return ((hasDot || !hasPath) && contentTypes[ext]) || 'application/octet-stream';
108
- }
109
- function isHtmlFile(filePath) {
110
- filePath = filePath.toLowerCase().trim();
111
- return filePath.endsWith('.html') || filePath.endsWith('.htm');
112
- }
113
- function isCssFile(filePath) {
114
- filePath = filePath.toLowerCase().trim();
115
- return filePath.endsWith('.css');
116
- }
117
- const TXT_EXT = ['css', 'html', 'htm', 'js', 'json', 'svg', 'xml'];
118
- function isSimpleText(filePath) {
119
- const ext = filePath.toLowerCase().trim().split('.').pop();
120
- return TXT_EXT.includes(ext);
121
- }
122
- function isExtensionLessPath(pathname) {
123
- const parts = pathname.split('/');
124
- const lastPart = parts[parts.length - 1];
125
- return !lastPart.includes('.');
126
- }
127
- function isSsrStaticDataPath(pathname) {
128
- const parts = pathname.split('/');
129
- const fileName = parts[parts.length - 1].split('?')[0];
130
- return fileName === 'page.state.json';
131
- }
132
- function getSsrStaticDataPath(req) {
133
- const parts = req.url.href.split('/');
134
- const fileName = parts[parts.length - 1];
135
- const fileNameParts = fileName.split('?');
136
- parts.pop();
137
- let ssrPath = new URL(parts.join('/')).href;
138
- if (!ssrPath.endsWith('/') && req.headers) {
139
- const h = new Headers(req.headers);
140
- if (h.get('referer').endsWith('/')) {
141
- ssrPath += '/';
142
- }
143
- }
144
- return {
145
- ssrPath,
146
- fileName: fileNameParts[0],
147
- hasQueryString: typeof fileNameParts[1] === 'string' && fileNameParts[1].length > 0,
148
- };
149
- }
150
- function isDevClient(pathname) {
151
- return pathname.startsWith(DEV_SERVER_URL);
152
- }
153
- function isDevModule(pathname) {
154
- return pathname.includes(DEV_MODULE_URL);
155
- }
156
- function isOpenInEditor(pathname) {
157
- return pathname === OPEN_IN_EDITOR_URL;
158
- }
159
- function isInitialDevServerLoad(pathname) {
160
- return pathname === DEV_SERVER_INIT_URL;
161
- }
162
- function isDevServerClient(pathname) {
163
- return pathname === DEV_SERVER_URL;
164
- }
165
- function shouldCompress(devServerConfig, req) {
166
- if (!devServerConfig.gzip) {
167
- return false;
168
- }
169
- if (req.method !== 'GET') {
170
- return false;
171
- }
172
- const acceptEncoding = req.headers && req.headers['accept-encoding'];
173
- if (typeof acceptEncoding !== 'string') {
174
- return false;
175
- }
176
- if (!acceptEncoding.includes('gzip')) {
177
- return false;
178
- }
179
- return true;
180
- }
181
-
182
- function createServerContext(sys, sendMsg, devServerConfig, buildResultsResolves, compilerRequestResolves) {
183
- const logRequest = (req, status) => {
184
- if (devServerConfig) {
185
- sendMsg({
186
- requestLog: {
187
- method: req.method || '?',
188
- url: req.pathname || '?',
189
- status,
190
- },
191
- });
192
- }
193
- };
194
- const serve500 = (req, res, error, xSource) => {
195
- try {
196
- res.writeHead(500, responseHeaders({
197
- 'content-type': 'text/plain; charset=utf-8',
198
- 'x-source': xSource,
199
- }));
200
- res.write(util__default['default'].inspect(error));
201
- res.end();
202
- logRequest(req, 500);
203
- }
204
- catch (e) {
205
- sendMsg({ error: { message: 'serve500: ' + e } });
206
- }
207
- };
208
- const serve404 = (req, res, xSource, content = null) => {
209
- try {
210
- if (req.pathname === '/favicon.ico') {
211
- const defaultFavicon = path__default['default'].join(devServerConfig.devServerDir, 'static', 'favicon.ico');
212
- res.writeHead(200, responseHeaders({
213
- 'content-type': 'image/x-icon',
214
- 'x-source': `favicon: ${xSource}`,
215
- }));
216
- const rs = fs__default['default'].createReadStream(defaultFavicon);
217
- rs.on('error', (err) => {
218
- res.writeHead(404, responseHeaders({
219
- 'content-type': 'text/plain; charset=utf-8',
220
- 'x-source': `createReadStream error: ${err}, ${xSource}`,
221
- }));
222
- res.write(util__default['default'].inspect(err));
223
- res.end();
224
- });
225
- rs.pipe(res);
226
- return;
227
- }
228
- if (content == null) {
229
- content = ['404 File Not Found', 'Url: ' + req.pathname, 'File: ' + req.filePath].join('\n');
230
- }
231
- res.writeHead(404, responseHeaders({
232
- 'content-type': 'text/plain; charset=utf-8',
233
- 'x-source': xSource,
234
- }));
235
- res.write(content);
236
- res.end();
237
- logRequest(req, 400);
238
- }
239
- catch (e) {
240
- serve500(req, res, e, xSource);
241
- }
242
- };
243
- const serve302 = (req, res, pathname = null) => {
244
- logRequest(req, 302);
245
- res.writeHead(302, { location: pathname || devServerConfig.basePath || '/' });
246
- res.end();
247
- };
248
- const getBuildResults = () => new Promise((resolve, reject) => {
249
- if (serverCtx.isServerListening) {
250
- buildResultsResolves.push({ resolve, reject });
251
- sendMsg({ requestBuildResults: true });
252
- }
253
- else {
254
- reject('dev server closed');
255
- }
256
- });
257
- const getCompilerRequest = (compilerRequestPath) => new Promise((resolve, reject) => {
258
- if (serverCtx.isServerListening) {
259
- compilerRequestResolves.push({
260
- path: compilerRequestPath,
261
- resolve,
262
- reject,
263
- });
264
- sendMsg({ compilerRequestPath });
265
- }
266
- else {
267
- reject('dev server closed');
268
- }
269
- });
270
- const serverCtx = {
271
- connectorHtml: null,
272
- dirTemplate: null,
273
- getBuildResults,
274
- getCompilerRequest,
275
- isServerListening: false,
276
- logRequest,
277
- prerenderConfig: null,
278
- serve302,
279
- serve404,
280
- serve500,
281
- sys,
282
- };
283
- return serverCtx;
284
- }
285
-
286
- const noop = () => {
287
- /* noop*/
288
- };
289
- const isFunction = (v) => typeof v === 'function';
290
- const isString = (v) => typeof v === 'string';
291
-
292
- /**
293
- * Builds a diagnostic from an `Error`, appends it to the `diagnostics` parameter, and returns the created diagnostic
294
- * @param diagnostics the series of diagnostics the newly created diagnostics should be added to
295
- * @param err the error to derive information from in generating the diagnostic
296
- * @param msg an optional message to use in place of `err` to generate the diagnostic
297
- * @returns the generated diagnostic
298
- */
299
- const catchError = (diagnostics, err, msg) => {
300
- const diagnostic = {
301
- level: 'error',
302
- type: 'build',
303
- header: 'Build Error',
304
- messageText: 'build error',
305
- relFilePath: null,
306
- absFilePath: null,
307
- lines: [],
308
- };
309
- if (isString(msg)) {
310
- diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';
311
- }
312
- else if (err != null) {
313
- if (err.stack != null) {
314
- diagnostic.messageText = err.stack.toString();
315
- }
316
- else {
317
- if (err.message != null) {
318
- diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
319
- }
320
- else {
321
- diagnostic.messageText = err.toString();
322
- }
323
- }
324
- }
325
- if (diagnostics != null && !shouldIgnoreError(diagnostic.messageText)) {
326
- diagnostics.push(diagnostic);
327
- }
328
- return diagnostic;
329
- };
330
- const shouldIgnoreError = (msg) => {
331
- return msg === TASK_CANCELED_MSG;
332
- };
333
- const TASK_CANCELED_MSG = `task canceled`;
334
-
335
- /**
336
- * Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar
337
- * Forward-slash paths can be used in Windows as long as they're not
338
- * extended-length paths and don't contain any non-ascii characters.
339
- * This was created since the path methods in Node.js outputs \\ paths on Windows.
340
- * @param path the Windows-based path to convert
341
- * @returns the converted path
342
- */
343
- const normalizePath = (path) => {
344
- if (typeof path !== 'string') {
345
- throw new Error(`invalid path to normalize`);
346
- }
347
- path = normalizeSlashes(path.trim());
348
- const components = pathComponents(path, getRootLength(path));
349
- const reducedComponents = reducePathComponents(components);
350
- const rootPart = reducedComponents[0];
351
- const secondPart = reducedComponents[1];
352
- const normalized = rootPart + reducedComponents.slice(1).join('/');
353
- if (normalized === '') {
354
- return '.';
355
- }
356
- if (rootPart === '' &&
357
- secondPart &&
358
- path.includes('/') &&
359
- !secondPart.startsWith('.') &&
360
- !secondPart.startsWith('@')) {
361
- return './' + normalized;
362
- }
363
- return normalized;
364
- };
365
- const normalizeSlashes = (path) => path.replace(backslashRegExp, '/');
366
- const altDirectorySeparator = '\\';
367
- const urlSchemeSeparator = '://';
368
- const backslashRegExp = /\\/g;
369
- const reducePathComponents = (components) => {
370
- if (!Array.isArray(components) || components.length === 0) {
371
- return [];
372
- }
373
- const reduced = [components[0]];
374
- for (let i = 1; i < components.length; i++) {
375
- const component = components[i];
376
- if (!component)
377
- continue;
378
- if (component === '.')
379
- continue;
380
- if (component === '..') {
381
- if (reduced.length > 1) {
382
- if (reduced[reduced.length - 1] !== '..') {
383
- reduced.pop();
384
- continue;
385
- }
386
- }
387
- else if (reduced[0])
388
- continue;
389
- }
390
- reduced.push(component);
391
- }
392
- return reduced;
393
- };
394
- const getRootLength = (path) => {
395
- const rootLength = getEncodedRootLength(path);
396
- return rootLength < 0 ? ~rootLength : rootLength;
397
- };
398
- const getEncodedRootLength = (path) => {
399
- if (!path)
400
- return 0;
401
- const ch0 = path.charCodeAt(0);
402
- // POSIX or UNC
403
- if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
404
- if (path.charCodeAt(1) !== ch0)
405
- return 1; // POSIX: "/" (or non-normalized "\")
406
- const p1 = path.indexOf(ch0 === 47 /* slash */ ? '/' : altDirectorySeparator, 2);
407
- if (p1 < 0)
408
- return path.length; // UNC: "//server" or "\\server"
409
- return p1 + 1; // UNC: "//server/" or "\\server\"
410
- }
411
- // DOS
412
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {
413
- const ch2 = path.charCodeAt(2);
414
- if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
415
- return 3; // DOS: "c:/" or "c:\"
416
- if (path.length === 2)
417
- return 2; // DOS: "c:" (but not "c:d")
418
- }
419
- // URL
420
- const schemeEnd = path.indexOf(urlSchemeSeparator);
421
- if (schemeEnd !== -1) {
422
- const authorityStart = schemeEnd + urlSchemeSeparator.length;
423
- const authorityEnd = path.indexOf('/', authorityStart);
424
- if (authorityEnd !== -1) {
425
- // URL: "file:///", "file://server/", "file://server/path"
426
- // For local "file" URLs, include the leading DOS volume (if present).
427
- // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
428
- // special case interpreted as "the machine from which the URL is being interpreted".
429
- const scheme = path.slice(0, schemeEnd);
430
- const authority = path.slice(authorityStart, authorityEnd);
431
- if (scheme === 'file' &&
432
- (authority === '' || authority === 'localhost') &&
433
- isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
434
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
435
- if (volumeSeparatorEnd !== -1) {
436
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {
437
- // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
438
- return ~(volumeSeparatorEnd + 1);
439
- }
440
- if (volumeSeparatorEnd === path.length) {
441
- // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
442
- // but not "file:///c:d" or "file:///c%3ad"
443
- return ~volumeSeparatorEnd;
444
- }
445
- }
446
- }
447
- return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
448
- }
449
- return ~path.length; // URL: "file://server", "http://server"
450
- }
451
- // relative
452
- return 0;
453
- };
454
- const isVolumeCharacter = (charCode) => (charCode >= 97 /* a */ && charCode <= 122 /* z */) ||
455
- (charCode >= 65 /* A */ && charCode <= 90 /* Z */);
456
- const getFileUrlVolumeSeparatorEnd = (url, start) => {
457
- const ch0 = url.charCodeAt(start);
458
- if (ch0 === 58 /* colon */)
459
- return start + 1;
460
- if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
461
- const ch2 = url.charCodeAt(start + 2);
462
- if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
463
- return start + 3;
464
- }
465
- return -1;
466
- };
467
- const pathComponents = (path, rootLength) => {
468
- const root = path.substring(0, rootLength);
469
- const rest = path.substring(rootLength).split('/');
470
- const restLen = rest.length;
471
- if (restLen > 0 && !rest[restLen - 1]) {
472
- rest.pop();
473
- }
474
- return [root, ...rest];
475
- };
476
-
477
- async function serveFile(devServerConfig, serverCtx, req, res) {
478
- try {
479
- if (isSimpleText(req.filePath)) {
480
- // easy text file, use the internal cache
481
- let content = await serverCtx.sys.readFile(req.filePath, 'utf8');
482
- if (devServerConfig.websocket && isHtmlFile(req.filePath) && !isDevServerClient(req.pathname)) {
483
- // auto inject our dev server script
484
- content = appendDevServerClientScript(devServerConfig, req, content);
485
- }
486
- else if (isCssFile(req.filePath)) {
487
- content = updateStyleUrls(req.url, content);
488
- }
489
- if (shouldCompress(devServerConfig, req)) {
490
- // let's gzip this well known web dev text file
491
- res.writeHead(200, responseHeaders({
492
- 'content-type': getContentType(req.filePath) + '; charset=utf-8',
493
- 'content-encoding': 'gzip',
494
- vary: 'Accept-Encoding',
495
- }));
496
- zlib__namespace.gzip(content, { level: 9 }, (_, data) => {
497
- res.end(data);
498
- });
499
- }
500
- else {
501
- // let's not gzip this file
502
- res.writeHead(200, responseHeaders({
503
- 'content-type': getContentType(req.filePath) + '; charset=utf-8',
504
- 'content-length': buffer.Buffer.byteLength(content, 'utf8'),
505
- }));
506
- res.write(content);
507
- res.end();
508
- }
509
- }
510
- else {
511
- // non-well-known text file or other file, probably best we use a stream
512
- // but don't bother trying to gzip this file for the dev server
513
- res.writeHead(200, responseHeaders({
514
- 'content-type': getContentType(req.filePath),
515
- 'content-length': req.stats.size,
516
- }));
517
- fs__default['default'].createReadStream(req.filePath).pipe(res);
518
- }
519
- serverCtx.logRequest(req, 200);
520
- }
521
- catch (e) {
522
- serverCtx.serve500(req, res, e, 'serveFile');
523
- }
524
- }
525
- function updateStyleUrls(url, oldCss) {
526
- const versionId = url.searchParams.get('s-hmr');
527
- const hmrUrls = url.searchParams.get('s-hmr-urls');
528
- if (versionId && hmrUrls) {
529
- hmrUrls.split(',').forEach((hmrUrl) => {
530
- urlVersionIds.set(hmrUrl, versionId);
531
- });
532
- }
533
- const reg = /url\((['"]?)(.*)\1\)/gi;
534
- let result;
535
- let newCss = oldCss;
536
- while ((result = reg.exec(oldCss)) !== null) {
537
- const oldUrl = result[2];
538
- const parsedUrl = new URL(oldUrl, url);
539
- const fileName = path__default['default'].basename(parsedUrl.pathname);
540
- const versionId = urlVersionIds.get(fileName);
541
- if (!versionId) {
542
- continue;
543
- }
544
- parsedUrl.searchParams.set('s-hmr', versionId);
545
- newCss = newCss.replace(oldUrl, parsedUrl.pathname);
546
- }
547
- return newCss;
548
- }
549
- const urlVersionIds = new Map();
550
- function appendDevServerClientScript(devServerConfig, req, content) {
551
- var _a, _b, _c;
552
- const devServerClientUrl = getDevServerClientUrl(devServerConfig, (_b = (_a = req.headers) === null || _a === void 0 ? void 0 : _a['x-forwarded-host']) !== null && _b !== void 0 ? _b : req.host, (_c = req.headers) === null || _c === void 0 ? void 0 : _c['x-forwarded-proto']);
553
- const iframe = `<iframe title="Stencil Dev Server Connector ${version} &#9889;" src="${devServerClientUrl}" style="display:block;width:0;height:0;border:0;visibility:hidden" aria-hidden="true"></iframe>`;
554
- return appendDevServerClientIframe(content, iframe);
555
- }
556
- function appendDevServerClientIframe(content, iframe) {
557
- if (content.includes('</body>')) {
558
- return content.replace('</body>', `${iframe}</body>`);
559
- }
560
- if (content.includes('</html>')) {
561
- return content.replace('</html>', `${iframe}</html>`);
562
- }
563
- return `${content}${iframe}`;
564
- }
565
-
566
- async function serveOpenInEditor(serverCtx, req, res) {
567
- let status = 200;
568
- const data = {};
569
- try {
570
- const editors = await getEditors();
571
- if (editors.length > 0) {
572
- await parseData(editors, serverCtx.sys, req, data);
573
- await openDataInEditor(data);
574
- }
575
- else {
576
- data.error = `no editors available`;
577
- }
578
- }
579
- catch (e) {
580
- data.error = e + '';
581
- status = 500;
582
- }
583
- serverCtx.logRequest(req, status);
584
- res.writeHead(status, responseHeaders({
585
- 'content-type': 'application/json; charset=utf-8',
586
- }));
587
- res.write(JSON.stringify(data, null, 2));
588
- res.end();
589
- }
590
- async function parseData(editors, sys, req, data) {
591
- const qs = req.searchParams;
592
- if (!qs.has('file')) {
593
- data.error = `missing file`;
594
- return;
595
- }
596
- data.file = qs.get('file');
597
- if (qs.has('line') && !isNaN(qs.get('line'))) {
598
- data.line = parseInt(qs.get('line'), 10);
599
- }
600
- if (typeof data.line !== 'number' || data.line < 1) {
601
- data.line = 1;
602
- }
603
- if (qs.has('column') && !isNaN(qs.get('column'))) {
604
- data.column = parseInt(qs.get('column'), 10);
605
- }
606
- if (typeof data.column !== 'number' || data.column < 1) {
607
- data.column = 1;
608
- }
609
- let editor = qs.get('editor');
610
- if (typeof editor === 'string') {
611
- editor = editor.trim().toLowerCase();
612
- if (editors.some((e) => e.id === editor)) {
613
- data.editor = editor;
614
- }
615
- else {
616
- data.error = `invalid editor: ${editor}`;
617
- return;
618
- }
619
- }
620
- else {
621
- data.editor = editors[0].id;
622
- }
623
- const stat = await sys.stat(data.file);
624
- data.exists = stat.isFile;
625
- }
626
- async function openDataInEditor(data) {
627
- if (!data.exists || data.error) {
628
- return;
629
- }
630
- try {
631
- const opts = {
632
- editor: data.editor,
633
- };
634
- const editor = openInEditorApi__default['default'].configure(opts, (err) => (data.error = err + ''));
635
- if (data.error) {
636
- return;
637
- }
638
- data.open = `${data.file}:${data.line}:${data.column}`;
639
- await editor.open(data.open);
640
- }
641
- catch (e) {
642
- data.error = e + '';
643
- }
644
- }
645
- let editors = null;
646
- function getEditors() {
647
- if (!editors) {
648
- editors = new Promise(async (resolve) => {
649
- const editors = [];
650
- try {
651
- await Promise.all(Object.keys(openInEditorApi__default['default'].editors).map(async (editorId) => {
652
- const isSupported = await isEditorSupported(editorId);
653
- editors.push({
654
- id: editorId,
655
- priority: EDITOR_PRIORITY[editorId],
656
- supported: isSupported,
657
- });
658
- }));
659
- }
660
- catch (e) { }
661
- resolve(editors
662
- .filter((e) => e.supported)
663
- .sort((a, b) => {
664
- if (a.priority < b.priority)
665
- return -1;
666
- if (a.priority > b.priority)
667
- return 1;
668
- return 0;
669
- })
670
- .map((e) => {
671
- return {
672
- id: e.id,
673
- name: EDITORS[e.id],
674
- };
675
- }));
676
- });
677
- }
678
- return editors;
679
- }
680
- async function isEditorSupported(editorId) {
681
- let isSupported = false;
682
- try {
683
- await openInEditorApi__default['default'].editors[editorId].detect();
684
- isSupported = true;
685
- }
686
- catch (e) { }
687
- return isSupported;
688
- }
689
- const EDITORS = {
690
- atom: 'Atom',
691
- code: 'Code',
692
- emacs: 'Emacs',
693
- idea14ce: 'IDEA 14 Community Edition',
694
- phpstorm: 'PhpStorm',
695
- sublime: 'Sublime',
696
- webstorm: 'WebStorm',
697
- vim: 'Vim',
698
- visualstudio: 'Visual Studio',
699
- };
700
- const EDITOR_PRIORITY = {
701
- code: 1,
702
- atom: 2,
703
- sublime: 3,
704
- visualstudio: 4,
705
- idea14ce: 5,
706
- webstorm: 6,
707
- phpstorm: 7,
708
- vim: 8,
709
- emacs: 9,
710
- };
711
-
712
- async function serveDevClient(devServerConfig, serverCtx, req, res) {
713
- try {
714
- if (isOpenInEditor(req.pathname)) {
715
- return serveOpenInEditor(serverCtx, req, res);
716
- }
717
- if (isDevServerClient(req.pathname)) {
718
- return serveDevClientScript(devServerConfig, serverCtx, req, res);
719
- }
720
- if (isInitialDevServerLoad(req.pathname)) {
721
- req.filePath = path__default['default'].join(devServerConfig.devServerDir, 'templates', 'initial-load.html');
722
- }
723
- else {
724
- const staticFile = req.pathname.replace(DEV_SERVER_URL + '/', '');
725
- req.filePath = path__default['default'].join(devServerConfig.devServerDir, 'static', staticFile);
726
- }
727
- try {
728
- req.stats = await serverCtx.sys.stat(req.filePath);
729
- if (req.stats.isFile) {
730
- return serveFile(devServerConfig, serverCtx, req, res);
731
- }
732
- return serverCtx.serve404(req, res, 'serveDevClient not file');
733
- }
734
- catch (e) {
735
- return serverCtx.serve404(req, res, `serveDevClient stats error ${e}`);
736
- }
737
- }
738
- catch (e) {
739
- return serverCtx.serve500(req, res, e, 'serveDevClient');
740
- }
741
- }
742
- async function serveDevClientScript(devServerConfig, serverCtx, req, res) {
743
- try {
744
- if (serverCtx.connectorHtml == null) {
745
- const filePath = path__default['default'].join(devServerConfig.devServerDir, 'connector.html');
746
- serverCtx.connectorHtml = serverCtx.sys.readFileSync(filePath, 'utf8');
747
- if (typeof serverCtx.connectorHtml !== 'string') {
748
- return serverCtx.serve404(req, res, `serveDevClientScript`);
749
- }
750
- const devClientConfig = {
751
- basePath: devServerConfig.basePath,
752
- editors: await getEditors(),
753
- reloadStrategy: devServerConfig.reloadStrategy,
754
- };
755
- serverCtx.connectorHtml = serverCtx.connectorHtml.replace('window.__DEV_CLIENT_CONFIG__', JSON.stringify(devClientConfig));
756
- }
757
- res.writeHead(200, responseHeaders({
758
- 'content-type': 'text/html; charset=utf-8',
759
- }));
760
- res.write(serverCtx.connectorHtml);
761
- res.end();
762
- }
763
- catch (e) {
764
- return serverCtx.serve500(req, res, e, `serveDevClientScript`);
765
- }
766
- }
767
-
768
- async function serveDevNodeModule(serverCtx, req, res) {
769
- try {
770
- const results = await serverCtx.getCompilerRequest(req.pathname);
771
- const headers = {
772
- 'content-type': 'application/javascript; charset=utf-8',
773
- 'content-length': Buffer.byteLength(results.content, 'utf8'),
774
- 'x-dev-node-module-id': results.nodeModuleId,
775
- 'x-dev-node-module-version': results.nodeModuleVersion,
776
- 'x-dev-node-module-resolved-path': results.nodeResolvedPath,
777
- 'x-dev-node-module-cache-path': results.cachePath,
778
- 'x-dev-node-module-cache-hit': results.cacheHit,
779
- };
780
- res.writeHead(results.status, responseHeaders(headers));
781
- res.write(results.content);
782
- res.end();
783
- }
784
- catch (e) {
785
- serverCtx.serve500(req, res, e, `serveDevNodeModule`);
786
- }
787
- }
788
-
789
- async function serveDirectoryIndex(devServerConfig, serverCtx, req, res) {
790
- const indexFilePath = path__default['default'].join(req.filePath, 'index.html');
791
- req.stats = await serverCtx.sys.stat(indexFilePath);
792
- if (req.stats.isFile) {
793
- req.filePath = indexFilePath;
794
- return serveFile(devServerConfig, serverCtx, req, res);
795
- }
796
- if (!req.pathname.endsWith('/')) {
797
- return serverCtx.serve302(req, res, req.pathname + '/');
798
- }
799
- try {
800
- const dirFilePaths = await serverCtx.sys.readDir(req.filePath);
801
- try {
802
- if (serverCtx.dirTemplate == null) {
803
- const dirTemplatePath = path__default['default'].join(devServerConfig.devServerDir, 'templates', 'directory-index.html');
804
- serverCtx.dirTemplate = serverCtx.sys.readFileSync(dirTemplatePath);
805
- }
806
- const files = await getFiles(serverCtx.sys, req.url, dirFilePaths);
807
- const templateHtml = serverCtx.dirTemplate
808
- .replace('{{title}}', getTitle(req.pathname))
809
- .replace('{{nav}}', getName(req.pathname))
810
- .replace('{{files}}', files);
811
- serverCtx.logRequest(req, 200);
812
- res.writeHead(200, responseHeaders({
813
- 'content-type': 'text/html; charset=utf-8',
814
- 'x-directory-index': req.pathname,
815
- }));
816
- res.write(templateHtml);
817
- res.end();
818
- }
819
- catch (e) {
820
- return serverCtx.serve500(req, res, e, 'serveDirectoryIndex');
821
- }
822
- }
823
- catch (e) {
824
- return serverCtx.serve404(req, res, 'serveDirectoryIndex');
825
- }
826
- }
827
- async function getFiles(sys, baseUrl, dirItemNames) {
828
- const items = await getDirectoryItems(sys, baseUrl, dirItemNames);
829
- if (baseUrl.pathname !== '/') {
830
- items.unshift({
831
- isDirectory: true,
832
- pathname: '../',
833
- name: '..',
834
- });
835
- }
836
- return items
837
- .map((item) => {
838
- return `
839
- <li class="${item.isDirectory ? 'directory' : 'file'}">
840
- <a href="${item.pathname}">
841
- <span class="icon"></span>
842
- <span>${item.name}</span>
843
- </a>
844
- </li>`;
845
- })
846
- .join('');
847
- }
848
- async function getDirectoryItems(sys, baseUrl, dirFilePaths) {
849
- const items = await Promise.all(dirFilePaths.map(async (dirFilePath) => {
850
- const fileName = path__default['default'].basename(dirFilePath);
851
- const url = new URL(fileName, baseUrl);
852
- const stats = await sys.stat(dirFilePath);
853
- const item = {
854
- name: fileName,
855
- pathname: url.pathname,
856
- isDirectory: stats.isDirectory,
857
- };
858
- return item;
859
- }));
860
- return items;
861
- }
862
- function getTitle(pathName) {
863
- return pathName;
864
- }
865
- function getName(pathName) {
866
- const dirs = pathName.split('/');
867
- dirs.pop();
868
- let url = '';
869
- return (dirs
870
- .map((dir, index) => {
871
- url += dir + '/';
872
- const text = index === 0 ? `~` : dir;
873
- return `<a href="${url}">${text}</a>`;
874
- })
875
- .join('<span>/</span>') + '<span>/</span>');
876
- }
877
-
878
- async function ssrPageRequest(devServerConfig, serverCtx, req, res) {
879
- try {
880
- let status = 500;
881
- let content = '';
882
- const { hydrateApp, srcIndexHtml, diagnostics } = await setupHydrateApp(devServerConfig, serverCtx);
883
- if (!diagnostics.some((diagnostic) => diagnostic.level === 'error')) {
884
- try {
885
- const opts = getSsrHydrateOptions(devServerConfig, serverCtx, req.url);
886
- const ssrResults = await hydrateApp.renderToString(srcIndexHtml, opts);
887
- diagnostics.push(...ssrResults.diagnostics);
888
- status = ssrResults.httpStatus;
889
- content = ssrResults.html;
890
- }
891
- catch (e) {
892
- catchError(diagnostics, e);
893
- }
894
- }
895
- if (diagnostics.some((diagnostic) => diagnostic.level === 'error')) {
896
- content = getSsrErrorContent(diagnostics);
897
- status = 500;
898
- }
899
- if (devServerConfig.websocket) {
900
- content = appendDevServerClientScript(devServerConfig, req, content);
901
- }
902
- serverCtx.logRequest(req, status);
903
- res.writeHead(status, responseHeaders({
904
- 'content-type': 'text/html; charset=utf-8',
905
- 'content-length': Buffer.byteLength(content, 'utf8'),
906
- }));
907
- res.write(content);
908
- res.end();
909
- }
910
- catch (e) {
911
- serverCtx.serve500(req, res, e, `ssrPageRequest`);
912
- }
913
- }
914
- async function ssrStaticDataRequest(devServerConfig, serverCtx, req, res) {
915
- try {
916
- const data = {};
917
- let httpCache = false;
918
- const { hydrateApp, srcIndexHtml, diagnostics } = await setupHydrateApp(devServerConfig, serverCtx);
919
- if (!diagnostics.some((diagnostic) => diagnostic.level === 'error')) {
920
- try {
921
- const { ssrPath, hasQueryString } = getSsrStaticDataPath(req);
922
- const url = new URL(ssrPath, req.url);
923
- const opts = getSsrHydrateOptions(devServerConfig, serverCtx, url);
924
- const ssrResults = await hydrateApp.renderToString(srcIndexHtml, opts);
925
- diagnostics.push(...ssrResults.diagnostics);
926
- ssrResults.staticData.forEach((s) => {
927
- if (s.type === 'application/json') {
928
- data[s.id] = JSON.parse(s.content);
929
- }
930
- else {
931
- data[s.id] = s.content;
932
- }
933
- });
934
- data.components = ssrResults.components.map((c) => c.tag).sort();
935
- httpCache = hasQueryString;
936
- }
937
- catch (e) {
938
- catchError(diagnostics, e);
939
- }
940
- }
941
- if (diagnostics.length > 0) {
942
- data.diagnostics = diagnostics;
943
- }
944
- const status = diagnostics.some((diagnostic) => diagnostic.level === 'error') ? 500 : 200;
945
- const content = JSON.stringify(data);
946
- serverCtx.logRequest(req, status);
947
- res.writeHead(status, responseHeaders({
948
- 'content-type': 'application/json; charset=utf-8',
949
- 'content-length': Buffer.byteLength(content, 'utf8'),
950
- }, httpCache && status === 200));
951
- res.write(content);
952
- res.end();
953
- }
954
- catch (e) {
955
- serverCtx.serve500(req, res, e, `ssrStaticDataRequest`);
956
- }
957
- }
958
- async function setupHydrateApp(devServerConfig, serverCtx) {
959
- let srcIndexHtml = null;
960
- let hydrateApp = null;
961
- const buildResults = await serverCtx.getBuildResults();
962
- const diagnostics = [];
963
- if (serverCtx.prerenderConfig == null && isString(devServerConfig.prerenderConfig)) {
964
- const compilerPath = path__default['default'].join(devServerConfig.devServerDir, '..', 'compiler', 'stencil.js');
965
- const compiler = require(compilerPath);
966
- const prerenderConfigResults = compiler.nodeRequire(devServerConfig.prerenderConfig);
967
- diagnostics.push(...prerenderConfigResults.diagnostics);
968
- if (prerenderConfigResults.module && prerenderConfigResults.module.config) {
969
- serverCtx.prerenderConfig = prerenderConfigResults.module.config;
970
- }
971
- }
972
- if (!isString(buildResults.hydrateAppFilePath)) {
973
- diagnostics.push({ messageText: `Missing hydrateAppFilePath`, level: `error`, type: `ssr` });
974
- }
975
- else if (!isString(devServerConfig.srcIndexHtml)) {
976
- diagnostics.push({ messageText: `Missing srcIndexHtml`, level: `error`, type: `ssr` });
977
- }
978
- else {
979
- srcIndexHtml = await serverCtx.sys.readFile(devServerConfig.srcIndexHtml);
980
- if (!isString(srcIndexHtml)) {
981
- diagnostics.push({
982
- messageText: `Unable to load src index html: ${devServerConfig.srcIndexHtml}`,
983
- level: `error`,
984
- type: `ssr`,
985
- });
986
- }
987
- else {
988
- // ensure we cleared out node's internal require() cache for this file
989
- const hydrateAppFilePath = path__default['default'].resolve(buildResults.hydrateAppFilePath);
990
- // brute force way of clearning node's module cache
991
- // not using `delete require.cache[id]` since it'll cause memory leaks
992
- require.cache = {};
993
- const Module = require('module');
994
- Module._cache[hydrateAppFilePath] = undefined;
995
- hydrateApp = require(hydrateAppFilePath);
996
- }
997
- }
998
- return {
999
- hydrateApp,
1000
- srcIndexHtml,
1001
- diagnostics,
1002
- };
1003
- }
1004
- function getSsrHydrateOptions(devServerConfig, serverCtx, url) {
1005
- const opts = {
1006
- url: url.href,
1007
- addModulePreloads: false,
1008
- approximateLineWidth: 120,
1009
- inlineExternalStyleSheets: false,
1010
- minifyScriptElements: false,
1011
- minifyStyleElements: false,
1012
- removeAttributeQuotes: false,
1013
- removeBooleanAttributeQuotes: false,
1014
- removeEmptyAttributes: false,
1015
- removeHtmlComments: false,
1016
- prettyHtml: true,
1017
- };
1018
- const prerenderConfig = serverCtx === null || serverCtx === void 0 ? void 0 : serverCtx.prerenderConfig;
1019
- if (isFunction(prerenderConfig === null || prerenderConfig === void 0 ? void 0 : prerenderConfig.hydrateOptions)) {
1020
- const userOpts = prerenderConfig.hydrateOptions(url);
1021
- if (userOpts) {
1022
- Object.assign(opts, userOpts);
1023
- }
1024
- }
1025
- if (isFunction(serverCtx.sys.applyPrerenderGlobalPatch)) {
1026
- const orgBeforeHydrate = opts.beforeHydrate;
1027
- opts.beforeHydrate = (document) => {
1028
- // patch this new window with the fetch global from node-fetch
1029
- const devServerBaseUrl = new URL(devServerConfig.browserUrl);
1030
- const devServerHostUrl = devServerBaseUrl.origin;
1031
- serverCtx.sys.applyPrerenderGlobalPatch({
1032
- devServerHostUrl: devServerHostUrl,
1033
- window: document.defaultView,
1034
- });
1035
- if (typeof orgBeforeHydrate === 'function') {
1036
- return orgBeforeHydrate(document);
1037
- }
1038
- };
1039
- }
1040
- return opts;
1041
- }
1042
- function getSsrErrorContent(diagnostics) {
1043
- return `<!doctype html>
1044
- <html>
1045
- <head>
1046
- <title>SSR Error</title>
1047
- <style>
1048
- body {
1049
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
1050
- }
1051
- </style>
1052
- </head>
1053
- <body>
1054
- <h1>SSR Dev Error</h1>
1055
- ${diagnostics.map((diagnostic) => `
1056
- <p>
1057
- ${diagnostic.messageText}
1058
- </p>
1059
- `)}
1060
- </body>
1061
- </html>`;
1062
- }
1063
-
1064
- function createRequestHandler(devServerConfig, serverCtx) {
1065
- let userRequestHandler = null;
1066
- if (typeof devServerConfig.requestListenerPath === 'string') {
1067
- userRequestHandler = require(devServerConfig.requestListenerPath);
1068
- }
1069
- return async function (incomingReq, res) {
1070
- async function defaultHandler() {
1071
- try {
1072
- const req = normalizeHttpRequest(devServerConfig, incomingReq);
1073
- if (!req.url) {
1074
- return serverCtx.serve302(req, res);
1075
- }
1076
- if (isDevClient(req.pathname) && devServerConfig.websocket) {
1077
- return serveDevClient(devServerConfig, serverCtx, req, res);
1078
- }
1079
- if (isDevModule(req.pathname)) {
1080
- return serveDevNodeModule(serverCtx, req, res);
1081
- }
1082
- if (!isValidUrlBasePath(devServerConfig.basePath, req.url)) {
1083
- return serverCtx.serve404(req, res, `invalid basePath`, `404 File Not Found, base path: ${devServerConfig.basePath}`);
1084
- }
1085
- if (devServerConfig.ssr) {
1086
- if (isExtensionLessPath(req.url.pathname)) {
1087
- return ssrPageRequest(devServerConfig, serverCtx, req, res);
1088
- }
1089
- if (isSsrStaticDataPath(req.url.pathname)) {
1090
- return ssrStaticDataRequest(devServerConfig, serverCtx, req, res);
1091
- }
1092
- }
1093
- req.stats = await serverCtx.sys.stat(req.filePath);
1094
- if (req.stats.isFile) {
1095
- return serveFile(devServerConfig, serverCtx, req, res);
1096
- }
1097
- if (req.stats.isDirectory) {
1098
- return serveDirectoryIndex(devServerConfig, serverCtx, req, res);
1099
- }
1100
- const xSource = ['notfound'];
1101
- const validHistoryApi = isValidHistoryApi(devServerConfig, req);
1102
- xSource.push(`validHistoryApi: ${validHistoryApi}`);
1103
- if (validHistoryApi) {
1104
- try {
1105
- const indexFilePath = path__default['default'].join(devServerConfig.root, devServerConfig.historyApiFallback.index);
1106
- xSource.push(`indexFilePath: ${indexFilePath}`);
1107
- req.stats = await serverCtx.sys.stat(indexFilePath);
1108
- if (req.stats.isFile) {
1109
- req.filePath = indexFilePath;
1110
- return serveFile(devServerConfig, serverCtx, req, res);
1111
- }
1112
- }
1113
- catch (e) {
1114
- xSource.push(`notfound error: ${e}`);
1115
- }
1116
- }
1117
- return serverCtx.serve404(req, res, xSource.join(', '));
1118
- }
1119
- catch (e) {
1120
- return serverCtx.serve500(incomingReq, res, e, `not found error`);
1121
- }
1122
- }
1123
- if (typeof userRequestHandler === 'function') {
1124
- await userRequestHandler(incomingReq, res, defaultHandler);
1125
- }
1126
- else {
1127
- await defaultHandler();
1128
- }
1129
- };
1130
- }
1131
- function isValidUrlBasePath(basePath, url) {
1132
- // normalize the paths to always end with a slash for the check
1133
- let pathname = url.pathname;
1134
- if (!pathname.endsWith('/')) {
1135
- pathname += '/';
1136
- }
1137
- if (!basePath.endsWith('/')) {
1138
- basePath += '/';
1139
- }
1140
- return pathname.startsWith(basePath);
1141
- }
1142
- function normalizeHttpRequest(devServerConfig, incomingReq) {
1143
- const req = {
1144
- method: (incomingReq.method || 'GET').toUpperCase(),
1145
- headers: incomingReq.headers,
1146
- acceptHeader: (incomingReq.headers && typeof incomingReq.headers.accept === 'string' && incomingReq.headers.accept) || '',
1147
- host: (incomingReq.headers && typeof incomingReq.headers.host === 'string' && incomingReq.headers.host) || null,
1148
- url: null,
1149
- searchParams: null,
1150
- };
1151
- const incomingUrl = (incomingReq.url || '').trim() || null;
1152
- if (incomingUrl) {
1153
- if (req.host) {
1154
- req.url = new URL(incomingReq.url, `http://${req.host}`);
1155
- }
1156
- else {
1157
- req.url = new URL(incomingReq.url, `http://dev.stenciljs.com`);
1158
- }
1159
- req.searchParams = req.url.searchParams;
1160
- }
1161
- if (req.url) {
1162
- const parts = req.url.pathname.replace(/\\/g, '/').split('/');
1163
- req.pathname = parts.map((part) => decodeURIComponent(part)).join('/');
1164
- if (req.pathname.length > 0 && !isDevClient(req.pathname)) {
1165
- req.pathname = '/' + req.pathname.substring(devServerConfig.basePath.length);
1166
- }
1167
- req.filePath = normalizePath(path__default['default'].normalize(path__default['default'].join(devServerConfig.root, path__default['default'].relative('/', req.pathname))));
1168
- }
1169
- return req;
1170
- }
1171
- function isValidHistoryApi(devServerConfig, req) {
1172
- if (!devServerConfig.historyApiFallback) {
1173
- return false;
1174
- }
1175
- if (req.method !== 'GET') {
1176
- return false;
1177
- }
1178
- if (!req.acceptHeader.includes('text/html')) {
1179
- return false;
1180
- }
1181
- if (!devServerConfig.historyApiFallback.disableDotRule && req.pathname.includes('.')) {
1182
- return false;
1183
- }
1184
- return true;
1185
- }
1186
-
1187
- function createHttpServer(devServerConfig, serverCtx) {
1188
- // create our request handler
1189
- const reqHandler = createRequestHandler(devServerConfig, serverCtx);
1190
- const credentials = devServerConfig.https;
1191
- return credentials ? https__namespace.createServer(credentials, reqHandler) : http__namespace.createServer(reqHandler);
1192
- }
1193
- async function findClosestOpenPort(host, port) {
1194
- async function t(portToCheck) {
1195
- const isTaken = await isPortTaken(host, portToCheck);
1196
- if (!isTaken) {
1197
- return portToCheck;
1198
- }
1199
- return t(portToCheck + 1);
1200
- }
1201
- return t(port);
1202
- }
1203
- function isPortTaken(host, port) {
1204
- return new Promise((resolve, reject) => {
1205
- const tester = net__namespace
1206
- .createServer()
1207
- .once('error', () => {
1208
- resolve(true);
1209
- })
1210
- .once('listening', () => {
1211
- tester
1212
- .once('close', () => {
1213
- resolve(false);
1214
- })
1215
- .close();
1216
- })
1217
- .on('error', (err) => {
1218
- reject(err);
1219
- })
1220
- .listen(port, host);
1221
- });
1222
- }
1223
-
1224
- function createWebSocket(httpServer, onMessageFromClient) {
1225
- const wsConfig = {
1226
- server: httpServer,
1227
- };
1228
- const wsServer = new ws__namespace.Server(wsConfig);
1229
- function heartbeat() {
1230
- this.isAlive = true;
1231
- }
1232
- wsServer.on('connection', (ws) => {
1233
- ws.on('message', (data) => {
1234
- // the server process has received a message from the browser
1235
- // pass the message received from the browser to the main cli process
1236
- try {
1237
- onMessageFromClient(JSON.parse(data.toString()));
1238
- }
1239
- catch (e) {
1240
- console.error(e);
1241
- }
1242
- });
1243
- ws.isAlive = true;
1244
- ws.on('pong', heartbeat);
1245
- // ignore invalid close frames sent by Safari 15
1246
- ws.on('error', console.error);
1247
- });
1248
- const pingInternval = setInterval(() => {
1249
- wsServer.clients.forEach((ws) => {
1250
- if (!ws.isAlive) {
1251
- return ws.close(1000);
1252
- }
1253
- ws.isAlive = false;
1254
- ws.ping(noop);
1255
- });
1256
- }, 10000);
1257
- return {
1258
- sendToBrowser: (msg) => {
1259
- if (msg && wsServer && wsServer.clients) {
1260
- const data = JSON.stringify(msg);
1261
- wsServer.clients.forEach((ws) => {
1262
- if (ws.readyState === ws.OPEN) {
1263
- ws.send(data);
1264
- }
1265
- });
1266
- }
1267
- },
1268
- close: () => {
1269
- return new Promise((resolve, reject) => {
1270
- clearInterval(pingInternval);
1271
- wsServer.clients.forEach((ws) => {
1272
- ws.close(1000);
1273
- });
1274
- wsServer.close((err) => {
1275
- if (err) {
1276
- reject(err);
1277
- }
1278
- else {
1279
- resolve();
1280
- }
1281
- });
1282
- });
1283
- },
1284
- };
1285
- }
1286
-
1287
- function createCommonjsModule(fn, basedir, module) {
1288
- return module = {
1289
- path: basedir,
1290
- exports: {},
1291
- require: function (path, base) {
1292
- return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
1293
- }
1294
- }, fn(module, module.exports), module.exports;
1295
- }
1296
-
1297
- function commonjsRequire () {
1298
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
1299
- }
1300
-
1301
- let isDocker;
1302
-
1303
- function hasDockerEnv() {
1304
- try {
1305
- fs__default$1['default'].statSync('/.dockerenv');
1306
- return true;
1307
- } catch (_) {
1308
- return false;
1309
- }
1310
- }
1311
-
1312
- function hasDockerCGroup() {
1313
- try {
1314
- return fs__default$1['default'].readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
1315
- } catch (_) {
1316
- return false;
1317
- }
1318
- }
1319
-
1320
- var isDocker_1 = () => {
1321
- if (isDocker === undefined) {
1322
- isDocker = hasDockerEnv() || hasDockerCGroup();
1323
- }
1324
-
1325
- return isDocker;
1326
- };
1327
-
1328
- var isWsl_1 = createCommonjsModule(function (module) {
1329
-
1330
-
1331
-
1332
-
1333
- const isWsl = () => {
1334
- if (process.platform !== 'linux') {
1335
- return false;
1336
- }
1337
-
1338
- if (os__default['default'].release().toLowerCase().includes('microsoft')) {
1339
- if (isDocker_1()) {
1340
- return false;
1341
- }
1342
-
1343
- return true;
1344
- }
1345
-
1346
- try {
1347
- return fs__default$1['default'].readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ?
1348
- !isDocker_1() : false;
1349
- } catch (_) {
1350
- return false;
1351
- }
1352
- };
1353
-
1354
- if (process.env.__IS_WSL_TEST__) {
1355
- module.exports = isWsl;
1356
- } else {
1357
- module.exports = isWsl();
1358
- }
1359
- });
1360
-
1361
- var defineLazyProp = (object, propertyName, fn) => {
1362
- const define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});
1363
-
1364
- Object.defineProperty(object, propertyName, {
1365
- configurable: true,
1366
- enumerable: true,
1367
- get() {
1368
- const result = fn();
1369
- define(result);
1370
- return result;
1371
- },
1372
- set(value) {
1373
- define(value);
1374
- }
1375
- });
1376
-
1377
- return object;
1378
- };
1379
-
1380
- const {promises: fs, constants: fsConstants} = fs__default$1['default'];
1381
-
1382
-
1383
-
1384
-
1385
- // Path to included `xdg-open`.
1386
- const localXdgOpenPath = path__default['default'].join(__dirname, 'xdg-open');
1387
-
1388
- const {platform, arch} = process;
1389
-
1390
- /**
1391
- Get the mount point for fixed drives in WSL.
1392
-
1393
- @inner
1394
- @returns {string} The mount point.
1395
- */
1396
- const getWslDrivesMountPoint = (() => {
1397
- // Default value for "root" param
1398
- // according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config
1399
- const defaultMountPoint = '/mnt/';
1400
-
1401
- let mountPoint;
1402
-
1403
- return async function () {
1404
- if (mountPoint) {
1405
- // Return memoized mount point value
1406
- return mountPoint;
1407
- }
1408
-
1409
- const configFilePath = '/etc/wsl.conf';
1410
-
1411
- let isConfigFileExists = false;
1412
- try {
1413
- await fs.access(configFilePath, fsConstants.F_OK);
1414
- isConfigFileExists = true;
1415
- } catch {}
1416
-
1417
- if (!isConfigFileExists) {
1418
- return defaultMountPoint;
1419
- }
1420
-
1421
- const configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});
1422
- const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
1423
-
1424
- if (!configMountPoint) {
1425
- return defaultMountPoint;
1426
- }
1427
-
1428
- mountPoint = configMountPoint.groups.mountPoint.trim();
1429
- mountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;
1430
-
1431
- return mountPoint;
1432
- };
1433
- })();
1434
-
1435
- const pTryEach = async (array, mapper) => {
1436
- let latestError;
1437
-
1438
- for (const item of array) {
1439
- try {
1440
- return await mapper(item); // eslint-disable-line no-await-in-loop
1441
- } catch (error) {
1442
- latestError = error;
1443
- }
1444
- }
1445
-
1446
- throw latestError;
1447
- };
1448
-
1449
- const open = async (target, options) => {
1450
- if (typeof target !== 'string') {
1451
- throw new TypeError('Expected a `target`');
1452
- }
1453
-
1454
- options = {
1455
- wait: false,
1456
- background: false,
1457
- newInstance: false,
1458
- allowNonzeroExitCode: false,
1459
- ...options
1460
- };
1461
-
1462
- if (Array.isArray(options.app)) {
1463
- return pTryEach(options.app, singleApp => open(target, {
1464
- ...options,
1465
- app: singleApp
1466
- }));
1467
- }
1468
-
1469
- let {name: app, arguments: appArguments = []} = options.app || {};
1470
- appArguments = [...appArguments];
1471
-
1472
- if (Array.isArray(app)) {
1473
- return pTryEach(app, appName => open(target, {
1474
- ...options,
1475
- app: {
1476
- name: appName,
1477
- arguments: appArguments
1478
- }
1479
- }));
1480
- }
1481
-
1482
- let command;
1483
- const cliArguments = [];
1484
- const childProcessOptions = {};
1485
-
1486
- if (platform === 'darwin') {
1487
- command = 'open';
1488
-
1489
- if (options.wait) {
1490
- cliArguments.push('--wait-apps');
1491
- }
1492
-
1493
- if (options.background) {
1494
- cliArguments.push('--background');
1495
- }
1496
-
1497
- if (options.newInstance) {
1498
- cliArguments.push('--new');
1499
- }
1500
-
1501
- if (app) {
1502
- cliArguments.push('-a', app);
1503
- }
1504
- } else if (platform === 'win32' || (isWsl_1 && !isDocker_1())) {
1505
- const mountPoint = await getWslDrivesMountPoint();
1506
-
1507
- command = isWsl_1 ?
1508
- `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` :
1509
- `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
1510
-
1511
- cliArguments.push(
1512
- '-NoProfile',
1513
- '-NonInteractive',
1514
- '–ExecutionPolicy',
1515
- 'Bypass',
1516
- '-EncodedCommand'
1517
- );
1518
-
1519
- if (!isWsl_1) {
1520
- childProcessOptions.windowsVerbatimArguments = true;
1521
- }
1522
-
1523
- const encodedArguments = ['Start'];
1524
-
1525
- if (options.wait) {
1526
- encodedArguments.push('-Wait');
1527
- }
1528
-
1529
- if (app) {
1530
- // Double quote with double quotes to ensure the inner quotes are passed through.
1531
- // Inner quotes are delimited for PowerShell interpretation with backticks.
1532
- encodedArguments.push(`"\`"${app}\`""`, '-ArgumentList');
1533
- appArguments.unshift(target);
1534
- } else {
1535
- encodedArguments.push(`"${target}"`);
1536
- }
1537
-
1538
- if (appArguments.length > 0) {
1539
- appArguments = appArguments.map(arg => `"\`"${arg}\`""`);
1540
- encodedArguments.push(appArguments.join(','));
1541
- }
1542
-
1543
- // Using Base64-encoded command, accepted by PowerShell, to allow special characters.
1544
- target = Buffer.from(encodedArguments.join(' '), 'utf16le').toString('base64');
1545
- } else {
1546
- if (app) {
1547
- command = app;
1548
- } else {
1549
- // When bundled by Webpack, there's no actual package file path and no local `xdg-open`.
1550
- const isBundled = !__dirname || __dirname === '/';
1551
-
1552
- // Check if local `xdg-open` exists and is executable.
1553
- let exeLocalXdgOpen = false;
1554
- try {
1555
- await fs.access(localXdgOpenPath, fsConstants.X_OK);
1556
- exeLocalXdgOpen = true;
1557
- } catch {}
1558
-
1559
- const useSystemXdgOpen = process.versions.electron ||
1560
- platform === 'android' || isBundled || !exeLocalXdgOpen;
1561
- command = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;
1562
- }
1563
-
1564
- if (appArguments.length > 0) {
1565
- cliArguments.push(...appArguments);
1566
- }
1567
-
1568
- if (!options.wait) {
1569
- // `xdg-open` will block the process unless stdio is ignored
1570
- // and it's detached from the parent even if it's unref'd.
1571
- childProcessOptions.stdio = 'ignore';
1572
- childProcessOptions.detached = true;
1573
- }
1574
- }
1575
-
1576
- cliArguments.push(target);
1577
-
1578
- if (platform === 'darwin' && appArguments.length > 0) {
1579
- cliArguments.push('--args', ...appArguments);
1580
- }
1581
-
1582
- const subprocess = childProcess__default['default'].spawn(command, cliArguments, childProcessOptions);
1583
-
1584
- if (options.wait) {
1585
- return new Promise((resolve, reject) => {
1586
- subprocess.once('error', reject);
1587
-
1588
- subprocess.once('close', exitCode => {
1589
- if (options.allowNonzeroExitCode && exitCode > 0) {
1590
- reject(new Error(`Exited with code ${exitCode}`));
1591
- return;
1592
- }
1593
-
1594
- resolve(subprocess);
1595
- });
1596
- });
1597
- }
1598
-
1599
- subprocess.unref();
1600
-
1601
- return subprocess;
1602
- };
1603
-
1604
- function detectArchBinary(binary) {
1605
- if (typeof binary === 'string' || Array.isArray(binary)) {
1606
- return binary;
1607
- }
1608
-
1609
- const {[arch]: archBinary} = binary;
1610
-
1611
- if (!archBinary) {
1612
- throw new Error(`${arch} is not supported`);
1613
- }
1614
-
1615
- return archBinary;
1616
- }
1617
-
1618
- function detectPlatformBinary({[platform]: platformBinary}, {wsl}) {
1619
- if (wsl && isWsl_1) {
1620
- return detectArchBinary(wsl);
1621
- }
1622
-
1623
- if (!platformBinary) {
1624
- throw new Error(`${platform} is not supported`);
1625
- }
1626
-
1627
- return detectArchBinary(platformBinary);
1628
- }
1629
-
1630
- const apps = {};
1631
-
1632
- defineLazyProp(apps, 'chrome', () => detectPlatformBinary({
1633
- darwin: 'google chrome',
1634
- win32: 'chrome',
1635
- linux: ['google-chrome', 'google-chrome-stable']
1636
- }, {
1637
- wsl: {
1638
- ia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',
1639
- x64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe']
1640
- }
1641
- }));
1642
-
1643
- defineLazyProp(apps, 'firefox', () => detectPlatformBinary({
1644
- darwin: 'firefox',
1645
- win32: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe',
1646
- linux: 'firefox'
1647
- }, {
1648
- wsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
1649
- }));
1650
-
1651
- defineLazyProp(apps, 'edge', () => detectPlatformBinary({
1652
- darwin: 'microsoft edge',
1653
- win32: 'msedge',
1654
- linux: 'microsoft-edge'
1655
- }, {
1656
- wsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'
1657
- }));
1658
-
1659
- open.apps = apps;
1660
-
1661
- var open_1 = open;
1662
-
1663
- async function openInBrowser(opts) {
1664
- // await open(opts.url, { app: ['google chrome', '--auto-open-devtools-for-tabs'] });
1665
- await open_1(opts.url);
1666
- }
1667
-
1668
- function initServerProcess(sendMsg) {
1669
- let server = null;
1670
- let webSocket = null;
1671
- let serverCtx = null;
1672
- const buildResultsResolves = [];
1673
- const compilerRequestResolves = [];
1674
- const startServer = async (msg) => {
1675
- const devServerConfig = msg.startServer;
1676
- devServerConfig.port = await findClosestOpenPort(devServerConfig.address, devServerConfig.port);
1677
- devServerConfig.browserUrl = getBrowserUrl(devServerConfig.protocol, devServerConfig.address, devServerConfig.port, devServerConfig.basePath, '/');
1678
- devServerConfig.root = normalizePath(devServerConfig.root);
1679
- const sys = index_js.createNodeSys({ process });
1680
- serverCtx = createServerContext(sys, sendMsg, devServerConfig, buildResultsResolves, compilerRequestResolves);
1681
- server = createHttpServer(devServerConfig, serverCtx);
1682
- webSocket = devServerConfig.websocket ? createWebSocket(server, sendMsg) : null;
1683
- server.listen(devServerConfig.port, devServerConfig.address);
1684
- serverCtx.isServerListening = true;
1685
- if (devServerConfig.openBrowser) {
1686
- const initialLoadUrl = getBrowserUrl(devServerConfig.protocol, devServerConfig.address, devServerConfig.port, devServerConfig.basePath, devServerConfig.initialLoadUrl || DEV_SERVER_INIT_URL);
1687
- openInBrowser({ url: initialLoadUrl });
1688
- }
1689
- sendMsg({ serverStarted: devServerConfig });
1690
- };
1691
- const closeServer = () => {
1692
- const promises = [];
1693
- buildResultsResolves.forEach((r) => r.reject('dev server closed'));
1694
- buildResultsResolves.length = 0;
1695
- compilerRequestResolves.forEach((r) => r.reject('dev server closed'));
1696
- compilerRequestResolves.length = 0;
1697
- if (serverCtx) {
1698
- if (serverCtx.sys) {
1699
- promises.push(serverCtx.sys.destroy());
1700
- }
1701
- }
1702
- if (webSocket) {
1703
- promises.push(webSocket.close());
1704
- webSocket = null;
1705
- }
1706
- if (server) {
1707
- promises.push(new Promise((resolve) => {
1708
- server.close((err) => {
1709
- if (err) {
1710
- console.error(`close error: ${err}`);
1711
- }
1712
- resolve();
1713
- });
1714
- }));
1715
- }
1716
- Promise.all(promises).finally(() => {
1717
- sendMsg({
1718
- serverClosed: true,
1719
- });
1720
- });
1721
- };
1722
- const receiveMessageFromMain = (msg) => {
1723
- // the server process received a message from main thread
1724
- try {
1725
- if (msg) {
1726
- if (msg.startServer) {
1727
- startServer(msg);
1728
- }
1729
- else if (msg.closeServer) {
1730
- closeServer();
1731
- }
1732
- else if (msg.compilerRequestResults) {
1733
- for (let i = compilerRequestResolves.length - 1; i >= 0; i--) {
1734
- const r = compilerRequestResolves[i];
1735
- if (r.path === msg.compilerRequestResults.path) {
1736
- r.resolve(msg.compilerRequestResults);
1737
- compilerRequestResolves.splice(i, 1);
1738
- }
1739
- }
1740
- }
1741
- else if (serverCtx) {
1742
- if (msg.buildResults && !msg.isActivelyBuilding) {
1743
- buildResultsResolves.forEach((r) => r.resolve(msg.buildResults));
1744
- buildResultsResolves.length = 0;
1745
- }
1746
- if (webSocket) {
1747
- webSocket.sendToBrowser(msg);
1748
- }
1749
- }
1750
- }
1751
- }
1752
- catch (e) {
1753
- let stack = null;
1754
- if (e instanceof Error) {
1755
- stack = e.stack;
1756
- }
1757
- sendMsg({
1758
- error: { message: e + '', stack },
1759
- });
1760
- }
1761
- };
1762
- return receiveMessageFromMain;
1763
- }
1764
-
1765
- exports.initServerProcess = initServerProcess;