@oslokommune/punkt-elements 19.18.0 → 19.18.2

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 (290) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/{accordion-Cx-Gh3hc.cjs → accordion-Ea61u8Xj.cjs} +1 -1
  3. package/dist/{accordion-B0zAUNUV.js → accordion-gEzU_AQC.js} +1 -1
  4. package/dist/{alert-JnRrtTOW.js → alert-B3ify6mt.js} +3 -3
  5. package/dist/{alert-BRZDpVMt.cjs → alert-ByQC8-D1.cjs} +1 -1
  6. package/dist/{backlink-CsFeerTH.cjs → backlink-CNRyH73A.cjs} +1 -1
  7. package/dist/{backlink-D8Rv46lA.js → backlink-HF3DMgLc.js} +1 -1
  8. package/dist/{breadcrumbs-D03id_ha.cjs → breadcrumbs-YQ1orAK_.cjs} +1 -1
  9. package/dist/{breadcrumbs-ybOBe_op.js → breadcrumbs-qyZMkJtA.js} +1 -1
  10. package/dist/button-DWXtPiAA.cjs +32 -0
  11. package/dist/{button-ChdHZYBF.js → button-U4r2XSv4.js} +22 -25
  12. package/dist/{calendar-CFTrX0C5.cjs → calendar-4S_k7_KN.cjs} +2 -2
  13. package/dist/{calendar-BQCjUQvP.js → calendar-C8maj_iv.js} +13 -15
  14. package/dist/{card-COseC8ZL.cjs → card-CS0OoVjJ.cjs} +1 -1
  15. package/dist/{card-DSTEL8Kv.js → card-yxsQ563N.js} +3 -3
  16. package/dist/{checkbox-CKYNnLDh.js → checkbox-A5B82H0n.js} +1 -1
  17. package/dist/{checkbox-DkFswqr-.cjs → checkbox-Cj3S0xJE.cjs} +1 -1
  18. package/dist/{checkbox-group-1ghi5uHp.js → checkbox-group-AVOtCLSB.js} +2 -2
  19. package/dist/{checkbox-group-lcxR3cYR.cjs → checkbox-group-BFtLRclu.cjs} +1 -1
  20. package/dist/{combobox-iXYiaWbN.js → combobox-CScZtqsn.js} +6 -6
  21. package/dist/{combobox-CaWnlvTX.cjs → combobox-rmrzvK3U.cjs} +1 -1
  22. package/dist/components/accordion/accordion.d.ts +3 -3
  23. package/dist/components/calendar/calendar.d.ts +1 -2
  24. package/dist/components/datepicker/datepicker-utils.d.ts +9 -3
  25. package/dist/{consent-DiD0iQ5h.js → consent-JoGVWIB7.js} +1 -1
  26. package/dist/{consent-BwH89xk_.cjs → consent-T0-aOOEh.cjs} +1 -1
  27. package/dist/{datepicker-Da8SfyVG.cjs → datepicker-BOi60ruU.cjs} +3 -3
  28. package/dist/{datepicker-DTcow1ih.js → datepicker-C8DQaZa8.js} +134 -137
  29. package/dist/directives/slot-content.d.ts +7 -1
  30. package/dist/element-with-slot-B0Vp_OuR.cjs +1 -0
  31. package/dist/{element-with-slot-C0bH0T0H.js → element-with-slot-Dp2Gzv-Q.js} +113 -108
  32. package/dist/{fileupload-Cb1c7ul0.cjs → fileupload-Dov3DkmR.cjs} +1 -1
  33. package/dist/{fileupload-BNAQ9tNR.js → fileupload-jSc9M2Ok.js} +5 -5
  34. package/dist/{footer-BOwcLSsz.js → footer-BOIVSL59.js} +2 -2
  35. package/dist/{footer-Cl_Da5Iq.cjs → footer-MYZSMtmP.cjs} +1 -1
  36. package/dist/{header-Cwr995oK.js → header-BCpCu0HP.js} +7 -7
  37. package/dist/{header-CvER8wo6.cjs → header-CecwTgso.cjs} +1 -1
  38. package/dist/{header-menu-CsL4DZE2.js → header-menu-BEhnqxnw.js} +2 -2
  39. package/dist/{header-menu-D-wOwG1V.cjs → header-menu-CkZjAxHb.cjs} +1 -1
  40. package/dist/{heading-D4Kkb6-N.cjs → heading--hGRDNX9.cjs} +1 -1
  41. package/dist/{heading-DhTyaJms.js → heading-B1Ey3XzB.js} +1 -1
  42. package/dist/{helptext-DN0jjgVu.js → helptext-BXoDjtNs.js} +2 -2
  43. package/dist/{helptext-p0nwJsyf.cjs → helptext-DPqzGQeD.cjs} +1 -1
  44. package/dist/{icon-CLMJYuTL.js → icon-D3XT49vM.js} +7 -1
  45. package/dist/icon-Dk8y6odR.cjs +1 -0
  46. package/dist/{input-element-BOi7rBbw.cjs → input-element-BhbkMU20.cjs} +1 -1
  47. package/dist/{input-element-0yYtRu0p.js → input-element-JH4qPly5.js} +1 -1
  48. package/dist/{input-wrapper-4PTk8aX3.cjs → input-wrapper-Bekd6DGA.cjs} +1 -1
  49. package/dist/{input-wrapper-BSjQc4Vx.js → input-wrapper-BttEKK9G.js} +4 -4
  50. package/dist/{link-39EvU2ng.js → link-Cb0ufHt0.js} +2 -2
  51. package/dist/{link-Dj6SbcaD.cjs → link-UEoCDWe-.cjs} +1 -1
  52. package/dist/{linkcard-K9vvKg1u.js → linkcard-CD-tRZnz.js} +3 -3
  53. package/dist/{linkcard-BoQIfci8.cjs → linkcard-Dmp8DOyg.cjs} +2 -2
  54. package/dist/{loader-MoI2VRFr.js → loader-B0p9ZrAa.js} +2 -2
  55. package/dist/{loader-BRYL5kTN.cjs → loader-nd4WUR88.cjs} +1 -1
  56. package/dist/{messagebox-Dr-k3pnZ.js → messagebox-B-DU7T5q.js} +2 -2
  57. package/dist/{messagebox-CiOQUt0C.cjs → messagebox-Bx9jEw4V.cjs} +1 -1
  58. package/dist/{modal-DbzEnZNF.js → modal-Cv0uz8iY.js} +2 -2
  59. package/dist/{modal-DGiq84MG.cjs → modal-SFoXzth5.cjs} +1 -1
  60. package/dist/{option-group-element-DC364Rw_.js → option-group-element-16F2MJlO.js} +2 -2
  61. package/dist/{option-group-element-CH0sgVIl.cjs → option-group-element-DHpno4pS.cjs} +1 -1
  62. package/dist/pkt-accordion.cjs +1 -1
  63. package/dist/pkt-accordion.js +1 -1
  64. package/dist/pkt-alert.cjs +1 -1
  65. package/dist/pkt-alert.js +1 -1
  66. package/dist/pkt-backlink.cjs +1 -1
  67. package/dist/pkt-backlink.js +1 -1
  68. package/dist/pkt-breadcrumbs.cjs +1 -1
  69. package/dist/pkt-breadcrumbs.js +1 -1
  70. package/dist/pkt-button.cjs +1 -1
  71. package/dist/pkt-button.js +1 -1
  72. package/dist/pkt-calendar.cjs +1 -1
  73. package/dist/pkt-calendar.js +1 -1
  74. package/dist/pkt-card.cjs +1 -1
  75. package/dist/pkt-card.js +1 -1
  76. package/dist/pkt-checkbox-group.cjs +1 -1
  77. package/dist/pkt-checkbox-group.js +1 -1
  78. package/dist/pkt-checkbox.cjs +1 -1
  79. package/dist/pkt-checkbox.js +1 -1
  80. package/dist/pkt-combobox.cjs +1 -1
  81. package/dist/pkt-combobox.js +1 -1
  82. package/dist/pkt-consent.cjs +1 -1
  83. package/dist/pkt-consent.js +1 -1
  84. package/dist/pkt-datepicker.cjs +1 -1
  85. package/dist/pkt-datepicker.js +1 -1
  86. package/dist/pkt-fileupload.cjs +1 -1
  87. package/dist/pkt-fileupload.js +1 -1
  88. package/dist/pkt-footer.cjs +1 -1
  89. package/dist/pkt-footer.js +1 -1
  90. package/dist/pkt-header-menu.cjs +1 -1
  91. package/dist/pkt-header-menu.js +1 -1
  92. package/dist/pkt-header.cjs +1 -1
  93. package/dist/pkt-header.js +1 -1
  94. package/dist/pkt-heading.cjs +1 -1
  95. package/dist/pkt-heading.js +1 -1
  96. package/dist/pkt-helptext.cjs +1 -1
  97. package/dist/pkt-helptext.js +1 -1
  98. package/dist/pkt-icon.cjs +1 -1
  99. package/dist/pkt-icon.js +1 -1
  100. package/dist/pkt-index.cjs +1 -1
  101. package/dist/pkt-index.js +35 -35
  102. package/dist/pkt-input-wrapper.cjs +1 -1
  103. package/dist/pkt-input-wrapper.js +1 -1
  104. package/dist/pkt-link.cjs +1 -1
  105. package/dist/pkt-link.js +1 -1
  106. package/dist/pkt-linkcard.cjs +1 -1
  107. package/dist/pkt-linkcard.js +1 -1
  108. package/dist/pkt-loader.cjs +1 -1
  109. package/dist/pkt-loader.js +1 -1
  110. package/dist/pkt-messagebox.cjs +1 -1
  111. package/dist/pkt-messagebox.js +1 -1
  112. package/dist/pkt-modal.cjs +1 -1
  113. package/dist/pkt-modal.js +1 -1
  114. package/dist/{pkt-options-controller-D1sKTkbR.cjs → pkt-options-controller-C193xcN4.cjs} +1 -1
  115. package/dist/{pkt-options-controller-BikFfGcZ.js → pkt-options-controller-CH8U6zlw.js} +1 -1
  116. package/dist/pkt-progressbar.cjs +1 -1
  117. package/dist/pkt-progressbar.js +1 -1
  118. package/dist/pkt-radio-group.cjs +1 -1
  119. package/dist/pkt-radio-group.js +1 -1
  120. package/dist/pkt-radiobutton.cjs +1 -1
  121. package/dist/pkt-radiobutton.js +1 -1
  122. package/dist/pkt-searchinput.cjs +1 -1
  123. package/dist/pkt-searchinput.js +1 -1
  124. package/dist/pkt-select.cjs +1 -1
  125. package/dist/pkt-select.js +1 -1
  126. package/dist/pkt-tabs.cjs +1 -1
  127. package/dist/pkt-tabs.js +1 -1
  128. package/dist/pkt-tag.cjs +1 -1
  129. package/dist/pkt-tag.js +1 -1
  130. package/dist/pkt-textarea.cjs +1 -1
  131. package/dist/pkt-textarea.js +1 -1
  132. package/dist/pkt-textinput.cjs +1 -1
  133. package/dist/pkt-textinput.js +1 -1
  134. package/dist/pkt-timepicker.cjs +1 -1
  135. package/dist/pkt-timepicker.js +1 -1
  136. package/dist/{progressbar-t0zgEke0.js → progressbar-CMwFXEMB.js} +1 -1
  137. package/dist/{progressbar-CnX4fFfR.cjs → progressbar-eRJU41Uc.cjs} +1 -1
  138. package/dist/{radio-group-DJikniZi.js → radio-group-CO3dzdOl.js} +2 -2
  139. package/dist/{radio-group-XCYKqoLD.cjs → radio-group-S8Gg4Qaq.cjs} +1 -1
  140. package/dist/{radiobutton-PYQKVnNQ.js → radiobutton-BNsed-4-.js} +1 -1
  141. package/dist/{radiobutton-DgkML7sd.cjs → radiobutton-CYlly_Zk.cjs} +1 -1
  142. package/dist/{searchinput-Mdc9Ihld.cjs → searchinput-CVpPmZAJ.cjs} +1 -1
  143. package/dist/{searchinput-BzYifHBf.js → searchinput-Ca6zFqH5.js} +1 -1
  144. package/dist/{select-D8TC1msV.cjs → select-C74U9Tyl.cjs} +1 -1
  145. package/dist/{select-CorofYxz.js → select-C7r2Y7Bq.js} +4 -4
  146. package/dist/{tabs-B63J6MXb.cjs → tabs-BsVUzKix.cjs} +1 -1
  147. package/dist/{tabs-DDakCTkY.js → tabs-CxG9lgAB.js} +2 -2
  148. package/dist/{tag-6IPe9bwQ.cjs → tag-BfFtiV5e.cjs} +1 -1
  149. package/dist/{tag-BPvGZcKf.js → tag-BswfpmoV.js} +2 -2
  150. package/dist/{textarea-eRNStC90.js → textarea-5aOI1Qkq.js} +4 -4
  151. package/dist/{textarea-CjtqjgpN.cjs → textarea-VObZEvUw.cjs} +1 -1
  152. package/dist/{textinput-D_oEaI41.js → textinput-DABFhf0d.js} +4 -4
  153. package/dist/{textinput-BZPGcxZV.cjs → textinput-Wd1yRQuN.cjs} +1 -1
  154. package/dist/{timepicker-JBOeZg-7.js → timepicker-Bfp365j8.js} +4 -4
  155. package/dist/{timepicker-C0d92R8u.cjs → timepicker-Cc_7siiw.cjs} +1 -1
  156. package/package.json +17 -22
  157. package/src/components/accordion/accordion.ts +3 -3
  158. package/src/components/calendar/calendar.selection.test.ts +40 -0
  159. package/src/components/calendar/calendar.ts +5 -6
  160. package/src/components/consent/consent.test.ts +2 -0
  161. package/src/components/datepicker/datepicker-popup.ts +1 -1
  162. package/src/components/datepicker/datepicker-utils.ts +7 -5
  163. package/src/components/header/types.ts +0 -1
  164. package/src/components/icon/icon.test.ts +21 -0
  165. package/src/components/icon/icon.ts +7 -2
  166. package/src/components/linkcard/linkcard.ts +1 -1
  167. package/dist/base-elements/checkable-native-parity.test.d.ts +0 -0
  168. package/dist/base-elements/form-attribute.test.d.ts +0 -0
  169. package/dist/base-elements/form-disabled.test.d.ts +0 -0
  170. package/dist/base-elements/polyfill-form-value.test.d.ts +0 -0
  171. package/dist/button-Ca_V13cQ.cjs +0 -32
  172. package/dist/components/accordion/accordion.test.d.ts +0 -0
  173. package/dist/components/alert/alert.test.d.ts +0 -14
  174. package/dist/components/backlink/backlink.test.d.ts +0 -10
  175. package/dist/components/breadcrumbs/breadcrumbs.test.d.ts +0 -0
  176. package/dist/components/button/button.test.d.ts +0 -22
  177. package/dist/components/calendar/calendar.accessibility.test.d.ts +0 -16
  178. package/dist/components/calendar/calendar.constraints.test.d.ts +0 -0
  179. package/dist/components/calendar/calendar.core.test.d.ts +0 -0
  180. package/dist/components/calendar/calendar.interaction.test.d.ts +0 -0
  181. package/dist/components/calendar/calendar.selection.test.d.ts +0 -0
  182. package/dist/components/card/card.test.d.ts +0 -22
  183. package/dist/components/checkbox/checkbox.test.d.ts +0 -24
  184. package/dist/components/checkbox-group/checkbox-group.test.d.ts +0 -0
  185. package/dist/components/combobox/combobox.accessibility.test.d.ts +0 -0
  186. package/dist/components/combobox/combobox.attributes.test.d.ts +0 -0
  187. package/dist/components/combobox/combobox.core.test.d.ts +0 -0
  188. package/dist/components/combobox/combobox.interaction.test.d.ts +0 -0
  189. package/dist/components/combobox/combobox.preselection.test.d.ts +0 -0
  190. package/dist/components/combobox/combobox.selection.test.d.ts +0 -0
  191. package/dist/components/consent/consent.test.d.ts +0 -16
  192. package/dist/components/datepicker/date-tags.test.d.ts +0 -12
  193. package/dist/components/datepicker/datepicker-popup.test.d.ts +0 -4
  194. package/dist/components/datepicker/datepicker-utils.test.d.ts +0 -1
  195. package/dist/components/datepicker/datepicker.accessibility.test.d.ts +0 -0
  196. package/dist/components/datepicker/datepicker.core.test.d.ts +0 -0
  197. package/dist/components/datepicker/datepicker.input.test.d.ts +0 -0
  198. package/dist/components/datepicker/datepicker.selection.test.d.ts +0 -0
  199. package/dist/components/datepicker/datepicker.validation.test.d.ts +0 -0
  200. package/dist/components/fileupload/fileupload.test.d.ts +0 -0
  201. package/dist/components/footer/footer.accessibility.test.d.ts +0 -0
  202. package/dist/components/footer/footer.test.d.ts +0 -0
  203. package/dist/components/header/header-global.accessibility.test.d.ts +0 -0
  204. package/dist/components/header/header-global.test.d.ts +0 -0
  205. package/dist/components/header/header-service.accessibility.test.d.ts +0 -0
  206. package/dist/components/header/header-service.test.d.ts +0 -18
  207. package/dist/components/header/header.test.d.ts +0 -0
  208. package/dist/components/header-menu/header-menu.test.d.ts +0 -0
  209. package/dist/components/heading/heading.test.d.ts +0 -0
  210. package/dist/components/helptext/helptext-association.test.d.ts +0 -0
  211. package/dist/components/helptext/helptext.test.d.ts +0 -0
  212. package/dist/components/icon/icon.test.d.ts +0 -12
  213. package/dist/components/input-wrapper/input-wrapper.test.d.ts +0 -32
  214. package/dist/components/input-wrapper/tri-state.test.d.ts +0 -0
  215. package/dist/components/input-wrapper/wrapper-parity.test.d.ts +0 -1
  216. package/dist/components/link/link.test.d.ts +0 -15
  217. package/dist/components/linkcard/linkcard.test.d.ts +0 -9
  218. package/dist/components/listbox/listbox.interaction.test.d.ts +0 -10
  219. package/dist/components/listbox/listbox.test.d.ts +0 -10
  220. package/dist/components/loader/loader.test.d.ts +0 -8
  221. package/dist/components/messagebox/messagebox.test.d.ts +0 -8
  222. package/dist/components/modal/modal.test.d.ts +0 -9
  223. package/dist/components/progressbar/progressbar.test.d.ts +0 -8
  224. package/dist/components/radio-group/radio-group.test.d.ts +0 -0
  225. package/dist/components/radiobutton/radiobutton.test.d.ts +0 -28
  226. package/dist/components/searchinput/searchinput.test.d.ts +0 -0
  227. package/dist/components/select/select.test.d.ts +0 -23
  228. package/dist/components/tabs/tabs.test.d.ts +0 -0
  229. package/dist/components/tag/tag.test.d.ts +0 -8
  230. package/dist/components/textarea/textarea.test.d.ts +0 -29
  231. package/dist/components/textinput/textinput.test.d.ts +0 -33
  232. package/dist/components/timepicker/timepicker.test.d.ts +0 -25
  233. package/dist/directives/slot-content.test.d.ts +0 -0
  234. package/dist/docs/backlink.d.ts +0 -4
  235. package/dist/docs/components/accordion.d.ts +0 -5
  236. package/dist/docs/components/alert.d.ts +0 -9
  237. package/dist/docs/components/backlink.d.ts +0 -4
  238. package/dist/docs/components/breadcrumbs.d.ts +0 -8
  239. package/dist/docs/components/button.d.ts +0 -10
  240. package/dist/docs/components/calendar.d.ts +0 -4
  241. package/dist/docs/components/card.d.ts +0 -27
  242. package/dist/docs/components/checkbox-group.d.ts +0 -13
  243. package/dist/docs/components/checkbox.d.ts +0 -8
  244. package/dist/docs/components/combobox.d.ts +0 -11
  245. package/dist/docs/components/comboboxdemo.d.ts +0 -4
  246. package/dist/docs/components/consent.d.ts +0 -4
  247. package/dist/docs/components/datepicker.d.ts +0 -4
  248. package/dist/docs/components/datepickermultiple.d.ts +0 -4
  249. package/dist/docs/components/event-log.d.ts +0 -20
  250. package/dist/docs/components/fileupload.d.ts +0 -28
  251. package/dist/docs/components/footer.d.ts +0 -9
  252. package/dist/docs/components/form-sizes.d.ts +0 -10
  253. package/dist/docs/components/form.d.ts +0 -9
  254. package/dist/docs/components/header-full.d.ts +0 -36
  255. package/dist/docs/components/header-global-full.d.ts +0 -20
  256. package/dist/docs/components/header-global.d.ts +0 -14
  257. package/dist/docs/components/header-menu.d.ts +0 -8
  258. package/dist/docs/components/header.d.ts +0 -18
  259. package/dist/docs/components/heading.d.ts +0 -12
  260. package/dist/docs/components/icon.d.ts +0 -4
  261. package/dist/docs/components/input-wrapper.d.ts +0 -4
  262. package/dist/docs/components/link.d.ts +0 -4
  263. package/dist/docs/components/linkcard.d.ts +0 -4
  264. package/dist/docs/components/loader.d.ts +0 -10
  265. package/dist/docs/components/messagebox.d.ts +0 -4
  266. package/dist/docs/components/modal.d.ts +0 -24
  267. package/dist/docs/components/progressbar.d.ts +0 -9
  268. package/dist/docs/components/radio-checkbox-sizes.d.ts +0 -10
  269. package/dist/docs/components/radio-group.d.ts +0 -13
  270. package/dist/docs/components/radiobutton.d.ts +0 -12
  271. package/dist/docs/components/searchinput.d.ts +0 -17
  272. package/dist/docs/components/select.d.ts +0 -13
  273. package/dist/docs/components/slot-internals.d.ts +0 -14
  274. package/dist/docs/components/slots.d.ts +0 -37
  275. package/dist/docs/components/switch.d.ts +0 -4
  276. package/dist/docs/components/tabs.d.ts +0 -35
  277. package/dist/docs/components/tag.d.ts +0 -4
  278. package/dist/docs/components/textarea.d.ts +0 -4
  279. package/dist/docs/components/textinput.d.ts +0 -5
  280. package/dist/docs/components/timepicker.d.ts +0 -4
  281. package/dist/docs/components/verifisering.d.ts +0 -15
  282. package/dist/docs/header.d.ts +0 -14
  283. package/dist/docs/punkt-docs.d.ts +0 -15
  284. package/dist/docs/tableOfContents.d.ts +0 -15
  285. package/dist/element-with-slot-DkyaNnm0.cjs +0 -1
  286. package/dist/icon-jPhyZD1z.cjs +0 -1
  287. package/dist/tests/component-registry.d.ts +0 -72
  288. package/dist/tests/option-contexts.d.ts +0 -7
  289. package/dist/tests/strings-override.test.d.ts +0 -0
  290. package/dist/tests/test-framework.d.ts +0 -29
@@ -352,8 +352,14 @@ declare class ForwardSlotsDirective extends AsyncDirective {
352
352
  private mapping;
353
353
  constructor(partInfo: PartInfo);
354
354
  render(_host: LitElement, _slots: ForwardedSlots): unknown;
355
- /** Runs on each host render: connects the host's manager to the child element's manager. */
355
+ /**
356
+ * Runs on each host render: connects the host's manager to the child element's manager. A
357
+ * child that is not defined yet is connected once it is, because a manager created before the
358
+ * upgrade could not follow the child's renders.
359
+ */
356
360
  update(part: ElementPart, [host, slots]: [LitElement, ForwardedSlots]): unknown;
361
+ /** Makes the child element's manager include the host's slots. */
362
+ private connect;
357
363
  disconnected(): void;
358
364
  reconnected(): void;
359
365
  }
@@ -0,0 +1 @@
1
+ const e=require("./element-C6WTyJFE.cjs"),t=require("./async-directive-DpyKp6qv.cjs");function n(e){return e.classList&&(e.classList.contains(`_dialog_overlay`)||e.classList.contains(`backdrop`))?!0:typeof e.hasAttribute==`function`&&e.hasAttribute(`data-skip`)}function r(e){return e.nodeName===`OPTION`||e.nodeName===`DATA`}function i(e){return e.nodeType===Node.TEXT_NODE&&e.nodeValue?.trim()!==``}var a,o=new WeakMap,s=new WeakMap,c=new WeakSet;function l(e){let t=o.get(e);return t||(t=new T(e),o.set(e,t)),t}var u=Symbol(`default`);function d(e){return e===void 0?u:e}function f(e){if(e.nodeType!==Node.ELEMENT_NODE)return u;let t=e.getAttribute(`slot`);return t===null?u:d(t)}function p(e){return Array.isArray(e)?e.map(e=>{let t=e===null?u:e;return[t,t]}):Object.entries(e).map(([e,t])=>[e,t===null?u:t])}function m(e,t){return e.length===t.length&&e.every(([e,n],r)=>t[r][0]===e&&t[r][1]===n)}function h(e){if(e.nodeType===Node.TEXT_NODE)return i(e);if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return!n(t)&&!r(t)}function g(e){return e.nodeType===Node.TEXT_NODE&&!!e.nodeValue&&!i(e)}function _(e,t){if(!h(e))return!1;if(e instanceof HTMLTemplateElement){let n=f(e);for(let r of Array.from(e.content.childNodes))v(t,n,r)}else v(t,f(e),e);return!0}function v(e,t,n){let r=e.get(t);r||(r=[],e.set(t,r)),r.push(n)}function y(e,t,n){Node.prototype.insertBefore.call(e,t,n)}function b(e){e.parentNode&&Node.prototype.removeChild.call(e.parentNode,e)}function x(e){return Object.getOwnPropertyDescriptor(Node.prototype,`nextSibling`).get.call(e)}function S(e,t){return e.node.compareDocumentPosition(t.node)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function C(e){if(e.nodeType!==Node.TEXT_NODE||Object.prototype.hasOwnProperty.call(e,`data`))return;let t=e,n={data:Object.getOwnPropertyDescriptor(CharacterData.prototype,`data`),nodeValue:Object.getOwnPropertyDescriptor(Node.prototype,`nodeValue`)};for(let[e,r]of Object.entries(n))r?.get&&r.set&&Object.defineProperty(t,e,{configurable:!0,get:()=>r.get.call(t),set:e=>{r.set.call(t,e),w(t)}})}function w(e){let t=s.get(e);if(t){i(e)||t.releaseText(e);return}let n=e.parentNode&&o.get(e.parentNode);n&&(i(e)?n.adoptText(e):n.blankTextChanged(e))}var T=class e{constructor(e){this.nodesBySlot=new Map,this.trackedNodes=new Set,this.placeholderToNode=new Map,this.nodeToPlaceholder=new Map,this.mirrorOf=new Map,this.hasWhitespace=!1,this.contentBounds=null,this.changedWhitespace=new Set,this.directives=new Set,this.sources=new Map,this.subscribers=new Set,this.generation=0,this.initialCollectionDone=!1,this.inOwnChange=!1,this.rendering=!1,this.contentEnd=null,this.rootMarker=null,this.observer=null,this.observing=!1,this.wantsObserver=!1,this.followsHostRenders=!1,this.host=e,typeof e.addController==`function`&&(this.followsHostRenders=!0,e.addController({hostConnected:()=>{if(!this.wantsObserver)return;let e=!this.observing;this.startObserving(),e&&this.resync()},hostDisconnected:()=>this.stopObservingIfUnused(),hostUpdate:()=>{e.hasUpdated||this.collectLateChildren(),this.flushMutations(!1),e.hasUpdated||this.insertContentEnd(),this.rendering=!0,queueMicrotask(()=>{this.rendering=!1})},hostUpdated:()=>{this.rendering=!1,!this.rootMarker&&this.contentEnd?.parentNode===e&&(this.rootMarker=x(this.contentEnd)),this.flushMutations(!0)}}))}collectNodes(){if(this.initialCollectionDone)return;this.initialCollectionDone=!0,this.generation++;let e=Array.from(this.host.childNodes);for(let t of e)this.watchHostText(t),_(t,this.nodesBySlot)&&this.track(t);this.syncWhitespace()}collectLateChildren(){if(this.initialCollectionDone){for(let e of Array.from(this.host.childNodes))this.trackedNodes.has(e)||this.placeholderToNode.has(e)||(this.watchHostText(e),h(e)&&(this.addContent(e),this.generation++));this.syncWhitespace()}}addDirective(e){this.directives.add(e),this.startObserving()}removeDirective(e){this.directives.delete(e),this.stopObservingIfUnused()}addSource(e,t,n){let r=this.sources.get(e);r&&r.manager===t&&m(r.mapping,n)||(r&&r.manager!==t&&this.detachFrom(r.manager,e),this.sources.set(e,{manager:t,mapping:n}),t.subscribers.add(this),t.startObserving(),this.handleChange())}removeSource(e){let t=this.sources.get(e);t&&(this.sources.delete(e),this.detachFrom(t.manager,e),this.handleChange())}detachFrom(e,t){[...this.sources.entries()].some(([n,r])=>n!==t&&r.manager===e)||(e.subscribers.delete(this),e.stopObservingIfUnused())}reachableParts(e=new Set){if(e.has(this))return[];e.add(this);let t=[...this.directives];for(let n of this.subscribers)t.push(...n.reachableParts(e));return t}getNodes(e){return this.placementNodes(e).filter(e=>!c.has(e))}placementNodes(e){return this.nodesFor(d(e))}hasContent(e){return this.getNodes(e).length>0}nodesFor(e){let t=this.nodesBySlot.get(e)??[];if(this.sources.size===0)return t;let n=[];for(let{manager:t,mapping:r}of this.sources.values())for(let[i,a]of r)a===e&&n.push(...t.nodesFor(i));return n.length?[...t,...n]:t}ensurePlaceholder(e){if(this.nodeToPlaceholder.has(e))return;if(e.parentNode!==this.host){for(let{manager:t}of this.sources.values())t.ensurePlaceholder(e);return}let t=this.isInTemplate(e)?this.getContentEnd():e;y(this.host,this.createPlaceholder(e),t)}createPlaceholder(t){let n=document.createComment(e.PLACEHOLDER_PREFIX);if(t.nodeType===Node.TEXT_NODE){let e=t;Object.defineProperty(n,"data",{configurable:!0,get:()=>e.data,set:t=>{e.data=t}})}return this.placeholderToNode.set(n,t),this.nodeToPlaceholder.set(t,n),n}forgetPlaceholder(e){let t=this.nodeToPlaceholder.get(e);return t&&(this.placeholderToNode.delete(t),this.nodeToPlaceholder.delete(e)),t}placeholderOf(e){return this.trackedNodes.has(e)?this.nodeToPlaceholder.get(e):void 0}handleNow(e){if(this.rendering)return e();this.flushMutations(!1);let t=e();return this.flushMutations(!1),t}positionInHost(e){if(!e||e.parentNode===this.host)return this.rendering||e&&!this.isInTemplate(e)?e:this.getContentEnd()??e;if(this.trackedNodes.has(e))return this.nodeToPlaceholder.get(e)??e;for(let t=e.previousSibling;t;t=t.previousSibling){let e=this.placeholderOf(t);if(e)return e.nextSibling}for(let t=e.nextSibling;t;t=t.nextSibling){let e=this.placeholderOf(t);if(e)return e}return this.reachableParts().some(t=>t.parentOfPart()===e.parentNode)?this.getContentEnd():e}owns(e){return this.trackedNodes.has(e)}moveDistributed(e,t){let n=this.nodeToPlaceholder.get(e);if(this.rendering||!n||!this.trackedNodes.has(e)||!e.parentNode||e.parentNode===this.host)return!1;this.flushMutations(!1);let r=this.positionInHost(t);if(r===n||r===e)return!0;if(r&&r.parentNode!==this.host)return!1;let i=f(e),a=this.nodesBySlot.get(i);if(!a||!a.includes(e))return!1;let o=null;for(let t=r;t&&!o;t=t.nextSibling){let n=this.placeholderToNode.get(t)??t;if(n!==e&&this.trackedNodes.has(n)){if(n instanceof HTMLTemplateElement)return!1;f(n)===i&&(o=n)}}let s=a[a.length-1]===e?a[a.length-2]:a[a.length-1],c=o??s;return c&&(!c.parentNode||c.parentNode===this.host)?!1:(this.asOwnChange(()=>{y(this.host,n,r),a.splice(a.indexOf(e),1),a.splice(o?a.indexOf(o):a.length,0,e),o?y(o.parentNode,e,o):s&&y(s.parentNode,e,s.nextSibling),this.handleChange()}),!0)}replaceContent(e){if(!this.initialCollectionDone)return!1;let t=e.flatMap(e=>e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.childNodes):[e]);if(t.some(e=>e.contains(this.host)))return!1;this.flushMutations(!1);let n=this.getContentEnd();return n?(this.asOwnChange(()=>{let e=new Set(this.trackedNodes);for(let t of this.nodesBySlot.values())t.forEach(t=>e.add(t));for(let t of e){let e=this.forgetPlaceholder(t);e&&b(e),b(t),this.untrack(t)}for(this.nodesBySlot.clear(),this.mirrorOf.clear(),this.contentBounds=null;n.previousSibling;)b(n.previousSibling);let r=document.createDocumentFragment();r.append(...t),y(this.host,r,n);for(let e of t)this.watchHostText(e),h(e)&&this.addContent(e);this.handleChange()}),!0):!1}adoptText(e){this.initialCollectionDone&&!this.trackedNodes.has(e)&&(e.parentNode!==this.host||this.isInTemplate(e)||(this.flushMutations(!1),this.asOwnChange(()=>{this.dropMirror(e),this.insertInSlotOrder(e),this.track(e),this.handleChange()})))}blankTextChanged(e){let t=this.mirrorOf.get(e);t&&(t.data=e.data,e.data)||this.initialCollectionDone&&(e.parentNode!==this.host||this.isInTemplate(e)||(this.watchHostText(e),this.changedWhitespace.add(e),this.flushMutations(!1),this.asOwnChange(()=>this.handleChange())))}releaseText(e){if(this.flushMutations(!1),!this.trackedNodes.has(e))return;let t=this.nodeToPlaceholder.get(e);(t?t.parentNode===this.host:e.parentNode===this.host)&&this.asOwnChange(()=>{t&&(this.forgetPlaceholder(e),Node.prototype.replaceChild.call(this.host,e,t)),this.removeContent(e),this.watchHostText(e),this.handleChange()})}watchHostText(e){C(e),g(e)&&(this.hasWhitespace=!0,this.changedWhitespace.add(e))}syncWhitespace(){if(!this.hasWhitespace)return;let e=this.findContentBounds(),t=this.contentBounds,n=this.changedWhitespace;if(this.contentBounds=e,this.changedWhitespace=new Set,!e)for(let e of[...this.mirrorOf.keys()])this.dropMirror(e);else{if(this.dropMirrorsOutside(),!t)this.collectBlankBetween(e.firstAt,e.lastAt,n);else{if(t.first!==e.first){let r=this.placeOf(t.first);r&&this.precedes(e.firstAt,r)?this.collectBlankBetween(e.firstAt,r,n):this.collectBlankBeside(e.firstAt,`nextSibling`,n)}if(t.last!==e.last){let r=this.placeOf(t.last);r&&this.precedes(r,e.lastAt)?this.collectBlankBetween(r,e.lastAt,n):this.collectBlankBeside(e.lastAt,`previousSibling`,n)}}for(let t of n)t.parentNode===this.host&&g(t)&&this.isBetween(t,e)?this.addMirror(t):this.dropMirror(t)}}dropMirrorsOutside(){let e=this.nodesBySlot.get(u)??[],t=[],n=e=>{if(c.has(e))t.push(this.nodeToPlaceholder.get(e));else if(this.placeOf(e))return!1;return!0};for(let t=0;t<e.length&&n(e[t]);t++);for(let t=e.length-1;t>=0&&n(e[t]);t--);t.forEach(e=>this.dropMirror(e))}precedes(e,t){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)}collectBlankBeside(e,t,n){for(let r=e[t];r;r=r[t]){if(g(r)){n.add(r);continue}let e=this.placeholderToNode.get(r)??r;if(!c.has(e)&&this.trackedNodes.has(e))return}}findContentBounds(){let e=this.nodesBySlot.get(u)??[],t=e=>c.has(e)?null:this.placeOf(e),n,r=null,i,a=null;for(let i=0;i<e.length&&!r;i++)[n,r]=[e[i],t(e[i])];for(let n=e.length-1;n>=0&&!a;n--)[i,a]=[e[n],t(e[n])];return n&&i&&r&&a?{first:n,last:i,firstAt:r,lastAt:a}:null}placeOf(e){if(!this.trackedNodes.has(e))return null;let t=this.nodeToPlaceholder.get(e)??e;return t.parentNode===this.host?t:null}isBetween(e,{firstAt:t,lastAt:n}){return this.precedes(t,e)&&this.precedes(e,n)}collectBlankBetween(e,t,n){if(e===t)return;let[r,i]=this.precedes(e,t)?[e,t]:[t,e];for(let e=r.nextSibling;e&&e!==i;e=e.nextSibling)g(e)&&n.add(e)}addMirror(e){if(this.mirrorOf.has(e))return;let t=document.createTextNode(e.data);c.add(t),this.mirrorOf.set(e,t),this.placeholderToNode.set(e,t),this.nodeToPlaceholder.set(t,e),this.insertInSlotOrder(t)}dropMirror(e){let t=this.mirrorOf.get(e);t&&(this.mirrorOf.delete(e),this.forgetPlaceholder(t),b(t),this.removeFromSlots(t))}insertContentEnd(){this.contentEnd||(this.contentEnd=document.createComment(``),Object.defineProperty(this.contentEnd,"nextSibling",{configurable:!0,get:()=>null})),this.contentEnd.parentNode!==this.host&&y(this.host,this.contentEnd,null)}getContentEnd(){let e=this.contentEnd;return e?(e.parentNode!==this.host&&this.rootMarker?.parentNode===this.host&&y(this.host,e,this.rootMarker),e.parentNode===this.host?e:null):null}isInTemplate(e){let t=this.getContentEnd();return!t||e.parentNode!==this.host?!1:e===t||!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)}startObserving(){if(this.wantsObserver=!0,this.observing)return;this.observing=!0;let e=()=>{this.observing&&typeof MutationObserver<`u`&&(this.observer=new MutationObserver(e=>{this.handleMutations(e)}),this.observer.observe(this.host,{childList:!0,subtree:!0}))};this.followsHostRenders?e():setTimeout(e,0)}stopObserving(){this.observing&&(this.observing=!1,this.observer?.disconnect(),this.observer=null)}stopObservingIfUnused(){let e=this.directives.size===0&&this.subscribers.size===0;(!this.host.isConnected||e&&!this.followsHostRenders)&&this.stopObserving()}flushMutations(e){if(this.inOwnChange)return;let t=this.observer?.takeRecords();t?.length&&this.handleMutations(t,e)}handleMutations(e,t=!1){this.inOwnChange||this.asOwnChange(()=>this.applyMutations(e,t))}applyMutations(e,t){let n=!1,r=[],i=new Map,a=[];for(let o of e){for(let e of o.removedNodes){let a=this.placeholderToNode.get(e);if(a&&e.parentNode===this.host)t||(this.removeFromSlots(a),this.insertInSlotOrder(a),b(a),c.has(a)&&this.changedWhitespace.add(e),n=!0);else if(a){if(this.placeholderToNode.delete(e),this.nodeToPlaceholder.delete(a),c.has(a)&&this.mirrorOf.delete(e),t)continue;b(a),this.removeContent(a),n=!0}else if(this.trackedNodes.has(e)&&!this.host.contains(e)&&!t){this.removeContent(e);let t=this.forgetPlaceholder(e);if(t&&(r.push(t),o.target!==this.host)){let e=i.get(o.target)??[];e.push(t),i.set(o.target,e)}n=!0}}if(o.target!==this.host)o.addedNodes.length&&a.push(o);else if(!t){for(let e of o.addedNodes)if(!this.placeholderToNode.has(e)){if(this.trackedNodes.has(e)&&e.parentNode===this.host){let t=this.forgetPlaceholder(e);t&&b(t),this.removeFromSlots(e),this.insertInSlotOrder(e),n=!0}else!this.trackedNodes.has(e)&&h(e)?(this.addContent(e),n=!0):(this.watchHostText(e),g(e)&&(n=!0))}}}i.size&&this.adoptNodesInParts(a,i)&&(n=!0);for(let e of r)b(e);this.getContentEnd(),n&&this.handleChange()}adoptNodesInParts(e,t){let n=new Set;for(let r of e)t.has(r.target)&&r.addedNodes.forEach(e=>n.add(e));if(n.size===0)return!1;let r=this.reachableParts(),i=[];for(let e of n){if(!e.parentNode||!t.has(e.parentNode)||s.has(e)||c.has(e)||this.placeholderToNode.has(e))continue;let n=r.find(t=>t.contains(e));if(!n)continue;let a=this.hostPositionFor(e,n,t);a&&i.push({node:e,before:a.before})}if(i.length===0)return!1;let a=!1;for(let{node:e,before:t}of i.sort(S))h(e)&&!(e instanceof HTMLTemplateElement)?(y(this.host,this.createPlaceholder(e),t),this.insertInSlotOrder(e),this.track(e),a=!0):y(this.host,e,t);return a}hostPositionFor(e,t,n){let{startNode:r,endNode:i}=t.bounds();for(let t=e.nextSibling;t&&t!==i;t=t.nextSibling){let e=this.placeholderOf(t);if(e)return{before:e}}for(let t=e.previousSibling;t&&t!==r;t=t.previousSibling){let e=this.placeholderOf(t);if(e)return{before:e.nextSibling}}let a=e.parentNode?n.get(e.parentNode):void 0;return a?{before:a[0]}:null}resync(){this.asOwnChange(()=>{let e=!1;for(let t of[...this.trackedNodes]){let n=this.nodeToPlaceholder.get(t),r=this.host.contains(t);(!r||n&&n.parentNode!==this.host)&&(n&&b(this.forgetPlaceholder(t)),r&&b(t),this.removeContent(t),e=!0)}let t=this.getContentEnd();for(let n=t?this.host.firstChild:null;n&&n!==t;n=n.nextSibling)this.trackedNodes.has(n)||this.placeholderToNode.has(n)||(this.watchHostText(n),h(n)&&(this.addContent(n),e=!0));this.syncWhitespace(),this.sortSlots()&&(e=!0),e&&this.handleChange()})}sortSlots(){let e=!1;for(let t of this.nodesBySlot.values()){if(!t.every(e=>this.nodeToPlaceholder.has(e)))continue;let n=t.map(e=>({node:this.nodeToPlaceholder.get(e),real:e})).sort(S).map(({real:e})=>e);n.every((e,n)=>e===t[n])||(t.splice(0,t.length,...n),n.forEach(b),e=!0)}return e}handleChange(){this.syncWhitespace(),this.generation++,this.notifyDirectives();for(let e of this.subscribers)e.handleChange();this.host.requestUpdate()}notifyDirectives(){for(let e of this.directives)e.handleNodesChanged()}asOwnChange(e){let t=this.inOwnChange;this.inOwnChange=!0;try{e()}finally{t||(this.observer?.takeRecords(),this.inOwnChange=!1)}}addContent(e){e instanceof HTMLTemplateElement?_(e,this.nodesBySlot):this.insertInSlotOrder(e),this.track(e)}removeContent(e){this.untrack(e),this.removeFromSlots(e)}track(e){this.trackedNodes.add(e),s.set(e,this),C(e)}untrack(e){this.trackedNodes.delete(e),s.get(e)===this&&s.delete(e)}insertInSlotOrder(e){let t=f(e),n=this.nodesBySlot.get(t)??[];this.nodesBySlot.set(t,n);let r=this.nodeToPlaceholder.get(e)??e,i=e=>{let t=this.nodeToPlaceholder.get(e)??e;return!!(r.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)},a=n.length;for(;a>0&&i(n[a-1]);)a--;n.splice(a,0,e)}removeFromSlots(e){for(let[t,n]of this.nodesBySlot){let r=n.indexOf(e);if(r!==-1){n.splice(r,1),n.length===0&&this.nodesBySlot.delete(t);return}}}};a=T,a.PLACEHOLDER_PREFIX=`pkt-slot`;var E=class extends t.t{constructor(t){if(super(t),this.manager=null,this.host=null,this.part=null,this.lastGeneration=-1,t.type!==e.m.CHILD)throw Error(`slotContent() can only be used in child expressions`)}render(t,n){return e.g}update(t,[n,r]){return this.part=t,this.host=n,this.slotName=r,this.manager||(this.manager=l(n),this.manager.collectNodes(),this.manager.addDirective(this)),this.placeNodes(),e.g}handleNodesChanged(){this.isConnected&&this.manager&&this.placeNodes()}disconnected(){this.manager?.removeDirective(this),this.manager=null,this.lastGeneration=-1}reconnected(){this.host&&(this.manager=l(this.host),this.manager.addDirective(this),this.placeNodes())}contains(e){let t=this.parentOfPart();return!this.isConnected||!t?!1:this.isInsidePart(e,t,this.coversContainer(t))}bounds(){return{startNode:this.part?.startNode??null,endNode:this.part?.endNode??null}}parentOfPart(){return this.part?this.part.startNode?this.part.startNode.parentNode:this.part.parentNode:null}placeNodes(){if(!this.manager||!this.part)return;let e=this.manager.generation;if(e===this.lastGeneration)return;this.lastGeneration=e;let t=this.parentOfPart();if(!t)return;let n=this.manager.placementNodes(this.slotName),r=this.coversContainer(t),i=this.part.endNode;for(let e=n.length-1;e>=0;e--){let a=n[e];this.isInsidePart(a,t,r)||(this.manager.ensurePlaceholder(a),y(t,a,i)),i=a}}coversContainer(e){let{startNode:t,endNode:n}=this.part;return!n&&(!t||t===e.firstChild)}isInsidePart(e,t,n){if(!this.part||e.parentNode!==t)return!1;if(n)return!0;let{startNode:r,endNode:i}=this.part,a=!r||!!(r.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING),o=!i||!!(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING);return a&&o}},D=e.f(E),O=class extends t.t{constructor(t){if(super(t),this.target=null,this.source=null,this.mapping=[],t.type!==e.m.ELEMENT)throw Error(`forwardSlots() can only be used as an element directive`)}render(t,n){return e.g}update(t,[n,r]){let i=t.element;return typeof i.addController==`function`?this.connect(i,n,r):customElements.whenDefined(i.localName).then(()=>{this.isConnected&&this.connect(i,n,r)}),e.g}connect(e,t,n){let r=l(e);this.target&&this.target!==r&&this.target.removeSource(this),this.target=r,this.source=l(t),this.source.collectNodes(),this.mapping=p(n),this.target.addSource(this,this.source,this.mapping)}disconnected(){this.target?.removeSource(this)}reconnected(){this.target&&this.source&&this.target.addSource(this,this.source,this.mapping)}},k=e.f(O),A=new Map;function j(e){if(A.has(e))return A.get(e);let t,n=HTMLElement.prototype;for(;!t&&n;)t=Object.getOwnPropertyDescriptor(n,e),n=Object.getPrototypeOf(n);return A.set(e,t),t}function M(e,t){return t.some(t=>typeof t!=`string`&&t.contains(e))}var N=class extends e.t{connectedCallback(){l(this).collectNodes(),super.connectedCallback()}hasSlotContent(e){return l(this).hasContent(e)}appendChild(e){let t=l(this);return t.moveDistributed(e,null)?e:t.handleNow(()=>super.insertBefore(e,t.positionInHost(null)))}append(...e){if(M(this,e)){super.append(...e);return}let t=l(this);t.handleNow(()=>{let n=document.createDocumentFragment();n.append(...e),super.insertBefore(n,t.positionInHost(null))})}prepend(...e){l(this).handleNow(()=>super.prepend(...e))}insertBefore(e,t){let n=l(this);return n.moveDistributed(e,t)?e:n.handleNow(()=>super.insertBefore(e,n.positionInHost(t)))}removeChild(e){let t=l(this);return e.parentNode===this||!t.owns(e)?super.removeChild(e):t.handleNow(()=>(e.parentNode?.removeChild(e),e))}replaceChild(e,t){let n=l(this);return t.parentNode===this||!n.owns(t)?super.replaceChild(e,t):n.handleNow(()=>(super.insertBefore(e,n.positionInHost(t)),t.parentNode?.removeChild(t),t))}replaceChildren(...e){let t=e.map(e=>typeof e==`string`?document.createTextNode(e):e);l(this).replaceContent(t)||super.replaceChildren(...e)}get textContent(){return j(`textContent`).get.call(this)}set textContent(e){let t=e==null?``:String(e);l(this).replaceContent(t?[document.createTextNode(t)]:[])||j(`textContent`).set.call(this,e)}get innerHTML(){return j(`innerHTML`).get.call(this)}set innerHTML(e){let t=document.createElement(`template`);t.innerHTML=e,l(this).replaceContent(Array.from(t.content.childNodes))||j(`innerHTML`).set.call(this,e)}get innerText(){let e=j(`innerText`);return e?.get?e.get.call(this):this.textContent}set innerText(e){let t=j(`innerText`);if(!t?.set){this.textContent=e;return}let n=document.createElement(`div`);t.set.call(n,e),l(this).replaceContent(Array.from(n.childNodes))||t.set.call(this,e)}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return N}});
@@ -12,63 +12,63 @@ function s(e) {
12
12
  }
13
13
  //#endregion
14
14
  //#region src/directives/slot-content.ts
15
- var c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakSet();
16
- function d(e) {
17
- let t = c.get(e);
18
- return t || (t = new D(e), c.set(e, t)), t;
19
- }
20
- var f = Symbol("default");
21
- function p(e) {
22
- return e === void 0 ? f : e;
15
+ var c, l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakSet();
16
+ function f(e) {
17
+ let t = l.get(e);
18
+ return t || (t = new O(e), l.set(e, t)), t;
23
19
  }
20
+ var p = Symbol("default");
24
21
  function m(e) {
25
- if (e.nodeType !== Node.ELEMENT_NODE) return f;
26
- let t = e.getAttribute("slot");
27
- return t === null ? f : p(t);
22
+ return e === void 0 ? p : e;
28
23
  }
29
24
  function h(e) {
25
+ if (e.nodeType !== Node.ELEMENT_NODE) return p;
26
+ let t = e.getAttribute("slot");
27
+ return t === null ? p : m(t);
28
+ }
29
+ function g(e) {
30
30
  return Array.isArray(e) ? e.map((e) => {
31
- let t = e === null ? f : e;
31
+ let t = e === null ? p : e;
32
32
  return [t, t];
33
- }) : Object.entries(e).map(([e, t]) => [e, t === null ? f : t]);
33
+ }) : Object.entries(e).map(([e, t]) => [e, t === null ? p : t]);
34
34
  }
35
- function g(e, t) {
35
+ function _(e, t) {
36
36
  return e.length === t.length && e.every(([e, n], r) => t[r][0] === e && t[r][1] === n);
37
37
  }
38
- function _(e) {
38
+ function v(e) {
39
39
  if (e.nodeType === Node.TEXT_NODE) return s(e);
40
40
  if (e.nodeType !== Node.ELEMENT_NODE) return !1;
41
41
  let t = e;
42
42
  return !a(t) && !o(t);
43
43
  }
44
- function v(e) {
44
+ function y(e) {
45
45
  return e.nodeType === Node.TEXT_NODE && !!e.nodeValue && !s(e);
46
46
  }
47
- function y(e, t) {
48
- if (!_(e)) return !1;
47
+ function b(e, t) {
48
+ if (!v(e)) return !1;
49
49
  if (e instanceof HTMLTemplateElement) {
50
- let n = m(e);
51
- for (let r of Array.from(e.content.childNodes)) b(t, n, r);
52
- } else b(t, m(e), e);
50
+ let n = h(e);
51
+ for (let r of Array.from(e.content.childNodes)) x(t, n, r);
52
+ } else x(t, h(e), e);
53
53
  return !0;
54
54
  }
55
- function b(e, t, n) {
55
+ function x(e, t, n) {
56
56
  let r = e.get(t);
57
57
  r || (r = [], e.set(t, r)), r.push(n);
58
58
  }
59
- function x(e, t, n) {
59
+ function S(e, t, n) {
60
60
  Node.prototype.insertBefore.call(e, t, n);
61
61
  }
62
- function S(e) {
62
+ function C(e) {
63
63
  e.parentNode && Node.prototype.removeChild.call(e.parentNode, e);
64
64
  }
65
- function C(e) {
65
+ function w(e) {
66
66
  return Object.getOwnPropertyDescriptor(Node.prototype, "nextSibling").get.call(e);
67
67
  }
68
- function w(e, t) {
68
+ function T(e, t) {
69
69
  return e.node.compareDocumentPosition(t.node) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
70
70
  }
71
- function T(e) {
71
+ function E(e) {
72
72
  if (e.nodeType !== Node.TEXT_NODE || Object.prototype.hasOwnProperty.call(e, "data")) return;
73
73
  let t = e, n = {
74
74
  data: Object.getOwnPropertyDescriptor(CharacterData.prototype, "data"),
@@ -78,23 +78,20 @@ function T(e) {
78
78
  configurable: !0,
79
79
  get: () => r.get.call(t),
80
80
  set: (e) => {
81
- r.set.call(t, e), E(t);
81
+ r.set.call(t, e), D(t);
82
82
  }
83
83
  });
84
84
  }
85
- function E(e) {
86
- let t = l.get(e);
85
+ function D(e) {
86
+ let t = u.get(e);
87
87
  if (t) {
88
88
  s(e) || t.releaseText(e);
89
89
  return;
90
90
  }
91
- let n = e.parentNode && c.get(e.parentNode);
91
+ let n = e.parentNode && l.get(e.parentNode);
92
92
  n && (s(e) ? n.adoptText(e) : n.blankTextChanged(e));
93
93
  }
94
- var D = class e {
95
- static {
96
- this.PLACEHOLDER_PREFIX = "pkt-slot";
97
- }
94
+ var O = class e {
98
95
  constructor(e) {
99
96
  this.nodesBySlot = /* @__PURE__ */ new Map(), this.trackedNodes = /* @__PURE__ */ new Set(), this.placeholderToNode = /* @__PURE__ */ new Map(), this.nodeToPlaceholder = /* @__PURE__ */ new Map(), this.mirrorOf = /* @__PURE__ */ new Map(), this.hasWhitespace = !1, this.contentBounds = null, this.changedWhitespace = /* @__PURE__ */ new Set(), this.directives = /* @__PURE__ */ new Set(), this.sources = /* @__PURE__ */ new Map(), this.subscribers = /* @__PURE__ */ new Set(), this.generation = 0, this.initialCollectionDone = !1, this.inOwnChange = !1, this.rendering = !1, this.contentEnd = null, this.rootMarker = null, this.observer = null, this.observing = !1, this.wantsObserver = !1, this.followsHostRenders = !1, this.host = e, typeof e.addController == "function" && (this.followsHostRenders = !0, e.addController({
100
97
  hostConnected: () => {
@@ -109,7 +106,7 @@ var D = class e {
109
106
  });
110
107
  },
111
108
  hostUpdated: () => {
112
- this.rendering = !1, !this.rootMarker && this.contentEnd?.parentNode === e && (this.rootMarker = C(this.contentEnd)), this.flushMutations(!0);
109
+ this.rendering = !1, !this.rootMarker && this.contentEnd?.parentNode === e && (this.rootMarker = w(this.contentEnd)), this.flushMutations(!0);
113
110
  }
114
111
  }));
115
112
  }
@@ -117,12 +114,12 @@ var D = class e {
117
114
  if (this.initialCollectionDone) return;
118
115
  this.initialCollectionDone = !0, this.generation++;
119
116
  let e = Array.from(this.host.childNodes);
120
- for (let t of e) this.watchHostText(t), y(t, this.nodesBySlot) && this.track(t);
117
+ for (let t of e) this.watchHostText(t), b(t, this.nodesBySlot) && this.track(t);
121
118
  this.syncWhitespace();
122
119
  }
123
120
  collectLateChildren() {
124
121
  if (this.initialCollectionDone) {
125
- for (let e of Array.from(this.host.childNodes)) this.trackedNodes.has(e) || this.placeholderToNode.has(e) || (this.watchHostText(e), _(e) && (this.addContent(e), this.generation++));
122
+ for (let e of Array.from(this.host.childNodes)) this.trackedNodes.has(e) || this.placeholderToNode.has(e) || (this.watchHostText(e), v(e) && (this.addContent(e), this.generation++));
126
123
  this.syncWhitespace();
127
124
  }
128
125
  }
@@ -134,7 +131,7 @@ var D = class e {
134
131
  }
135
132
  addSource(e, t, n) {
136
133
  let r = this.sources.get(e);
137
- r && r.manager === t && g(r.mapping, n) || (r && r.manager !== t && this.detachFrom(r.manager, e), this.sources.set(e, {
134
+ r && r.manager === t && _(r.mapping, n) || (r && r.manager !== t && this.detachFrom(r.manager, e), this.sources.set(e, {
138
135
  manager: t,
139
136
  mapping: n
140
137
  }), t.subscribers.add(this), t.startObserving(), this.handleChange());
@@ -154,10 +151,10 @@ var D = class e {
154
151
  return t;
155
152
  }
156
153
  getNodes(e) {
157
- return this.placementNodes(e).filter((e) => !u.has(e));
154
+ return this.placementNodes(e).filter((e) => !d.has(e));
158
155
  }
159
156
  placementNodes(e) {
160
- return this.nodesFor(p(e));
157
+ return this.nodesFor(m(e));
161
158
  }
162
159
  hasContent(e) {
163
160
  return this.getNodes(e).length > 0;
@@ -176,7 +173,7 @@ var D = class e {
176
173
  return;
177
174
  }
178
175
  let t = this.isInTemplate(e) ? this.getContentEnd() : e;
179
- x(this.host, this.createPlaceholder(e), t);
176
+ S(this.host, this.createPlaceholder(e), t);
180
177
  }
181
178
  createPlaceholder(t) {
182
179
  let n = document.createComment(e.PLACEHOLDER_PREFIX);
@@ -228,19 +225,19 @@ var D = class e {
228
225
  let r = this.positionInHost(t);
229
226
  if (r === n || r === e) return !0;
230
227
  if (r && r.parentNode !== this.host) return !1;
231
- let i = m(e), a = this.nodesBySlot.get(i);
228
+ let i = h(e), a = this.nodesBySlot.get(i);
232
229
  if (!a || !a.includes(e)) return !1;
233
230
  let o = null;
234
231
  for (let t = r; t && !o; t = t.nextSibling) {
235
232
  let n = this.placeholderToNode.get(t) ?? t;
236
233
  if (n !== e && this.trackedNodes.has(n)) {
237
234
  if (n instanceof HTMLTemplateElement) return !1;
238
- m(n) === i && (o = n);
235
+ h(n) === i && (o = n);
239
236
  }
240
237
  }
241
238
  let s = a[a.length - 1] === e ? a[a.length - 2] : a[a.length - 1], c = o ?? s;
242
239
  return c && (!c.parentNode || c.parentNode === this.host) ? !1 : (this.asOwnChange(() => {
243
- x(this.host, n, r), a.splice(a.indexOf(e), 1), a.splice(o ? a.indexOf(o) : a.length, 0, e), o ? x(o.parentNode, e, o) : s && x(s.parentNode, e, s.nextSibling), this.handleChange();
240
+ S(this.host, n, r), a.splice(a.indexOf(e), 1), a.splice(o ? a.indexOf(o) : a.length, 0, e), o ? S(o.parentNode, e, o) : s && S(s.parentNode, e, s.nextSibling), this.handleChange();
244
241
  }), !0);
245
242
  }
246
243
  replaceContent(e) {
@@ -254,12 +251,12 @@ var D = class e {
254
251
  for (let t of this.nodesBySlot.values()) t.forEach((t) => e.add(t));
255
252
  for (let t of e) {
256
253
  let e = this.forgetPlaceholder(t);
257
- e && S(e), S(t), this.untrack(t);
254
+ e && C(e), C(t), this.untrack(t);
258
255
  }
259
- for (this.nodesBySlot.clear(), this.mirrorOf.clear(), this.contentBounds = null; n.previousSibling;) S(n.previousSibling);
256
+ for (this.nodesBySlot.clear(), this.mirrorOf.clear(), this.contentBounds = null; n.previousSibling;) C(n.previousSibling);
260
257
  let r = document.createDocumentFragment();
261
- r.append(...t), x(this.host, r, n);
262
- for (let e of t) this.watchHostText(e), _(e) && this.addContent(e);
258
+ r.append(...t), S(this.host, r, n);
259
+ for (let e of t) this.watchHostText(e), v(e) && this.addContent(e);
263
260
  this.handleChange();
264
261
  }), !0) : !1;
265
262
  }
@@ -280,7 +277,7 @@ var D = class e {
280
277
  });
281
278
  }
282
279
  watchHostText(e) {
283
- T(e), v(e) && (this.hasWhitespace = !0, this.changedWhitespace.add(e));
280
+ E(e), y(e) && (this.hasWhitespace = !0, this.changedWhitespace.add(e));
284
281
  }
285
282
  syncWhitespace() {
286
283
  if (!this.hasWhitespace) return;
@@ -298,12 +295,12 @@ var D = class e {
298
295
  r && this.precedes(r, e.lastAt) ? this.collectBlankBetween(r, e.lastAt, n) : this.collectBlankBeside(e.lastAt, "previousSibling", n);
299
296
  }
300
297
  }
301
- for (let t of n) t.parentNode === this.host && v(t) && this.isBetween(t, e) ? this.addMirror(t) : this.dropMirror(t);
298
+ for (let t of n) t.parentNode === this.host && y(t) && this.isBetween(t, e) ? this.addMirror(t) : this.dropMirror(t);
302
299
  }
303
300
  }
304
301
  dropMirrorsOutside() {
305
- let e = this.nodesBySlot.get(f) ?? [], t = [], n = (e) => {
306
- if (u.has(e)) t.push(this.nodeToPlaceholder.get(e));
302
+ let e = this.nodesBySlot.get(p) ?? [], t = [], n = (e) => {
303
+ if (d.has(e)) t.push(this.nodeToPlaceholder.get(e));
307
304
  else if (this.placeOf(e)) return !1;
308
305
  return !0;
309
306
  };
@@ -316,16 +313,16 @@ var D = class e {
316
313
  }
317
314
  collectBlankBeside(e, t, n) {
318
315
  for (let r = e[t]; r; r = r[t]) {
319
- if (v(r)) {
316
+ if (y(r)) {
320
317
  n.add(r);
321
318
  continue;
322
319
  }
323
320
  let e = this.placeholderToNode.get(r) ?? r;
324
- if (!u.has(e) && this.trackedNodes.has(e)) return;
321
+ if (!d.has(e) && this.trackedNodes.has(e)) return;
325
322
  }
326
323
  }
327
324
  findContentBounds() {
328
- let e = this.nodesBySlot.get(f) ?? [], t = (e) => u.has(e) ? null : this.placeOf(e), n, r = null, i, a = null;
325
+ let e = this.nodesBySlot.get(p) ?? [], t = (e) => d.has(e) ? null : this.placeOf(e), n, r = null, i, a = null;
329
326
  for (let i = 0; i < e.length && !r; i++) [n, r] = [e[i], t(e[i])];
330
327
  for (let n = e.length - 1; n >= 0 && !a; n--) [i, a] = [e[n], t(e[n])];
331
328
  return n && i && r && a ? {
@@ -346,26 +343,26 @@ var D = class e {
346
343
  collectBlankBetween(e, t, n) {
347
344
  if (e === t) return;
348
345
  let [r, i] = this.precedes(e, t) ? [e, t] : [t, e];
349
- for (let e = r.nextSibling; e && e !== i; e = e.nextSibling) v(e) && n.add(e);
346
+ for (let e = r.nextSibling; e && e !== i; e = e.nextSibling) y(e) && n.add(e);
350
347
  }
351
348
  addMirror(e) {
352
349
  if (this.mirrorOf.has(e)) return;
353
350
  let t = document.createTextNode(e.data);
354
- u.add(t), this.mirrorOf.set(e, t), this.placeholderToNode.set(e, t), this.nodeToPlaceholder.set(t, e), this.insertInSlotOrder(t);
351
+ d.add(t), this.mirrorOf.set(e, t), this.placeholderToNode.set(e, t), this.nodeToPlaceholder.set(t, e), this.insertInSlotOrder(t);
355
352
  }
356
353
  dropMirror(e) {
357
354
  let t = this.mirrorOf.get(e);
358
- t && (this.mirrorOf.delete(e), this.forgetPlaceholder(t), S(t), this.removeFromSlots(t));
355
+ t && (this.mirrorOf.delete(e), this.forgetPlaceholder(t), C(t), this.removeFromSlots(t));
359
356
  }
360
357
  insertContentEnd() {
361
358
  this.contentEnd || (this.contentEnd = document.createComment(""), Object.defineProperty(this.contentEnd, "nextSibling", {
362
359
  configurable: !0,
363
360
  get: () => null
364
- })), this.contentEnd.parentNode !== this.host && x(this.host, this.contentEnd, null);
361
+ })), this.contentEnd.parentNode !== this.host && S(this.host, this.contentEnd, null);
365
362
  }
366
363
  getContentEnd() {
367
364
  let e = this.contentEnd;
368
- return e ? (e.parentNode !== this.host && this.rootMarker?.parentNode === this.host && x(this.host, e, this.rootMarker), e.parentNode === this.host ? e : null) : null;
365
+ return e ? (e.parentNode !== this.host && this.rootMarker?.parentNode === this.host && S(this.host, e, this.rootMarker), e.parentNode === this.host ? e : null) : null;
369
366
  }
370
367
  isInTemplate(e) {
371
368
  let t = this.getContentEnd();
@@ -404,10 +401,10 @@ var D = class e {
404
401
  for (let o of e) {
405
402
  for (let e of o.removedNodes) {
406
403
  let a = this.placeholderToNode.get(e);
407
- if (a && e.parentNode === this.host) t || (this.removeFromSlots(a), this.insertInSlotOrder(a), S(a), u.has(a) && this.changedWhitespace.add(e), n = !0);
404
+ if (a && e.parentNode === this.host) t || (this.removeFromSlots(a), this.insertInSlotOrder(a), C(a), d.has(a) && this.changedWhitespace.add(e), n = !0);
408
405
  else if (a) {
409
- if (this.placeholderToNode.delete(e), this.nodeToPlaceholder.delete(a), u.has(a) && this.mirrorOf.delete(e), t) continue;
410
- S(a), this.removeContent(a), n = !0;
406
+ if (this.placeholderToNode.delete(e), this.nodeToPlaceholder.delete(a), d.has(a) && this.mirrorOf.delete(e), t) continue;
407
+ C(a), this.removeContent(a), n = !0;
411
408
  } else if (this.trackedNodes.has(e) && !this.host.contains(e) && !t) {
412
409
  this.removeContent(e);
413
410
  let t = this.forgetPlaceholder(e);
@@ -423,13 +420,13 @@ var D = class e {
423
420
  for (let e of o.addedNodes) if (!this.placeholderToNode.has(e)) {
424
421
  if (this.trackedNodes.has(e) && e.parentNode === this.host) {
425
422
  let t = this.forgetPlaceholder(e);
426
- t && S(t), this.removeFromSlots(e), this.insertInSlotOrder(e), n = !0;
427
- } else !this.trackedNodes.has(e) && _(e) ? (this.addContent(e), n = !0) : (this.watchHostText(e), v(e) && (n = !0));
423
+ t && C(t), this.removeFromSlots(e), this.insertInSlotOrder(e), n = !0;
424
+ } else !this.trackedNodes.has(e) && v(e) ? (this.addContent(e), n = !0) : (this.watchHostText(e), y(e) && (n = !0));
428
425
  }
429
426
  }
430
427
  }
431
428
  i.size && this.adoptNodesInParts(a, i) && (n = !0);
432
- for (let e of r) S(e);
429
+ for (let e of r) C(e);
433
430
  this.getContentEnd(), n && this.handleChange();
434
431
  }
435
432
  adoptNodesInParts(e, t) {
@@ -438,7 +435,7 @@ var D = class e {
438
435
  if (n.size === 0) return !1;
439
436
  let r = this.reachableParts(), i = [];
440
437
  for (let e of n) {
441
- if (!e.parentNode || !t.has(e.parentNode) || l.has(e) || u.has(e) || this.placeholderToNode.has(e)) continue;
438
+ if (!e.parentNode || !t.has(e.parentNode) || u.has(e) || d.has(e) || this.placeholderToNode.has(e)) continue;
442
439
  let n = r.find((t) => t.contains(e));
443
440
  if (!n) continue;
444
441
  let a = this.hostPositionFor(e, n, t);
@@ -449,7 +446,7 @@ var D = class e {
449
446
  }
450
447
  if (i.length === 0) return !1;
451
448
  let a = !1;
452
- for (let { node: e, before: t } of i.sort(w)) _(e) && !(e instanceof HTMLTemplateElement) ? (x(this.host, this.createPlaceholder(e), t), this.insertInSlotOrder(e), this.track(e), a = !0) : x(this.host, e, t);
449
+ for (let { node: e, before: t } of i.sort(T)) v(e) && !(e instanceof HTMLTemplateElement) ? (S(this.host, this.createPlaceholder(e), t), this.insertInSlotOrder(e), this.track(e), a = !0) : S(this.host, e, t);
453
450
  return a;
454
451
  }
455
452
  hostPositionFor(e, t, n) {
@@ -470,10 +467,10 @@ var D = class e {
470
467
  let e = !1;
471
468
  for (let t of [...this.trackedNodes]) {
472
469
  let n = this.nodeToPlaceholder.get(t), r = this.host.contains(t);
473
- (!r || n && n.parentNode !== this.host) && (n && S(this.forgetPlaceholder(t)), r && S(t), this.removeContent(t), e = !0);
470
+ (!r || n && n.parentNode !== this.host) && (n && C(this.forgetPlaceholder(t)), r && C(t), this.removeContent(t), e = !0);
474
471
  }
475
472
  let t = this.getContentEnd();
476
- for (let n = t ? this.host.firstChild : null; n && n !== t; n = n.nextSibling) this.trackedNodes.has(n) || this.placeholderToNode.has(n) || (this.watchHostText(n), _(n) && (this.addContent(n), e = !0));
473
+ for (let n = t ? this.host.firstChild : null; n && n !== t; n = n.nextSibling) this.trackedNodes.has(n) || this.placeholderToNode.has(n) || (this.watchHostText(n), v(n) && (this.addContent(n), e = !0));
477
474
  this.syncWhitespace(), this.sortSlots() && (e = !0), e && this.handleChange();
478
475
  });
479
476
  }
@@ -484,8 +481,8 @@ var D = class e {
484
481
  let n = t.map((e) => ({
485
482
  node: this.nodeToPlaceholder.get(e),
486
483
  real: e
487
- })).sort(w).map(({ real: e }) => e);
488
- n.every((e, n) => e === t[n]) || (t.splice(0, t.length, ...n), n.forEach(S), e = !0);
484
+ })).sort(T).map(({ real: e }) => e);
485
+ n.every((e, n) => e === t[n]) || (t.splice(0, t.length, ...n), n.forEach(C), e = !0);
489
486
  }
490
487
  return e;
491
488
  }
@@ -507,19 +504,19 @@ var D = class e {
507
504
  }
508
505
  }
509
506
  addContent(e) {
510
- e instanceof HTMLTemplateElement ? y(e, this.nodesBySlot) : this.insertInSlotOrder(e), this.track(e);
507
+ e instanceof HTMLTemplateElement ? b(e, this.nodesBySlot) : this.insertInSlotOrder(e), this.track(e);
511
508
  }
512
509
  removeContent(e) {
513
510
  this.untrack(e), this.removeFromSlots(e);
514
511
  }
515
512
  track(e) {
516
- this.trackedNodes.add(e), l.set(e, this), T(e);
513
+ this.trackedNodes.add(e), u.set(e, this), E(e);
517
514
  }
518
515
  untrack(e) {
519
- this.trackedNodes.delete(e), l.get(e) === this && l.delete(e);
516
+ this.trackedNodes.delete(e), u.get(e) === this && u.delete(e);
520
517
  }
521
518
  insertInSlotOrder(e) {
522
- let t = m(e), n = this.nodesBySlot.get(t) ?? [];
519
+ let t = h(e), n = this.nodesBySlot.get(t) ?? [];
523
520
  this.nodesBySlot.set(t, n);
524
521
  let r = this.nodeToPlaceholder.get(e) ?? e, i = (e) => {
525
522
  let t = this.nodeToPlaceholder.get(e) ?? e;
@@ -537,7 +534,9 @@ var D = class e {
537
534
  }
538
535
  }
539
536
  }
540
- }, O = e(class extends i {
537
+ };
538
+ c = O, c.PLACEHOLDER_PREFIX = "pkt-slot";
539
+ var k = e(class extends i {
541
540
  constructor(e) {
542
541
  if (super(e), this.manager = null, this.host = null, this.part = null, this.lastGeneration = -1, e.type !== n.CHILD) throw Error("slotContent() can only be used in child expressions");
543
542
  }
@@ -545,7 +544,7 @@ var D = class e {
545
544
  return t;
546
545
  }
547
546
  update(e, [n, r]) {
548
- return this.part = e, this.host = n, this.slotName = r, this.manager || (this.manager = d(n), this.manager.collectNodes(), this.manager.addDirective(this)), this.placeNodes(), t;
547
+ return this.part = e, this.host = n, this.slotName = r, this.manager || (this.manager = f(n), this.manager.collectNodes(), this.manager.addDirective(this)), this.placeNodes(), t;
549
548
  }
550
549
  handleNodesChanged() {
551
550
  this.isConnected && this.manager && this.placeNodes();
@@ -554,7 +553,7 @@ var D = class e {
554
553
  this.manager?.removeDirective(this), this.manager = null, this.lastGeneration = -1;
555
554
  }
556
555
  reconnected() {
557
- this.host && (this.manager = d(this.host), this.manager.addDirective(this), this.placeNodes());
556
+ this.host && (this.manager = f(this.host), this.manager.addDirective(this), this.placeNodes());
558
557
  }
559
558
  contains(e) {
560
559
  let t = this.parentOfPart();
@@ -579,7 +578,7 @@ var D = class e {
579
578
  let n = this.manager.placementNodes(this.slotName), r = this.coversContainer(t), i = this.part.endNode;
580
579
  for (let e = n.length - 1; e >= 0; e--) {
581
580
  let a = n[e];
582
- this.isInsidePart(a, t, r) || (this.manager.ensurePlaceholder(a), x(t, a, i)), i = a;
581
+ this.isInsidePart(a, t, r) || (this.manager.ensurePlaceholder(a), S(t, a, i)), i = a;
583
582
  }
584
583
  }
585
584
  coversContainer(e) {
@@ -592,7 +591,7 @@ var D = class e {
592
591
  let { startNode: r, endNode: i } = this.part, a = !r || !!(r.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING), o = !i || !!(e.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_FOLLOWING);
593
592
  return a && o;
594
593
  }
595
- }), k = e(class extends i {
594
+ }), A = e(class extends i {
596
595
  constructor(e) {
597
596
  if (super(e), this.target = null, this.source = null, this.mapping = [], e.type !== n.ELEMENT) throw Error("forwardSlots() can only be used as an element directive");
598
597
  }
@@ -600,8 +599,14 @@ var D = class e {
600
599
  return t;
601
600
  }
602
601
  update(e, [n, r]) {
603
- let i = d(e.element);
604
- return this.target && this.target !== i && this.target.removeSource(this), this.target = i, this.source = d(n), this.source.collectNodes(), this.mapping = h(r), this.target.addSource(this, this.source, this.mapping), t;
602
+ let i = e.element;
603
+ return typeof i.addController == "function" ? this.connect(i, n, r) : customElements.whenDefined(i.localName).then(() => {
604
+ this.isConnected && this.connect(i, n, r);
605
+ }), t;
606
+ }
607
+ connect(e, t, n) {
608
+ let r = f(e);
609
+ this.target && this.target !== r && this.target.removeSource(this), this.target = r, this.source = f(t), this.source.collectNodes(), this.mapping = g(n), this.target.addSource(this, this.source, this.mapping);
605
610
  }
606
611
  disconnected() {
607
612
  this.target?.removeSource(this);
@@ -609,84 +614,84 @@ var D = class e {
609
614
  reconnected() {
610
615
  this.target && this.source && this.target.addSource(this, this.source, this.mapping);
611
616
  }
612
- }), A = /* @__PURE__ */ new Map();
613
- function j(e) {
614
- if (A.has(e)) return A.get(e);
617
+ }), j = /* @__PURE__ */ new Map();
618
+ function M(e) {
619
+ if (j.has(e)) return j.get(e);
615
620
  let t, n = HTMLElement.prototype;
616
621
  for (; !t && n;) t = Object.getOwnPropertyDescriptor(n, e), n = Object.getPrototypeOf(n);
617
- return A.set(e, t), t;
622
+ return j.set(e, t), t;
618
623
  }
619
- function M(e, t) {
624
+ function N(e, t) {
620
625
  return t.some((t) => typeof t != "string" && t.contains(e));
621
626
  }
622
- var N = class extends r {
627
+ var P = class extends r {
623
628
  connectedCallback() {
624
- d(this).collectNodes(), super.connectedCallback();
629
+ f(this).collectNodes(), super.connectedCallback();
625
630
  }
626
631
  hasSlotContent(e) {
627
- return d(this).hasContent(e);
632
+ return f(this).hasContent(e);
628
633
  }
629
634
  appendChild(e) {
630
- let t = d(this);
635
+ let t = f(this);
631
636
  return t.moveDistributed(e, null) ? e : t.handleNow(() => super.insertBefore(e, t.positionInHost(null)));
632
637
  }
633
638
  append(...e) {
634
- if (M(this, e)) {
639
+ if (N(this, e)) {
635
640
  super.append(...e);
636
641
  return;
637
642
  }
638
- let t = d(this);
643
+ let t = f(this);
639
644
  t.handleNow(() => {
640
645
  let n = document.createDocumentFragment();
641
646
  n.append(...e), super.insertBefore(n, t.positionInHost(null));
642
647
  });
643
648
  }
644
649
  prepend(...e) {
645
- d(this).handleNow(() => super.prepend(...e));
650
+ f(this).handleNow(() => super.prepend(...e));
646
651
  }
647
652
  insertBefore(e, t) {
648
- let n = d(this);
653
+ let n = f(this);
649
654
  return n.moveDistributed(e, t) ? e : n.handleNow(() => super.insertBefore(e, n.positionInHost(t)));
650
655
  }
651
656
  removeChild(e) {
652
- let t = d(this);
657
+ let t = f(this);
653
658
  return e.parentNode === this || !t.owns(e) ? super.removeChild(e) : t.handleNow(() => (e.parentNode?.removeChild(e), e));
654
659
  }
655
660
  replaceChild(e, t) {
656
- let n = d(this);
661
+ let n = f(this);
657
662
  return t.parentNode === this || !n.owns(t) ? super.replaceChild(e, t) : n.handleNow(() => (super.insertBefore(e, n.positionInHost(t)), t.parentNode?.removeChild(t), t));
658
663
  }
659
664
  replaceChildren(...e) {
660
665
  let t = e.map((e) => typeof e == "string" ? document.createTextNode(e) : e);
661
- d(this).replaceContent(t) || super.replaceChildren(...e);
666
+ f(this).replaceContent(t) || super.replaceChildren(...e);
662
667
  }
663
668
  get textContent() {
664
- return j("textContent").get.call(this);
669
+ return M("textContent").get.call(this);
665
670
  }
666
671
  set textContent(e) {
667
672
  let t = e == null ? "" : String(e);
668
- d(this).replaceContent(t ? [document.createTextNode(t)] : []) || j("textContent").set.call(this, e);
673
+ f(this).replaceContent(t ? [document.createTextNode(t)] : []) || M("textContent").set.call(this, e);
669
674
  }
670
675
  get innerHTML() {
671
- return j("innerHTML").get.call(this);
676
+ return M("innerHTML").get.call(this);
672
677
  }
673
678
  set innerHTML(e) {
674
679
  let t = document.createElement("template");
675
- t.innerHTML = e, d(this).replaceContent(Array.from(t.content.childNodes)) || j("innerHTML").set.call(this, e);
680
+ t.innerHTML = e, f(this).replaceContent(Array.from(t.content.childNodes)) || M("innerHTML").set.call(this, e);
676
681
  }
677
682
  get innerText() {
678
- let e = j("innerText");
683
+ let e = M("innerText");
679
684
  return e?.get ? e.get.call(this) : this.textContent;
680
685
  }
681
686
  set innerText(e) {
682
- let t = j("innerText");
687
+ let t = M("innerText");
683
688
  if (!t?.set) {
684
689
  this.textContent = e;
685
690
  return;
686
691
  }
687
692
  let n = document.createElement("div");
688
- t.set.call(n, e), d(this).replaceContent(Array.from(n.childNodes)) || t.set.call(this, e);
693
+ t.set.call(n, e), f(this).replaceContent(Array.from(n.childNodes)) || t.set.call(this, e);
689
694
  }
690
695
  };
691
696
  //#endregion
692
- export { o as a, O as i, k as n, d as r, N as t };
697
+ export { o as a, k as i, A as n, f as r, P as t };