@mhmo91/schmancy 0.10.19 → 0.10.21

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 (371) hide show
  1. package/custom-elements.json +0 -62
  2. package/dist/agent/{overlay.confirm-body-D3jQyXgA.js → overlay.confirm-body-DXus8d-w.js} +1 -1
  3. package/dist/agent/{overlay.confirm-body-D3jQyXgA.js.map → overlay.confirm-body-DXus8d-w.js.map} +1 -1
  4. package/dist/agent/schmancy.agent.js +2043 -2083
  5. package/dist/agent/schmancy.agent.js.map +1 -1
  6. package/dist/agent/schmancy.manifest.json +1 -48
  7. package/dist/area-Cbkt0NX4.cjs +21 -0
  8. package/dist/area-Cbkt0NX4.cjs.map +1 -0
  9. package/dist/{area-BIipuSyO.js → area-Ddk7P5wD.js} +101 -131
  10. package/dist/area-Ddk7P5wD.js.map +1 -0
  11. package/dist/area.cjs +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-B8CE5vGw.cjs → autocomplete-CfBFDSc3.cjs} +1 -1
  14. package/dist/{autocomplete-B8CE5vGw.cjs.map → autocomplete-CfBFDSc3.cjs.map} +1 -1
  15. package/dist/{autocomplete-Mrb3koUN.js → autocomplete-Ds3Q2cwR.js} +2 -2
  16. package/dist/{autocomplete-Mrb3koUN.js.map → autocomplete-Ds3Q2cwR.js.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/avatar.cjs +1 -1
  20. package/dist/avatar.js +1 -1
  21. package/dist/badge.cjs +1 -1
  22. package/dist/badge.js +1 -1
  23. package/dist/{boat-CNWIQPA1.js → boat-BF5P6p_f.js} +1 -1
  24. package/dist/{boat-CNWIQPA1.js.map → boat-BF5P6p_f.js.map} +1 -1
  25. package/dist/{boat-OatK_MGh.cjs → boat-BPN8HLzZ.cjs} +1 -1
  26. package/dist/{boat-OatK_MGh.cjs.map → boat-BPN8HLzZ.cjs.map} +1 -1
  27. package/dist/boat.cjs +1 -1
  28. package/dist/boat.js +1 -1
  29. package/dist/breadcrumb.cjs +1 -1
  30. package/dist/breadcrumb.js +1 -1
  31. package/dist/{busy-Cetzws-m.js → busy-BuACDJy6.js} +1 -1
  32. package/dist/{busy-Cetzws-m.js.map → busy-BuACDJy6.js.map} +1 -1
  33. package/dist/{busy-CMKX4oQf.cjs → busy-C7ejPa-Q.cjs} +1 -1
  34. package/dist/{busy-CMKX4oQf.cjs.map → busy-C7ejPa-Q.cjs.map} +1 -1
  35. package/dist/busy.cjs +1 -1
  36. package/dist/busy.js +1 -1
  37. package/dist/button.cjs +15 -9
  38. package/dist/button.cjs.map +1 -1
  39. package/dist/button.js +15 -9
  40. package/dist/button.js.map +1 -1
  41. package/dist/{card-8VXoo2C_.cjs → card-BIzaLuEg.cjs} +1 -1
  42. package/dist/{card-8VXoo2C_.cjs.map → card-BIzaLuEg.cjs.map} +1 -1
  43. package/dist/{card-D2k3dRL0.js → card-CgQwXO8L.js} +1 -1
  44. package/dist/{card-D2k3dRL0.js.map → card-CgQwXO8L.js.map} +1 -1
  45. package/dist/card.cjs +1 -1
  46. package/dist/card.js +1 -1
  47. package/dist/{checkbox-Cq5wzeaY.cjs → checkbox-BAqE3sTx.cjs} +1 -1
  48. package/dist/{checkbox-Cq5wzeaY.cjs.map → checkbox-BAqE3sTx.cjs.map} +1 -1
  49. package/dist/{checkbox-8hNsBejz.js → checkbox-BNdg57Om.js} +1 -1
  50. package/dist/{checkbox-8hNsBejz.js.map → checkbox-BNdg57Om.js.map} +1 -1
  51. package/dist/checkbox.cjs +1 -1
  52. package/dist/checkbox.js +1 -1
  53. package/dist/{chips-Dx_WvOGk.cjs → chips-DS3y4Lbn.cjs} +2 -4
  54. package/dist/chips-DS3y4Lbn.cjs.map +1 -0
  55. package/dist/{chips-D1kJrbzo.js → chips-DnqLaOb1.js} +3 -5
  56. package/dist/chips-DnqLaOb1.js.map +1 -0
  57. package/dist/chips.cjs +1 -1
  58. package/dist/chips.js +2 -2
  59. package/dist/connectivity.cjs +1 -1
  60. package/dist/connectivity.js +1 -1
  61. package/dist/content-drawer.cjs +1 -1
  62. package/dist/content-drawer.js +1 -1
  63. package/dist/{date-range-H903Vt_r.cjs → date-range-CsJfjbmi.cjs} +1 -1
  64. package/dist/{date-range-H903Vt_r.cjs.map → date-range-CsJfjbmi.cjs.map} +1 -1
  65. package/dist/{date-range-Dv-DM6mB.js → date-range-aPSmSBhk.js} +2 -2
  66. package/dist/{date-range-Dv-DM6mB.js.map → date-range-aPSmSBhk.js.map} +1 -1
  67. package/dist/{date-range-inline-Bvs2ZvEY.cjs → date-range-inline-CAa0_4EI.cjs} +1 -1
  68. package/dist/{date-range-inline-Bvs2ZvEY.cjs.map → date-range-inline-CAa0_4EI.cjs.map} +1 -1
  69. package/dist/{date-range-inline-TWWnTZlw.js → date-range-inline-PeRt1iIF.js} +1 -1
  70. package/dist/{date-range-inline-TWWnTZlw.js.map → date-range-inline-PeRt1iIF.js.map} +1 -1
  71. package/dist/date-range-inline.cjs +1 -1
  72. package/dist/date-range-inline.js +1 -1
  73. package/dist/date-range.cjs +1 -1
  74. package/dist/date-range.js +1 -1
  75. package/dist/delay.cjs +1 -1
  76. package/dist/delay.js +1 -1
  77. package/dist/{details-CwSDur6j.cjs → details-BnXbDpt7.cjs} +2 -2
  78. package/dist/details-BnXbDpt7.cjs.map +1 -0
  79. package/dist/{details-Cpg8sH2F.js → details-BpFjVclg.js} +2 -2
  80. package/dist/details-BpFjVclg.js.map +1 -0
  81. package/dist/details.cjs +1 -1
  82. package/dist/details.js +1 -1
  83. package/dist/directives.cjs +3 -3
  84. package/dist/directives.cjs.map +1 -1
  85. package/dist/directives.js +290 -203
  86. package/dist/directives.js.map +1 -1
  87. package/dist/{divider-BNdVLE0H.cjs → divider-B84lt1A3.cjs} +1 -1
  88. package/dist/{divider-BNdVLE0H.cjs.map → divider-B84lt1A3.cjs.map} +1 -1
  89. package/dist/{divider-Be833gGZ.js → divider-D8cBBkdG.js} +1 -1
  90. package/dist/{divider-Be833gGZ.js.map → divider-D8cBBkdG.js.map} +1 -1
  91. package/dist/divider.cjs +1 -1
  92. package/dist/divider.js +1 -1
  93. package/dist/dropdown.cjs +1 -1
  94. package/dist/dropdown.js +1 -1
  95. package/dist/{expand-CtoffNNj.js → expand-BJiKggfg.js} +2 -2
  96. package/dist/{expand-CtoffNNj.js.map → expand-BJiKggfg.js.map} +1 -1
  97. package/dist/{expand-BP6RLzHw.cjs → expand-DK-O37-j.cjs} +1 -1
  98. package/dist/{expand-BP6RLzHw.cjs.map → expand-DK-O37-j.cjs.map} +1 -1
  99. package/dist/expand.cjs +1 -1
  100. package/dist/expand.js +1 -1
  101. package/dist/{float-KmbhaQHA.js → float-B4FDN40h.js} +1 -1
  102. package/dist/{float-KmbhaQHA.js.map → float-B4FDN40h.js.map} +1 -1
  103. package/dist/{float-CfbQM_2v.cjs → float-RWR6Q1Hh.cjs} +1 -1
  104. package/dist/{float-CfbQM_2v.cjs.map → float-RWR6Q1Hh.cjs.map} +1 -1
  105. package/dist/float.cjs +1 -1
  106. package/dist/float.js +1 -1
  107. package/dist/{form-8IcmP8uV.js → form-Bz5WamuM.js} +8 -8
  108. package/dist/{form-8IcmP8uV.js.map → form-Bz5WamuM.js.map} +1 -1
  109. package/dist/{form-CuBIrKOA.cjs → form-PioZDvzA.cjs} +1 -1
  110. package/dist/{form-CuBIrKOA.cjs.map → form-PioZDvzA.cjs.map} +1 -1
  111. package/dist/form.cjs +1 -1
  112. package/dist/form.js +6 -6
  113. package/dist/handover/agent-runtime-followups.md +1 -1
  114. package/dist/handover/agent-runtime-v1.md +3 -3
  115. package/dist/{icons-D7df1ysG.js → icons-BgUbHwy8.js} +1 -1
  116. package/dist/{icons-D7df1ysG.js.map → icons-BgUbHwy8.js.map} +1 -1
  117. package/dist/{icons-BJld4JHp.cjs → icons-morK4hHz.cjs} +1 -1
  118. package/dist/{icons-BJld4JHp.cjs.map → icons-morK4hHz.cjs.map} +1 -1
  119. package/dist/icons.cjs +1 -1
  120. package/dist/icons.js +1 -1
  121. package/dist/{iframe-GT6D8l5Z.cjs → iframe-BXe1TPx1.cjs} +1 -1
  122. package/dist/{iframe-GT6D8l5Z.cjs.map → iframe-BXe1TPx1.cjs.map} +1 -1
  123. package/dist/{iframe-DAbgW9tT.js → iframe-CByrVlZy.js} +1 -1
  124. package/dist/{iframe-DAbgW9tT.js.map → iframe-CByrVlZy.js.map} +1 -1
  125. package/dist/iframe.cjs +1 -1
  126. package/dist/iframe.js +1 -1
  127. package/dist/index.cjs +1 -1
  128. package/dist/index.js +55 -56
  129. package/dist/{input-BE9wEEw4.cjs → input-BY9OCQWr.cjs} +1 -1
  130. package/dist/{input-BE9wEEw4.cjs.map → input-BY9OCQWr.cjs.map} +1 -1
  131. package/dist/{input-DC6ap_uN.js → input-Q0fm34Co.js} +2 -2
  132. package/dist/{input-DC6ap_uN.js.map → input-Q0fm34Co.js.map} +1 -1
  133. package/dist/{input-chip-MsiMu-b5.cjs → input-chip-BwNf3GD0.cjs} +1 -1
  134. package/dist/{input-chip-MsiMu-b5.cjs.map → input-chip-BwNf3GD0.cjs.map} +1 -1
  135. package/dist/{input-chip-c5n547tg.js → input-chip-CytUirVS.js} +1 -1
  136. package/dist/{input-chip-c5n547tg.js.map → input-chip-CytUirVS.js.map} +1 -1
  137. package/dist/input.cjs +1 -1
  138. package/dist/input.js +1 -1
  139. package/dist/json.cjs +1 -1
  140. package/dist/json.js +2 -2
  141. package/dist/kbd.cjs +1 -1
  142. package/dist/kbd.js +1 -1
  143. package/dist/layout.cjs +26 -1
  144. package/dist/layout.cjs.map +1 -0
  145. package/dist/layout.js +115 -2
  146. package/dist/layout.js.map +1 -0
  147. package/dist/{lightbox-CNX9Eg3U.js → lightbox-Ckvn5YNF.js} +1 -1
  148. package/dist/{lightbox-CNX9Eg3U.js.map → lightbox-Ckvn5YNF.js.map} +1 -1
  149. package/dist/{lightbox-HqJBBjAT.cjs → lightbox-p2E0oVR0.cjs} +1 -1
  150. package/dist/{lightbox-HqJBBjAT.cjs.map → lightbox-p2E0oVR0.cjs.map} +1 -1
  151. package/dist/lightbox.cjs +1 -1
  152. package/dist/lightbox.js +1 -1
  153. package/dist/{list-C76Pb-c1.js → list-CsrPVvmm.js} +1 -1
  154. package/dist/{list-C76Pb-c1.js.map → list-CsrPVvmm.js.map} +1 -1
  155. package/dist/{list-bhyuQSyO.cjs → list-r57UFHu3.cjs} +1 -1
  156. package/dist/{list-bhyuQSyO.cjs.map → list-r57UFHu3.cjs.map} +1 -1
  157. package/dist/list.cjs +1 -1
  158. package/dist/list.js +1 -1
  159. package/dist/{menu-BqKQ-s0C.cjs → menu-BOZ2iwed.cjs} +1 -1
  160. package/dist/{menu-BqKQ-s0C.cjs.map → menu-BOZ2iwed.cjs.map} +1 -1
  161. package/dist/{menu-C5ksITpG.js → menu-CxE16xur.js} +2 -2
  162. package/dist/{menu-C5ksITpG.js.map → menu-CxE16xur.js.map} +1 -1
  163. package/dist/menu.cjs +1 -1
  164. package/dist/menu.js +1 -1
  165. package/dist/mixins-DTCHPEd4.cjs +254 -0
  166. package/dist/{mixins-Du9HMrIG.cjs.map → mixins-DTCHPEd4.cjs.map} +1 -1
  167. package/dist/mixins-pU53qf6R.js +636 -0
  168. package/dist/{mixins-DCVXqL1Q.js.map → mixins-pU53qf6R.js.map} +1 -1
  169. package/dist/mixins.cjs +1 -1
  170. package/dist/mixins.js +1 -1
  171. package/dist/nav-drawer.cjs +1 -1
  172. package/dist/nav-drawer.js +1 -1
  173. package/dist/navigation-bar.cjs +1 -1
  174. package/dist/navigation-bar.js +1 -1
  175. package/dist/navigation-rail.cjs +1 -1
  176. package/dist/navigation-rail.js +1 -1
  177. package/dist/{notification-DR3gvWt8.cjs → notification-58tkVys8.cjs} +1 -1
  178. package/dist/{notification-DR3gvWt8.cjs.map → notification-58tkVys8.cjs.map} +1 -1
  179. package/dist/{notification-eZxtr3NN.js → notification-CgTBiAdf.js} +2 -2
  180. package/dist/{notification-eZxtr3NN.js.map → notification-CgTBiAdf.js.map} +1 -1
  181. package/dist/notification.cjs +1 -1
  182. package/dist/notification.js +1 -1
  183. package/dist/{option-BDOKUqTy.cjs → option-61YE3gub.cjs} +1 -1
  184. package/dist/{option-BDOKUqTy.cjs.map → option-61YE3gub.cjs.map} +1 -1
  185. package/dist/{option-CBEHYG4U.js → option-Bicf6xpI.js} +1 -1
  186. package/dist/{option-CBEHYG4U.js.map → option-Bicf6xpI.js.map} +1 -1
  187. package/dist/option.cjs +1 -1
  188. package/dist/option.js +1 -1
  189. package/dist/{overlay-DG6EeyKt.cjs → overlay-B3gKPWhu.cjs} +2 -2
  190. package/dist/overlay-B3gKPWhu.cjs.map +1 -0
  191. package/dist/{overlay-oxM9OLXP.js → overlay-D3mdWOLS.js} +12 -11
  192. package/dist/overlay-D3mdWOLS.js.map +1 -0
  193. package/dist/overlay.cjs +1 -1
  194. package/dist/{overlay.confirm-body-D_P2e7l6.js → overlay.confirm-body-Czi6cMZq.js} +1 -1
  195. package/dist/{overlay.confirm-body-D_P2e7l6.js.map → overlay.confirm-body-Czi6cMZq.js.map} +1 -1
  196. package/dist/{overlay.confirm-body-78e1WrN9.cjs → overlay.confirm-body-yr0HzS_d.cjs} +1 -1
  197. package/dist/{overlay.confirm-body-78e1WrN9.cjs.map → overlay.confirm-body-yr0HzS_d.cjs.map} +1 -1
  198. package/dist/overlay.js +3 -3
  199. package/dist/{overlay.service-C8NwO4Bx.js → overlay.service-BfZf3xoD.js} +2 -2
  200. package/dist/{overlay.service-C8NwO4Bx.js.map → overlay.service-BfZf3xoD.js.map} +1 -1
  201. package/dist/{overlay.service-DQkGPUY7.cjs → overlay.service-DNs3AWqp.cjs} +1 -1
  202. package/dist/{overlay.service-DQkGPUY7.cjs.map → overlay.service-DNs3AWqp.cjs.map} +1 -1
  203. package/dist/{progress-CMSst_2U.cjs → progress-D8XZJVl5.cjs} +1 -1
  204. package/dist/{progress-CMSst_2U.cjs.map → progress-D8XZJVl5.cjs.map} +1 -1
  205. package/dist/{progress-C4kDZfb7.js → progress-Zqx-S9NZ.js} +1 -1
  206. package/dist/{progress-C4kDZfb7.js.map → progress-Zqx-S9NZ.js.map} +1 -1
  207. package/dist/progress.cjs +1 -1
  208. package/dist/progress.js +1 -1
  209. package/dist/radio-group-D9MU1Mxz.js +71 -0
  210. package/dist/radio-group-D9MU1Mxz.js.map +1 -0
  211. package/dist/radio-group-bl8K4Gls.cjs +19 -0
  212. package/dist/radio-group-bl8K4Gls.cjs.map +1 -0
  213. package/dist/radio-group.cjs +1 -1
  214. package/dist/radio-group.js +1 -1
  215. package/dist/range.cjs +1 -1
  216. package/dist/range.js +1 -1
  217. package/dist/{rxjs-utils-Cs6XGwF6.js.map → rxjs-utils-BK8VMe3K.js.map} +1 -1
  218. package/dist/{rxjs-utils-Dsj75cJy.cjs.map → rxjs-utils-DhOKenkS.cjs.map} +1 -1
  219. package/dist/rxjs-utils.cjs +1 -1
  220. package/dist/rxjs-utils.js +1 -1
  221. package/dist/{select-UU2pB67h.js → select-CMwkl-D6.js} +3 -3
  222. package/dist/select-CMwkl-D6.js.map +1 -0
  223. package/dist/select-COIfVtZl.cjs +56 -0
  224. package/dist/select-COIfVtZl.cjs.map +1 -0
  225. package/dist/select.cjs +1 -1
  226. package/dist/select.js +1 -1
  227. package/dist/skeleton.cjs +1 -1
  228. package/dist/skeleton.js +1 -1
  229. package/dist/skills/SKILL.md +18 -2
  230. package/dist/skills/area.md +13 -0
  231. package/dist/skills/overlay.md +13 -0
  232. package/dist/skills/page.md +71 -29
  233. package/dist/skills/schmancy/SKILL.md +18 -2
  234. package/dist/skills/schmancy/area.md +13 -0
  235. package/dist/skills/schmancy/overlay.md +13 -0
  236. package/dist/skills/schmancy/page.md +71 -29
  237. package/dist/slider.cjs +1 -1
  238. package/dist/slider.js +1 -1
  239. package/dist/{splash-screen-BvaDkvJU.cjs → splash-screen-2hxq8Sft.cjs} +1 -1
  240. package/dist/{splash-screen-BvaDkvJU.cjs.map → splash-screen-2hxq8Sft.cjs.map} +1 -1
  241. package/dist/{splash-screen-ChMkAPLU.js → splash-screen-xrMNpzkm.js} +1 -1
  242. package/dist/{splash-screen-ChMkAPLU.js.map → splash-screen-xrMNpzkm.js.map} +1 -1
  243. package/dist/splash-screen.cjs +1 -1
  244. package/dist/splash-screen.js +1 -1
  245. package/dist/{src-DnunCC4X.js → src-CHd-U-w4.js} +34 -35
  246. package/dist/{src-DnunCC4X.js.map → src-CHd-U-w4.js.map} +1 -1
  247. package/dist/{src-BIlD63Cz.cjs → src-ggWtvpDr.cjs} +1 -1
  248. package/dist/{src-BIlD63Cz.cjs.map → src-ggWtvpDr.cjs.map} +1 -1
  249. package/dist/steps.cjs +1 -1
  250. package/dist/steps.js +1 -1
  251. package/dist/{surface-DCRy-EyT.js → surface-3nnvlxeE.js} +1 -1
  252. package/dist/{surface-DCRy-EyT.js.map → surface-3nnvlxeE.js.map} +1 -1
  253. package/dist/{surface-DWwQDX9r.cjs → surface-BkQ44Wuo.cjs} +1 -1
  254. package/dist/{surface-DWwQDX9r.cjs.map → surface-BkQ44Wuo.cjs.map} +1 -1
  255. package/dist/surface.cjs +1 -1
  256. package/dist/surface.js +1 -1
  257. package/dist/switch.cjs +1 -1
  258. package/dist/switch.js +1 -1
  259. package/dist/table.cjs +1 -1
  260. package/dist/table.js +1 -1
  261. package/dist/{tabs-CkDNLbiS.js → tabs-CnLIe8nE.js} +1 -1
  262. package/dist/{tabs-CkDNLbiS.js.map → tabs-CnLIe8nE.js.map} +1 -1
  263. package/dist/{tabs-lxQHWEb7.cjs → tabs-Dql0rcqZ.cjs} +1 -1
  264. package/dist/{tabs-lxQHWEb7.cjs.map → tabs-Dql0rcqZ.cjs.map} +1 -1
  265. package/dist/tabs.cjs +1 -1
  266. package/dist/tabs.js +1 -1
  267. package/dist/teleport.cjs +1 -1
  268. package/dist/teleport.js +1 -1
  269. package/dist/{textarea-DkfGmRSI.js → textarea-BAogS_Ff.js} +1 -1
  270. package/dist/{textarea-DkfGmRSI.js.map → textarea-BAogS_Ff.js.map} +1 -1
  271. package/dist/{textarea-CNa4dSvF.cjs → textarea-CGD6lAEe.cjs} +1 -1
  272. package/dist/{textarea-CNa4dSvF.cjs.map → textarea-CGD6lAEe.cjs.map} +1 -1
  273. package/dist/textarea.cjs +1 -1
  274. package/dist/textarea.js +1 -1
  275. package/dist/{theme-CNWRYdfn.js → theme-CUK0HrS3.js} +1 -1
  276. package/dist/{theme-CNWRYdfn.js.map → theme-CUK0HrS3.js.map} +1 -1
  277. package/dist/{theme-CMyXTDht.cjs → theme-DKrrQ-ic.cjs} +1 -1
  278. package/dist/{theme-CMyXTDht.cjs.map → theme-DKrrQ-ic.cjs.map} +1 -1
  279. package/dist/{theme-button-CixloLin.js → theme-button-Bb8qW2IH.js} +1 -1
  280. package/dist/{theme-button-CixloLin.js.map → theme-button-Bb8qW2IH.js.map} +1 -1
  281. package/dist/{theme-button-kMhsX5Oe.cjs → theme-button-CmTwFm3l.cjs} +1 -1
  282. package/dist/{theme-button-kMhsX5Oe.cjs.map → theme-button-CmTwFm3l.cjs.map} +1 -1
  283. package/dist/theme-button.cjs +1 -1
  284. package/dist/theme-button.js +1 -1
  285. package/dist/theme.cjs +1 -1
  286. package/dist/theme.js +2 -2
  287. package/dist/tree.cjs +1 -1
  288. package/dist/tree.js +1 -1
  289. package/dist/typography.cjs +1 -1
  290. package/dist/typography.js +1 -1
  291. package/dist/{utils-DXE5fBBd.js.map → utils-Cxg0Kfy5.js.map} +1 -1
  292. package/dist/{utils-C-Q8ePtG.cjs.map → utils-aCJYAGUr.cjs.map} +1 -1
  293. package/dist/utils.cjs +1 -1
  294. package/dist/utils.js +1 -1
  295. package/dist/visually-hidden.cjs +1 -1
  296. package/dist/visually-hidden.js +1 -1
  297. package/dist/{window-qaGFMn_4.cjs → window-BbWlaPZv.cjs} +1 -1
  298. package/dist/{window-qaGFMn_4.cjs.map → window-BbWlaPZv.cjs.map} +1 -1
  299. package/dist/{window-BcvDNi9D.js → window-DuDAQa6y.js} +1 -1
  300. package/dist/{window-BcvDNi9D.js.map → window-DuDAQa6y.js.map} +1 -1
  301. package/dist/window.cjs +1 -1
  302. package/dist/window.js +1 -1
  303. package/package.json +1 -1
  304. package/skills/schmancy/SKILL.md +18 -2
  305. package/skills/schmancy/area.md +13 -0
  306. package/skills/schmancy/overlay.md +13 -0
  307. package/skills/schmancy/page.md +71 -29
  308. package/src/CLAUDE.md +20 -0
  309. package/src/area/area.component.ts +168 -343
  310. package/src/button/button.ts +8 -5
  311. package/src/button/icon-button.ts +8 -5
  312. package/src/chips/filter-chip.ts +1 -3
  313. package/src/details/details.ts +1 -1
  314. package/src/directives/fill.ts +137 -0
  315. package/src/directives/index.ts +2 -0
  316. package/src/directives/overflow-within.ts +186 -0
  317. package/src/form/fields/radio-group/radio-button.ts +22 -44
  318. package/src/form/fields/radio-group/radio-group.ts +20 -75
  319. package/src/form/fields/select/select.ts +3 -2
  320. package/src/index.ts +0 -1
  321. package/src/overlay/index.ts +1 -0
  322. package/src/overlay/overlay.component.ts +38 -39
  323. package/src/overlay/overlay.positioning.ts +10 -2
  324. package/src/overlay/overlay.types.ts +10 -3
  325. package/src/state/schmancy-state.html +897 -0
  326. package/src/state/schmancy-state.md +981 -0
  327. package/types/src/area/area.component.d.ts +0 -15
  328. package/types/src/button/icon-button.d.ts +1 -1
  329. package/types/src/directives/fill.d.ts +46 -0
  330. package/types/src/directives/index.d.ts +2 -0
  331. package/types/src/directives/overflow-within.d.ts +77 -0
  332. package/types/src/form/fields/radio-group/radio-button.d.ts +2 -5
  333. package/types/src/form/fields/radio-group/radio-group.d.ts +2 -10
  334. package/types/src/index.d.ts +0 -1
  335. package/types/src/overlay/index.d.ts +1 -1
  336. package/types/src/overlay/overlay.positioning.d.ts +9 -1
  337. package/types/src/overlay/overlay.types.d.ts +9 -3
  338. package/dist/area-BIipuSyO.js.map +0 -1
  339. package/dist/area-C-EMiNEE.cjs +0 -12
  340. package/dist/area-C-EMiNEE.cjs.map +0 -1
  341. package/dist/chips-D1kJrbzo.js.map +0 -1
  342. package/dist/chips-Dx_WvOGk.cjs.map +0 -1
  343. package/dist/details-Cpg8sH2F.js.map +0 -1
  344. package/dist/details-CwSDur6j.cjs.map +0 -1
  345. package/dist/mixins-DCVXqL1Q.js +0 -636
  346. package/dist/mixins-Du9HMrIG.cjs +0 -254
  347. package/dist/overlay-DG6EeyKt.cjs.map +0 -1
  348. package/dist/overlay-oxM9OLXP.js.map +0 -1
  349. package/dist/page.cjs +0 -20
  350. package/dist/page.cjs.map +0 -1
  351. package/dist/page.js +0 -74
  352. package/dist/page.js.map +0 -1
  353. package/dist/radio-group-DB9D2ZkA.js +0 -108
  354. package/dist/radio-group-DB9D2ZkA.js.map +0 -1
  355. package/dist/radio-group-dVUvYFq7.cjs +0 -40
  356. package/dist/radio-group-dVUvYFq7.cjs.map +0 -1
  357. package/dist/scroll-C1klVgSQ.js +0 -115
  358. package/dist/scroll-C1klVgSQ.js.map +0 -1
  359. package/dist/scroll-S-bXF2u6.cjs +0 -26
  360. package/dist/scroll-S-bXF2u6.cjs.map +0 -1
  361. package/dist/select-UU2pB67h.js.map +0 -1
  362. package/dist/select-fu_-rZyn.cjs +0 -56
  363. package/dist/select-fu_-rZyn.cjs.map +0 -1
  364. package/src/page/index.ts +0 -1
  365. package/src/page/page.ts +0 -137
  366. package/types/src/page/index.d.ts +0 -1
  367. package/types/src/page/page.d.ts +0 -37
  368. /package/dist/{rxjs-utils-Cs6XGwF6.js → rxjs-utils-BK8VMe3K.js} +0 -0
  369. /package/dist/{rxjs-utils-Dsj75cJy.cjs → rxjs-utils-DhOKenkS.cjs} +0 -0
  370. /package/dist/{utils-DXE5fBBd.js → utils-Cxg0Kfy5.js} +0 -0
  371. /package/dist/{utils-C-Q8ePtG.cjs → utils-aCJYAGUr.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-inline-TWWnTZlw.js","names":[],"sources":["../src/date-range-inline/date-range-inline.ts"],"sourcesContent":["import { html } from 'lit'\r\nimport { customElement, property, state } from 'lit/decorators.js'\r\nimport { SchmancyFormField } from '@mixins/index'\r\n\r\ndeclare global {\r\n\tinterface HTMLElementTagNameMap {\r\n\t\t'schmancy-date-range-inline': SchmancyDateRangeInline\r\n\t}\r\n}\r\n\r\nexport type SchmancyDateRangeInlineChangeEvent = CustomEvent<{\r\n\tdateFrom: string\r\n\tdateTo: string\r\n\tisValid: boolean\r\n}>\r\n\r\n/**\r\n * Smart inline date range picker that handles all the heavy lifting.\r\n * Auto-corrects invalid ranges, provides smart defaults, and validates dates.\r\n */\r\n@customElement('schmancy-date-range-inline')\r\nexport default class SchmancyDateRangeInline extends SchmancyFormField() {\r\n\t/**\r\n\t * Input type - 'date' or 'datetime-local'\r\n\t */\r\n\t@property({ type: String })\r\n\ttype: 'date' | 'datetime-local' = 'date'\r\n\r\n\t/**\r\n\t * From date configuration\r\n\t */\r\n\t@property({ type: Object })\r\n\tdateFrom: { label: string; value: string } = { label: 'From', value: '' }\r\n\r\n\t/**\r\n\t * To date configuration\r\n\t */\r\n\t@property({ type: Object })\r\n\tdateTo: { label: string; value: string } = { label: 'To', value: '' }\r\n\r\n\t/**\r\n\t * Minimum allowed date\r\n\t */\r\n\t@property({ type: String })\r\n\tminDate?: string\r\n\r\n\t/**\r\n\t * Maximum allowed date\r\n\t */\r\n\t@property({ type: String })\r\n\tmaxDate?: string\r\n\r\n\t/**\r\n\t * Compact mode for smaller UI\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tcompact = false\r\n\r\n\t/**\r\n\t * Auto-correct invalid date ranges\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tautoCorrect = true\r\n\r\n\t/**\r\n\t * Minimum gap between dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tminGap = 0\r\n\r\n\t/**\r\n\t * Maximum gap between dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tmaxGap?: number\r\n\r\n\t/**\r\n\t * Default gap when auto-setting dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tdefaultGap = 1\r\n\r\n\t/**\r\n\t * Whether to allow same date selection\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tallowSameDate = false\r\n\r\n\t/**\r\n\t * Internal validation state\r\n\t */\r\n\t@state()\r\n\tprivate validationState = {\r\n\t\tdateFromError: '',\r\n\t\tdateToError: '',\r\n\t\trangeError: ''\r\n\t}\r\n\r\n\tconnectedCallback() {\r\n\t\tsuper.connectedCallback()\r\n\t\t// Initialize with smart defaults if no values provided\r\n\t\tif (!this.dateFrom.value && !this.dateTo.value) {\r\n\t\t\tthis.setSmartDefaults()\r\n\t\t} else {\r\n\t\t\t// Validate initial values\r\n\t\t\tthis.validateAndCorrect()\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set smart default dates based on context\r\n\t */\r\n\tprivate setSmartDefaults() {\r\n\t\tconst today = new Date()\r\n\t\tconst tomorrow = new Date(today)\r\n\t\ttomorrow.setDate(tomorrow.getDate() + this.defaultGap)\r\n\r\n\t\tconst format = this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'\r\n\t\t\r\n\t\tthis.dateFrom = {\r\n\t\t\t...this.dateFrom,\r\n\t\t\tvalue: this.formatDate(today, format)\r\n\t\t}\r\n\t\t\r\n\t\tthis.dateTo = {\r\n\t\t\t...this.dateTo,\r\n\t\t\tvalue: this.formatDate(tomorrow, format)\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Format date to required string format\r\n\t */\r\n\tprivate formatDate(date: Date, format: string): string {\r\n\t\tconst year = date.getFullYear()\r\n\t\tconst month = String(date.getMonth() + 1).padStart(2, '0')\r\n\t\tconst day = String(date.getDate()).padStart(2, '0')\r\n\t\t\r\n\t\tif (format === 'YYYY-MM-DD') {\r\n\t\t\treturn `${year}-${month}-${day}`\r\n\t\t} else {\r\n\t\t\tconst hours = String(date.getHours()).padStart(2, '0')\r\n\t\t\tconst minutes = String(date.getMinutes()).padStart(2, '0')\r\n\t\t\treturn `${year}-${month}-${day}T${hours}:${minutes}`\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Parse date string to Date object\r\n\t */\r\n\tprivate parseDate(dateStr: string): Date | null {\r\n\t\tif (!dateStr) return null\r\n\t\tconst date = new Date(dateStr)\r\n\t\treturn isNaN(date.getTime()) ? null : date\r\n\t}\r\n\r\n\t/**\r\n\t * Calculate days between two dates\r\n\t */\r\n\tprivate getDaysBetween(date1: Date, date2: Date): number {\r\n\t\tconst msPerDay = 24 * 60 * 60 * 1000\r\n\t\treturn Math.floor((date2.getTime() - date1.getTime()) / msPerDay)\r\n\t}\r\n\r\n\t/**\r\n\t * Handle from date change with validation and auto-correction\r\n\t */\r\n\tprivate handleDateFromChange(e: Event) {\r\n\t\tconst input = e.target as HTMLInputElement\r\n\t\tconst newValue = input.value\r\n\r\n\t\t// Update the value\r\n\t\tthis.dateFrom = { ...this.dateFrom, value: newValue }\r\n\r\n\t\t// Clear previous errors\r\n\t\tthis.validationState = { ...this.validationState, dateFromError: '', rangeError: '' }\r\n\r\n\t\tif (!newValue) {\r\n\t\t\t// Allow empty for optional fields\r\n\t\t\tif (!this.required) {\r\n\t\t\t\tthis.emitChange()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tthis.validationState = { ...this.validationState, dateFromError: 'Start date is required' }\r\n\t\t\tthis.error = true\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// Validate and potentially auto-correct\r\n\t\tthis.validateAndCorrect('from')\r\n\t}\r\n\r\n\t/**\r\n\t * Handle to date change with validation and auto-correction\r\n\t */\r\n\tprivate handleDateToChange(e: Event) {\r\n\t\tconst input = e.target as HTMLInputElement\r\n\t\tconst newValue = input.value\r\n\r\n\t\t// Update the value\r\n\t\tthis.dateTo = { ...this.dateTo, value: newValue }\r\n\r\n\t\t// Clear previous errors\r\n\t\tthis.validationState = { ...this.validationState, dateToError: '', rangeError: '' }\r\n\r\n\t\tif (!newValue) {\r\n\t\t\t// Allow empty for optional fields\r\n\t\t\tif (!this.required) {\r\n\t\t\t\tthis.emitChange()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tthis.validationState = { ...this.validationState, dateToError: 'End date is required' }\r\n\t\t\tthis.error = true\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// Validate and potentially auto-correct\r\n\t\tthis.validateAndCorrect('to')\r\n\t}\r\n\r\n\t/**\r\n\t * Validate dates and auto-correct if enabled\r\n\t */\r\n\tprivate validateAndCorrect(changedField?: 'from' | 'to') {\r\n\t\tconst fromDate = this.parseDate(this.dateFrom.value)\r\n\t\tconst toDate = this.parseDate(this.dateTo.value)\r\n\r\n\t\t// Reset validation state\r\n\t\tlet hasError = false\r\n\t\tconst newValidationState = { dateFromError: '', dateToError: '', rangeError: '' }\r\n\r\n\t\t// Validate individual dates\r\n\t\tif (this.dateFrom.value && !fromDate) {\r\n\t\t\tnewValidationState.dateFromError = 'Invalid date format'\r\n\t\t\thasError = true\r\n\t\t}\r\n\r\n\t\tif (this.dateTo.value && !toDate) {\r\n\t\t\tnewValidationState.dateToError = 'Invalid date format'\r\n\t\t\thasError = true\r\n\t\t}\r\n\r\n\t\t// If both dates are valid, check range constraints\r\n\t\tif (fromDate && toDate) {\r\n\t\t\tconst daysBetween = this.getDaysBetween(fromDate, toDate)\r\n\r\n\t\t\t// Check if from date is after to date\r\n\t\t\tif (fromDate > toDate) {\r\n\t\t\t\tif (this.autoCorrect) {\r\n\t\t\t\t\t// Auto-correct based on which field changed\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\t// User changed from date, adjust to date\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.defaultGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (changedField === 'to') {\r\n\t\t\t\t\t\t// User changed to date, adjust from date\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.defaultGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// No specific field changed, swap them\r\n\t\t\t\t\t\tconst tempValue = this.dateFrom.value\r\n\t\t\t\t\t\tthis.dateFrom = { ...this.dateFrom, value: this.dateTo.value }\r\n\t\t\t\t\t\tthis.dateTo = { ...this.dateTo, value: tempValue }\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = 'End date must be after start date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check same date constraint\r\n\t\t\tif (!this.allowSameDate && daysBetween === 0) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct by adjusting the other date\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.defaultGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.defaultGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = 'Start and end dates cannot be the same'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check minimum gap\r\n\t\t\tif (this.minGap > 0 && daysBetween < this.minGap) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct to maintain minimum gap\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.minGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.minGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = `Minimum ${this.minGap} day${this.minGap > 1 ? 's' : ''} required between dates`\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check maximum gap\r\n\t\t\tif (this.maxGap !== undefined && daysBetween > this.maxGap) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct to maintain maximum gap\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.maxGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.maxGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = `Maximum ${this.maxGap} day${this.maxGap > 1 ? 's' : ''} allowed between dates`\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check against min/max date constraints\r\n\t\t\tif (this.minDate) {\r\n\t\t\t\tconst minDateObj = this.parseDate(this.minDate)\r\n\t\t\t\tif (minDateObj && fromDate < minDateObj) {\r\n\t\t\t\t\tnewValidationState.dateFromError = 'Date is before minimum allowed date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.maxDate) {\r\n\t\t\t\tconst maxDateObj = this.parseDate(this.maxDate)\r\n\t\t\t\tif (maxDateObj && toDate > maxDateObj) {\r\n\t\t\t\t\tnewValidationState.dateToError = 'Date is after maximum allowed date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Update validation state\r\n\t\tthis.validationState = newValidationState\r\n\t\tthis.error = hasError\r\n\r\n\t\t// Emit change event with validation status\r\n\t\tthis.emitChange()\r\n\t}\r\n\r\n\t/**\r\n\t * Get computed min date for the \"to\" field based on \"from\" value\r\n\t */\r\n\tprivate getComputedMinDateTo(): string | undefined {\r\n\t\tif (!this.dateFrom.value) return this.minDate\r\n\r\n\t\tconst fromDate = this.parseDate(this.dateFrom.value)\r\n\t\tif (!fromDate) return this.minDate\r\n\r\n\t\t// Calculate minimum date based on constraints\r\n\t\tconst minToDate = new Date(fromDate)\r\n\t\t\r\n\t\tif (!this.allowSameDate) {\r\n\t\t\tminToDate.setDate(minToDate.getDate() + 1)\r\n\t\t}\r\n\t\t\r\n\t\tif (this.minGap > 0) {\r\n\t\t\tminToDate.setDate(fromDate.getDate() + this.minGap)\r\n\t\t}\r\n\r\n\t\t// Compare with global minDate if set\r\n\t\tif (this.minDate) {\r\n\t\t\tconst globalMin = this.parseDate(this.minDate)\r\n\t\t\tif (globalMin && globalMin > minToDate) {\r\n\t\t\t\treturn this.minDate\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.formatDate(minToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t}\r\n\r\n\t/**\r\n\t * Get computed max date for the \"from\" field based on \"to\" value\r\n\t */\r\n\tprivate getComputedMaxDateFrom(): string | undefined {\r\n\t\tif (!this.dateTo.value) return this.maxDate\r\n\r\n\t\tconst toDate = this.parseDate(this.dateTo.value)\r\n\t\tif (!toDate) return this.maxDate\r\n\r\n\t\t// Calculate maximum date based on constraints\r\n\t\tconst maxFromDate = new Date(toDate)\r\n\t\t\r\n\t\tif (!this.allowSameDate) {\r\n\t\t\tmaxFromDate.setDate(maxFromDate.getDate() - 1)\r\n\t\t}\r\n\t\t\r\n\t\tif (this.minGap > 0) {\r\n\t\t\tmaxFromDate.setDate(toDate.getDate() - this.minGap)\r\n\t\t}\r\n\r\n\t\t// Compare with global maxDate if set\r\n\t\tif (this.maxDate) {\r\n\t\t\tconst globalMax = this.parseDate(this.maxDate)\r\n\t\t\tif (globalMax && globalMax < maxFromDate) {\r\n\t\t\t\treturn this.maxDate\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.formatDate(maxFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t}\r\n\r\n\temitChange() {\r\n\t\tconst isValid = !this.error && \r\n\t\t\t!!this.dateFrom.value && \r\n\t\t\t!!this.dateTo.value && \r\n\t\t\t!this.validationState.dateFromError && \r\n\t\t\t!this.validationState.dateToError && \r\n\t\t\t!this.validationState.rangeError\r\n\r\n\t\tthis.dispatchEvent(new CustomEvent<SchmancyDateRangeInlineChangeEvent['detail']>('change', {\r\n\t\t\tdetail: {\r\n\t\t\t\tdateFrom: this.dateFrom.value,\r\n\t\t\t\tdateTo: this.dateTo.value,\r\n\t\t\t\tisValid\r\n\t\t\t},\r\n\t\t\tbubbles: true,\r\n\t\t\tcomposed: true\r\n\t\t}))\r\n\t}\r\n\r\n\tprotected render() {\r\n\t\t// Determine which error to show on each input\r\n\t\tconst fromError = this.validationState.dateFromError || this.validationState.rangeError\r\n\t\tconst toError = this.validationState.dateToError || this.validationState.rangeError\r\n\r\n\t\treturn html`\r\n\t\t\t<div class=\"w-full\">\r\n\t\t\t\t<div class=\"flex items-start gap-2 w-full\">\r\n\t\t\t\t\t<div class=\"flex-1\">\r\n\t\t\t\t\t\t<schmancy-input\r\n\t\t\t\t\t\t\t.type=${this.type}\r\n\t\t\t\t\t\t\t.label=${this.dateFrom.label}\r\n\t\t\t\t\t\t\t.value=${this.dateFrom.value}\r\n\t\t\t\t\t\t\t.min=${this.minDate}\r\n\t\t\t\t\t\t\t.max=${this.getComputedMaxDateFrom()}\r\n\t\t\t\t\t\t\t@change=${this.handleDateFromChange}\r\n\t\t\t\t\t\t\t.error=${!!fromError}\r\n\t\t\t\t\t\t\t.hint=${fromError || ''}\r\n\t\t\t\t\t\t\t.required=${this.required}\r\n\t\t\t\t\t\t\t.disabled=${this.disabled}\r\n\t\t\t\t\t\t\tsize=${this.compact ? 'sm' : 'md'}\r\n\t\t\t\t\t\t></schmancy-input>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"flex items-center justify-center ${this.compact ? 'pt-8' : 'pt-10'} px-1\">\r\n\t\t\t\t\t\t<schmancy-icon class=\"text-surface-onVariant opacity-50\">\r\n\t\t\t\t\t\t\tarrow_forward\r\n\t\t\t\t\t\t</schmancy-icon>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"flex-1\">\r\n\t\t\t\t\t\t<schmancy-input\r\n\t\t\t\t\t\t\t.type=${this.type}\r\n\t\t\t\t\t\t\t.label=${this.dateTo.label}\r\n\t\t\t\t\t\t\t.value=${this.dateTo.value}\r\n\t\t\t\t\t\t\t.min=${this.getComputedMinDateTo()}\r\n\t\t\t\t\t\t\t.max=${this.maxDate}\r\n\t\t\t\t\t\t\t@change=${this.handleDateToChange}\r\n\t\t\t\t\t\t\t.error=${!!toError}\r\n\t\t\t\t\t\t\t.hint=${toError || ''}\r\n\t\t\t\t\t\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AAAA,IAAA,IAAA,IAAA,EAAA,CAvER,EAAc,6BAAA,CAAA,EAA6B,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"date-range-inline-PeRt1iIF.js","names":[],"sources":["../src/date-range-inline/date-range-inline.ts"],"sourcesContent":["import { html } from 'lit'\r\nimport { customElement, property, state } from 'lit/decorators.js'\r\nimport { SchmancyFormField } from '@mixins/index'\r\n\r\ndeclare global {\r\n\tinterface HTMLElementTagNameMap {\r\n\t\t'schmancy-date-range-inline': SchmancyDateRangeInline\r\n\t}\r\n}\r\n\r\nexport type SchmancyDateRangeInlineChangeEvent = CustomEvent<{\r\n\tdateFrom: string\r\n\tdateTo: string\r\n\tisValid: boolean\r\n}>\r\n\r\n/**\r\n * Smart inline date range picker that handles all the heavy lifting.\r\n * Auto-corrects invalid ranges, provides smart defaults, and validates dates.\r\n */\r\n@customElement('schmancy-date-range-inline')\r\nexport default class SchmancyDateRangeInline extends SchmancyFormField() {\r\n\t/**\r\n\t * Input type - 'date' or 'datetime-local'\r\n\t */\r\n\t@property({ type: String })\r\n\ttype: 'date' | 'datetime-local' = 'date'\r\n\r\n\t/**\r\n\t * From date configuration\r\n\t */\r\n\t@property({ type: Object })\r\n\tdateFrom: { label: string; value: string } = { label: 'From', value: '' }\r\n\r\n\t/**\r\n\t * To date configuration\r\n\t */\r\n\t@property({ type: Object })\r\n\tdateTo: { label: string; value: string } = { label: 'To', value: '' }\r\n\r\n\t/**\r\n\t * Minimum allowed date\r\n\t */\r\n\t@property({ type: String })\r\n\tminDate?: string\r\n\r\n\t/**\r\n\t * Maximum allowed date\r\n\t */\r\n\t@property({ type: String })\r\n\tmaxDate?: string\r\n\r\n\t/**\r\n\t * Compact mode for smaller UI\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tcompact = false\r\n\r\n\t/**\r\n\t * Auto-correct invalid date ranges\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tautoCorrect = true\r\n\r\n\t/**\r\n\t * Minimum gap between dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tminGap = 0\r\n\r\n\t/**\r\n\t * Maximum gap between dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tmaxGap?: number\r\n\r\n\t/**\r\n\t * Default gap when auto-setting dates (in days)\r\n\t */\r\n\t@property({ type: Number })\r\n\tdefaultGap = 1\r\n\r\n\t/**\r\n\t * Whether to allow same date selection\r\n\t */\r\n\t@property({ type: Boolean })\r\n\tallowSameDate = false\r\n\r\n\t/**\r\n\t * Internal validation state\r\n\t */\r\n\t@state()\r\n\tprivate validationState = {\r\n\t\tdateFromError: '',\r\n\t\tdateToError: '',\r\n\t\trangeError: ''\r\n\t}\r\n\r\n\tconnectedCallback() {\r\n\t\tsuper.connectedCallback()\r\n\t\t// Initialize with smart defaults if no values provided\r\n\t\tif (!this.dateFrom.value && !this.dateTo.value) {\r\n\t\t\tthis.setSmartDefaults()\r\n\t\t} else {\r\n\t\t\t// Validate initial values\r\n\t\t\tthis.validateAndCorrect()\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set smart default dates based on context\r\n\t */\r\n\tprivate setSmartDefaults() {\r\n\t\tconst today = new Date()\r\n\t\tconst tomorrow = new Date(today)\r\n\t\ttomorrow.setDate(tomorrow.getDate() + this.defaultGap)\r\n\r\n\t\tconst format = this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'\r\n\t\t\r\n\t\tthis.dateFrom = {\r\n\t\t\t...this.dateFrom,\r\n\t\t\tvalue: this.formatDate(today, format)\r\n\t\t}\r\n\t\t\r\n\t\tthis.dateTo = {\r\n\t\t\t...this.dateTo,\r\n\t\t\tvalue: this.formatDate(tomorrow, format)\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Format date to required string format\r\n\t */\r\n\tprivate formatDate(date: Date, format: string): string {\r\n\t\tconst year = date.getFullYear()\r\n\t\tconst month = String(date.getMonth() + 1).padStart(2, '0')\r\n\t\tconst day = String(date.getDate()).padStart(2, '0')\r\n\t\t\r\n\t\tif (format === 'YYYY-MM-DD') {\r\n\t\t\treturn `${year}-${month}-${day}`\r\n\t\t} else {\r\n\t\t\tconst hours = String(date.getHours()).padStart(2, '0')\r\n\t\t\tconst minutes = String(date.getMinutes()).padStart(2, '0')\r\n\t\t\treturn `${year}-${month}-${day}T${hours}:${minutes}`\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Parse date string to Date object\r\n\t */\r\n\tprivate parseDate(dateStr: string): Date | null {\r\n\t\tif (!dateStr) return null\r\n\t\tconst date = new Date(dateStr)\r\n\t\treturn isNaN(date.getTime()) ? null : date\r\n\t}\r\n\r\n\t/**\r\n\t * Calculate days between two dates\r\n\t */\r\n\tprivate getDaysBetween(date1: Date, date2: Date): number {\r\n\t\tconst msPerDay = 24 * 60 * 60 * 1000\r\n\t\treturn Math.floor((date2.getTime() - date1.getTime()) / msPerDay)\r\n\t}\r\n\r\n\t/**\r\n\t * Handle from date change with validation and auto-correction\r\n\t */\r\n\tprivate handleDateFromChange(e: Event) {\r\n\t\tconst input = e.target as HTMLInputElement\r\n\t\tconst newValue = input.value\r\n\r\n\t\t// Update the value\r\n\t\tthis.dateFrom = { ...this.dateFrom, value: newValue }\r\n\r\n\t\t// Clear previous errors\r\n\t\tthis.validationState = { ...this.validationState, dateFromError: '', rangeError: '' }\r\n\r\n\t\tif (!newValue) {\r\n\t\t\t// Allow empty for optional fields\r\n\t\t\tif (!this.required) {\r\n\t\t\t\tthis.emitChange()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tthis.validationState = { ...this.validationState, dateFromError: 'Start date is required' }\r\n\t\t\tthis.error = true\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// Validate and potentially auto-correct\r\n\t\tthis.validateAndCorrect('from')\r\n\t}\r\n\r\n\t/**\r\n\t * Handle to date change with validation and auto-correction\r\n\t */\r\n\tprivate handleDateToChange(e: Event) {\r\n\t\tconst input = e.target as HTMLInputElement\r\n\t\tconst newValue = input.value\r\n\r\n\t\t// Update the value\r\n\t\tthis.dateTo = { ...this.dateTo, value: newValue }\r\n\r\n\t\t// Clear previous errors\r\n\t\tthis.validationState = { ...this.validationState, dateToError: '', rangeError: '' }\r\n\r\n\t\tif (!newValue) {\r\n\t\t\t// Allow empty for optional fields\r\n\t\t\tif (!this.required) {\r\n\t\t\t\tthis.emitChange()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tthis.validationState = { ...this.validationState, dateToError: 'End date is required' }\r\n\t\t\tthis.error = true\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// Validate and potentially auto-correct\r\n\t\tthis.validateAndCorrect('to')\r\n\t}\r\n\r\n\t/**\r\n\t * Validate dates and auto-correct if enabled\r\n\t */\r\n\tprivate validateAndCorrect(changedField?: 'from' | 'to') {\r\n\t\tconst fromDate = this.parseDate(this.dateFrom.value)\r\n\t\tconst toDate = this.parseDate(this.dateTo.value)\r\n\r\n\t\t// Reset validation state\r\n\t\tlet hasError = false\r\n\t\tconst newValidationState = { dateFromError: '', dateToError: '', rangeError: '' }\r\n\r\n\t\t// Validate individual dates\r\n\t\tif (this.dateFrom.value && !fromDate) {\r\n\t\t\tnewValidationState.dateFromError = 'Invalid date format'\r\n\t\t\thasError = true\r\n\t\t}\r\n\r\n\t\tif (this.dateTo.value && !toDate) {\r\n\t\t\tnewValidationState.dateToError = 'Invalid date format'\r\n\t\t\thasError = true\r\n\t\t}\r\n\r\n\t\t// If both dates are valid, check range constraints\r\n\t\tif (fromDate && toDate) {\r\n\t\t\tconst daysBetween = this.getDaysBetween(fromDate, toDate)\r\n\r\n\t\t\t// Check if from date is after to date\r\n\t\t\tif (fromDate > toDate) {\r\n\t\t\t\tif (this.autoCorrect) {\r\n\t\t\t\t\t// Auto-correct based on which field changed\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\t// User changed from date, adjust to date\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.defaultGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (changedField === 'to') {\r\n\t\t\t\t\t\t// User changed to date, adjust from date\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.defaultGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// No specific field changed, swap them\r\n\t\t\t\t\t\tconst tempValue = this.dateFrom.value\r\n\t\t\t\t\t\tthis.dateFrom = { ...this.dateFrom, value: this.dateTo.value }\r\n\t\t\t\t\t\tthis.dateTo = { ...this.dateTo, value: tempValue }\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = 'End date must be after start date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check same date constraint\r\n\t\t\tif (!this.allowSameDate && daysBetween === 0) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct by adjusting the other date\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.defaultGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.defaultGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = 'Start and end dates cannot be the same'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check minimum gap\r\n\t\t\tif (this.minGap > 0 && daysBetween < this.minGap) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct to maintain minimum gap\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.minGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.minGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = `Minimum ${this.minGap} day${this.minGap > 1 ? 's' : ''} required between dates`\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check maximum gap\r\n\t\t\tif (this.maxGap !== undefined && daysBetween > this.maxGap) {\r\n\t\t\t\tif (this.autoCorrect && changedField) {\r\n\t\t\t\t\t// Auto-correct to maintain maximum gap\r\n\t\t\t\t\tif (changedField === 'from') {\r\n\t\t\t\t\t\tconst newToDate = new Date(fromDate)\r\n\t\t\t\t\t\tnewToDate.setDate(newToDate.getDate() + this.maxGap)\r\n\t\t\t\t\t\tthis.dateTo = {\r\n\t\t\t\t\t\t\t...this.dateTo,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst newFromDate = new Date(toDate)\r\n\t\t\t\t\t\tnewFromDate.setDate(newFromDate.getDate() - this.maxGap)\r\n\t\t\t\t\t\tthis.dateFrom = {\r\n\t\t\t\t\t\t\t...this.dateFrom,\r\n\t\t\t\t\t\t\tvalue: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Re-validate after correction\r\n\t\t\t\t\tthis.validateAndCorrect()\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewValidationState.rangeError = `Maximum ${this.maxGap} day${this.maxGap > 1 ? 's' : ''} allowed between dates`\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Check against min/max date constraints\r\n\t\t\tif (this.minDate) {\r\n\t\t\t\tconst minDateObj = this.parseDate(this.minDate)\r\n\t\t\t\tif (minDateObj && fromDate < minDateObj) {\r\n\t\t\t\t\tnewValidationState.dateFromError = 'Date is before minimum allowed date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.maxDate) {\r\n\t\t\t\tconst maxDateObj = this.parseDate(this.maxDate)\r\n\t\t\t\tif (maxDateObj && toDate > maxDateObj) {\r\n\t\t\t\t\tnewValidationState.dateToError = 'Date is after maximum allowed date'\r\n\t\t\t\t\thasError = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Update validation state\r\n\t\tthis.validationState = newValidationState\r\n\t\tthis.error = hasError\r\n\r\n\t\t// Emit change event with validation status\r\n\t\tthis.emitChange()\r\n\t}\r\n\r\n\t/**\r\n\t * Get computed min date for the \"to\" field based on \"from\" value\r\n\t */\r\n\tprivate getComputedMinDateTo(): string | undefined {\r\n\t\tif (!this.dateFrom.value) return this.minDate\r\n\r\n\t\tconst fromDate = this.parseDate(this.dateFrom.value)\r\n\t\tif (!fromDate) return this.minDate\r\n\r\n\t\t// Calculate minimum date based on constraints\r\n\t\tconst minToDate = new Date(fromDate)\r\n\t\t\r\n\t\tif (!this.allowSameDate) {\r\n\t\t\tminToDate.setDate(minToDate.getDate() + 1)\r\n\t\t}\r\n\t\t\r\n\t\tif (this.minGap > 0) {\r\n\t\t\tminToDate.setDate(fromDate.getDate() + this.minGap)\r\n\t\t}\r\n\r\n\t\t// Compare with global minDate if set\r\n\t\tif (this.minDate) {\r\n\t\t\tconst globalMin = this.parseDate(this.minDate)\r\n\t\t\tif (globalMin && globalMin > minToDate) {\r\n\t\t\t\treturn this.minDate\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.formatDate(minToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t}\r\n\r\n\t/**\r\n\t * Get computed max date for the \"from\" field based on \"to\" value\r\n\t */\r\n\tprivate getComputedMaxDateFrom(): string | undefined {\r\n\t\tif (!this.dateTo.value) return this.maxDate\r\n\r\n\t\tconst toDate = this.parseDate(this.dateTo.value)\r\n\t\tif (!toDate) return this.maxDate\r\n\r\n\t\t// Calculate maximum date based on constraints\r\n\t\tconst maxFromDate = new Date(toDate)\r\n\t\t\r\n\t\tif (!this.allowSameDate) {\r\n\t\t\tmaxFromDate.setDate(maxFromDate.getDate() - 1)\r\n\t\t}\r\n\t\t\r\n\t\tif (this.minGap > 0) {\r\n\t\t\tmaxFromDate.setDate(toDate.getDate() - this.minGap)\r\n\t\t}\r\n\r\n\t\t// Compare with global maxDate if set\r\n\t\tif (this.maxDate) {\r\n\t\t\tconst globalMax = this.parseDate(this.maxDate)\r\n\t\t\tif (globalMax && globalMax < maxFromDate) {\r\n\t\t\t\treturn this.maxDate\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.formatDate(maxFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')\r\n\t}\r\n\r\n\temitChange() {\r\n\t\tconst isValid = !this.error && \r\n\t\t\t!!this.dateFrom.value && \r\n\t\t\t!!this.dateTo.value && \r\n\t\t\t!this.validationState.dateFromError && \r\n\t\t\t!this.validationState.dateToError && \r\n\t\t\t!this.validationState.rangeError\r\n\r\n\t\tthis.dispatchEvent(new CustomEvent<SchmancyDateRangeInlineChangeEvent['detail']>('change', {\r\n\t\t\tdetail: {\r\n\t\t\t\tdateFrom: this.dateFrom.value,\r\n\t\t\t\tdateTo: this.dateTo.value,\r\n\t\t\t\tisValid\r\n\t\t\t},\r\n\t\t\tbubbles: true,\r\n\t\t\tcomposed: true\r\n\t\t}))\r\n\t}\r\n\r\n\tprotected render() {\r\n\t\t// Determine which error to show on each input\r\n\t\tconst fromError = this.validationState.dateFromError || this.validationState.rangeError\r\n\t\tconst toError = this.validationState.dateToError || this.validationState.rangeError\r\n\r\n\t\treturn html`\r\n\t\t\t<div class=\"w-full\">\r\n\t\t\t\t<div class=\"flex items-start gap-2 w-full\">\r\n\t\t\t\t\t<div class=\"flex-1\">\r\n\t\t\t\t\t\t<schmancy-input\r\n\t\t\t\t\t\t\t.type=${this.type}\r\n\t\t\t\t\t\t\t.label=${this.dateFrom.label}\r\n\t\t\t\t\t\t\t.value=${this.dateFrom.value}\r\n\t\t\t\t\t\t\t.min=${this.minDate}\r\n\t\t\t\t\t\t\t.max=${this.getComputedMaxDateFrom()}\r\n\t\t\t\t\t\t\t@change=${this.handleDateFromChange}\r\n\t\t\t\t\t\t\t.error=${!!fromError}\r\n\t\t\t\t\t\t\t.hint=${fromError || ''}\r\n\t\t\t\t\t\t\t.required=${this.required}\r\n\t\t\t\t\t\t\t.disabled=${this.disabled}\r\n\t\t\t\t\t\t\tsize=${this.compact ? 'sm' : 'md'}\r\n\t\t\t\t\t\t></schmancy-input>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"flex items-center justify-center ${this.compact ? 'pt-8' : 'pt-10'} px-1\">\r\n\t\t\t\t\t\t<schmancy-icon class=\"text-surface-onVariant opacity-50\">\r\n\t\t\t\t\t\t\tarrow_forward\r\n\t\t\t\t\t\t</schmancy-icon>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"flex-1\">\r\n\t\t\t\t\t\t<schmancy-input\r\n\t\t\t\t\t\t\t.type=${this.type}\r\n\t\t\t\t\t\t\t.label=${this.dateTo.label}\r\n\t\t\t\t\t\t\t.value=${this.dateTo.value}\r\n\t\t\t\t\t\t\t.min=${this.getComputedMinDateTo()}\r\n\t\t\t\t\t\t\t.max=${this.maxDate}\r\n\t\t\t\t\t\t\t@change=${this.handleDateToChange}\r\n\t\t\t\t\t\t\t.error=${!!toError}\r\n\t\t\t\t\t\t\t.hint=${toError || ''}\r\n\t\t\t\t\t\t\t.required=${this.required}\r\n\t\t\t\t\t\t\t.disabled=${this.disabled}\r\n\t\t\t\t\t\t\tsize=${this.compact ? 'sm' : 'md'}\r\n\t\t\t\t\t\t></schmancy-input>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t`\r\n\t}\r\n}"],"mappings":";;;;AAqBe,IAAA,IAAA,cAAsC,GAAA,CAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,OAKlB,QAAA,KAAA,WAMW;GAAE,OAAO;GAAQ,OAAO;GAAA,EAAA,KAAA,SAM1B;GAAE,OAAO;GAAM,OAAO;GAAA,EAAA,KAAA,UAAA,CAkBvD,GAAA,KAAA,cAAA,CAMI,GAAA,KAAA,SAML,GAAA,KAAA,aAYI,GAAA,KAAA,gBAAA,CAMG,GAAA,KAAA,kBAMU;GACzB,eAAe;GACf,aAAa;GACb,YAAY;GAAA;;CAGb,oBAAA;EACC,MAAM,mBAAA,EAED,KAAK,SAAS,SAAU,KAAK,OAAO,QAIxC,KAAK,oBAAA,GAHL,KAAK,kBAAA;;CAUP,mBAAA;EACC,IAAM,oBAAQ,IAAI,MAAA,EACZ,IAAW,IAAI,KAAK,EAAA;EAC1B,EAAS,QAAQ,EAAS,SAAA,GAAY,KAAK,WAAA;EAE3C,IAAM,IAAS,KAAK,SAAS,mBAAmB,qBAAqB;EAErE,KAAK,WAAW;GAAA,GACZ,KAAK;GACR,OAAO,KAAK,WAAW,GAAO,EAAA;GAAA,EAG/B,KAAK,SAAS;GAAA,GACV,KAAK;GACR,OAAO,KAAK,WAAW,GAAU,EAAA;GAAA;;CAOnC,WAAmB,GAAY,GAAA;EAC9B,IAAM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AA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,iBAAA,KAAA,EAAA,EAAA,EAAA,CAM3B,GAAA,CAAA,EAAO,EAAA,WAAA,mBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CAvER,EAAc,6BAAA,CAAA,EAA6B,EAAA;AAAA,SAAA,KAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./date-range-inline-Bvs2ZvEY.cjs`);exports.SchmancyDateRangeInline=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./date-range-inline-CAa0_4EI.cjs`);exports.SchmancyDateRangeInline=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "./date-range-inline-TWWnTZlw.js";
1
+ import { t as e } from "./date-range-inline-PeRt1iIF.js";
2
2
  export { e as SchmancyDateRangeInline };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./date-range-H903Vt_r.cjs`);Object.defineProperty(exports,`SchmancyDateRange`,{enumerable:!0,get:function(){return e.t}}),exports.validateInitialDateRange=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./date-range-CsJfjbmi.cjs`);Object.defineProperty(exports,`SchmancyDateRange`,{enumerable:!0,get:function(){return e.t}}),exports.validateInitialDateRange=e.n;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./date-range-Dv-DM6mB.js";
1
+ import { n as e, t } from "./date-range-aPSmSBhk.js";
2
2
  export { t as SchmancyDateRange, e as validateInitialDateRange };
package/dist/delay.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./hashContent-Ck6laKlk.cjs`);let r=require(`rxjs`),i=require(`rxjs/operators`),a=require(`@lit/context`),o=require(`lit/decorators.js`),s=require(`lit`),c=require(`@lit-labs/motion`),l=require(`lit/directives/cache.js`);var u,d=(0,a.createContext)(`delay-context`),f=u=class extends e.c{constructor(...e){super(...e),this.delay=0,this.motion=`flyBelow`,this.rendered=!1,this.parentDelay=0,this.effectiveDelay=0,this.once=!0,this.sessionKey=``}firstUpdated(){this.observeSlotChanges(),this.updateRenderState()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}observeSlotChanges(){let e=this.shadowRoot?.querySelector(`slot`);e&&(this.mutationObserver=new MutationObserver(()=>{this.sessionKey=this.generateSessionKey()}),this.mutationObserver.observe(e,{childList:!0,subtree:!0}))}getTotalSiblingDelay(e){if(!(e&&e instanceof HTMLElement))return 0;let t=0,n=e.previousElementSibling;for(;n;)n instanceof u&&(t+=n.delay),n=n.previousElementSibling;return e.parentElement&&(t+=this.getTotalSiblingDelay(e.parentElement)),t}updateRenderState(){if(this.sessionKey=this.generateSessionKey(),this.once&&sessionStorage.getItem(this.sessionKey)===`true`)return void(this.rendered=!0);let e=this.getTotalSiblingDelay(this);this.effectiveDelay=this.delay+this.parentDelay+e,(0,r.timer)(this.effectiveDelay).pipe((0,i.takeUntil)(this.disconnecting)).subscribe(()=>{if(this.rendered=!0,this.once)try{sessionStorage.setItem(this.sessionKey,`true`)}catch{}})}generateSessionKey(){let e=this.assignedElements.map(e=>e.outerHTML).join(``);return this.once?n.t(e):``}get motionLit(){return this.motion===`flyBelow`?c.flyBelow:this.motion===`flyAbove`?c.flyAbove:c.fadeIn}render(){return(0,l.cache)(this.rendered?s.html`<div
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DTCHPEd4.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./hashContent-Ck6laKlk.cjs`);let r=require(`rxjs`),i=require(`rxjs/operators`),a=require(`@lit/context`),o=require(`lit/decorators.js`),s=require(`lit`),c=require(`@lit-labs/motion`),l=require(`lit/directives/cache.js`);var u,d=(0,a.createContext)(`delay-context`),f=u=class extends e.c{constructor(...e){super(...e),this.delay=0,this.motion=`flyBelow`,this.rendered=!1,this.parentDelay=0,this.effectiveDelay=0,this.once=!0,this.sessionKey=``}firstUpdated(){this.observeSlotChanges(),this.updateRenderState()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}observeSlotChanges(){let e=this.shadowRoot?.querySelector(`slot`);e&&(this.mutationObserver=new MutationObserver(()=>{this.sessionKey=this.generateSessionKey()}),this.mutationObserver.observe(e,{childList:!0,subtree:!0}))}getTotalSiblingDelay(e){if(!(e&&e instanceof HTMLElement))return 0;let t=0,n=e.previousElementSibling;for(;n;)n instanceof u&&(t+=n.delay),n=n.previousElementSibling;return e.parentElement&&(t+=this.getTotalSiblingDelay(e.parentElement)),t}updateRenderState(){if(this.sessionKey=this.generateSessionKey(),this.once&&sessionStorage.getItem(this.sessionKey)===`true`)return void(this.rendered=!0);let e=this.getTotalSiblingDelay(this);this.effectiveDelay=this.delay+this.parentDelay+e,(0,r.timer)(this.effectiveDelay).pipe((0,i.takeUntil)(this.disconnecting)).subscribe(()=>{if(this.rendered=!0,this.once)try{sessionStorage.setItem(this.sessionKey,`true`)}catch{}})}generateSessionKey(){let e=this.assignedElements.map(e=>e.outerHTML).join(``);return this.once?n.t(e):``}get motionLit(){return this.motion===`flyBelow`?c.flyBelow:this.motion===`flyAbove`?c.flyAbove:c.fadeIn}render(){return(0,l.cache)(this.rendered?s.html`<div
2
2
  ${(0,c.animate)({in:this.motionLit,keyframeOptions:{duration:300,easing:`ease-out`}})}
3
3
  >
4
4
  <slot></slot>
package/dist/delay.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as e } from "./mixins-DCVXqL1Q.js";
1
+ import { c as e } from "./mixins-pU53qf6R.js";
2
2
  import { a as t } from "./active-host-BP0zy_Y9.js";
3
3
  import { t as n } from "./hashContent-dJrI-9sc.js";
4
4
  import { timer as r } from "rxjs";
@@ -1,4 +1,4 @@
1
- require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./cursor-glow-C8LgCxpI.cjs`),a=require(`./magnetic-Bgh7aHHI.cjs`);let o=require(`rxjs`),s=require(`rxjs/operators`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`);var d=class extends e.t(e.c){static{this.styles=[l.css`
1
+ require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DTCHPEd4.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./cursor-glow-C8LgCxpI.cjs`),a=require(`./magnetic-Bgh7aHHI.cjs`);let o=require(`rxjs`),s=require(`rxjs/operators`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`);var d=class extends e.t(e.c){static{this.styles=[l.css`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -109,7 +109,7 @@ require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=requi
109
109
  transition: none;
110
110
  }
111
111
  }
112
- `]}static{this.shadowRootOptions={...l.LitElement.shadowRootOptions,mode:`open`,delegatesFocus:!0}}get open(){return this._open$.value}set open(e){this._open$.value!==e&&this._open$.next(e)}constructor(){super(),this.summary=``,this.indicatorPlacement=`end`,this.hideIndicator=!1,this.indicatorRotate=90,this.locked=!1,this.overlay=!1,this.summaryPadding=`p-3`,this.contentPadding=`p-3`,this._open$=new o.BehaviorSubject(!1),this._indicatorRef=(0,u.createRef)(),this._contentRef=(0,u.createRef)(),this._indicatorIsOpen=!1,this._closing=!1,this._nativeAnim=typeof CSS<`u`&&!!CSS.supports?.(`selector(::details-content)`)&&!!CSS.supports?.(`interpolate-size`,`allow-keywords`),this._hasOpened=!1,this.type=`solid`,this.rounded=`all`}connectedCallback(){super.connectedCallback(),this._open$.pipe((0,s.distinctUntilChanged)(),(0,s.tap)(e=>{e&&!this._hasOpened&&(this._hasOpened=!0),this._animateIndicator(e),this._updateIndicatorSlot()}),(0,s.takeUntil)(this.disconnecting)).subscribe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._closeSub?.unsubscribe()}render(){let e=this._open$.value,t=this.classMap({"w-full rounded-xl transition-shadow duration-200 ease-out":!0,"overflow-hidden":!this.overlay,"overflow-visible relative":this.overlay}),n=this.classMap({[this.summaryPadding]:!0,"select-none relative flex items-center gap-2 rounded-xl":!0,"transition-colors duration-150":!0,"hover:bg-surface-on/5 active:bg-surface-on/8":!this.locked,"focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1":!this.locked,"cursor-pointer group":!this.locked,"cursor-default":this.locked,"flex-row":this.indicatorPlacement===`start`,"flex-row-reverse":this.indicatorPlacement===`end`}),r=this.classMap({[this.contentPadding]:!0,"text-sm":!0,"absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20":this.overlay});return l.html`
112
+ `]}static{this.shadowRootOptions={...l.LitElement.shadowRootOptions,mode:`open`,delegatesFocus:!0}}get open(){return this._open$.value}set open(e){this._open$.value!==e&&this._open$.next(e)}constructor(){super(),this.summary=``,this.indicatorPlacement=`end`,this.hideIndicator=!1,this.indicatorRotate=90,this.locked=!1,this.overlay=!1,this.summaryPadding=`p-3`,this.contentPadding=`p-3`,this._open$=new o.BehaviorSubject(!1),this._indicatorRef=(0,u.createRef)(),this._contentRef=(0,u.createRef)(),this._indicatorIsOpen=!1,this._closing=!1,this._nativeAnim=typeof CSS<`u`&&!!CSS.supports?.(`selector(::details-content)`)&&!!CSS.supports?.(`interpolate-size`,`allow-keywords`),this._hasOpened=!1,this.type=`solid`,this.rounded=`all`}connectedCallback(){super.connectedCallback(),this._open$.pipe((0,s.distinctUntilChanged)(),(0,s.tap)(e=>{e&&!this._hasOpened&&(this._hasOpened=!0),this._animateIndicator(e),this._updateIndicatorSlot()}),(0,s.takeUntil)(this.disconnecting)).subscribe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._closeSub?.unsubscribe()}render(){let e=this._open$.value,t=this.classMap({"w-full rounded-xl transition-shadow duration-200 ease-out":!0,"overflow-visible":!this.overlay,"overflow-visible relative":this.overlay}),n=this.classMap({[this.summaryPadding]:!0,"select-none relative flex items-center gap-2 rounded-xl":!0,"transition-colors duration-150":!0,"hover:bg-surface-on/5 active:bg-surface-on/8":!this.locked,"focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1":!this.locked,"cursor-pointer group":!this.locked,"cursor-default":this.locked,"flex-row":this.indicatorPlacement===`start`,"flex-row-reverse":this.indicatorPlacement===`end`}),r=this.classMap({[this.contentPadding]:!0,"text-sm":!0,"absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20":this.overlay});return l.html`
113
113
  <details ?open=${e} @toggle=${this._handleToggle} class=${t}>
114
114
  <summary ${this.locked?``:a.t({strength:2,radius:50})} ${this.locked?``:i.t({radius:250,intensity:.08})} class=${n} tabindex=${this.locked?-1:0} @click=${this._handleSummaryClick}>
115
115
  ${this.hideIndicator?``:l.html`
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-BnXbDpt7.cjs","names":[],"sources":["../src/details/details.ts"],"sourcesContent":["import { SchmancyElement, SurfaceMixin } from '@mixins/index'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { magnetic } from '../directives/magnetic'\nimport { createRef, ref, Ref } from 'lit/directives/ref.js'\nimport { BehaviorSubject, fromEvent, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, take, takeUntil, tap } from 'rxjs/operators'\nimport { SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\n\n@customElement('schmancy-details')\nexport default class SchmancyDetails extends SurfaceMixin(SchmancyElement) {\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t:host([overlay]) {\n\t\t\tposition: relative;\n\t\t}\n\n\t\t:host([open]) {\n\t\t\tz-index: 10;\n\t\t}\n\n\t\tdetails {\n\t\t\tbackground: inherit;\n\t\t\tcolor: inherit;\n\t\t\tborder-radius: inherit;\n\t\t}\n\n\t\tsummary::-webkit-details-marker {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tsummary {\n\t\t\tlist-style: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t/*\n\t\t * Blackbird 2.1 — CSS-driven collapse/expand\n\t\t *\n\t\t * Single animation system: CSS grid transition handles height,\n\t\t * coordinated opacity fade for buttery smooth feel.\n\t\t * No competing Web Animations API on content.\n\t\t */\n\n\t\t.content-wrapper {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: 0fr;\n\t\t\toverflow: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition:\n\t\t\t\tgrid-template-rows 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\topacity 250ms ease;\n\t\t}\n\n\t\t/* Spring easing when linear() is supported */\n\t\t@supports (animation-timing-function: linear(0, 1)) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition:\n\t\t\t\t\tgrid-template-rows 400ms linear(\n\t\t\t\t\t\t0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,\n\t\t\t\t\t\t0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50%, 1.015 54.8%,\n\t\t\t\t\t\t1.017 63.3%, 1.001\n\t\t\t\t\t),\n\t\t\t\t\topacity 250ms ease;\n\t\t\t}\n\t\t}\n\n\t\t.content-wrapper[data-open='true'] {\n\t\t\tgrid-template-rows: 1fr;\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.content-inner {\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/*\n\t\t * Progressive Enhancement: ::details-content (Chrome 131+)\n\t\t *\n\t\t * When both ::details-content AND interpolate-size are supported,\n\t\t * the browser handles height animation natively — including animated\n\t\t * close via transition-behavior: allow-discrete on content-visibility.\n\t\t * The grid wrapper becomes transparent (display: contents).\n\t\t */\n\t\t@supports selector(::details-content) and (interpolate-size: allow-keywords) {\n\t\t\t:host {\n\t\t\t\tinterpolate-size: allow-keywords;\n\t\t\t}\n\n\t\t\t.content-wrapper {\n\t\t\t\tdisplay: contents;\n\t\t\t}\n\n\t\t\tdetails::details-content {\n\t\t\t\tblock-size: 0;\n\t\t\t\toverflow-y: clip;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition:\n\t\t\t\t\tblock-size 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\t\topacity 250ms ease,\n\t\t\t\t\tcontent-visibility 400ms;\n\t\t\t\ttransition-behavior: allow-discrete;\n\t\t\t}\n\n\t\t\tdetails[open]::details-content {\n\t\t\t\tblock-size: auto;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t\tdetails::details-content {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\t`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open' as const,\n\t\tdelegatesFocus: true,\n\t}\n\n\t@property() summary = ''\n\n\t@property({ type: Boolean, reflect: true })\n\tget open() {\n\t\treturn this._open$.value\n\t}\n\tset open(value: boolean) {\n\t\tif (this._open$.value !== value) {\n\t\t\tthis._open$.next(value)\n\t\t}\n\t}\n\n\t@property({ attribute: 'indicator-placement', reflect: true })\n\tindicatorPlacement: 'start' | 'end' = 'end'\n\n\t@property({ type: Boolean, attribute: 'hide-indicator' })\n\thideIndicator = false\n\n\t@property({ type: Number, attribute: 'indicator-rotate' })\n\tindicatorRotate: number = 90\n\n\t@property({ type: Boolean, reflect: true })\n\tlocked = false\n\n\t@property({ type: Boolean, reflect: true })\n\toverlay = false\n\n\t@property({ attribute: 'summary-padding' })\n\tsummaryPadding = 'p-3'\n\n\t@property({ attribute: 'content-padding' })\n\tcontentPadding = 'p-3'\n\n\tprivate _open$ = new BehaviorSubject<boolean>(false)\n\tprivate _indicatorRef: Ref<HTMLElement> = createRef()\n\tprivate _contentRef: Ref<HTMLDivElement> = createRef()\n\tprivate _currentAnimation?: Animation\n\tprivate _indicatorIsOpen = false\n\tprivate _closing = false\n\tprivate _closeSub?: Subscription\n\n\t/** True when browser handles close animation natively via ::details-content */\n\tprivate _nativeAnim =\n\t\ttypeof CSS !== 'undefined' &&\n\t\t!!CSS.supports?.('selector(::details-content)') &&\n\t\t!!CSS.supports?.('interpolate-size', 'allow-keywords')\n\n\t/**\n\t * Lazy rendering: tracks if content has ever been opened.\n\t * Once true, content stays rendered (even when closed) for smooth animations.\n\t */\n\t@state() private _hasOpened = false\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.type = 'solid'\n\t\tthis.rounded = 'all'\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis._open$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(isOpen => {\n\t\t\t\t\tif (isOpen && !this._hasOpened) {\n\t\t\t\t\t\tthis._hasOpened = true\n\t\t\t\t\t}\n\t\t\t\t\tthis._animateIndicator(isOpen)\n\t\t\t\t\tthis._updateIndicatorSlot()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.requestUpdate())\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._closeSub?.unsubscribe()\n\t}\n\n\trender() {\n\t\tconst isOpen = this._open$.value\n\n\t\tconst detailsClasses = this.classMap({\n\t\t\t'w-full rounded-xl transition-shadow duration-200 ease-out': true,\n\t\t\t'overflow-visible': !this.overlay,\n\t\t\t'overflow-visible relative': this.overlay,\n\t\t})\n\n\t\tconst summaryClasses = this.classMap({\n\t\t\t[this.summaryPadding]: true,\n\t\t\t'select-none relative flex items-center gap-2 rounded-xl': true,\n\t\t\t'transition-colors duration-150': true,\n\t\t\t'hover:bg-surface-on/5 active:bg-surface-on/8': !this.locked,\n\t\t\t'focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1': !this.locked,\n\t\t\t'cursor-pointer group': !this.locked,\n\t\t\t'cursor-default': this.locked,\n\t\t\t'flex-row': this.indicatorPlacement === 'start',\n\t\t\t'flex-row-reverse': this.indicatorPlacement === 'end',\n\t\t})\n\n\t\tconst contentClasses = this.classMap({\n\t\t\t[this.contentPadding]: true,\n\t\t\t'text-sm': true,\n\t\t\t'absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20':\n\t\t\t\tthis.overlay,\n\t\t})\n\n\t\treturn html`\n\t\t\t<details ?open=${isOpen} @toggle=${this._handleToggle} class=${detailsClasses}>\n\t\t\t\t<summary ${this.locked ? '' : magnetic({ strength: 2, radius: 50 })} ${this.locked ? '' : cursorGlow({ radius: 250, intensity: 0.08 })} class=${summaryClasses} tabindex=${this.locked ? -1 : 0} @click=${this._handleSummaryClick}>\n\t\t\t\t\t${!this.hideIndicator\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t${ref(this._indicatorRef)}\n\t\t\t\t\t\t\t\t\tclass=\"flex items-center justify-center w-5 h-5 rounded-full shrink-0 opacity-70 group-hover:opacity-100\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" @slotchange=${this._handleIndicatorSlotChange}>\n\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-5 h-5\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td=\"M9 6L15 12L9 18\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t: ''}\n\n\t\t\t\t\t<span class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<slot name=\"summary\">${this.summary}</slot>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<slot name=\"actions\"></slot>\n\t\t\t\t</summary>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"content-wrapper\"\n\t\t\t\t\tdata-open=${isOpen && !this._closing}\n\t\t\t\t\taria-hidden=${isOpen ? 'false' : 'true'}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content-inner\">\n\t\t\t\t\t\t${this._hasOpened\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"details\"></slot>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</details>\n\t\t`\n\t}\n\n\tprivate _handleSummaryClick(e: MouseEvent) {\n\t\tif ((e.target as HTMLElement).closest('[slot=\"actions\"]')) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this.locked) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this._closing) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\n\t\t// Native animated path (Chromium 131+): browser handles everything via CSS\n\t\tif (this._nativeAnim) return\n\n\t\t// Fallback: manually animate close via CSS transition, then close native details\n\t\tif (this._open$.value) {\n\t\t\te.preventDefault()\n\t\t\tthis._startClose()\n\t\t}\n\t\t// If closed, let native open happen (handled by _handleToggle)\n\t}\n\n\tprivate _handleToggle(e: Event) {\n\t\te.stopPropagation()\n\n\t\tconst ownDetails = this.shadowRoot?.querySelector('details')\n\t\tif (e.target !== ownDetails) return\n\n\t\tconst newState = ownDetails.open\n\n\t\tif (this._nativeAnim) {\n\t\t\t// Native path: handle both open and close\n\t\t\tif (this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t} else {\n\t\t\t// Fallback path: only handle OPEN (close is driven by _startClose)\n\t\t\tif (newState && this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fallback close: trigger CSS grid+opacity transition, then close native <details>.\n\t * The CSS transition (400ms) handles the visual collapse — no WAAPI needed.\n\t */\n\tprivate _startClose() {\n\t\tthis._closing = true\n\t\tthis._closeSub?.unsubscribe()\n\n\t\t// Immediately collapse the grid wrapper via DOM attribute\n\t\tthis._contentRef.value?.setAttribute('data-open', 'false')\n\n\t\t// Animate indicator immediately\n\t\tthis._animateIndicator(false)\n\n\t\t// After CSS transition completes, close native details and update state\n\t\tconst wrapper = this._contentRef.value\n\t\tif (!wrapper) return\n\n\t\tthis._closeSub = fromEvent<TransitionEvent>(wrapper, 'transitionend').pipe(\n\t\t\tfilter(e => e.propertyName === 'grid-template-rows'),\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._closing = false\n\t\t\t\tthis.open = false\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: false })\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprivate _handleIndicatorSlotChange(e: Event) {\n\t\tconst slot = e.target as HTMLSlotElement\n\t\tslot.assignedElements().forEach(el => {\n\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t})\n\t}\n\n\tprivate _updateIndicatorSlot() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot[name=\"indicator\"]') as HTMLSlotElement | null\n\t\tif (slot) {\n\t\t\tslot.assignedElements().forEach(el => {\n\t\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t\t})\n\t\t}\n\t}\n\n\t/** Idempotent indicator rotation — skips if already at target state */\n\tprivate _animateIndicator(isOpen: boolean) {\n\t\tif (this._indicatorIsOpen === isOpen) return\n\t\tthis._indicatorIsOpen = isOpen\n\n\t\tconst indicator = this._indicatorRef.value\n\t\tif (!indicator || reducedMotion$.value) return\n\n\t\tthis._currentAnimation?.cancel()\n\n\t\tthis._currentAnimation = indicator.animate(\n\t\t\t[\n\t\t\t\t{ transform: `rotate(${isOpen ? '0deg' : `${this.indicatorRotate}deg`})` },\n\t\t\t\t{ transform: `rotate(${isOpen ? `${this.indicatorRotate}deg` : '0deg'})` },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t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GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGjC,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGjC,CAAE,UAAW,kBAAA,CAAA,CAAA,CAAoB,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGjC,CAAE,UAAW,kBAAA,CAAA,CAAA,CAAoB,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAqBnC,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA3KM,mBAAA,CAAA,CAAmB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { c as e, t } from "./mixins-DCVXqL1Q.js";
1
+ import { c as e, t } from "./mixins-pU53qf6R.js";
2
2
  import { a as n } from "./active-host-BP0zy_Y9.js";
3
3
  import { f as r } from "./animation-DCznELuT.js";
4
4
  import { t as i } from "./reduced-motion-D7LqTUMn.js";
@@ -151,7 +151,7 @@ var C = class extends t(e) {
151
151
  render() {
152
152
  let e = this._open$.value, t = this.classMap({
153
153
  "w-full rounded-xl transition-shadow duration-200 ease-out": !0,
154
- "overflow-hidden": !this.overlay,
154
+ "overflow-visible": !this.overlay,
155
155
  "overflow-visible relative": this.overlay
156
156
  }), n = this.classMap({
157
157
  [this.summaryPadding]: !0,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-BpFjVclg.js","names":[],"sources":["../src/details/details.ts"],"sourcesContent":["import { SchmancyElement, SurfaceMixin } from '@mixins/index'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { magnetic } from '../directives/magnetic'\nimport { createRef, ref, Ref } from 'lit/directives/ref.js'\nimport { BehaviorSubject, fromEvent, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, take, takeUntil, tap } from 'rxjs/operators'\nimport { SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\n\n@customElement('schmancy-details')\nexport default class SchmancyDetails extends SurfaceMixin(SchmancyElement) {\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t:host([overlay]) {\n\t\t\tposition: relative;\n\t\t}\n\n\t\t:host([open]) {\n\t\t\tz-index: 10;\n\t\t}\n\n\t\tdetails {\n\t\t\tbackground: inherit;\n\t\t\tcolor: inherit;\n\t\t\tborder-radius: inherit;\n\t\t}\n\n\t\tsummary::-webkit-details-marker {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tsummary {\n\t\t\tlist-style: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t/*\n\t\t * Blackbird 2.1 — CSS-driven collapse/expand\n\t\t *\n\t\t * Single animation system: CSS grid transition handles height,\n\t\t * coordinated opacity fade for buttery smooth feel.\n\t\t * No competing Web Animations API on content.\n\t\t */\n\n\t\t.content-wrapper {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: 0fr;\n\t\t\toverflow: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition:\n\t\t\t\tgrid-template-rows 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\topacity 250ms ease;\n\t\t}\n\n\t\t/* Spring easing when linear() is supported */\n\t\t@supports (animation-timing-function: linear(0, 1)) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition:\n\t\t\t\t\tgrid-template-rows 400ms linear(\n\t\t\t\t\t\t0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,\n\t\t\t\t\t\t0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50%, 1.015 54.8%,\n\t\t\t\t\t\t1.017 63.3%, 1.001\n\t\t\t\t\t),\n\t\t\t\t\topacity 250ms ease;\n\t\t\t}\n\t\t}\n\n\t\t.content-wrapper[data-open='true'] {\n\t\t\tgrid-template-rows: 1fr;\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.content-inner {\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/*\n\t\t * Progressive Enhancement: ::details-content (Chrome 131+)\n\t\t *\n\t\t * When both ::details-content AND interpolate-size are supported,\n\t\t * the browser handles height animation natively — including animated\n\t\t * close via transition-behavior: allow-discrete on content-visibility.\n\t\t * The grid wrapper becomes transparent (display: contents).\n\t\t */\n\t\t@supports selector(::details-content) and (interpolate-size: allow-keywords) {\n\t\t\t:host {\n\t\t\t\tinterpolate-size: allow-keywords;\n\t\t\t}\n\n\t\t\t.content-wrapper {\n\t\t\t\tdisplay: contents;\n\t\t\t}\n\n\t\t\tdetails::details-content {\n\t\t\t\tblock-size: 0;\n\t\t\t\toverflow-y: clip;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition:\n\t\t\t\t\tblock-size 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\t\topacity 250ms ease,\n\t\t\t\t\tcontent-visibility 400ms;\n\t\t\t\ttransition-behavior: allow-discrete;\n\t\t\t}\n\n\t\t\tdetails[open]::details-content {\n\t\t\t\tblock-size: auto;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t\tdetails::details-content {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\t`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open' as const,\n\t\tdelegatesFocus: true,\n\t}\n\n\t@property() summary = ''\n\n\t@property({ type: Boolean, reflect: true })\n\tget open() {\n\t\treturn this._open$.value\n\t}\n\tset open(value: boolean) {\n\t\tif (this._open$.value !== value) {\n\t\t\tthis._open$.next(value)\n\t\t}\n\t}\n\n\t@property({ attribute: 'indicator-placement', reflect: true })\n\tindicatorPlacement: 'start' | 'end' = 'end'\n\n\t@property({ type: Boolean, attribute: 'hide-indicator' })\n\thideIndicator = false\n\n\t@property({ type: Number, attribute: 'indicator-rotate' })\n\tindicatorRotate: number = 90\n\n\t@property({ type: Boolean, reflect: true })\n\tlocked = false\n\n\t@property({ type: Boolean, reflect: true })\n\toverlay = false\n\n\t@property({ attribute: 'summary-padding' })\n\tsummaryPadding = 'p-3'\n\n\t@property({ attribute: 'content-padding' })\n\tcontentPadding = 'p-3'\n\n\tprivate _open$ = new BehaviorSubject<boolean>(false)\n\tprivate _indicatorRef: Ref<HTMLElement> = createRef()\n\tprivate _contentRef: Ref<HTMLDivElement> = createRef()\n\tprivate _currentAnimation?: Animation\n\tprivate _indicatorIsOpen = false\n\tprivate _closing = false\n\tprivate _closeSub?: Subscription\n\n\t/** True when browser handles close animation natively via ::details-content */\n\tprivate _nativeAnim =\n\t\ttypeof CSS !== 'undefined' &&\n\t\t!!CSS.supports?.('selector(::details-content)') &&\n\t\t!!CSS.supports?.('interpolate-size', 'allow-keywords')\n\n\t/**\n\t * Lazy rendering: tracks if content has ever been opened.\n\t * Once true, content stays rendered (even when closed) for smooth animations.\n\t */\n\t@state() private _hasOpened = false\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.type = 'solid'\n\t\tthis.rounded = 'all'\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis._open$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(isOpen => {\n\t\t\t\t\tif (isOpen && !this._hasOpened) {\n\t\t\t\t\t\tthis._hasOpened = true\n\t\t\t\t\t}\n\t\t\t\t\tthis._animateIndicator(isOpen)\n\t\t\t\t\tthis._updateIndicatorSlot()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.requestUpdate())\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._closeSub?.unsubscribe()\n\t}\n\n\trender() {\n\t\tconst isOpen = this._open$.value\n\n\t\tconst detailsClasses = this.classMap({\n\t\t\t'w-full rounded-xl transition-shadow duration-200 ease-out': true,\n\t\t\t'overflow-visible': !this.overlay,\n\t\t\t'overflow-visible relative': this.overlay,\n\t\t})\n\n\t\tconst summaryClasses = this.classMap({\n\t\t\t[this.summaryPadding]: true,\n\t\t\t'select-none relative flex items-center gap-2 rounded-xl': true,\n\t\t\t'transition-colors duration-150': true,\n\t\t\t'hover:bg-surface-on/5 active:bg-surface-on/8': !this.locked,\n\t\t\t'focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1': !this.locked,\n\t\t\t'cursor-pointer group': !this.locked,\n\t\t\t'cursor-default': this.locked,\n\t\t\t'flex-row': this.indicatorPlacement === 'start',\n\t\t\t'flex-row-reverse': this.indicatorPlacement === 'end',\n\t\t})\n\n\t\tconst contentClasses = this.classMap({\n\t\t\t[this.contentPadding]: true,\n\t\t\t'text-sm': true,\n\t\t\t'absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20':\n\t\t\t\tthis.overlay,\n\t\t})\n\n\t\treturn html`\n\t\t\t<details ?open=${isOpen} @toggle=${this._handleToggle} class=${detailsClasses}>\n\t\t\t\t<summary ${this.locked ? '' : magnetic({ strength: 2, radius: 50 })} ${this.locked ? '' : cursorGlow({ radius: 250, intensity: 0.08 })} class=${summaryClasses} tabindex=${this.locked ? -1 : 0} @click=${this._handleSummaryClick}>\n\t\t\t\t\t${!this.hideIndicator\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t${ref(this._indicatorRef)}\n\t\t\t\t\t\t\t\t\tclass=\"flex items-center justify-center w-5 h-5 rounded-full shrink-0 opacity-70 group-hover:opacity-100\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" @slotchange=${this._handleIndicatorSlotChange}>\n\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-5 h-5\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td=\"M9 6L15 12L9 18\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t: ''}\n\n\t\t\t\t\t<span class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<slot name=\"summary\">${this.summary}</slot>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<slot name=\"actions\"></slot>\n\t\t\t\t</summary>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"content-wrapper\"\n\t\t\t\t\tdata-open=${isOpen && !this._closing}\n\t\t\t\t\taria-hidden=${isOpen ? 'false' : 'true'}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content-inner\">\n\t\t\t\t\t\t${this._hasOpened\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"details\"></slot>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</details>\n\t\t`\n\t}\n\n\tprivate _handleSummaryClick(e: MouseEvent) {\n\t\tif ((e.target as HTMLElement).closest('[slot=\"actions\"]')) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this.locked) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this._closing) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\n\t\t// Native animated path (Chromium 131+): browser handles everything via CSS\n\t\tif (this._nativeAnim) return\n\n\t\t// Fallback: manually animate close via CSS transition, then close native details\n\t\tif (this._open$.value) {\n\t\t\te.preventDefault()\n\t\t\tthis._startClose()\n\t\t}\n\t\t// If closed, let native open happen (handled by _handleToggle)\n\t}\n\n\tprivate _handleToggle(e: Event) {\n\t\te.stopPropagation()\n\n\t\tconst ownDetails = this.shadowRoot?.querySelector('details')\n\t\tif (e.target !== ownDetails) return\n\n\t\tconst newState = ownDetails.open\n\n\t\tif (this._nativeAnim) {\n\t\t\t// Native path: handle both open and close\n\t\t\tif (this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t} else {\n\t\t\t// Fallback path: only handle OPEN (close is driven by _startClose)\n\t\t\tif (newState && this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fallback close: trigger CSS grid+opacity transition, then close native <details>.\n\t * The CSS transition (400ms) handles the visual collapse — no WAAPI needed.\n\t */\n\tprivate _startClose() {\n\t\tthis._closing = true\n\t\tthis._closeSub?.unsubscribe()\n\n\t\t// Immediately collapse the grid wrapper via DOM attribute\n\t\tthis._contentRef.value?.setAttribute('data-open', 'false')\n\n\t\t// Animate indicator immediately\n\t\tthis._animateIndicator(false)\n\n\t\t// After CSS transition completes, close native details and update state\n\t\tconst wrapper = this._contentRef.value\n\t\tif (!wrapper) return\n\n\t\tthis._closeSub = fromEvent<TransitionEvent>(wrapper, 'transitionend').pipe(\n\t\t\tfilter(e => e.propertyName === 'grid-template-rows'),\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._closing = false\n\t\t\t\tthis.open = false\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: false })\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprivate _handleIndicatorSlotChange(e: Event) {\n\t\tconst slot = e.target as HTMLSlotElement\n\t\tslot.assignedElements().forEach(el => {\n\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t})\n\t}\n\n\tprivate _updateIndicatorSlot() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot[name=\"indicator\"]') as HTMLSlotElement | null\n\t\tif (slot) {\n\t\t\tslot.assignedElements().forEach(el => {\n\t\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t\t})\n\t\t}\n\t}\n\n\t/** Idempotent indicator rotation — skips if already at target state */\n\tprivate _animateIndicator(isOpen: boolean) {\n\t\tif (this._indicatorIsOpen === isOpen) return\n\t\tthis._indicatorIsOpen = isOpen\n\n\t\tconst indicator = this._indicatorRef.value\n\t\tif (!indicator || reducedMotion$.value) return\n\n\t\tthis._currentAnimation?.cancel()\n\n\t\tthis._currentAnimation = indicator.animate(\n\t\t\t[\n\t\t\t\t{ transform: `rotate(${isOpen ? '0deg' : `${this.indicatorRotate}deg`})` },\n\t\t\t\t{ transform: `rotate(${isOpen ? `${this.indicatorRotate}deg` : '0deg'})` },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-details': SchmancyDetails\n\t}\n}\n"],"mappings":";;;;;;;;;;;AAYe,IAAA,IAAA,cAA8B,EAAa,EAAA,CAAA;CAAA;EAAA,KAAA,SACzC,CAAC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgHiB;GAAA,GACjC,EAAW;GACd,MAAM;GACN,gBAAA,CAAgB;GAAA;;CAKjB,IAAA,OACI;EACH,OAAO,KAAK,OAAO;;CAEpB,IAAA,KAAS,GAAA;EACJ,KAAK,OAAO,UAAU,KACzB,KAAK,OAAO,KAAK,EAAA;;CA6CnB,cAAA;EACC,OAAA,EAAA,KAAA,UAtDqB,IAAA,KAAA,qBAagB,OAAA,KAAA,gBAAA,CAGtB,GAAA,KAAA,kBAGU,IAAA,KAAA,SAAA,CAGjB,GAAA,KAAA,UAAA,CAGC,GAAA,KAAA,iBAGO,OAAA,KAAA,iBAGA,OAAA,KAAA,SAEA,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,gBACJ,GAAA,EAAA,KAAA,cACC,GAAA,EAAA,KAAA,mBAAA,CAEhB,GAAA,KAAA,WAAA,CACR,GAAA,KAAA,cAKH,OAAR,MAAQ,OAAR,CAAA,CACL,IAAI,WAAW,8BAAA,IAAA,CAAA,CACf,IAAI,WAAW,oBAAoB,iBAAA,EAAA,KAAA,aAAA,CAMR,GAI7B,KAAK,OAAO,SACZ,KAAK,UAAU;;CAGhB,oBAAA;EACC,MAAM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AAA,EAAA,EAAA,EAAA,CAG1C,EAAS,EAAE,WAAW,mBAAA,CAAA,CAAA,EAAoB,EAAA,WAAA,kBAAA,KAAA,EAAA,EAAA,EAAA,CAG1C,EAAS,EAAE,WAAW,mBAAA,CAAA,CAAA,EAAoB,EAAA,WAAA,kBAAA,KAAA,EAAA,EAAA,EAAA,CAqB1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CA3KR,EAAc,mBAAA,CAAA,EAAmB,EAAA;AAAA,SAAA,KAAA"}
package/dist/details.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./details-CwSDur6j.cjs`);exports.SchmancyDetails=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./details-BnXbDpt7.cjs`);exports.SchmancyDetails=e.t;
package/dist/details.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./details-Cpg8sH2F.js";
1
+ import { t as e } from "./details-BpFjVclg.js";
2
2
  export { e as SchmancyDetails };
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./animation-CCOIW4wJ.cjs`),t=require(`./reduced-motion-Dzfp_w5x.cjs`),n=require(`./cursor-glow-C8LgCxpI.cjs`),r=require(`./layout-BbCIfIgo.cjs`),i=require(`./magnetic-Bgh7aHHI.cjs`);let a=require(`rxjs`),o=require(`rxjs/operators`),s=require(`lit`),c=require(`lit/async-directive.js`),l=require(`lit/directive.js`);var u={smooth:e.d,snappy:e.f,bouncy:e.l,gentle:e.u},d=class extends c.AsyncDirective{constructor(...e){super(...e),this.element=null,this.originalContent=``,this.animations=[],this.disconnecting$=new a.Subject,this.initialized=!1}render(e){return s.noChange}update(e,[t]){return this.element=e.element,this.initialized||(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new a.Subject),t.text===void 0?this.originalContent=this.element.textContent||``:(this.originalContent=t.text,this.element.textContent=t.text),this.element.style.willChange=`transform, opacity`,t.animation===`typewriter`?this.element.textContent=``:this.element.style.opacity=`0`,this.initialize(t)),s.noChange}disconnected(){this.cleanup()}reconnected(){this.element&&(this.element.style.willChange=`transform, opacity`)}initialize(e){let{animation:t,delay:n=0,duration:r,stagger:i,preset:s=`snappy`,restart:c=!1}=e,l=u[s],d=r??l.duration,f=i??(t===`cyber-glitch`?30:50),p=this.createVisibilityObservable$();(c?p.pipe((0,o.switchMap)(e=>e?(0,a.timer)(n).pipe((0,o.switchMap)(()=>this.runAnimation$(t,d,f,l))):(0,a.defer)(()=>(this.resetToInitial(t),a.EMPTY)))):p.pipe((0,o.filter)(e=>e),(0,o.take)(1),(0,o.delay)(n),(0,o.switchMap)(()=>this.runAnimation$(t,d,f,l)))).pipe((0,o.takeUntil)(this.disconnecting$)).subscribe()}cleanup(){this.disconnecting$.next(),this.disconnecting$.complete(),this.cancelAnimations(),this.element&&(this.element.textContent=this.originalContent,this.element.style.opacity=``,this.element.style.willChange=`auto`,this.element.style.transform=``,this.element.style.filter=``),this.element=null,this.initialized=!1}cancelAnimations(){this.animations.forEach(e=>e.cancel()),this.animations=[]}resetToInitial(e){this.cancelAnimations(),this.element&&(e===`typewriter`?this.element.textContent=``:(this.element.textContent=this.originalContent,this.element.style.opacity=`0`),this.element.style.transform=``,this.element.style.filter=``,this.element.style.willChange=`transform, opacity`)}getAccumulatedOpacity(){if(!this.element)return 0;let e=1,t=this.element.parentElement,n=0;for(;t&&t!==document.body&&n<10;){let r=window.getComputedStyle(t);if(r.visibility===`hidden`||r.display===`none`)return 0;let i=parseFloat(r.opacity)||1;if(i<1&&(e*=i,e<=.5))return e;if(t.assignedSlot){let n=this.getSlotAncestorOpacity(t.assignedSlot);if(n===0)return 0;e*=n}t=t.parentElement,n++}return e}getSlotAncestorOpacity(e){let t=1,n=e.parentElement;for(;n;){let e=window.getComputedStyle(n);if(e.visibility===`hidden`||e.display===`none`)return 0;t*=parseFloat(e.opacity)||1,n=n.parentElement}return t}createVisibilityObservable$(){let e=(0,a.fromEvent)(document,`visibilitychange`).pipe((0,o.startWith)(null),(0,o.map)(()=>document.visibilityState===`visible`),(0,o.distinctUntilChanged)());return(0,a.combineLatest)([(0,a.interval)(200).pipe((0,o.startWith)(0),(0,o.map)(()=>{if(!this.element)return!1;let e=this.element.getBoundingClientRect();return e.width>0&&e.height>0&&e.top<window.innerHeight&&e.bottom>0&&this.getAccumulatedOpacity()>.5}),(0,o.distinctUntilChanged)()),e]).pipe((0,o.map)(([e,t])=>e&&t),(0,o.distinctUntilChanged)())}runAnimation$(e,t,n,r){if(!this.element)return a.EMPTY;switch(e){case`fade-up`:return this.animateFadeUp$(t,r);case`blur-reveal`:return this.animateBlurReveal$(t,n,r);case`word-reveal`:return this.animateWordReveal$(t,n,r);case`cyber-glitch`:return this.animateCyberGlitch$(t,n,r);case`typewriter`:return this.animateTypewriter$(t);default:return a.EMPTY}}animateFadeUp$(e,t){if(!this.element)return a.EMPTY;let n=this.element.animate([{opacity:0,transform:`translateY(30px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:t.easingFallback,fill:`forwards`});return this.animations.push(n),(0,a.from)(n.finished).pipe((0,o.tap)(()=>{this.element&&(this.element.style.opacity=``,this.element.style.transform=``,this.element.style.willChange=`auto`)}),(0,o.catchError)(()=>a.EMPTY))}wrapTextNodes(e){let t=[],n=document.createDocumentFragment(),r=Array.from(e.childNodes);for(let e of r)if(e.nodeType===Node.TEXT_NODE){let r=(e.textContent||``).split(/(\s+)/);for(let e of r)if(/^\s+$/.test(e))n.appendChild(document.createTextNode(e));else if(e.length>0){let r=document.createElement(`span`);r.textContent=e,n.appendChild(r),t.push(r)}}else e instanceof HTMLElement&&(n.appendChild(e),t.push(e));return e.textContent=``,e.appendChild(n),t}animateBlurReveal$(e,t,n){if(!this.element)return a.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,filter:`blur(8px)`,transform:`scale(0.9)`},{opacity:1,filter:`blur(0)`,transform:`scale(1)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,a.from)(i.finished).pipe((0,o.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,o.catchError)(()=>a.EMPTY)):a.EMPTY}animateWordReveal$(e,t,n){if(!this.element)return a.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,transform:`translateY(20px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,a.from)(i.finished).pipe((0,o.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,o.catchError)(()=>a.EMPTY)):a.EMPTY}animateCyberGlitch$(e,t,n){if(!this.element)return a.EMPTY;let r=this.originalContent.split(``),i=document.createDocumentFragment(),s=[];for(let e of r){let t=document.createElement(`span`);t.style.display=`inline-block`,t.style.opacity=`0`,t.textContent=e===` `?`\xA0`:e,i.appendChild(t),s.push(t)}this.element.textContent=``,this.element.appendChild(i),this.element.style.opacity=`1`,s.forEach((i,a)=>{if(r[a]===` `)return void(i.style.opacity=`1`);let o=i.animate([{opacity:0,transform:`translateY(-8px) scale(1.4)`,filter:`blur(4px)`},{opacity:1,transform:`translateY(0) scale(1)`,filter:`blur(0)`}],{duration:e,easing:n.easingFallback,delay:a*t,fill:`forwards`});this.animations.push(o)});let c=this.animations[this.animations.length-1];return c?(0,a.from)(c.finished).pipe((0,o.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,s.forEach(e=>{e.style.willChange=`auto`}))}),(0,o.catchError)(()=>a.EMPTY)):a.EMPTY}animateTypewriter$(e){if(!this.element)return a.EMPTY;let t=this.originalContent,n=t.length;if(n===0)return a.EMPTY;let r=e/n,i=0;return(0,a.interval)(r).pipe((0,o.tap)(()=>{i++,this.element&&(this.element.textContent=t.slice(0,i))}),(0,o.takeWhile)(()=>i<n),(0,o.finalize)(()=>{this.element&&(this.element.textContent=this.originalContent,this.element.style.willChange=`auto`)}))}},f=(0,c.directive)(d),p=class extends l.Directive{constructor(e){super(e),this.config={}}update(e,[t]){if(e.type!==l.PartType.ELEMENT)throw Error("The `classMap` directive must be used in the `class` attribute");let n=e.element;this.config=t,this.config.bgColor&&(n.style.backgroundColor=this.config.bgColor),this.config.color&&(n.style.color=this.config.color)}render(e){return this.config=e,s.nothing}},m=(0,l.directive)(p),h=new WeakMap;function g(e,t){let n=e.match(/var\(([^,)]+)/);return n&&getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim()||t}var _=class extends l.Directive{constructor(e){if(super(e),e.type!==l.PartType.ELEMENT)throw Error(`confirmClick directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=h.get(r);if(i){if(i.callback=t,this.optionsEqual(i.options,n))return;this.cleanup(r)}let o=new a.Subject,s=this.setupClickListener(r,n??{},o);h.set(r,{subscription:s,callback:t,options:n??{},overlayElement:null,isConfirming:!1,cancel$:o})}optionsEqual(e,t){return t?e.timeout===t.timeout&&e.icon===t.icon:Object.keys(e).length===0}setupClickListener(e,t,n){return(0,a.fromEvent)(e,`click`).pipe((0,o.tap)(r=>{let i=h.get(e);i&&!i.isConfirming&&(r.stopPropagation(),r.preventDefault(),i.isConfirming=!0,this.showOverlay(e,i,t,n))})).subscribe()}showOverlay(e,t,n,r){let i=n.timeout??3e3,s=e,c=n.icon??s.icon??s._capturedIcon??e.textContent?.trim()??`warning`,l=g(`var(--schmancy-sys-color-error-default)`,`#dc2626`),u=g(`var(--schmancy-sys-color-error-on)`,`#ffffff`),d=g(`var(--schmancy-sys-color-error-container)`,`#fecaca`),f=document.createElement(`div`);f.setAttribute(`role`,`status`),f.setAttribute(`aria-label`,`Click again to confirm`);let p=e.getBoundingClientRect(),m=p.width,_=p.height,v=window.devicePixelRatio||1,y=getComputedStyle(e);Object.assign(f.style,{position:`fixed`,top:`${p.top}px`,left:`${p.left}px`,width:`${m}px`,height:`${_}px`,zIndex:`10000`,borderRadius:y.borderRadius||`50%`,overflow:`hidden`,cursor:`pointer`,opacity:`0`,transform:`scale(0.6)`,transition:`opacity 250ms cubic-bezier(0.22, 1.25, 0.36, 1), transform 300ms cubic-bezier(0.22, 1.25, 0.36, 1)`});let b=document.createElement(`canvas`);b.width=m*v,b.height=_*v,b.style.width=`${m}px`,b.style.height=`${_}px`,b.style.position=`absolute`,b.style.top=`0`,b.style.left=`0`,f.appendChild(b);let x=Math.round(.5*Math.min(m,_)),S=document.createElement(`schmancy-icon`);S.textContent=c,S.setAttribute(`size`,`${x}px`),Object.assign(S.style,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:u,pointerEvents:`none`}),f.appendChild(S),document.body.appendChild(f),t.overlayElement=f,(0,a.of)(null).pipe((0,o.observeOn)(a.animationFrameScheduler)).subscribe(()=>{f.style.opacity=`1`,f.style.transform=`scale(1)`});let C=b.getContext(`2d`);if(!C)return;C.scale(v,v);let w=m/2,T=_/2,E=Math.min(m,_)/2-1,D=E-3,O=e=>{C.clearRect(0,0,m,_),C.beginPath(),C.arc(w,T,D,0,2*Math.PI),C.fillStyle=l,C.fill();let t=1-e;if(t>0){let e=-Math.PI/2,n=e+2*Math.PI*t;C.beginPath(),C.arc(w,T,E,e,n),C.arc(w,T,D,n,e,!0),C.closePath(),C.fillStyle=d,C.fill()}};O(0);let k=performance.now(),A=(0,a.interval)(0,a.animationFrameScheduler).pipe((0,o.map)(()=>(performance.now()-k)/i),(0,o.takeWhile)(e=>e<=1),(0,o.takeUntil)(r),(0,o.tap)(e=>O(e))).subscribe({complete:()=>{h.get(e)?.isConfirming&&this.hideOverlay(e)}});t.subscription.add(A);let j=(0,a.merge)((0,a.fromEvent)(f,`click`).pipe((0,o.take)(1),(0,o.tap)(()=>{t.callback(),this.hideOverlay(e)})),(0,a.fromEvent)(document,`click`,{capture:!0}).pipe((0,o.filter)(t=>!f.contains(t.target)&&!e.contains(t.target)),(0,o.take)(1),(0,o.tap)(()=>this.hideOverlay(e))),(0,a.fromEvent)(document,`keydown`).pipe((0,o.filter)(e=>e.key===`Escape`),(0,o.take)(1),(0,o.tap)(()=>this.hideOverlay(e)))).pipe((0,o.take)(1),(0,o.takeUntil)(r)).subscribe();t.subscription.add(j)}hideOverlay(e){let t=h.get(e);if(t&&(t.cancel$.next(),t.isConfirming=!1,t.overlayElement)){let e=t.overlayElement;e.style.opacity=`0`,e.style.transform=`scale(0.6)`,(0,a.timer)(250).pipe((0,o.tap)(()=>{document.body.contains(e)&&document.body.removeChild(e)})).subscribe(),t.overlayElement=null}}cleanup(e){let t=h.get(e);t&&(t.cancel$.next(),t.cancel$.complete(),t.subscription.unsubscribe(),t.overlayElement&&document.body.contains(t.overlayElement)&&document.body.removeChild(t.overlayElement),h.delete(e))}disconnected(e){this.cleanup(e.element)}reconnected(e){let t=e.element,n=h.get(t);if(n){let e=new a.Subject,r=this.setupClickListener(t,n.options,e);h.set(t,{subscription:r,callback:n.callback,options:n.options,overlayElement:null,isConfirming:!1,cancel$:e})}}},v=(0,l.directive)(_),y=class extends c.AsyncDirective{constructor(...e){super(...e),this.element=null,this.items=[],this.subscription=null,this.typewriterSub=null,this.currentAnimation=null,this.addDisplayEl=null,this.disconnecting$=new a.Subject,this.initialized=!1}render(e){return s.noChange}update(e,[t={}]){if(this.element=e.element,!this.initialized&&this.isConnected){if(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new a.Subject),this.items=Array.from(this.element.children).filter(e=>e instanceof HTMLElement),this.items.length===0)return s.noChange;this.element.style.display=`inline-grid`,this.element.style.verticalAlign=`bottom`,this.items.forEach((e,t)=>{e.style.gridColumn=`1`,e.style.gridRow=`1`,e.style.visibility=t===0?``:`hidden`}),this.startCycling(t)}return s.noChange}disconnected(){this.cleanup()}reconnected(){}startCycling(e){let{mode:t=`replace`}=e;this.items.length<2||(t===`add`?this.startAddCycling(e):this.startReplaceCycling(e))}startReplaceCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0}=e,s=e=>(0,a.defer)(()=>new a.Observable(i=>{let s=this.items[e],c=(e-1+this.items.length)%this.items.length,l=this.items[c],u=parseInt(s.dataset.hold||``,10)||n,d=this.transitionItems(l,s,t,r).pipe((0,o.switchMap)(()=>(0,a.timer)(u)),(0,o.take)(1),(0,o.takeUntil)(this.disconnecting$)).subscribe({next:()=>{i.next(),i.complete()},error:e=>i.error(e)});return()=>d.unsubscribe()})),c=parseInt(this.items[0].dataset.hold||``,10)||n,l=(0,a.concat)((0,a.defer)(()=>new a.Observable(e=>{let t=(0,a.timer)(c).pipe((0,o.takeUntil)(this.disconnecting$)).subscribe({next:()=>{e.next(),e.complete()}});return()=>t.unsubscribe()})),(0,a.concat)(...[...Array.from({length:this.items.length},(e,t)=>t).slice(1),0].map(e=>s(e))).pipe((0,o.repeat)()));this.subscription=(0,a.timer)(i).pipe((0,o.switchMap)(()=>l),(0,o.takeUntil)(this.disconnecting$)).subscribe()}startAddCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0,separator:s=`, `}=e,c=this.items.map(e=>e.textContent||``);this.items.forEach(e=>{e.style.display=`none`});let l=document.createElement(`span`);this.element.appendChild(l),this.addDisplayEl=l;let u=(0,a.defer)(()=>{l.textContent=``;let e=``,i=c.map((i,c)=>{let u=parseInt(this.items[c].dataset.hold||``,10)||n,d=(c>0?s:``)+i;return(0,a.defer)(()=>t===`typewriter`?this.typewriterAdd(l,e,d,r).pipe((0,o.tap)(()=>{e+=d}),(0,o.switchMap)(()=>(0,a.timer)(u))):(0,a.defer)(()=>(e+=d,l.textContent=e,(0,a.timer)(u))))}),u=(0,a.defer)(()=>{let t=l.animate([{opacity:1},{opacity:0}],{duration:r,fill:`forwards`});return this.currentAnimation=t,(0,a.from)(t.finished).pipe((0,o.tap)(()=>{t.cancel(),l.textContent=``,l.style.opacity=``,e=``}),(0,o.switchMap)(()=>(0,a.timer)(300)))});return(0,a.concat)(...i,u)});this.subscription=(0,a.timer)(i).pipe((0,o.switchMap)(()=>u.pipe((0,o.repeat)())),(0,o.takeUntil)(this.disconnecting$)).subscribe()}typewriterAdd(e,t,n,r){if(n.length===0)return(0,a.of)(void 0);let i=r/n.length;return new a.Observable(r=>{let s=0,c=(0,a.interval)(i).pipe((0,o.tap)(()=>{s++,e.textContent=t+n.slice(0,s)}),(0,o.takeWhile)(()=>s<n.length),(0,o.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{e.textContent=t+n,r.next(),r.complete()}});return()=>c.unsubscribe()})}transitionItems(e,t,n,r){switch(this.currentAnimation?.cancel(),this.currentAnimation=null,this.typewriterSub?.unsubscribe(),this.typewriterSub=null,n){case`slide`:return this.slideTransition(e,t,r);case`typewriter`:return this.typewriterTransition(e,t,r);default:return this.fadeTransition(e,t,r)}}fadeTransition(e,t,n){let r=e.animate([{opacity:1},{opacity:0}],{duration:n/2,fill:`forwards`});return this.currentAnimation=r,(0,a.from)(r.finished).pipe((0,o.switchMap)(()=>{r.cancel(),e.style.visibility=`hidden`,t.style.visibility=``;let i=t.animate([{opacity:0},{opacity:1}],{duration:n/2,fill:`forwards`});return this.currentAnimation=i,(0,a.from)(i.finished).pipe((0,o.tap)(()=>{i.cancel()}),(0,o.map)(()=>{}),(0,o.catchError)(()=>a.EMPTY))}),(0,o.catchError)(()=>a.EMPTY))}slideTransition(e,t,n){let r=`cubic-bezier(0.4, 0, 0.2, 1)`;t.style.visibility=``;let i=e.animate([{transform:`translateY(0)`,opacity:1},{transform:`translateY(-100%)`,opacity:0}],{duration:n,fill:`forwards`,easing:r}),s=t.animate([{transform:`translateY(100%)`,opacity:0},{transform:`translateY(0)`,opacity:1}],{duration:n,fill:`forwards`,easing:r});return this.currentAnimation=s,(0,a.from)(s.finished).pipe((0,o.tap)(()=>{i.cancel(),s.cancel(),e.style.visibility=`hidden`}),(0,o.map)(()=>{}),(0,o.catchError)(()=>a.EMPTY))}typewriterTransition(e,t,n){let r=e.textContent||``,i=t.textContent||``,s=r.length+i.length;if(s===0)return e.style.visibility=`hidden`,t.style.visibility=``,(0,a.of)(void 0);let c=n/s;return new a.Observable(n=>{let s=r.length;return this.typewriterSub=(0,a.concat)((0,a.interval)(c).pipe((0,o.tap)(()=>{s--,e.textContent=r.slice(0,s)}),(0,o.takeWhile)(()=>s>0)),(0,a.defer)(()=>(e.style.visibility=`hidden`,e.textContent=r,t.style.visibility=``,t.textContent=``,(0,a.of)(null))),(0,a.defer)(()=>{let e=0;return(0,a.interval)(c).pipe((0,o.tap)(()=>{e++,t.textContent=i.slice(0,e)}),(0,o.takeWhile)(()=>e<i.length))})).pipe((0,o.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{t.textContent=i,n.next(),n.complete()}}),()=>{this.typewriterSub?.unsubscribe(),this.typewriterSub=null}})}cleanup(){this.disconnecting$.next(),this.disconnecting$.complete(),this.currentAnimation?.cancel(),this.currentAnimation=null,this.typewriterSub?.unsubscribe(),this.typewriterSub=null,this.subscription?.unsubscribe(),this.subscription=null,this.addDisplayEl&&=(this.addDisplayEl.remove(),null),this.items.forEach((e,t)=>{e.style.gridColumn=``,e.style.gridRow=``,e.style.visibility=t===0?``:`hidden`,e.style.opacity=``,e.style.transform=``}),this.element=null,this.items=[],this.initialized=!1}},b=(0,c.directive)(y),x=class extends c.AsyncDirective{constructor(...e){super(...e),this.maxBlur=8,this.duration=400,this.isBlurred=!1,this.transitionSet=!1}render(e){}update(e,[n]){if(e.type!==l.PartType.ELEMENT)throw Error(`depthOfField directive must be used on an element`);this.element=e.element,this.maxBlur=n.maxBlur??8,this.duration=n.duration??400,this.transitionSet||t.t.value||(this.element.style.transition=`filter ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1), scale ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1)`,this.transitionSet=!0),n.active&&!this.isBlurred?this.applyBlur():!n.active&&this.isBlurred&&this.clearBlur()}applyBlur(){this.element.style.filter=`blur(${this.maxBlur}px) saturate(60%)`,this.element.style.scale=`1.01`,this.isBlurred=!0}clearBlur(){this.element.style.filter=``,this.element.style.scale=``,this.isBlurred=!1}disconnected(){this.isBlurred&&this.clearBlur()}reconnected(){}},S=(0,l.directive)(x),C=new a.BehaviorSubject(null),w=new a.BehaviorSubject(null),T=new Map,E=new Map,D=[];function O(e){D.push(`[${new Date().toISOString().slice(11,23)}] ${e}`)}var k=null;w.pipe((0,o.distinctUntilChanged)((e,t)=>e?.target===t?.target&&e?.position===t?.position)).subscribe(e=>{if(!e)return void(k&&(k.style.display=`none`));if(t.t.value)return;let n=function(){if(k)return k;let e=document.createElement(`div`);e.setAttribute(`data-schmancy-drop-line`,``),Object.assign(e.style,{position:`fixed`,height:`2px`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,borderRadius:`1px`,pointerEvents:`none`,zIndex:`10000`,transition:`top 100ms ease, left 100ms ease, width 100ms ease`,boxShadow:`0 0 4px var(--schmancy-sys-color-tertiary-default, #6750A4)`,display:`none`});for(let t of[`left`,`right`]){let n=document.createElement(`div`);Object.assign(n.style,{position:`absolute`,width:`6px`,height:`6px`,borderRadius:`50%`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,top:`-2px`,[t]:`-3px`}),e.appendChild(n)}return document.body.appendChild(e),k=e,e}(),r=e.target.getBoundingClientRect(),i=e.position===`before`?r.top-1:r.bottom+1;Object.assign(n.style,{top:`${i}px`,left:`${r.left}px`,width:`${r.width}px`,display:`block`})});var A=class extends l.Directive{constructor(...e){super(...e),this.destroy$=new a.Subject}update(n,[r]){if(this.id=r,!this.element){let r=n.element;this.element=r,r.draggable=!0,r.style.cursor=`grab`,(0,a.fromEvent)(r,`dragstart`).pipe((0,o.tap)(e=>{e.stopPropagation(),e.dataTransfer?.setData(`application/json`,JSON.stringify({id:this.id})),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`),r.style.cursor=`grabbing`,D.length=0,O(`DRAGSTART id=${this.id} tag=${r.tagName}`),C.next(this.id),E.clear();let t=r.parentElement;if(t)for(let[e,n]of T)n.parentElement===t&&E.set(e,n.getBoundingClientRect())}),(0,o.observeOn)(a.animationFrameScheduler),(0,o.tap)(()=>{t.t.value||(r.style.transition=`transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease`,r.style.transform=`scale(1.03)`,r.style.boxShadow=`0 8px 25px rgba(0,0,0,0.15)`,r.style.opacity=`0.6`,r.style.zIndex=`1000`,r.style.pointerEvents=`none`)}),(0,o.switchMap)(()=>(0,a.fromEvent)(r,`dragend`).pipe((0,o.take)(1),(0,o.tap)(()=>{let n=w.value;if(r.style.removeProperty(`transition`),r.style.removeProperty(`transform`),r.style.removeProperty(`box-shadow`),r.style.removeProperty(`opacity`),r.style.removeProperty(`z-index`),r.style.removeProperty(`pointer-events`),r.style.cursor=`grab`,n){let{target:r,destinationId:i,position:s}=n;O(`DROP source=${this.id} dest=${i} pos=${s}`),r.dispatchEvent(new CustomEvent(`drop`,{detail:{source:this.id,destination:i,position:s},bubbles:!0,composed:!0})),(0,a.timer)(0,a.animationFrameScheduler).pipe((0,o.skip)(1),(0,o.take)(1)).subscribe(()=>{if(!t.t.value&&E.size!==0){for(let[t,n]of E){let r=T.get(t);if(!r)continue;let i=r.getBoundingClientRect(),a=n.left-i.left,o=n.top-i.top;Math.abs(a)<1&&Math.abs(o)<1||r.animate([{transform:`translate(${a}px, ${o}px)`},{transform:`translate(0,0)`}],{duration:e.f.duration,easing:e.f.easingFallback,fill:`none`})}E.clear()}})}C.next(null),w.next(null),O(`DRAGEND id=${this.id}`),D.length!==0&&(D.length=0)}))),(0,o.takeUntil)(this.destroy$)).subscribe()}return this.registeredId&&this.registeredId!==r&&T.delete(this.registeredId),T.set(r,this.element),this.registeredId=r,s.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.registeredId&&T.delete(this.registeredId),this.element=void 0}reconnected(){this.destroy$=new a.Subject,this.element=void 0}render(e){return s.nothing}},j=(0,l.directive)(A),M=class extends l.Directive{constructor(...e){super(...e),this.destroy$=new a.Subject}update(e,[t]){if(this.destinationId=t,!this.element){let t=e.element;this.element=t,(0,a.fromEvent)(t,`dragenter`).pipe((0,o.tap)(e=>{O(`NATIVE-DRAGENTER dest=${this.destinationId}`),e.preventDefault()}),(0,o.takeUntil)(this.destroy$)).subscribe(),(0,a.fromEvent)(t,`dragover`).pipe((0,o.tap)(e=>{O(`NATIVE-DRAGOVER dest=${this.destinationId}`),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,o.takeUntil)(this.destroy$)).subscribe(),(0,a.fromEvent)(t,`drop`).pipe((0,o.tap)(e=>{e.preventDefault(),O(`NATIVE-DROP dest=${this.destinationId}`)}),(0,o.takeUntil)(this.destroy$)).subscribe(),C.pipe((0,o.switchMap)(e=>e&&e!==this.destinationId?(O(`DROP-ACTIVE dest=${this.destinationId} src=${e}`),(0,a.fromEvent)(t,`dragover`).pipe((0,o.tap)(e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,o.tap)(n=>{let r=function(e,t,n){let r=t.getBoundingClientRect(),i=n?T.get(n):null;if(!i)return e.clientY<r.top+r.height/2?`before`:`after`;let a=i.getBoundingClientRect();if(Math.abs(a.top-r.top)<r.height/2){let t=r.left+r.width/2;return a.left>r.left?e.clientX<t?`before`:null:e.clientX>=t?`after`:null}let o=r.top+r.height/2;return a.top>r.top?e.clientY<o?`before`:null:e.clientY>=o?`after`:null}(n,t,e);w.next(r?{target:t,destinationId:this.destinationId,position:r}:null)}))):(w.next(null),a.EMPTY)),(0,o.takeUntil)(this.destroy$)).subscribe()}return s.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.element=void 0}reconnected(){this.destroy$=new a.Subject,this.element=void 0}render(e){return s.nothing}},ee=(0,l.directive)(M),N=class extends c.AsyncDirective{constructor(...e){super(...e),this.hasAnimated=!1}render(e){}update(e,[n]){if(e.type!==l.PartType.ELEMENT)throw Error(`gravity directive must be used on an element`);if(this.element=e.element,this.options=n,this.hasAnimated)return;if(t.t.value)return void(this.hasAnimated=!0);let r=Math.max(.3,Math.min(3,n?.mass??1)),i=n?.distance??30,a=(n?.delay??0)+(n?.stagger??0);this.animate(r,i,a),this.hasAnimated=!0}reconnected(){if(this.hasAnimated=!1,this.options&&!t.t.value){let e=Math.max(.3,Math.min(3,this.options.mass??1)),t=this.options.distance??30,n=(this.options.delay??0)+(this.options.stagger??0);this.animate(e,t,n),this.hasAnimated=!0}}animate(t,n,r){let i=t<.7?e.l:e.d,s=i.duration*(1/Math.sqrt(t)),c=1/t*n;this.animation?.cancel(),this.element.style.willChange=`transform, opacity`,this.animation=this.element.animate([{opacity:0,transform:`translateY(-${c}px)`},{opacity:1,transform:`translateY(0)`}],{duration:s,delay:r,easing:i.easingFallback,fill:`backwards`}),(0,a.from)(this.animation.finished).pipe((0,o.take)(1),(0,o.tap)(()=>{this.element.style.willChange=``,this.animation=void 0}),(0,o.catchError)(()=>a.EMPTY)).subscribe()}disconnected(){this.animation?.cancel(),this.animation=void 0}},P=(0,l.directive)(N),F=class extends c.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e,t){return s.noChange}update(e,[t,n]){let r=e.element,i,c,l,u={};if(typeof t==`function`?(i=t,u=n||{}):(c=t.onEnter,l=t.onExit,u=t.options||{},i=e=>{e&&c&&c(),!e&&l&&l()}),this.state?.element===r)return s.noChange;this.cleanup();let{once:d=!1,threshold:f=0,rootMargin:p=`0px`,delay:m=0}=u,h=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0],n=t.isIntersecting;m>0&&n?(this.state.delayTimerSub&&this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=(0,a.timer)(m).pipe((0,o.take)(1),(0,o.tap)(()=>this.triggerCallback(n,t))).subscribe()):(!n&&this.state.delayTimerSub&&(this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=void 0),this.triggerCallback(n,t))},{threshold:f,rootMargin:p});return this.state={element:r,observer:h,callback:i,onEnter:c,onExit:l,once:d,delay:m,hasFired:!1},h.observe(r),s.noChange}triggerCallback(e,t){this.state&&(this.state.once?e&&!this.state.hasFired&&(this.state.hasFired=!0,this.state.callback(e,t),this.cleanup()):this.state.callback(e,t))}cleanup(){this.state&&=(this.state.delayTimerSub?.unsubscribe(),this.state.delayTimerSub=void 0,this.state.observer.disconnect(),null)}pause(){this.state&&(this.state.delayTimerSub?.unsubscribe(),this.state.observer.disconnect())}disconnected(){this.pause()}reconnected(){this.state&&this.state.observer.observe(this.state.element)}},I=(0,c.directive)(F),L={active:!0,intensity:`medium`},R={light:{blur:12,sat:1.3,bright:1.05,tint:.45,border:.2,shadow:.06},medium:{blur:16,sat:1.4,bright:1.08,tint:.55,border:.28,shadow:.08},strong:{blur:24,sat:1.5,bright:1.12,tint:.65,border:.35,shadow:.1}},z=[`backdropFilter`,`background`,`boxShadow`,`borderTop`,`borderBottom`],te=class extends c.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return s.noChange}update(e,[t={}]){let n=e.element,r={...L,...t};return r.active?this.activate(n,r):this.cleanup(),s.noChange}activate(e,t){if(!this.isConnected)return;let n=R[t.intensity];if(!this.state){let t={};for(let n of z)t[n]=e.style[n];this.state={element:e,origStyles:t}}this.applyStyles(e,n)}applyStyles(e,t){let n=`blur(${t.blur}px) saturate(${t.sat}) brightness(${t.bright})`;e.style.backdropFilter=n,e.style.setProperty(`-webkit-backdrop-filter`,n),e.style.background=`rgba(var(--md-sys-color-surface-container, 255 255 255) / ${t.tint})`;let r=t.border;e.style.boxShadow=[`inset 0 1px 0 0 rgba(255,255,255, ${1.5*r})`,`inset 0 2px 6px rgba(255,255,255, ${.6*r})`,`inset 0 -1px 0 0 rgba(255,255,255, ${.25*r})`,`0 1px 3px rgba(0,0,0, ${t.shadow})`,`0 6px 20px rgba(0,0,0, ${.5*t.shadow})`].join(`, `),e.style.borderTop=`0.5px solid rgba(255,255,255, ${.9*r})`,e.style.borderBottom=`0.5px solid rgba(0,0,0, 0.05)`}cleanup(){if(!this.state)return;let{element:e,origStyles:t}=this.state;for(let n of z)e.style[n]=t[n];e.style.removeProperty(`-webkit-backdrop-filter`),this.state=null}disconnected(){this.cleanup()}reconnected(){}},ne=(0,c.directive)(te),B=`schmancy-lb-rotate`,V=!1;function H(){if(V)return;let e=document.createElement(`style`);e.id=`schmancy-living-border-shared`,e.textContent=`\n\t\t@property --${B}-angle {\n\t\t\tsyntax: '<angle>';\n\t\t\tinitial-value: 0deg;\n\t\t\tinherits: false;\n\t\t}\n\t\t@keyframes ${B} {\n\t\t\tto { --${B}-angle: 360deg; }\n\t\t}\n\t`,document.head.appendChild(e),V=!0}var U=class extends c.AsyncDirective{constructor(...e){super(...e),this.teardown$=new a.Subject,this.didSetPosition=!1}render(e){}update(e,[n]){if(e.type!==l.PartType.ELEMENT)throw Error(`livingBorder directive must be used on an element`);let r=JSON.stringify(n??{});this.element&&r===this.prevKey||(this.prevKey=r,this.element=e.element,this.lastOptions=n,t.t.value||(this.teardown$.next(),this.cleanup(),H(),this.createBorderOverlay(n)))}reconnected(){this.lastOptions&&!t.t.value&&(H(),this.createBorderOverlay(this.lastOptions))}createBorderOverlay(e){let t=e?.width??1,n=e?.color??`var(--schmancy-sys-color-primary-default)`,r=e?.spread??6,i=e?.duration??3e3,s=e?.onHover??!1;getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`,this.didSetPosition=!0),this.borderEl=document.createElement(`div`),this.borderEl.setAttribute(`aria-hidden`,`true`);let c=`-${t}px`;Object.assign(this.borderEl.style,{position:`absolute`,top:c,left:c,right:c,bottom:c,borderRadius:`inherit`,pointerEvents:`none`,zIndex:`0`,background:`conic-gradient(\n\t\t\t\tfrom var(--${B}-angle),\n\t\t\t\ttransparent 0%, transparent 30%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 45%,\n\t\t\t\t${n} 50%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 55%,\n\t\t\t\ttransparent 70%, transparent 100%\n\t\t\t)`,mask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,maskComposite:`exclude`,WebkitMaskComposite:`xor`,padding:`${t}px`,animation:`${B} ${i}ms linear infinite`,filter:`blur(${.3*r}px) drop-shadow(0 0 ${r}px color-mix(in srgb, ${n} 40%, transparent))`,opacity:s?`0`:`0.5`,transition:`opacity 300ms ease`}),this.element.prepend(this.borderEl),(0,a.merge)((0,a.fromEvent)(this.element,`mouseenter`).pipe((0,o.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=s?`0.7`:`0.8`)})),(0,a.fromEvent)(this.element,`mouseleave`).pipe((0,o.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=s?`0`:`0.5`)}))).pipe((0,o.takeUntil)(this.teardown$)).subscribe()}cleanup(){this.borderEl?.remove(),this.borderEl=void 0}disconnected(){this.teardown$.next(),this.cleanup(),this.didSetPosition&&this.element&&(this.element.style.position=``,this.didSetPosition=!1)}},W=(0,l.directive)(U),G=new WeakMap,K=class extends l.Directive{constructor(e){if(super(e),e.type!==l.PartType.ELEMENT)throw Error(`longPress directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=G.get(r);if(i){if(i.callback===t&&this.optionsEqual(i.options,n))return;i.subscription.unsubscribe()}let a=this.setupLongPress(r,t,n);G.set(r,{subscription:a,callback:t,options:n||{}})}optionsEqual(e,t){return t?e.duration===t.duration&&e.movementThreshold===t.movementThreshold:Object.keys(e).length===0}setupLongPress(e,t,n={}){let r=n.duration??500,i=n.movementThreshold??10,s=(0,a.fromEvent)(e,`pointerdown`),c=(0,a.fromEvent)(window,`pointerup`),l=(0,a.fromEvent)(window,`pointermove`),u=(0,a.fromEvent)(window,`pointercancel`);return s.pipe((0,o.switchMap)(e=>{let n=e.clientX,s=e.clientY,d=(0,a.merge)(c,u,l.pipe((0,o.filter)(e=>{let t=e.clientX-n,r=e.clientY-s;return Math.sqrt(t*t+r*r)>i}))).pipe((0,o.first)());return(0,a.timer)(r).pipe((0,o.takeUntil)(d),(0,o.tap)(()=>t()))})).subscribe()}disconnected(e){let t=e.element,n=G.get(t);n&&(n.subscription.unsubscribe(),G.delete(t))}reconnected(e){let t=e.element,n=G.get(t);n&&(n.subscription=this.setupLongPress(t,n.callback,n.options))}},q=(0,l.directive)(K),J={active:!0,autoHideDuration:3e3,background:!0,intensity:1,blur:1,speed:1,fadeInDuration:1e3,fadeOutDuration:8e3,idleOpacity:.6,idleBreathe:!0,temperature:0,chromaticAberration:1,particleCount:30},Y=`cubic-bezier(0.37, 0, 0.63, 1)`,X=`cubic-bezier(0.25, 0.1, 0.25, 1)`,Z=!1,re=class e{constructor(){this.elementToDirective=new WeakMap,this.instances=new Set,this.observer=null,this.visibilitySub=null,this.tabVisible=!0}static{this._instance=null}static get instance(){return e._instance||=new e,e._instance}register(e,t){let n=this.instances.size===0;this.instances.add(e),this.elementToDirective.set(t,e),n&&this.setup(),this.observer?.observe(t)}unregister(e,t){this.observer?.unobserve(t),this.elementToDirective.delete(t),this.instances.delete(e),this.instances.size===0&&this.teardown()}setup(){this.observer=new IntersectionObserver(e=>{for(let t of e){let e=this.elementToDirective.get(t.target);e&&e.onVisibilityChange(t.isIntersecting&&this.tabVisible)}},{threshold:0}),this.visibilitySub=(0,a.fromEvent)(document,`visibilitychange`).pipe((0,o.tap)(()=>{this.tabVisible=document.visibilityState===`visible`;for(let e of this.instances)e.onVisibilityChange(this.tabVisible)})).subscribe()}teardown(){this.observer&&=(this.observer.disconnect(),null),this.visibilitySub&&=(this.visibilitySub.unsubscribe(),null)}},ie=class extends c.AsyncDirective{constructor(...e){super(...e),this.state=null,this.coordinator=re.instance}render(e){return s.noChange}update(e,[t={}]){let n=e.element,r={...J,...t};return r.active?this.show(n,r):this.hide(r),s.noChange}onVisibilityChange(e){if(!this.state?.overlay)return;let t=this.state.isVisible;this.state.isVisible=e,t!==e&&(this.state.overlay.classList.toggle(`paused`,!e),this.state.overlay.classList.toggle(`running`,e))}show(e,n){(function(){if(Z||typeof document>`u`)return;Z=!0;let e=document.createElement(`style`);e.id=`nebula-directive-styles`,e.textContent=`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./animation-CCOIW4wJ.cjs`),t=require(`./reduced-motion-Dzfp_w5x.cjs`),n=require(`./cursor-glow-C8LgCxpI.cjs`),r=require(`./theme.service-CnFUmUpc.cjs`),i=require(`./layout-BbCIfIgo.cjs`),a=require(`./magnetic-Bgh7aHHI.cjs`);let o=require(`rxjs`),s=require(`rxjs/operators`),c=require(`lit`),l=require(`lit/async-directive.js`),u=require(`lit/directive.js`);var d={smooth:e.d,snappy:e.f,bouncy:e.l,gentle:e.u},f=class extends l.AsyncDirective{constructor(...e){super(...e),this.element=null,this.originalContent=``,this.animations=[],this.disconnecting$=new o.Subject,this.initialized=!1}render(e){return c.noChange}update(e,[t]){return this.element=e.element,this.initialized||(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new o.Subject),t.text===void 0?this.originalContent=this.element.textContent||``:(this.originalContent=t.text,this.element.textContent=t.text),this.element.style.willChange=`transform, opacity`,t.animation===`typewriter`?this.element.textContent=``:this.element.style.opacity=`0`,this.initialize(t)),c.noChange}disconnected(){this.cleanup()}reconnected(){this.element&&(this.element.style.willChange=`transform, opacity`)}initialize(e){let{animation:t,delay:n=0,duration:r,stagger:i,preset:a=`snappy`,restart:c=!1}=e,l=d[a],u=r??l.duration,f=i??(t===`cyber-glitch`?30:50),p=this.createVisibilityObservable$();(c?p.pipe((0,s.switchMap)(e=>e?(0,o.timer)(n).pipe((0,s.switchMap)(()=>this.runAnimation$(t,u,f,l))):(0,o.defer)(()=>(this.resetToInitial(t),o.EMPTY)))):p.pipe((0,s.filter)(e=>e),(0,s.take)(1),(0,s.delay)(n),(0,s.switchMap)(()=>this.runAnimation$(t,u,f,l)))).pipe((0,s.takeUntil)(this.disconnecting$)).subscribe()}cleanup(){this.disconnecting$.next(),this.disconnecting$.complete(),this.cancelAnimations(),this.element&&(this.element.textContent=this.originalContent,this.element.style.opacity=``,this.element.style.willChange=`auto`,this.element.style.transform=``,this.element.style.filter=``),this.element=null,this.initialized=!1}cancelAnimations(){this.animations.forEach(e=>e.cancel()),this.animations=[]}resetToInitial(e){this.cancelAnimations(),this.element&&(e===`typewriter`?this.element.textContent=``:(this.element.textContent=this.originalContent,this.element.style.opacity=`0`),this.element.style.transform=``,this.element.style.filter=``,this.element.style.willChange=`transform, opacity`)}getAccumulatedOpacity(){if(!this.element)return 0;let e=1,t=this.element.parentElement,n=0;for(;t&&t!==document.body&&n<10;){let r=window.getComputedStyle(t);if(r.visibility===`hidden`||r.display===`none`)return 0;let i=parseFloat(r.opacity)||1;if(i<1&&(e*=i,e<=.5))return e;if(t.assignedSlot){let n=this.getSlotAncestorOpacity(t.assignedSlot);if(n===0)return 0;e*=n}t=t.parentElement,n++}return e}getSlotAncestorOpacity(e){let t=1,n=e.parentElement;for(;n;){let e=window.getComputedStyle(n);if(e.visibility===`hidden`||e.display===`none`)return 0;t*=parseFloat(e.opacity)||1,n=n.parentElement}return t}createVisibilityObservable$(){let e=(0,o.fromEvent)(document,`visibilitychange`).pipe((0,s.startWith)(null),(0,s.map)(()=>document.visibilityState===`visible`),(0,s.distinctUntilChanged)());return(0,o.combineLatest)([(0,o.interval)(200).pipe((0,s.startWith)(0),(0,s.map)(()=>{if(!this.element)return!1;let e=this.element.getBoundingClientRect();return e.width>0&&e.height>0&&e.top<window.innerHeight&&e.bottom>0&&this.getAccumulatedOpacity()>.5}),(0,s.distinctUntilChanged)()),e]).pipe((0,s.map)(([e,t])=>e&&t),(0,s.distinctUntilChanged)())}runAnimation$(e,t,n,r){if(!this.element)return o.EMPTY;switch(e){case`fade-up`:return this.animateFadeUp$(t,r);case`blur-reveal`:return this.animateBlurReveal$(t,n,r);case`word-reveal`:return this.animateWordReveal$(t,n,r);case`cyber-glitch`:return this.animateCyberGlitch$(t,n,r);case`typewriter`:return this.animateTypewriter$(t);default:return o.EMPTY}}animateFadeUp$(e,t){if(!this.element)return o.EMPTY;let n=this.element.animate([{opacity:0,transform:`translateY(30px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:t.easingFallback,fill:`forwards`});return this.animations.push(n),(0,o.from)(n.finished).pipe((0,s.tap)(()=>{this.element&&(this.element.style.opacity=``,this.element.style.transform=``,this.element.style.willChange=`auto`)}),(0,s.catchError)(()=>o.EMPTY))}wrapTextNodes(e){let t=[],n=document.createDocumentFragment(),r=Array.from(e.childNodes);for(let e of r)if(e.nodeType===Node.TEXT_NODE){let r=(e.textContent||``).split(/(\s+)/);for(let e of r)if(/^\s+$/.test(e))n.appendChild(document.createTextNode(e));else if(e.length>0){let r=document.createElement(`span`);r.textContent=e,n.appendChild(r),t.push(r)}}else e instanceof HTMLElement&&(n.appendChild(e),t.push(e));return e.textContent=``,e.appendChild(n),t}animateBlurReveal$(e,t,n){if(!this.element)return o.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,filter:`blur(8px)`,transform:`scale(0.9)`},{opacity:1,filter:`blur(0)`,transform:`scale(1)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,o.from)(i.finished).pipe((0,s.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,s.catchError)(()=>o.EMPTY)):o.EMPTY}animateWordReveal$(e,t,n){if(!this.element)return o.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,transform:`translateY(20px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,o.from)(i.finished).pipe((0,s.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,s.catchError)(()=>o.EMPTY)):o.EMPTY}animateCyberGlitch$(e,t,n){if(!this.element)return o.EMPTY;let r=this.originalContent.split(``),i=document.createDocumentFragment(),a=[];for(let e of r){let t=document.createElement(`span`);t.style.display=`inline-block`,t.style.opacity=`0`,t.textContent=e===` `?`\xA0`:e,i.appendChild(t),a.push(t)}this.element.textContent=``,this.element.appendChild(i),this.element.style.opacity=`1`,a.forEach((i,a)=>{if(r[a]===` `)return void(i.style.opacity=`1`);let o=i.animate([{opacity:0,transform:`translateY(-8px) scale(1.4)`,filter:`blur(4px)`},{opacity:1,transform:`translateY(0) scale(1)`,filter:`blur(0)`}],{duration:e,easing:n.easingFallback,delay:a*t,fill:`forwards`});this.animations.push(o)});let c=this.animations[this.animations.length-1];return c?(0,o.from)(c.finished).pipe((0,s.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,a.forEach(e=>{e.style.willChange=`auto`}))}),(0,s.catchError)(()=>o.EMPTY)):o.EMPTY}animateTypewriter$(e){if(!this.element)return o.EMPTY;let t=this.originalContent,n=t.length;if(n===0)return o.EMPTY;let r=e/n,i=0;return(0,o.interval)(r).pipe((0,s.tap)(()=>{i++,this.element&&(this.element.textContent=t.slice(0,i))}),(0,s.takeWhile)(()=>i<n),(0,s.finalize)(()=>{this.element&&(this.element.textContent=this.originalContent,this.element.style.willChange=`auto`)}))}},p=(0,l.directive)(f),m=class extends u.Directive{constructor(e){super(e),this.config={}}update(e,[t]){if(e.type!==u.PartType.ELEMENT)throw Error("The `classMap` directive must be used in the `class` attribute");let n=e.element;this.config=t,this.config.bgColor&&(n.style.backgroundColor=this.config.bgColor),this.config.color&&(n.style.color=this.config.color)}render(e){return this.config=e,c.nothing}},h=(0,u.directive)(m),g=new WeakMap;function _(e,t){let n=e.match(/var\(([^,)]+)/);return n&&getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim()||t}var v=class extends u.Directive{constructor(e){if(super(e),e.type!==u.PartType.ELEMENT)throw Error(`confirmClick directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=g.get(r);if(i){if(i.callback=t,this.optionsEqual(i.options,n))return;this.cleanup(r)}let a=new o.Subject,s=this.setupClickListener(r,n??{},a);g.set(r,{subscription:s,callback:t,options:n??{},overlayElement:null,isConfirming:!1,cancel$:a})}optionsEqual(e,t){return t?e.timeout===t.timeout&&e.icon===t.icon:Object.keys(e).length===0}setupClickListener(e,t,n){return(0,o.fromEvent)(e,`click`).pipe((0,s.tap)(r=>{let i=g.get(e);i&&!i.isConfirming&&(r.stopPropagation(),r.preventDefault(),i.isConfirming=!0,this.showOverlay(e,i,t,n))})).subscribe()}showOverlay(e,t,n,r){let i=n.timeout??3e3,a=e,c=n.icon??a.icon??a._capturedIcon??e.textContent?.trim()??`warning`,l=_(`var(--schmancy-sys-color-error-default)`,`#dc2626`),u=_(`var(--schmancy-sys-color-error-on)`,`#ffffff`),d=_(`var(--schmancy-sys-color-error-container)`,`#fecaca`),f=document.createElement(`div`);f.setAttribute(`role`,`status`),f.setAttribute(`aria-label`,`Click again to confirm`);let p=e.getBoundingClientRect(),m=p.width,h=p.height,v=window.devicePixelRatio||1,y=getComputedStyle(e);Object.assign(f.style,{position:`fixed`,top:`${p.top}px`,left:`${p.left}px`,width:`${m}px`,height:`${h}px`,zIndex:`10000`,borderRadius:y.borderRadius||`50%`,overflow:`hidden`,cursor:`pointer`,opacity:`0`,transform:`scale(0.6)`,transition:`opacity 250ms cubic-bezier(0.22, 1.25, 0.36, 1), transform 300ms cubic-bezier(0.22, 1.25, 0.36, 1)`});let b=document.createElement(`canvas`);b.width=m*v,b.height=h*v,b.style.width=`${m}px`,b.style.height=`${h}px`,b.style.position=`absolute`,b.style.top=`0`,b.style.left=`0`,f.appendChild(b);let x=Math.round(.5*Math.min(m,h)),S=document.createElement(`schmancy-icon`);S.textContent=c,S.setAttribute(`size`,`${x}px`),Object.assign(S.style,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:u,pointerEvents:`none`}),f.appendChild(S),document.body.appendChild(f),t.overlayElement=f,(0,o.of)(null).pipe((0,s.observeOn)(o.animationFrameScheduler)).subscribe(()=>{f.style.opacity=`1`,f.style.transform=`scale(1)`});let C=b.getContext(`2d`);if(!C)return;C.scale(v,v);let w=m/2,T=h/2,E=Math.min(m,h)/2-1,D=E-3,O=e=>{C.clearRect(0,0,m,h),C.beginPath(),C.arc(w,T,D,0,2*Math.PI),C.fillStyle=l,C.fill();let t=1-e;if(t>0){let e=-Math.PI/2,n=e+2*Math.PI*t;C.beginPath(),C.arc(w,T,E,e,n),C.arc(w,T,D,n,e,!0),C.closePath(),C.fillStyle=d,C.fill()}};O(0);let k=performance.now(),A=(0,o.interval)(0,o.animationFrameScheduler).pipe((0,s.map)(()=>(performance.now()-k)/i),(0,s.takeWhile)(e=>e<=1),(0,s.takeUntil)(r),(0,s.tap)(e=>O(e))).subscribe({complete:()=>{g.get(e)?.isConfirming&&this.hideOverlay(e)}});t.subscription.add(A);let j=(0,o.merge)((0,o.fromEvent)(f,`click`).pipe((0,s.take)(1),(0,s.tap)(()=>{t.callback(),this.hideOverlay(e)})),(0,o.fromEvent)(document,`click`,{capture:!0}).pipe((0,s.filter)(t=>!f.contains(t.target)&&!e.contains(t.target)),(0,s.take)(1),(0,s.tap)(()=>this.hideOverlay(e))),(0,o.fromEvent)(document,`keydown`).pipe((0,s.filter)(e=>e.key===`Escape`),(0,s.take)(1),(0,s.tap)(()=>this.hideOverlay(e)))).pipe((0,s.take)(1),(0,s.takeUntil)(r)).subscribe();t.subscription.add(j)}hideOverlay(e){let t=g.get(e);if(t&&(t.cancel$.next(),t.isConfirming=!1,t.overlayElement)){let e=t.overlayElement;e.style.opacity=`0`,e.style.transform=`scale(0.6)`,(0,o.timer)(250).pipe((0,s.tap)(()=>{document.body.contains(e)&&document.body.removeChild(e)})).subscribe(),t.overlayElement=null}}cleanup(e){let t=g.get(e);t&&(t.cancel$.next(),t.cancel$.complete(),t.subscription.unsubscribe(),t.overlayElement&&document.body.contains(t.overlayElement)&&document.body.removeChild(t.overlayElement),g.delete(e))}disconnected(e){this.cleanup(e.element)}reconnected(e){let t=e.element,n=g.get(t);if(n){let e=new o.Subject,r=this.setupClickListener(t,n.options,e);g.set(t,{subscription:r,callback:n.callback,options:n.options,overlayElement:null,isConfirming:!1,cancel$:e})}}},y=(0,u.directive)(v),b=class extends l.AsyncDirective{constructor(...e){super(...e),this.element=null,this.items=[],this.subscription=null,this.typewriterSub=null,this.currentAnimation=null,this.addDisplayEl=null,this.disconnecting$=new o.Subject,this.initialized=!1}render(e){return c.noChange}update(e,[t={}]){if(this.element=e.element,!this.initialized&&this.isConnected){if(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new o.Subject),this.items=Array.from(this.element.children).filter(e=>e instanceof HTMLElement),this.items.length===0)return c.noChange;this.element.style.display=`inline-grid`,this.element.style.verticalAlign=`bottom`,this.items.forEach((e,t)=>{e.style.gridColumn=`1`,e.style.gridRow=`1`,e.style.visibility=t===0?``:`hidden`}),this.startCycling(t)}return c.noChange}disconnected(){this.cleanup()}reconnected(){}startCycling(e){let{mode:t=`replace`}=e;this.items.length<2||(t===`add`?this.startAddCycling(e):this.startReplaceCycling(e))}startReplaceCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0}=e,a=e=>(0,o.defer)(()=>new o.Observable(i=>{let a=this.items[e],c=(e-1+this.items.length)%this.items.length,l=this.items[c],u=parseInt(a.dataset.hold||``,10)||n,d=this.transitionItems(l,a,t,r).pipe((0,s.switchMap)(()=>(0,o.timer)(u)),(0,s.take)(1),(0,s.takeUntil)(this.disconnecting$)).subscribe({next:()=>{i.next(),i.complete()},error:e=>i.error(e)});return()=>d.unsubscribe()})),c=parseInt(this.items[0].dataset.hold||``,10)||n,l=(0,o.concat)((0,o.defer)(()=>new o.Observable(e=>{let t=(0,o.timer)(c).pipe((0,s.takeUntil)(this.disconnecting$)).subscribe({next:()=>{e.next(),e.complete()}});return()=>t.unsubscribe()})),(0,o.concat)(...[...Array.from({length:this.items.length},(e,t)=>t).slice(1),0].map(e=>a(e))).pipe((0,s.repeat)()));this.subscription=(0,o.timer)(i).pipe((0,s.switchMap)(()=>l),(0,s.takeUntil)(this.disconnecting$)).subscribe()}startAddCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0,separator:a=`, `}=e,c=this.items.map(e=>e.textContent||``);this.items.forEach(e=>{e.style.display=`none`});let l=document.createElement(`span`);this.element.appendChild(l),this.addDisplayEl=l;let u=(0,o.defer)(()=>{l.textContent=``;let e=``,i=c.map((i,c)=>{let u=parseInt(this.items[c].dataset.hold||``,10)||n,d=(c>0?a:``)+i;return(0,o.defer)(()=>t===`typewriter`?this.typewriterAdd(l,e,d,r).pipe((0,s.tap)(()=>{e+=d}),(0,s.switchMap)(()=>(0,o.timer)(u))):(0,o.defer)(()=>(e+=d,l.textContent=e,(0,o.timer)(u))))}),u=(0,o.defer)(()=>{let t=l.animate([{opacity:1},{opacity:0}],{duration:r,fill:`forwards`});return this.currentAnimation=t,(0,o.from)(t.finished).pipe((0,s.tap)(()=>{t.cancel(),l.textContent=``,l.style.opacity=``,e=``}),(0,s.switchMap)(()=>(0,o.timer)(300)))});return(0,o.concat)(...i,u)});this.subscription=(0,o.timer)(i).pipe((0,s.switchMap)(()=>u.pipe((0,s.repeat)())),(0,s.takeUntil)(this.disconnecting$)).subscribe()}typewriterAdd(e,t,n,r){if(n.length===0)return(0,o.of)(void 0);let i=r/n.length;return new o.Observable(r=>{let a=0,c=(0,o.interval)(i).pipe((0,s.tap)(()=>{a++,e.textContent=t+n.slice(0,a)}),(0,s.takeWhile)(()=>a<n.length),(0,s.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{e.textContent=t+n,r.next(),r.complete()}});return()=>c.unsubscribe()})}transitionItems(e,t,n,r){switch(this.currentAnimation?.cancel(),this.currentAnimation=null,this.typewriterSub?.unsubscribe(),this.typewriterSub=null,n){case`slide`:return this.slideTransition(e,t,r);case`typewriter`:return this.typewriterTransition(e,t,r);default:return this.fadeTransition(e,t,r)}}fadeTransition(e,t,n){let r=e.animate([{opacity:1},{opacity:0}],{duration:n/2,fill:`forwards`});return this.currentAnimation=r,(0,o.from)(r.finished).pipe((0,s.switchMap)(()=>{r.cancel(),e.style.visibility=`hidden`,t.style.visibility=``;let i=t.animate([{opacity:0},{opacity:1}],{duration:n/2,fill:`forwards`});return this.currentAnimation=i,(0,o.from)(i.finished).pipe((0,s.tap)(()=>{i.cancel()}),(0,s.map)(()=>{}),(0,s.catchError)(()=>o.EMPTY))}),(0,s.catchError)(()=>o.EMPTY))}slideTransition(e,t,n){let r=`cubic-bezier(0.4, 0, 0.2, 1)`;t.style.visibility=``;let i=e.animate([{transform:`translateY(0)`,opacity:1},{transform:`translateY(-100%)`,opacity:0}],{duration:n,fill:`forwards`,easing:r}),a=t.animate([{transform:`translateY(100%)`,opacity:0},{transform:`translateY(0)`,opacity:1}],{duration:n,fill:`forwards`,easing:r});return this.currentAnimation=a,(0,o.from)(a.finished).pipe((0,s.tap)(()=>{i.cancel(),a.cancel(),e.style.visibility=`hidden`}),(0,s.map)(()=>{}),(0,s.catchError)(()=>o.EMPTY))}typewriterTransition(e,t,n){let r=e.textContent||``,i=t.textContent||``,a=r.length+i.length;if(a===0)return e.style.visibility=`hidden`,t.style.visibility=``,(0,o.of)(void 0);let c=n/a;return new o.Observable(n=>{let a=r.length;return this.typewriterSub=(0,o.concat)((0,o.interval)(c).pipe((0,s.tap)(()=>{a--,e.textContent=r.slice(0,a)}),(0,s.takeWhile)(()=>a>0)),(0,o.defer)(()=>(e.style.visibility=`hidden`,e.textContent=r,t.style.visibility=``,t.textContent=``,(0,o.of)(null))),(0,o.defer)(()=>{let e=0;return(0,o.interval)(c).pipe((0,s.tap)(()=>{e++,t.textContent=i.slice(0,e)}),(0,s.takeWhile)(()=>e<i.length))})).pipe((0,s.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{t.textContent=i,n.next(),n.complete()}}),()=>{this.typewriterSub?.unsubscribe(),this.typewriterSub=null}})}cleanup(){this.disconnecting$.next(),this.disconnecting$.complete(),this.currentAnimation?.cancel(),this.currentAnimation=null,this.typewriterSub?.unsubscribe(),this.typewriterSub=null,this.subscription?.unsubscribe(),this.subscription=null,this.addDisplayEl&&=(this.addDisplayEl.remove(),null),this.items.forEach((e,t)=>{e.style.gridColumn=``,e.style.gridRow=``,e.style.visibility=t===0?``:`hidden`,e.style.opacity=``,e.style.transform=``}),this.element=null,this.items=[],this.initialized=!1}},x=(0,l.directive)(b),S=class extends l.AsyncDirective{constructor(...e){super(...e),this.maxBlur=8,this.duration=400,this.isBlurred=!1,this.transitionSet=!1}render(e){}update(e,[n]){if(e.type!==u.PartType.ELEMENT)throw Error(`depthOfField directive must be used on an element`);this.element=e.element,this.maxBlur=n.maxBlur??8,this.duration=n.duration??400,this.transitionSet||t.t.value||(this.element.style.transition=`filter ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1), scale ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1)`,this.transitionSet=!0),n.active&&!this.isBlurred?this.applyBlur():!n.active&&this.isBlurred&&this.clearBlur()}applyBlur(){this.element.style.filter=`blur(${this.maxBlur}px) saturate(60%)`,this.element.style.scale=`1.01`,this.isBlurred=!0}clearBlur(){this.element.style.filter=``,this.element.style.scale=``,this.isBlurred=!1}disconnected(){this.isBlurred&&this.clearBlur()}reconnected(){}},C=(0,u.directive)(S),w=new o.BehaviorSubject(null),T=new o.BehaviorSubject(null),E=new Map,D=new Map,O=[];function k(e){O.push(`[${new Date().toISOString().slice(11,23)}] ${e}`)}var A=null;T.pipe((0,s.distinctUntilChanged)((e,t)=>e?.target===t?.target&&e?.position===t?.position)).subscribe(e=>{if(!e)return void(A&&(A.style.display=`none`));if(t.t.value)return;let n=function(){if(A)return A;let e=document.createElement(`div`);e.setAttribute(`data-schmancy-drop-line`,``),Object.assign(e.style,{position:`fixed`,height:`2px`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,borderRadius:`1px`,pointerEvents:`none`,zIndex:`10000`,transition:`top 100ms ease, left 100ms ease, width 100ms ease`,boxShadow:`0 0 4px var(--schmancy-sys-color-tertiary-default, #6750A4)`,display:`none`});for(let t of[`left`,`right`]){let n=document.createElement(`div`);Object.assign(n.style,{position:`absolute`,width:`6px`,height:`6px`,borderRadius:`50%`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,top:`-2px`,[t]:`-3px`}),e.appendChild(n)}return document.body.appendChild(e),A=e,e}(),r=e.target.getBoundingClientRect(),i=e.position===`before`?r.top-1:r.bottom+1;Object.assign(n.style,{top:`${i}px`,left:`${r.left}px`,width:`${r.width}px`,display:`block`})});var j=class extends u.Directive{constructor(...e){super(...e),this.destroy$=new o.Subject}update(n,[r]){if(this.id=r,!this.element){let r=n.element;this.element=r,r.draggable=!0,r.style.cursor=`grab`,(0,o.fromEvent)(r,`dragstart`).pipe((0,s.tap)(e=>{e.stopPropagation(),e.dataTransfer?.setData(`application/json`,JSON.stringify({id:this.id})),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`),r.style.cursor=`grabbing`,O.length=0,k(`DRAGSTART id=${this.id} tag=${r.tagName}`),w.next(this.id),D.clear();let t=r.parentElement;if(t)for(let[e,n]of E)n.parentElement===t&&D.set(e,n.getBoundingClientRect())}),(0,s.observeOn)(o.animationFrameScheduler),(0,s.tap)(()=>{t.t.value||(r.style.transition=`transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease`,r.style.transform=`scale(1.03)`,r.style.boxShadow=`0 8px 25px rgba(0,0,0,0.15)`,r.style.opacity=`0.6`,r.style.zIndex=`1000`,r.style.pointerEvents=`none`)}),(0,s.switchMap)(()=>(0,o.fromEvent)(r,`dragend`).pipe((0,s.take)(1),(0,s.tap)(()=>{let n=T.value;if(r.style.removeProperty(`transition`),r.style.removeProperty(`transform`),r.style.removeProperty(`box-shadow`),r.style.removeProperty(`opacity`),r.style.removeProperty(`z-index`),r.style.removeProperty(`pointer-events`),r.style.cursor=`grab`,n){let{target:r,destinationId:i,position:a}=n;k(`DROP source=${this.id} dest=${i} pos=${a}`),r.dispatchEvent(new CustomEvent(`drop`,{detail:{source:this.id,destination:i,position:a},bubbles:!0,composed:!0})),(0,o.timer)(0,o.animationFrameScheduler).pipe((0,s.skip)(1),(0,s.take)(1)).subscribe(()=>{if(!t.t.value&&D.size!==0){for(let[t,n]of D){let r=E.get(t);if(!r)continue;let i=r.getBoundingClientRect(),a=n.left-i.left,o=n.top-i.top;Math.abs(a)<1&&Math.abs(o)<1||r.animate([{transform:`translate(${a}px, ${o}px)`},{transform:`translate(0,0)`}],{duration:e.f.duration,easing:e.f.easingFallback,fill:`none`})}D.clear()}})}w.next(null),T.next(null),k(`DRAGEND id=${this.id}`),O.length!==0&&(O.length=0)}))),(0,s.takeUntil)(this.destroy$)).subscribe()}return this.registeredId&&this.registeredId!==r&&E.delete(this.registeredId),E.set(r,this.element),this.registeredId=r,c.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.registeredId&&E.delete(this.registeredId),this.element=void 0}reconnected(){this.destroy$=new o.Subject,this.element=void 0}render(e){return c.nothing}},ee=(0,u.directive)(j),M=class extends u.Directive{constructor(...e){super(...e),this.destroy$=new o.Subject}update(e,[t]){if(this.destinationId=t,!this.element){let t=e.element;this.element=t,(0,o.fromEvent)(t,`dragenter`).pipe((0,s.tap)(e=>{k(`NATIVE-DRAGENTER dest=${this.destinationId}`),e.preventDefault()}),(0,s.takeUntil)(this.destroy$)).subscribe(),(0,o.fromEvent)(t,`dragover`).pipe((0,s.tap)(e=>{k(`NATIVE-DRAGOVER dest=${this.destinationId}`),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,s.takeUntil)(this.destroy$)).subscribe(),(0,o.fromEvent)(t,`drop`).pipe((0,s.tap)(e=>{e.preventDefault(),k(`NATIVE-DROP dest=${this.destinationId}`)}),(0,s.takeUntil)(this.destroy$)).subscribe(),w.pipe((0,s.switchMap)(e=>e&&e!==this.destinationId?(k(`DROP-ACTIVE dest=${this.destinationId} src=${e}`),(0,o.fromEvent)(t,`dragover`).pipe((0,s.tap)(e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,s.tap)(n=>{let r=function(e,t,n){let r=t.getBoundingClientRect(),i=n?E.get(n):null;if(!i)return e.clientY<r.top+r.height/2?`before`:`after`;let a=i.getBoundingClientRect();if(Math.abs(a.top-r.top)<r.height/2){let t=r.left+r.width/2;return a.left>r.left?e.clientX<t?`before`:null:e.clientX>=t?`after`:null}let o=r.top+r.height/2;return a.top>r.top?e.clientY<o?`before`:null:e.clientY>=o?`after`:null}(n,t,e);T.next(r?{target:t,destinationId:this.destinationId,position:r}:null)}))):(T.next(null),o.EMPTY)),(0,s.takeUntil)(this.destroy$)).subscribe()}return c.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.element=void 0}reconnected(){this.destroy$=new o.Subject,this.element=void 0}render(e){return c.nothing}},N=(0,u.directive)(M),P=class extends l.AsyncDirective{constructor(...e){super(...e),this.element=null,this.disconnecting$=new o.Subject}apply(e,t){if(!this.element)return;let n=window.visualViewport,r=n?.height??window.innerHeight,i=n?.width??window.innerWidth,a=this.element.getBoundingClientRect(),o=Math.max(0,r-a.top),s=Math.max(0,i-a.left),c=t?0:e,l=this.element.style;l.boxSizing=`border-box`,l.height=`${o}px`,l.width=`${s}px`,l.paddingBottom=`${c}px`,l.minHeight=`0`,l.minWidth=`0`,l.overflow=`hidden`}subscribe(){if(!this.element)return;let e=(0,o.fromEvent)(window,`resize`,{passive:!0});(0,o.combineLatest)([(0,o.merge)(e,window.visualViewport?(0,o.merge)((0,o.fromEvent)(window.visualViewport,`resize`,{passive:!0}),(0,o.fromEvent)(window.visualViewport,`scroll`,{passive:!0})):e,(0,o.fromEvent)(window,`orientationchange`),(0,o.fromEvent)(document,`focusout`,{passive:!0}).pipe((0,s.switchMap)(()=>(0,o.timer)(100))),i.t(this.element),this.element.parentElement?i.t(this.element.parentElement):o.EMPTY).pipe((0,s.debounceTime)(16),(0,s.startWith)(null)),r.n.bottomOffset$,r.n.fullscreen$]).pipe((0,s.filter)(()=>{let e=window.visualViewport;return!e||Math.abs(e.scale-1)<=.01}),(0,s.map)(([,e,t])=>({bottomOffset:e,isFullscreen:t})),(0,s.distinctUntilChanged)((e,t)=>e.bottomOffset===t.bottomOffset&&e.isFullscreen===t.isFullscreen),(0,s.tap)(({bottomOffset:e,isFullscreen:t})=>this.apply(e,t)),(0,s.takeUntil)(this.disconnecting$)).subscribe()}render(){}update(e){if(e.type!==u.PartType.ELEMENT)throw Error(`fill directive can only be used on elements`);let t=e.element;this.element!==t&&(this.element=t,this.subscribe())}disconnected(){this.disconnecting$.next(),this.element=null}reconnected(){this.element&&(this.disconnecting$=new o.Subject,this.subscribe())}},F=(0,l.directive)(P),I=class extends l.AsyncDirective{constructor(...e){super(...e),this.hasAnimated=!1}render(e){}update(e,[n]){if(e.type!==u.PartType.ELEMENT)throw Error(`gravity directive must be used on an element`);if(this.element=e.element,this.options=n,this.hasAnimated)return;if(t.t.value)return void(this.hasAnimated=!0);let r=Math.max(.3,Math.min(3,n?.mass??1)),i=n?.distance??30,a=(n?.delay??0)+(n?.stagger??0);this.animate(r,i,a),this.hasAnimated=!0}reconnected(){if(this.hasAnimated=!1,this.options&&!t.t.value){let e=Math.max(.3,Math.min(3,this.options.mass??1)),t=this.options.distance??30,n=(this.options.delay??0)+(this.options.stagger??0);this.animate(e,t,n),this.hasAnimated=!0}}animate(t,n,r){let i=t<.7?e.l:e.d,a=i.duration*(1/Math.sqrt(t)),c=1/t*n;this.animation?.cancel(),this.element.style.willChange=`transform, opacity`,this.animation=this.element.animate([{opacity:0,transform:`translateY(-${c}px)`},{opacity:1,transform:`translateY(0)`}],{duration:a,delay:r,easing:i.easingFallback,fill:`backwards`}),(0,o.from)(this.animation.finished).pipe((0,s.take)(1),(0,s.tap)(()=>{this.element.style.willChange=``,this.animation=void 0}),(0,s.catchError)(()=>o.EMPTY)).subscribe()}disconnected(){this.animation?.cancel(),this.animation=void 0}},te=(0,u.directive)(I),ne=class extends l.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e,t){return c.noChange}update(e,[t,n]){let r=e.element,i,a,l,u={};if(typeof t==`function`?(i=t,u=n||{}):(a=t.onEnter,l=t.onExit,u=t.options||{},i=e=>{e&&a&&a(),!e&&l&&l()}),this.state?.element===r)return c.noChange;this.cleanup();let{once:d=!1,threshold:f=0,rootMargin:p=`0px`,delay:m=0}=u,h=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0],n=t.isIntersecting;m>0&&n?(this.state.delayTimerSub&&this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=(0,o.timer)(m).pipe((0,s.take)(1),(0,s.tap)(()=>this.triggerCallback(n,t))).subscribe()):(!n&&this.state.delayTimerSub&&(this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=void 0),this.triggerCallback(n,t))},{threshold:f,rootMargin:p});return this.state={element:r,observer:h,callback:i,onEnter:a,onExit:l,once:d,delay:m,hasFired:!1},h.observe(r),c.noChange}triggerCallback(e,t){this.state&&(this.state.once?e&&!this.state.hasFired&&(this.state.hasFired=!0,this.state.callback(e,t),this.cleanup()):this.state.callback(e,t))}cleanup(){this.state&&=(this.state.delayTimerSub?.unsubscribe(),this.state.delayTimerSub=void 0,this.state.observer.disconnect(),null)}pause(){this.state&&(this.state.delayTimerSub?.unsubscribe(),this.state.observer.disconnect())}disconnected(){this.pause()}reconnected(){this.state&&this.state.observer.observe(this.state.element)}},re=(0,l.directive)(ne),ie={active:!0,intensity:`medium`},ae={light:{blur:12,sat:1.3,bright:1.05,tint:.45,border:.2,shadow:.06},medium:{blur:16,sat:1.4,bright:1.08,tint:.55,border:.28,shadow:.08},strong:{blur:24,sat:1.5,bright:1.12,tint:.65,border:.35,shadow:.1}},L=[`backdropFilter`,`background`,`boxShadow`,`borderTop`,`borderBottom`],oe=class extends l.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return c.noChange}update(e,[t={}]){let n=e.element,r={...ie,...t};return r.active?this.activate(n,r):this.cleanup(),c.noChange}activate(e,t){if(!this.isConnected)return;let n=ae[t.intensity];if(!this.state){let t={};for(let n of L)t[n]=e.style[n];this.state={element:e,origStyles:t}}this.applyStyles(e,n)}applyStyles(e,t){let n=`blur(${t.blur}px) saturate(${t.sat}) brightness(${t.bright})`;e.style.backdropFilter=n,e.style.setProperty(`-webkit-backdrop-filter`,n),e.style.background=`rgba(var(--md-sys-color-surface-container, 255 255 255) / ${t.tint})`;let r=t.border;e.style.boxShadow=[`inset 0 1px 0 0 rgba(255,255,255, ${1.5*r})`,`inset 0 2px 6px rgba(255,255,255, ${.6*r})`,`inset 0 -1px 0 0 rgba(255,255,255, ${.25*r})`,`0 1px 3px rgba(0,0,0, ${t.shadow})`,`0 6px 20px rgba(0,0,0, ${.5*t.shadow})`].join(`, `),e.style.borderTop=`0.5px solid rgba(255,255,255, ${.9*r})`,e.style.borderBottom=`0.5px solid rgba(0,0,0, 0.05)`}cleanup(){if(!this.state)return;let{element:e,origStyles:t}=this.state;for(let n of L)e.style[n]=t[n];e.style.removeProperty(`-webkit-backdrop-filter`),this.state=null}disconnected(){this.cleanup()}reconnected(){}},R=(0,l.directive)(oe),z=`schmancy-lb-rotate`,B=!1;function V(){if(B)return;let e=document.createElement(`style`);e.id=`schmancy-living-border-shared`,e.textContent=`\n\t\t@property --${z}-angle {\n\t\t\tsyntax: '<angle>';\n\t\t\tinitial-value: 0deg;\n\t\t\tinherits: false;\n\t\t}\n\t\t@keyframes ${z} {\n\t\t\tto { --${z}-angle: 360deg; }\n\t\t}\n\t`,document.head.appendChild(e),B=!0}var H=class extends l.AsyncDirective{constructor(...e){super(...e),this.teardown$=new o.Subject,this.didSetPosition=!1}render(e){}update(e,[n]){if(e.type!==u.PartType.ELEMENT)throw Error(`livingBorder directive must be used on an element`);let r=JSON.stringify(n??{});this.element&&r===this.prevKey||(this.prevKey=r,this.element=e.element,this.lastOptions=n,t.t.value||(this.teardown$.next(),this.cleanup(),V(),this.createBorderOverlay(n)))}reconnected(){this.lastOptions&&!t.t.value&&(V(),this.createBorderOverlay(this.lastOptions))}createBorderOverlay(e){let t=e?.width??1,n=e?.color??`var(--schmancy-sys-color-primary-default)`,r=e?.spread??6,i=e?.duration??3e3,a=e?.onHover??!1;getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`,this.didSetPosition=!0),this.borderEl=document.createElement(`div`),this.borderEl.setAttribute(`aria-hidden`,`true`);let c=`-${t}px`;Object.assign(this.borderEl.style,{position:`absolute`,top:c,left:c,right:c,bottom:c,borderRadius:`inherit`,pointerEvents:`none`,zIndex:`0`,background:`conic-gradient(\n\t\t\t\tfrom var(--${z}-angle),\n\t\t\t\ttransparent 0%, transparent 30%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 45%,\n\t\t\t\t${n} 50%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 55%,\n\t\t\t\ttransparent 70%, transparent 100%\n\t\t\t)`,mask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,maskComposite:`exclude`,WebkitMaskComposite:`xor`,padding:`${t}px`,animation:`${z} ${i}ms linear infinite`,filter:`blur(${.3*r}px) drop-shadow(0 0 ${r}px color-mix(in srgb, ${n} 40%, transparent))`,opacity:a?`0`:`0.5`,transition:`opacity 300ms ease`}),this.element.prepend(this.borderEl),(0,o.merge)((0,o.fromEvent)(this.element,`mouseenter`).pipe((0,s.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=a?`0.7`:`0.8`)})),(0,o.fromEvent)(this.element,`mouseleave`).pipe((0,s.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=a?`0`:`0.5`)}))).pipe((0,s.takeUntil)(this.teardown$)).subscribe()}cleanup(){this.borderEl?.remove(),this.borderEl=void 0}disconnected(){this.teardown$.next(),this.cleanup(),this.didSetPosition&&this.element&&(this.element.style.position=``,this.didSetPosition=!1)}},U=(0,u.directive)(H),W=new WeakMap,G=class extends u.Directive{constructor(e){if(super(e),e.type!==u.PartType.ELEMENT)throw Error(`longPress directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=W.get(r);if(i){if(i.callback===t&&this.optionsEqual(i.options,n))return;i.subscription.unsubscribe()}let a=this.setupLongPress(r,t,n);W.set(r,{subscription:a,callback:t,options:n||{}})}optionsEqual(e,t){return t?e.duration===t.duration&&e.movementThreshold===t.movementThreshold:Object.keys(e).length===0}setupLongPress(e,t,n={}){let r=n.duration??500,i=n.movementThreshold??10,a=(0,o.fromEvent)(e,`pointerdown`),c=(0,o.fromEvent)(window,`pointerup`),l=(0,o.fromEvent)(window,`pointermove`),u=(0,o.fromEvent)(window,`pointercancel`);return a.pipe((0,s.switchMap)(e=>{let n=e.clientX,a=e.clientY,d=(0,o.merge)(c,u,l.pipe((0,s.filter)(e=>{let t=e.clientX-n,r=e.clientY-a;return Math.sqrt(t*t+r*r)>i}))).pipe((0,s.first)());return(0,o.timer)(r).pipe((0,s.takeUntil)(d),(0,s.tap)(()=>t()))})).subscribe()}disconnected(e){let t=e.element,n=W.get(t);n&&(n.subscription.unsubscribe(),W.delete(t))}reconnected(e){let t=e.element,n=W.get(t);n&&(n.subscription=this.setupLongPress(t,n.callback,n.options))}},K=(0,u.directive)(G),se={active:!0,autoHideDuration:3e3,background:!0,intensity:1,blur:1,speed:1,fadeInDuration:1e3,fadeOutDuration:8e3,idleOpacity:.6,idleBreathe:!0,temperature:0,chromaticAberration:1,particleCount:30},q=`cubic-bezier(0.37, 0, 0.63, 1)`,J=`cubic-bezier(0.25, 0.1, 0.25, 1)`,Y=!1,ce=class e{constructor(){this.elementToDirective=new WeakMap,this.instances=new Set,this.observer=null,this.visibilitySub=null,this.tabVisible=!0}static{this._instance=null}static get instance(){return e._instance||=new e,e._instance}register(e,t){let n=this.instances.size===0;this.instances.add(e),this.elementToDirective.set(t,e),n&&this.setup(),this.observer?.observe(t)}unregister(e,t){this.observer?.unobserve(t),this.elementToDirective.delete(t),this.instances.delete(e),this.instances.size===0&&this.teardown()}setup(){this.observer=new IntersectionObserver(e=>{for(let t of e){let e=this.elementToDirective.get(t.target);e&&e.onVisibilityChange(t.isIntersecting&&this.tabVisible)}},{threshold:0}),this.visibilitySub=(0,o.fromEvent)(document,`visibilitychange`).pipe((0,s.tap)(()=>{this.tabVisible=document.visibilityState===`visible`;for(let e of this.instances)e.onVisibilityChange(this.tabVisible)})).subscribe()}teardown(){this.observer&&=(this.observer.disconnect(),null),this.visibilitySub&&=(this.visibilitySub.unsubscribe(),null)}},le=class extends l.AsyncDirective{constructor(...e){super(...e),this.state=null,this.coordinator=ce.instance}render(e){return c.noChange}update(e,[t={}]){let n=e.element,r={...se,...t};return r.active?this.show(n,r):this.hide(r),c.noChange}onVisibilityChange(e){if(!this.state?.overlay)return;let t=this.state.isVisible;this.state.isVisible=e,t!==e&&(this.state.overlay.classList.toggle(`paused`,!e),this.state.overlay.classList.toggle(`running`,e))}show(e,n){(function(){if(Y||typeof document>`u`)return;Y=!0;let e=document.createElement(`style`);e.id=`nebula-directive-styles`,e.textContent=`
2
2
  /* =============================================================================
3
3
  NEBULA v3 - SURREAL DIMENSIONAL RIFT - GPU-COMPOSITED CSS ANIMATIONS
4
4
  Chromatic aberration, iridescent hue-cycling, event horizon, tendrils.
@@ -82,7 +82,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./ch
82
82
  transition: opacity 0s !important;
83
83
  }
84
84
  }
85
- `,document.head.appendChild(e)})(),this.state?.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null);let r=t.t.value;if(this.state?.overlay&&this.state.isDimmed)return this.state.isDimmed=!1,this.state.options=n,this.awakenOverlay(n,r),void this.scheduleAutoHide(n);this.state?.overlay||this.createOverlay(e,n,r),this.scheduleAutoHide(n)}awakenOverlay(t,n){if(!this.state?.overlay)return;let r=this.state.overlay,i=n?0:.6*t.fadeInDuration,a=n?`linear`:e._(e.d);r.style.setProperty(`--nebula-intensity`,String(t.intensity)),r.animate([{opacity:t.idleOpacity,transform:`scale(0.98)`,filter:`blur(${4*t.blur}px)`},{opacity:.7*t.intensity,transform:`scale(1.01)`,filter:`blur(${1*t.blur}px)`},{opacity:t.intensity,transform:`scale(1)`,filter:`blur(0px)`}],{duration:i,easing:a,fill:`forwards`}),r.classList.remove(`paused`),r.classList.add(`running`)}createOverlay(t,n,r){let i=window.getComputedStyle(t).position,a=t.style.position,o=t.style.overflow,s=t.style.contain;i===`static`&&(t.style.position=`relative`),t.style.overflow=`hidden`,t.style.contain=`paint`;let c=n.temperature,l=Math.max(0,c),u=Math.max(0,-c),d=n.intensity,f=Math.round(3+5*n.chromaticAberration),p=Math.round(20+60*u),m=Math.round(80+80*u),h=Math.round(20+80*l),g=Math.round(255-55*l),_=Math.round(100+100*u),v=Math.round(100*l),y=Math.round(255-55*l),b=Math.round(100+55*u),x=Math.round(255-55*u),S=document.createElement(`div`);if(S.className=`nebula-overlay running`,Object.assign(S.style,{position:`absolute`,inset:`-20%`,zIndex:n.background?`-1`:`9999`,opacity:`0`,"--nebula-intensity":String(d),"--nebula-blur-base":10*n.blur+`px`,"--nebula-idle-opacity":String(n.idleOpacity),"--nebula-aberration":`${f}px`,"--nebula-blur-core":12*n.blur+`px`}),r){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 40%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(circle 8% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.15*d}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,filter:`blur(${10*n.blur}px)`,opacity:String(d)}),S.appendChild(e)}else{let e=document.createElement(`div`);e.className=`nebula-layer`,Object.assign(e.style,{position:`absolute`,inset:`-5%`,background:`\n\t\t\t\t\tlinear-gradient(155deg,\n\t\t\t\t\t\ttransparent 0%, transparent 38%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4*d}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 54%,\n\t\t\t\t\t\ttransparent 60%, transparent 100%),\n\t\t\t\t\tlinear-gradient(225deg,\n\t\t\t\t\t\ttransparent 0%, transparent 42%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32*d}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 53%,\n\t\t\t\t\t\ttransparent 58%, transparent 100%),\n\t\t\t\t\tradial-gradient(ellipse 110% 110% at 50% 50%,\n\t\t\t\t\t\ttransparent 35%,\n\t\t\t\t\t\trgba(3,0,8,${.2*d}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35*d}) 85%),\n\t\t\t\t\tradial-gradient(ellipse 50% 45% at 30% 35%,\n\t\t\t\t\t\trgba(0,0,0,${.3*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 40% 55% at 70% 65%,\n\t\t\t\t\t\trgba(0,0,0,${.25*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${4*n.blur}px)`,mixBlendMode:`multiply`,transform:`translateZ(0)`}),S.appendChild(e);let t=document.createElement(`div`);t.className=`nebula-layer`,Object.assign(t.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${p},${m},${.14*d}) 0%,\n\t\t\t\t\t\trgba(255,${p},${m},${.06*d}) 35%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 30% 35% at 30% 35%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.03*d}) 50%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 25% 30% at 65% 70%,\n\t\t\t\t\t\trgba(255,${Math.min(255,p+30)},${m},${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-red ${35e3/n.speed}ms ${X} infinite`}),S.appendChild(t);let r=document.createElement(`div`);r.className=`nebula-layer`,Object.assign(r.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${h},100,${g},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.05*d}) 35%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 35% 30% at 68% 40%,\n\t\t\t\t\t\trgba(${v},${y},200,${.09*d}) 0%,\n\t\t\t\t\t\trgba(${v},${y},200,${.03*d}) 45%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 28% 25% at 35% 65%,\n\t\t\t\t\t\trgba(${h},100,${Math.min(255,g+20)},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-blue ${35e3/n.speed}ms ${X} infinite`}),S.appendChild(r);let i=document.createElement(`div`);i.className=`nebula-layer`,Object.assign(i.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.18*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.08*d}) 40%,\n\t\t\t\t\t\trgba(${h},100,${g},${.03*d}) 65%,\n\t\t\t\t\t\ttransparent 80%),\n\t\t\t\t\tradial-gradient(circle 6% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.25*d}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1*d}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-iridescent ${28e3/n.speed}ms linear infinite`}),S.appendChild(i);let a=document.createElement(`div`);if(a.className=`nebula-layer`,Object.assign(a.style,{position:`absolute`,inset:`-12%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 12% 55% at 48% 50%,\n\t\t\t\t\t\trgba(${v},${y},200,${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 45% 10% at 45% 35%,\n\t\t\t\t\t\trgba(255,${b},${x},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 10% 40% at 60% 60%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${14*n.blur}px)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-tendrils-breathe ${22e3/n.speed}ms ${Y} infinite`}),S.appendChild(a),n.particleCount>0){let e=document.createElement(`div`);e.className=`nebula-layer`;let t=[];for(let e=0;e<n.particleCount;e++){let e=5+90*Math.random(),n=5+90*Math.random(),r=.5+2*Math.random(),i=Math.round(360*Math.random()),a=(.3+.5*Math.random())*d;t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`)}Object.assign(e.style,{position:`absolute`,inset:`0`,background:t.join(`,`),mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-particle-twinkle ${5e3/n.speed}ms ${Y} infinite`}),S.appendChild(e)}}t.appendChild(S);let C=r?0:n.fadeInDuration,w=r?`linear`:e._(e.d);S.animate([{opacity:0,transform:`scale(0.85)`,filter:`blur(${25*n.blur}px) saturate(0.5)`},{opacity:.3*n.intensity,transform:`scale(0.95)`,filter:`blur(${12*n.blur}px) saturate(0.8)`},{opacity:.6*n.intensity,transform:`scale(1.02)`,filter:`blur(${4*n.blur}px) saturate(1.1)`},{opacity:.85*n.intensity,transform:`scale(1.005)`,filter:`blur(${1*n.blur}px) saturate(1.05)`},{opacity:n.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`}],{duration:C,easing:w,fill:`forwards`}),this.state={element:t,overlay:S,originalPosition:a,originalOverflow:o,originalContain:s,isDimmed:!1,autoHideSub:null,options:n,reducedMotion:r,isVisible:document.visibilityState===`visible`},this.coordinator.register(this,t)}scheduleAutoHide(e){!this.state||e.autoHideDuration<=0||(this.state.autoHideSub=(0,a.timer)(e.autoHideDuration).pipe((0,o.take)(1),(0,o.tap)(()=>{this.state&&(this.state.autoHideSub=null,this.hide(this.state.options))})).subscribe())}hide(t){if(!this.state?.overlay||(this.state.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null),this.state.isDimmed))return;this.state.isDimmed=!0;let n=this.state.overlay,r=this.state.options,i=this.state.reducedMotion,s=i?0:t.fadeOutDuration,c=i?`linear`:e._(e.u);if(t.idleOpacity<=0)return void n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.4*r.intensity,transform:`scale(0.95)`,filter:`blur(${8*r.blur}px) saturate(0.7)`},{opacity:0,transform:`scale(0.9)`,filter:`blur(${15*r.blur}px) saturate(0.3)`}],{duration:s,easing:c,fill:`forwards`});let l=n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.5*r.intensity,transform:`scale(0.99)`,filter:`blur(${3*r.blur}px) saturate(0.75)`},{opacity:t.idleOpacity,transform:`scale(1)`,filter:`blur(${8*r.blur}px) saturate(0.4)`}],{duration:s,easing:c,fill:`forwards`});t.idleBreathe&&!i&&(0,a.from)(l.finished).pipe((0,o.take)(1),(0,o.catchError)(()=>a.EMPTY)).subscribe(()=>{this.state?.overlay&&(this.state.overlay.style.animation=`nebula-idle-breathe ${12e3/r.speed}ms ${Y} infinite`)})}cleanup(){this.state&&=(this.coordinator.unregister(this,this.state.element),this.state.autoHideSub?.unsubscribe(),this.state.overlay?.remove(),this.state.element.style.position=this.state.originalPosition,this.state.element.style.overflow=this.state.originalOverflow,this.state.element.style.contain=this.state.originalContain,null)}disconnected(){this.cleanup()}reconnected(){this.state&&this.coordinator.register(this,this.state.element)}},ae=(0,c.directive)(ie),oe={smooth:e.d,snappy:e.f,bouncy:e.l,gentle:e.u},se=class extends c.AsyncDirective{constructor(e){if(super(e),this.initialized=!1,this.element=null,e.type!==l.PartType.ELEMENT)throw Error(`reveal() can only be used on elements`)}render(e,t){return s.noChange}update(n,[r=!1,i={}]){let a=n.element;this.element=a;let{preset:o=`smooth`,maxHeight:c=`10rem`,duration:l,easing:u}=i,d=oe[o],f=l??d.duration,p=u??e._(d),m=t.t.value;return this.initialized||=(this.setupElement(a,f,p,m),!0),r?(a.style.maxHeight=c,a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`,a.style.pointerEvents=``,a.style.paddingTop=``,a.style.paddingBottom=``,a.style.marginTop=``,a.style.marginBottom=``,a.removeAttribute(`aria-hidden`),a.removeAttribute(`inert`)):(a.style.maxHeight=`0`,a.style.opacity=`0`,a.style.transform=`translateY(-8px) scale(0.98)`,a.style.pointerEvents=`none`,a.style.paddingTop=`0`,a.style.paddingBottom=`0`,a.style.marginTop=`0`,a.style.marginBottom=`0`,a.setAttribute(`aria-hidden`,`true`),a.setAttribute(`inert`,``)),s.noChange}setupElement(e,t,n,r){e.style.overflow=`hidden`,e.style.transition=r?`none`:[`max-height ${t}ms ${n}`,`opacity ${t}ms ${n}`,`transform ${t}ms ${n}`,`padding ${t}ms ${n}`,`margin ${t}ms ${n}`].join(`, `)}disconnected(){this.element&&(this.element.style.willChange=``)}reconnected(){}},Q=(0,c.directive)(se),$=!1,ce=class extends c.AsyncDirective{constructor(...e){super(...e),this.teardown$=new a.Subject}render(){}update(e){if(e.type!==l.PartType.ELEMENT)throw Error(`ripple directive must be used on an element`);this.element=e.element,function(){if($)return;let e=document.createElement(`style`);e.id=`schmancy-ripple-shared`,e.textContent=`
85
+ `,document.head.appendChild(e)})(),this.state?.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null);let r=t.t.value;if(this.state?.overlay&&this.state.isDimmed)return this.state.isDimmed=!1,this.state.options=n,this.awakenOverlay(n,r),void this.scheduleAutoHide(n);this.state?.overlay||this.createOverlay(e,n,r),this.scheduleAutoHide(n)}awakenOverlay(t,n){if(!this.state?.overlay)return;let r=this.state.overlay,i=n?0:.6*t.fadeInDuration,a=n?`linear`:e._(e.d);r.style.setProperty(`--nebula-intensity`,String(t.intensity)),r.animate([{opacity:t.idleOpacity,transform:`scale(0.98)`,filter:`blur(${4*t.blur}px)`},{opacity:.7*t.intensity,transform:`scale(1.01)`,filter:`blur(${1*t.blur}px)`},{opacity:t.intensity,transform:`scale(1)`,filter:`blur(0px)`}],{duration:i,easing:a,fill:`forwards`}),r.classList.remove(`paused`),r.classList.add(`running`)}createOverlay(t,n,r){let i=window.getComputedStyle(t).position,a=t.style.position,o=t.style.overflow,s=t.style.contain;i===`static`&&(t.style.position=`relative`),t.style.overflow=`hidden`,t.style.contain=`paint`;let c=n.temperature,l=Math.max(0,c),u=Math.max(0,-c),d=n.intensity,f=Math.round(3+5*n.chromaticAberration),p=Math.round(20+60*u),m=Math.round(80+80*u),h=Math.round(20+80*l),g=Math.round(255-55*l),_=Math.round(100+100*u),v=Math.round(100*l),y=Math.round(255-55*l),b=Math.round(100+55*u),x=Math.round(255-55*u),S=document.createElement(`div`);if(S.className=`nebula-overlay running`,Object.assign(S.style,{position:`absolute`,inset:`-20%`,zIndex:n.background?`-1`:`9999`,opacity:`0`,"--nebula-intensity":String(d),"--nebula-blur-base":10*n.blur+`px`,"--nebula-idle-opacity":String(n.idleOpacity),"--nebula-aberration":`${f}px`,"--nebula-blur-core":12*n.blur+`px`}),r){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 40%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(circle 8% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.15*d}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,filter:`blur(${10*n.blur}px)`,opacity:String(d)}),S.appendChild(e)}else{let e=document.createElement(`div`);e.className=`nebula-layer`,Object.assign(e.style,{position:`absolute`,inset:`-5%`,background:`\n\t\t\t\t\tlinear-gradient(155deg,\n\t\t\t\t\t\ttransparent 0%, transparent 38%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4*d}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 54%,\n\t\t\t\t\t\ttransparent 60%, transparent 100%),\n\t\t\t\t\tlinear-gradient(225deg,\n\t\t\t\t\t\ttransparent 0%, transparent 42%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32*d}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 53%,\n\t\t\t\t\t\ttransparent 58%, transparent 100%),\n\t\t\t\t\tradial-gradient(ellipse 110% 110% at 50% 50%,\n\t\t\t\t\t\ttransparent 35%,\n\t\t\t\t\t\trgba(3,0,8,${.2*d}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35*d}) 85%),\n\t\t\t\t\tradial-gradient(ellipse 50% 45% at 30% 35%,\n\t\t\t\t\t\trgba(0,0,0,${.3*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 40% 55% at 70% 65%,\n\t\t\t\t\t\trgba(0,0,0,${.25*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${4*n.blur}px)`,mixBlendMode:`multiply`,transform:`translateZ(0)`}),S.appendChild(e);let t=document.createElement(`div`);t.className=`nebula-layer`,Object.assign(t.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${p},${m},${.14*d}) 0%,\n\t\t\t\t\t\trgba(255,${p},${m},${.06*d}) 35%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 30% 35% at 30% 35%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.03*d}) 50%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 25% 30% at 65% 70%,\n\t\t\t\t\t\trgba(255,${Math.min(255,p+30)},${m},${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-red ${35e3/n.speed}ms ${J} infinite`}),S.appendChild(t);let r=document.createElement(`div`);r.className=`nebula-layer`,Object.assign(r.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${h},100,${g},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.05*d}) 35%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 35% 30% at 68% 40%,\n\t\t\t\t\t\trgba(${v},${y},200,${.09*d}) 0%,\n\t\t\t\t\t\trgba(${v},${y},200,${.03*d}) 45%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 28% 25% at 35% 65%,\n\t\t\t\t\t\trgba(${h},100,${Math.min(255,g+20)},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-blue ${35e3/n.speed}ms ${J} infinite`}),S.appendChild(r);let i=document.createElement(`div`);i.className=`nebula-layer`,Object.assign(i.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.18*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.08*d}) 40%,\n\t\t\t\t\t\trgba(${h},100,${g},${.03*d}) 65%,\n\t\t\t\t\t\ttransparent 80%),\n\t\t\t\t\tradial-gradient(circle 6% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.25*d}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1*d}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-iridescent ${28e3/n.speed}ms linear infinite`}),S.appendChild(i);let a=document.createElement(`div`);if(a.className=`nebula-layer`,Object.assign(a.style,{position:`absolute`,inset:`-12%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 12% 55% at 48% 50%,\n\t\t\t\t\t\trgba(${v},${y},200,${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 45% 10% at 45% 35%,\n\t\t\t\t\t\trgba(255,${b},${x},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 10% 40% at 60% 60%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${14*n.blur}px)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-tendrils-breathe ${22e3/n.speed}ms ${q} infinite`}),S.appendChild(a),n.particleCount>0){let e=document.createElement(`div`);e.className=`nebula-layer`;let t=[];for(let e=0;e<n.particleCount;e++){let e=5+90*Math.random(),n=5+90*Math.random(),r=.5+2*Math.random(),i=Math.round(360*Math.random()),a=(.3+.5*Math.random())*d;t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`)}Object.assign(e.style,{position:`absolute`,inset:`0`,background:t.join(`,`),mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-particle-twinkle ${5e3/n.speed}ms ${q} infinite`}),S.appendChild(e)}}t.appendChild(S);let C=r?0:n.fadeInDuration,w=r?`linear`:e._(e.d);S.animate([{opacity:0,transform:`scale(0.85)`,filter:`blur(${25*n.blur}px) saturate(0.5)`},{opacity:.3*n.intensity,transform:`scale(0.95)`,filter:`blur(${12*n.blur}px) saturate(0.8)`},{opacity:.6*n.intensity,transform:`scale(1.02)`,filter:`blur(${4*n.blur}px) saturate(1.1)`},{opacity:.85*n.intensity,transform:`scale(1.005)`,filter:`blur(${1*n.blur}px) saturate(1.05)`},{opacity:n.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`}],{duration:C,easing:w,fill:`forwards`}),this.state={element:t,overlay:S,originalPosition:a,originalOverflow:o,originalContain:s,isDimmed:!1,autoHideSub:null,options:n,reducedMotion:r,isVisible:document.visibilityState===`visible`},this.coordinator.register(this,t)}scheduleAutoHide(e){!this.state||e.autoHideDuration<=0||(this.state.autoHideSub=(0,o.timer)(e.autoHideDuration).pipe((0,s.take)(1),(0,s.tap)(()=>{this.state&&(this.state.autoHideSub=null,this.hide(this.state.options))})).subscribe())}hide(t){if(!this.state?.overlay||(this.state.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null),this.state.isDimmed))return;this.state.isDimmed=!0;let n=this.state.overlay,r=this.state.options,i=this.state.reducedMotion,a=i?0:t.fadeOutDuration,c=i?`linear`:e._(e.u);if(t.idleOpacity<=0)return void n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.4*r.intensity,transform:`scale(0.95)`,filter:`blur(${8*r.blur}px) saturate(0.7)`},{opacity:0,transform:`scale(0.9)`,filter:`blur(${15*r.blur}px) saturate(0.3)`}],{duration:a,easing:c,fill:`forwards`});let l=n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.5*r.intensity,transform:`scale(0.99)`,filter:`blur(${3*r.blur}px) saturate(0.75)`},{opacity:t.idleOpacity,transform:`scale(1)`,filter:`blur(${8*r.blur}px) saturate(0.4)`}],{duration:a,easing:c,fill:`forwards`});t.idleBreathe&&!i&&(0,o.from)(l.finished).pipe((0,s.take)(1),(0,s.catchError)(()=>o.EMPTY)).subscribe(()=>{this.state?.overlay&&(this.state.overlay.style.animation=`nebula-idle-breathe ${12e3/r.speed}ms ${q} infinite`)})}cleanup(){this.state&&=(this.coordinator.unregister(this,this.state.element),this.state.autoHideSub?.unsubscribe(),this.state.overlay?.remove(),this.state.element.style.position=this.state.originalPosition,this.state.element.style.overflow=this.state.originalOverflow,this.state.element.style.contain=this.state.originalContain,null)}disconnected(){this.cleanup()}reconnected(){this.state&&this.coordinator.register(this,this.state.element)}},ue=(0,l.directive)(le),de={smooth:e.d,snappy:e.f,bouncy:e.l,gentle:e.u},fe=class extends l.AsyncDirective{constructor(e){if(super(e),this.initialized=!1,this.element=null,e.type!==u.PartType.ELEMENT)throw Error(`reveal() can only be used on elements`)}render(e,t){return c.noChange}update(n,[r=!1,i={}]){let a=n.element;this.element=a;let{preset:o=`smooth`,maxHeight:s=`10rem`,duration:l,easing:u}=i,d=de[o],f=l??d.duration,p=u??e._(d),m=t.t.value;return this.initialized||=(this.setupElement(a,f,p,m),!0),r?(a.style.maxHeight=s,a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`,a.style.pointerEvents=``,a.style.paddingTop=``,a.style.paddingBottom=``,a.style.marginTop=``,a.style.marginBottom=``,a.removeAttribute(`aria-hidden`),a.removeAttribute(`inert`)):(a.style.maxHeight=`0`,a.style.opacity=`0`,a.style.transform=`translateY(-8px) scale(0.98)`,a.style.pointerEvents=`none`,a.style.paddingTop=`0`,a.style.paddingBottom=`0`,a.style.marginTop=`0`,a.style.marginBottom=`0`,a.setAttribute(`aria-hidden`,`true`),a.setAttribute(`inert`,``)),c.noChange}setupElement(e,t,n,r){e.style.overflow=`hidden`,e.style.transition=r?`none`:[`max-height ${t}ms ${n}`,`opacity ${t}ms ${n}`,`transform ${t}ms ${n}`,`padding ${t}ms ${n}`,`margin ${t}ms ${n}`].join(`, `)}disconnected(){this.element&&(this.element.style.willChange=``)}reconnected(){}},X=(0,l.directive)(fe),Z=!1,pe=class extends l.AsyncDirective{constructor(...e){super(...e),this.teardown$=new o.Subject}render(){}update(e){if(e.type!==u.PartType.ELEMENT)throw Error(`ripple directive must be used on an element`);this.element=e.element,function(){if(Z)return;let e=document.createElement(`style`);e.id=`schmancy-ripple-shared`,e.textContent=`
86
86
  .schmancy-ripple-effect {
87
87
  position: absolute;
88
88
  border-radius: 50%;
@@ -96,4 +96,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./ch
96
96
  @keyframes schmancy-ripple-expand {
97
97
  to { transform: scale(4); opacity: 0; }
98
98
  }
99
- `,document.head.appendChild(e),$=!0}(),getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`),this.element.style.overflow=`hidden`,this.teardown$.next(),(0,a.fromEvent)(this.element,`click`).pipe((0,o.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}reconnected(){this.teardown$.next(),(0,a.fromEvent)(this.element,`click`).pipe((0,o.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}addRipple(e){let t=this.element.getBoundingClientRect(),n=Math.max(t.width,t.height),r=n/2,i=document.createElement(`span`);i.className=`schmancy-ripple-effect`,i.setAttribute(`aria-hidden`,`true`),i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.left=e.clientX-t.left-r+`px`,i.style.top=e.clientY-t.top-r+`px`,this.element.appendChild(i),(0,a.fromEvent)(i,`animationend`).pipe((0,o.take)(1)).subscribe(()=>i.remove())}disconnected(){this.teardown$.next()}},le=(0,l.directive)(ce);exports.DragDirective=A,exports.DropDirective=M,exports.animateText=f,exports.color=m,exports.confirmClick=v,exports.cursorGlow=n.t,exports.cycleText=b,exports.depthOfField=S,exports.drag=j,exports.drop=ee,exports.fromResizeObserver=r.t,exports.fullHeight=r.n,exports.fullWidth=r.r,exports.gravity=P,exports.intersect=I,exports.liquid=ne,exports.livingBorder=W,exports.longPress=q,exports.magnetic=i.t,exports.nebula=ae,exports.reducedMotion$=t.t,exports.reveal=Q,exports.ripple=le;
99
+ `,document.head.appendChild(e),Z=!0}(),getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`),this.element.style.overflow=`hidden`,this.teardown$.next(),(0,o.fromEvent)(this.element,`click`).pipe((0,s.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}reconnected(){this.teardown$.next(),(0,o.fromEvent)(this.element,`click`).pipe((0,s.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}addRipple(e){let t=this.element.getBoundingClientRect(),n=Math.max(t.width,t.height),r=n/2,i=document.createElement(`span`);i.className=`schmancy-ripple-effect`,i.setAttribute(`aria-hidden`,`true`),i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.left=e.clientX-t.left-r+`px`,i.style.top=e.clientY-t.top-r+`px`,this.element.appendChild(i),(0,o.fromEvent)(i,`animationend`).pipe((0,s.take)(1)).subscribe(()=>i.remove())}disconnected(){this.teardown$.next()}},me=(0,u.directive)(pe),Q=`schmancy-overflow-within-hidden`,$=!1,he=class extends l.AsyncDirective{constructor(...e){super(...e),this.element=null,this.disconnecting$=new o.Subject}render(e){return c.noChange}update(e,[t={}]){if(e.type!==u.PartType.ELEMENT)throw Error(`overflowWithin directive can only be used on elements`);let n=e.element,{hide:r=!1,direction:i=`both`,name:a,debounce:s=10}=t,l=n.style;l.minHeight=`0`,l.minWidth=`0`,l.boxSizing=`border-box`,l.overflowY=i===`horizontal`?`hidden`:`auto`,l.overflowX=i===`vertical`?`hidden`:`auto`,l.scrollBehavior=`smooth`,l.overscrollBehavior=`contain`,r?(function(){if($)return;$=!0;let e=new CSSStyleSheet;e.replaceSync(`.${Q} { scrollbar-width: none; -ms-overflow-style: none; }\n\t\t .${Q}::-webkit-scrollbar { display: none; }`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}(),n.classList.add(Q)):n.classList.remove(Q);let d=this.element!==n,f=this.currentName!==a;return d?(this.element=n,this.subscribe(s,a)):f&&(this.disconnecting$.next(),this.disconnecting$=new o.Subject,this.subscribe(s,a)),this.currentName=a,c.noChange}subscribe(e,t){if(!this.element)return;let n=this.element;(0,o.fromEvent)(n,`scroll`,{passive:!0}).pipe((0,o.debounceTime)(e),(0,o.takeUntil)(this.disconnecting$)).subscribe(e=>{n.dispatchEvent(new CustomEvent(`scroll`,{detail:{scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth,e},bubbles:!0,composed:!0}))}),t!==void 0&&(0,o.fromEvent)(window,`@schmancy:scrollTo`).pipe((0,o.filter)(e=>e.detail.name===t&&e.detail.action===`scrollTo`),(0,o.takeUntil)(this.disconnecting$)).subscribe(e=>{let t={behavior:`smooth`,top:e.detail.top};typeof e.detail.left==`number`&&(t.left=e.detail.left),n.scrollTo(t)})}disconnected(){this.disconnecting$.next(),this.element=null}reconnected(){this.element&&(this.disconnecting$=new o.Subject,this.subscribe(10,this.currentName))}},ge=(0,l.directive)(he);exports.DragDirective=j,exports.DropDirective=M,exports.animateText=p,exports.color=h,exports.confirmClick=y,exports.cursorGlow=n.t,exports.cycleText=x,exports.depthOfField=C,exports.drag=ee,exports.drop=N,exports.fill=F,exports.fromResizeObserver=i.t,exports.fullHeight=i.n,exports.fullWidth=i.r,exports.gravity=te,exports.intersect=re,exports.liquid=R,exports.livingBorder=U,exports.longPress=K,exports.magnetic=a.t,exports.nebula=ue,exports.overflowWithin=ge,exports.reducedMotion$=t.t,exports.reveal=X,exports.ripple=me;