@mhmo91/schmancy 0.9.12 → 0.9.13

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 (392) hide show
  1. package/README.md +34 -0
  2. package/custom-elements.json +42 -0
  3. package/dist/agent/flow-CaPi2G8y.js +386 -0
  4. package/dist/agent/flow-CaPi2G8y.js.map +1 -0
  5. package/dist/agent/rolldown-runtime-DsMetpgY.js +11 -0
  6. package/dist/agent/schmancy.agent.js +36368 -0
  7. package/dist/agent/schmancy.agent.js.map +1 -0
  8. package/dist/agent/schmancy.manifest.json +6879 -0
  9. package/dist/agent/vendor-highlight-CHJZQQB7.js +2178 -0
  10. package/dist/agent/vendor-highlight-CHJZQQB7.js.map +1 -0
  11. package/dist/agent/vendor-jsqr-r7GNh4P3.js +10212 -0
  12. package/dist/agent/vendor-jsqr-r7GNh4P3.js.map +1 -0
  13. package/dist/agent/vendor-material-color-Be96dpGE.js +3309 -0
  14. package/dist/agent/vendor-material-color-Be96dpGE.js.map +1 -0
  15. package/dist/{area-CBjmKtN-.cjs → area-CApZWjqs.cjs} +1 -1
  16. package/dist/area-CApZWjqs.cjs.map +1 -0
  17. package/dist/{area-CjX0Ckh9.js → area-D_p1YBgP.js} +1 -1
  18. package/dist/area-D_p1YBgP.js.map +1 -0
  19. package/dist/area.cjs +1 -1
  20. package/dist/area.js +1 -1
  21. package/dist/audio-C7TzWI8M.js.map +1 -1
  22. package/dist/audio-DUVz7Ars.cjs.map +1 -1
  23. package/dist/{autocomplete-ppoaK_GD.js → autocomplete-DAK35swc.js} +2 -2
  24. package/dist/{autocomplete-ppoaK_GD.js.map → autocomplete-DAK35swc.js.map} +1 -1
  25. package/dist/{autocomplete-WQxz4VGO.cjs → autocomplete-DlCqS1gW.cjs} +1 -1
  26. package/dist/{autocomplete-WQxz4VGO.cjs.map → autocomplete-DlCqS1gW.cjs.map} +1 -1
  27. package/dist/autocomplete.cjs +1 -1
  28. package/dist/autocomplete.js +1 -1
  29. package/dist/badge.cjs +1 -1
  30. package/dist/badge.js +1 -1
  31. package/dist/{boat-C-T9RDiG.cjs → boat-C57YTPbb.cjs} +1 -1
  32. package/dist/{boat-C-T9RDiG.cjs.map → boat-C57YTPbb.cjs.map} +1 -1
  33. package/dist/{boat-C4JnoakD.js → boat-Dms45k4o.js} +1 -1
  34. package/dist/{boat-C4JnoakD.js.map → boat-Dms45k4o.js.map} +1 -1
  35. package/dist/boat.cjs +1 -1
  36. package/dist/boat.js +1 -1
  37. package/dist/breadcrumb.cjs +1 -1
  38. package/dist/breadcrumb.js +1 -1
  39. package/dist/{busy-BMRUS_Ns.cjs → busy-BfN1p1n8.cjs} +1 -1
  40. package/dist/{busy-BMRUS_Ns.cjs.map → busy-BfN1p1n8.cjs.map} +1 -1
  41. package/dist/{busy-DuV4A5PX.js → busy-IKS9obYj.js} +1 -1
  42. package/dist/{busy-DuV4A5PX.js.map → busy-IKS9obYj.js.map} +1 -1
  43. package/dist/busy.cjs +1 -1
  44. package/dist/busy.js +1 -1
  45. package/dist/button.cjs +1 -1
  46. package/dist/button.cjs.map +1 -1
  47. package/dist/button.js +3 -3
  48. package/dist/button.js.map +1 -1
  49. package/dist/{card-DzXRouJC.js → card-DQNBal9V.js} +1 -1
  50. package/dist/{card-DzXRouJC.js.map → card-DQNBal9V.js.map} +1 -1
  51. package/dist/{card-DBjGfCxi.cjs → card-ZObyqkFF.cjs} +1 -1
  52. package/dist/{card-DBjGfCxi.cjs.map → card-ZObyqkFF.cjs.map} +1 -1
  53. package/dist/card.cjs +1 -1
  54. package/dist/card.js +1 -1
  55. package/dist/charts.cjs +1 -1
  56. package/dist/charts.js +1 -1
  57. package/dist/{checkbox-BwuhSBDG.js → checkbox-COhTJ1x5.js} +1 -1
  58. package/dist/{checkbox-BwuhSBDG.js.map → checkbox-COhTJ1x5.js.map} +1 -1
  59. package/dist/{checkbox-BibOr-sJ.cjs → checkbox-CiAtIrqB.cjs} +1 -1
  60. package/dist/{checkbox-BibOr-sJ.cjs.map → checkbox-CiAtIrqB.cjs.map} +1 -1
  61. package/dist/checkbox.cjs +1 -1
  62. package/dist/checkbox.js +1 -1
  63. package/dist/{chips-DiB2BfTQ.js → chips-B5o3vNQF.js} +3 -3
  64. package/dist/{chips-DiB2BfTQ.js.map → chips-B5o3vNQF.js.map} +1 -1
  65. package/dist/{chips-D5QvIKt6.cjs → chips-D2xmsC36.cjs} +1 -1
  66. package/dist/{chips-D5QvIKt6.cjs.map → chips-D2xmsC36.cjs.map} +1 -1
  67. package/dist/chips.cjs +1 -1
  68. package/dist/chips.js +2 -2
  69. package/dist/{code-highlight-Q2x2hrWg.cjs → code-highlight-BToHh8T6.cjs} +1 -1
  70. package/dist/{code-highlight-Q2x2hrWg.cjs.map → code-highlight-BToHh8T6.cjs.map} +1 -1
  71. package/dist/{code-highlight-B5_zONzv.js → code-highlight-SkMMTkIJ.js} +1 -1
  72. package/dist/{code-highlight-B5_zONzv.js.map → code-highlight-SkMMTkIJ.js.map} +1 -1
  73. package/dist/code-highlight.cjs +1 -1
  74. package/dist/code-highlight.js +1 -1
  75. package/dist/{components-jfFxyq6z.cjs → components-B-XYvUWn.cjs} +1 -1
  76. package/dist/{components-jfFxyq6z.cjs.map → components-B-XYvUWn.cjs.map} +1 -1
  77. package/dist/{components-CjLqW8Jp.js → components-Ca7OTgbQ.js} +1 -1
  78. package/dist/{components-CjLqW8Jp.js.map → components-Ca7OTgbQ.js.map} +1 -1
  79. package/dist/components.cjs +1 -1
  80. package/dist/components.js +1 -1
  81. package/dist/connectivity.cjs +1 -1
  82. package/dist/connectivity.js +1 -1
  83. package/dist/content-drawer.cjs +1 -1
  84. package/dist/content-drawer.js +1 -1
  85. package/dist/context-C6GwmNJJ.cjs +1 -0
  86. package/dist/{context-BRtGc7PP.cjs.map → context-C6GwmNJJ.cjs.map} +1 -1
  87. package/dist/context-oBTPHrbc.js +3 -0
  88. package/dist/{context-DgD3c6q-.js.map → context-oBTPHrbc.js.map} +1 -1
  89. package/dist/cursor-glow-82y5h3E4.cjs.map +1 -1
  90. package/dist/{date-range-DF5ROfrb.cjs → date-range-BTA9nKbw.cjs} +1 -1
  91. package/dist/{date-range-DF5ROfrb.cjs.map → date-range-BTA9nKbw.cjs.map} +1 -1
  92. package/dist/{date-range-Dcy8GSov.js → date-range-DUWpF0Qw.js} +2 -2
  93. package/dist/{date-range-Dcy8GSov.js.map → date-range-DUWpF0Qw.js.map} +1 -1
  94. package/dist/date-range.cjs +1 -1
  95. package/dist/date-range.js +1 -1
  96. package/dist/{delay-aQRihOO4.cjs → delay-Co89XWry.cjs} +1 -1
  97. package/dist/{delay-aQRihOO4.cjs.map → delay-Co89XWry.cjs.map} +1 -1
  98. package/dist/{delay-B7TvigGw.js → delay-CtDrlf1Q.js} +3 -3
  99. package/dist/{delay-B7TvigGw.js.map → delay-CtDrlf1Q.js.map} +1 -1
  100. package/dist/delay.cjs +1 -1
  101. package/dist/delay.js +1 -1
  102. package/dist/{details-DfYDNHuv.js → details-B1Ax7WiP.js} +1 -1
  103. package/dist/{details-DfYDNHuv.js.map → details-B1Ax7WiP.js.map} +1 -1
  104. package/dist/{details-Cs8yStsJ.cjs → details-CyXyVdb2.cjs} +1 -1
  105. package/dist/{details-Cs8yStsJ.cjs.map → details-CyXyVdb2.cjs.map} +1 -1
  106. package/dist/details.cjs +1 -1
  107. package/dist/details.js +1 -1
  108. package/dist/dialog-service-CCFGpU7a.js.map +1 -1
  109. package/dist/dialog-service-DXLGSshF.cjs.map +1 -1
  110. package/dist/dialog.cjs +1 -1
  111. package/dist/dialog.cjs.map +1 -1
  112. package/dist/dialog.js +1 -1
  113. package/dist/directives.cjs.map +1 -1
  114. package/dist/directives.js.map +1 -1
  115. package/dist/{divider-DE9pcMw3.js → divider-DuwCrKQu.js} +1 -1
  116. package/dist/{divider-DE9pcMw3.js.map → divider-DuwCrKQu.js.map} +1 -1
  117. package/dist/{divider-DY4ocl-Z.cjs → divider-xcvHqVBc.cjs} +1 -1
  118. package/dist/{divider-DY4ocl-Z.cjs.map → divider-xcvHqVBc.cjs.map} +1 -1
  119. package/dist/divider.cjs +1 -1
  120. package/dist/divider.js +1 -1
  121. package/dist/dropdown.cjs +1 -1
  122. package/dist/dropdown.js +2 -2
  123. package/dist/{expand-Cuu9u0j5.cjs → expand-DUgOh1af.cjs} +1 -1
  124. package/dist/{expand-Cuu9u0j5.cjs.map → expand-DUgOh1af.cjs.map} +1 -1
  125. package/dist/{expand-Cwis2Y6U.js → expand-X0C1W279.js} +2 -2
  126. package/dist/{expand-Cwis2Y6U.js.map → expand-X0C1W279.js.map} +1 -1
  127. package/dist/expand.cjs +1 -1
  128. package/dist/expand.js +1 -1
  129. package/dist/{extra-DoxLBpZ-.js → extra-BTyq-5Z6.js} +1 -1
  130. package/dist/{extra-DoxLBpZ-.js.map → extra-BTyq-5Z6.js.map} +1 -1
  131. package/dist/{extra-DRIgrdHx.cjs → extra-BqfYIC_q.cjs} +1 -1
  132. package/dist/{extra-DRIgrdHx.cjs.map → extra-BqfYIC_q.cjs.map} +1 -1
  133. package/dist/extra.cjs +1 -1
  134. package/dist/extra.js +1 -1
  135. package/dist/{float-2aPqW2lz.js → float-BgGeLER6.js} +1 -1
  136. package/dist/{float-2aPqW2lz.js.map → float-BgGeLER6.js.map} +1 -1
  137. package/dist/{float-I4wePTk7.cjs → float-yZoLnUg0.cjs} +1 -1
  138. package/dist/{float-I4wePTk7.cjs.map → float-yZoLnUg0.cjs.map} +1 -1
  139. package/dist/float.cjs +1 -1
  140. package/dist/float.js +1 -1
  141. package/dist/{icons-DDQBxhDC.js → icons-BDcb8dNb.js} +2 -2
  142. package/dist/{icons-DDQBxhDC.js.map → icons-BDcb8dNb.js.map} +1 -1
  143. package/dist/{icons-UOqapID2.cjs → icons-BLFEJFDG.cjs} +1 -1
  144. package/dist/{icons-UOqapID2.cjs.map → icons-BLFEJFDG.cjs.map} +1 -1
  145. package/dist/icons.cjs +1 -1
  146. package/dist/icons.js +1 -1
  147. package/dist/{iframe-FZCULDVM.cjs → iframe-CrDpQkhj.cjs} +1 -1
  148. package/dist/{iframe-FZCULDVM.cjs.map → iframe-CrDpQkhj.cjs.map} +1 -1
  149. package/dist/{iframe-CMTUyiz1.js → iframe-qCW0HzwB.js} +1 -1
  150. package/dist/{iframe-CMTUyiz1.js.map → iframe-qCW0HzwB.js.map} +1 -1
  151. package/dist/iframe.cjs +1 -1
  152. package/dist/iframe.js +1 -1
  153. package/dist/index.cjs +1 -1
  154. package/dist/index.js +32 -32
  155. package/dist/{input-DIuyi3Gm.cjs → input-C1MIZaKq.cjs} +1 -1
  156. package/dist/{input-DIuyi3Gm.cjs.map → input-C1MIZaKq.cjs.map} +1 -1
  157. package/dist/{input-HzweUBSn.js → input-Dv-HtkM9.js} +1 -1
  158. package/dist/{input-HzweUBSn.js.map → input-Dv-HtkM9.js.map} +1 -1
  159. package/dist/{input-chip-Bt2Lzi-2.js → input-chip-CyvjhQSw.js} +1 -1
  160. package/dist/{input-chip-Bt2Lzi-2.js.map → input-chip-CyvjhQSw.js.map} +1 -1
  161. package/dist/{input-chip-nghCxe9L.cjs → input-chip-DnfthOSY.cjs} +1 -1
  162. package/dist/{input-chip-nghCxe9L.cjs.map → input-chip-DnfthOSY.cjs.map} +1 -1
  163. package/dist/input.cjs +1 -1
  164. package/dist/input.js +1 -1
  165. package/dist/json.cjs +1 -1
  166. package/dist/json.js +2 -2
  167. package/dist/kbd.cjs +1 -1
  168. package/dist/kbd.js +1 -1
  169. package/dist/{layout-DHt4hK1n.cjs → layout-D0cR3hT1.cjs} +1 -1
  170. package/dist/{layout-DHt4hK1n.cjs.map → layout-D0cR3hT1.cjs.map} +1 -1
  171. package/dist/layout-PZCF3kwl.cjs.map +1 -1
  172. package/dist/{layout-BUq6VVj0.js → layout-Y5qo3er8.js} +2 -2
  173. package/dist/{layout-BUq6VVj0.js.map → layout-Y5qo3er8.js.map} +1 -1
  174. package/dist/layout.cjs +1 -1
  175. package/dist/layout.js +2 -2
  176. package/dist/{lightbox-p_uYC9Hy.js → lightbox-C_pqYF6q.js} +2 -2
  177. package/dist/{lightbox-p_uYC9Hy.js.map → lightbox-C_pqYF6q.js.map} +1 -1
  178. package/dist/{lightbox-CbAbyhzE.cjs → lightbox-Ce8nMldr.cjs} +1 -1
  179. package/dist/{lightbox-CbAbyhzE.cjs.map → lightbox-Ce8nMldr.cjs.map} +1 -1
  180. package/dist/lightbox.cjs +1 -1
  181. package/dist/lightbox.js +1 -1
  182. package/dist/{list-pvbKwpnz.cjs → list-CLc_OQ5k.cjs} +1 -1
  183. package/dist/{list-pvbKwpnz.cjs.map → list-CLc_OQ5k.cjs.map} +1 -1
  184. package/dist/{list-DG1shv4_.js → list-DcnTGee0.js} +2 -2
  185. package/dist/{list-DG1shv4_.js.map → list-DcnTGee0.js.map} +1 -1
  186. package/dist/list.cjs +1 -1
  187. package/dist/list.js +1 -1
  188. package/dist/{litElement.mixin-Bx9Avv0M.cjs → litElement.mixin-DeT3kAOS.cjs} +1 -1
  189. package/dist/{litElement.mixin-Bx9Avv0M.cjs.map → litElement.mixin-DeT3kAOS.cjs.map} +1 -1
  190. package/dist/{litElement.mixin-BLb2kIHg.js → litElement.mixin-Mi8bar6B.js} +1 -1
  191. package/dist/{litElement.mixin-BLb2kIHg.js.map → litElement.mixin-Mi8bar6B.js.map} +1 -1
  192. package/dist/magnetic-aBBnj_vk.cjs.map +1 -1
  193. package/dist/{mailbox-BCRplIro.js → mailbox-BrLZPj2o.js} +4 -4
  194. package/dist/{mailbox-BCRplIro.js.map → mailbox-BrLZPj2o.js.map} +1 -1
  195. package/dist/{mailbox-CZevIxwZ.cjs → mailbox-CE5sTDsQ.cjs} +1 -1
  196. package/dist/{mailbox-CZevIxwZ.cjs.map → mailbox-CE5sTDsQ.cjs.map} +1 -1
  197. package/dist/mailbox.cjs +1 -1
  198. package/dist/mailbox.js +1 -1
  199. package/dist/{map-C6kDkAju.cjs → map-CKzhM6uY.cjs} +1 -1
  200. package/dist/{map-C6kDkAju.cjs.map → map-CKzhM6uY.cjs.map} +1 -1
  201. package/dist/{map-BUcxWqBH.js → map-SNb-3q5h.js} +1 -1
  202. package/dist/{map-BUcxWqBH.js.map → map-SNb-3q5h.js.map} +1 -1
  203. package/dist/map.cjs +1 -1
  204. package/dist/map.js +1 -1
  205. package/dist/{menu-DhmDz_js.cjs → menu-BnGjBrdD.cjs} +1 -1
  206. package/dist/{menu-DhmDz_js.cjs.map → menu-BnGjBrdD.cjs.map} +1 -1
  207. package/dist/{menu-BleltblR.js → menu-VErqs9NG.js} +1 -1
  208. package/dist/{menu-BleltblR.js.map → menu-VErqs9NG.js.map} +1 -1
  209. package/dist/menu.cjs +1 -1
  210. package/dist/menu.js +1 -1
  211. package/dist/mixins.cjs +1 -1
  212. package/dist/mixins.js +2 -2
  213. package/dist/nav-drawer.cjs +1 -1
  214. package/dist/nav-drawer.js +1 -1
  215. package/dist/navigation-bar.cjs +1 -1
  216. package/dist/navigation-bar.js +1 -1
  217. package/dist/navigation-rail.cjs +1 -1
  218. package/dist/navigation-rail.js +1 -1
  219. package/dist/{notification-DvrozLTu.js → notification-B_Fkxv7d.js} +2 -2
  220. package/dist/notification-B_Fkxv7d.js.map +1 -0
  221. package/dist/{notification-BT84PlwC.cjs → notification-DE5dFf8G.cjs} +1 -1
  222. package/dist/notification-DE5dFf8G.cjs.map +1 -0
  223. package/dist/notification.cjs +1 -1
  224. package/dist/notification.js +1 -1
  225. package/dist/{option-y5FY8sz-.cjs → option-BmbP5ulK.cjs} +1 -1
  226. package/dist/{option-y5FY8sz-.cjs.map → option-BmbP5ulK.cjs.map} +1 -1
  227. package/dist/{option-EEYkHd44.js → option-DuAlGv27.js} +1 -1
  228. package/dist/{option-EEYkHd44.js.map → option-DuAlGv27.js.map} +1 -1
  229. package/dist/option.cjs +1 -1
  230. package/dist/option.js +1 -1
  231. package/dist/page.cjs +1 -1
  232. package/dist/page.cjs.map +1 -1
  233. package/dist/page.js +2 -2
  234. package/dist/{progress-B8nfhvrc.js → progress-BnXr7aAs.js} +1 -1
  235. package/dist/{progress-B8nfhvrc.js.map → progress-BnXr7aAs.js.map} +1 -1
  236. package/dist/{progress-B1if5cWu.cjs → progress-Bt9gUiGP.cjs} +1 -1
  237. package/dist/{progress-B1if5cWu.cjs.map → progress-Bt9gUiGP.cjs.map} +1 -1
  238. package/dist/progress.cjs +1 -1
  239. package/dist/progress.js +1 -1
  240. package/dist/{provide-BbFbvIEk.cjs → provide-CnXCF-UP.cjs} +1 -1
  241. package/dist/{provide-BbFbvIEk.cjs.map → provide-CnXCF-UP.cjs.map} +1 -1
  242. package/dist/{provide-BEMtticm.js → provide-Disc6_zz.js} +1 -1
  243. package/dist/{provide-BEMtticm.js.map → provide-Disc6_zz.js.map} +1 -1
  244. package/dist/qr-scanner.cjs +1 -1
  245. package/dist/qr-scanner.js +1 -1
  246. package/dist/{radio-group-DKXbC-jL.js → radio-group-BgZgHMoA.js} +1 -1
  247. package/dist/{radio-group-DKXbC-jL.js.map → radio-group-BgZgHMoA.js.map} +1 -1
  248. package/dist/{radio-group-DafTK0PB.cjs → radio-group-DkBFgq_3.cjs} +1 -1
  249. package/dist/{radio-group-DafTK0PB.cjs.map → radio-group-DkBFgq_3.cjs.map} +1 -1
  250. package/dist/radio-group.cjs +1 -1
  251. package/dist/radio-group.js +1 -1
  252. package/dist/range.cjs +1 -1
  253. package/dist/range.js +1 -1
  254. package/dist/{scroll-pdsp_9bT.js → scroll-57rkTHm8.js} +1 -1
  255. package/dist/{scroll-pdsp_9bT.js.map → scroll-57rkTHm8.js.map} +1 -1
  256. package/dist/{scroll-C6Hub5gG.cjs → scroll-hWt0b1gK.cjs} +1 -1
  257. package/dist/{scroll-C6Hub5gG.cjs.map → scroll-hWt0b1gK.cjs.map} +1 -1
  258. package/dist/{select-Zg9UqtCA.cjs → select-BDonPD5a.cjs} +1 -1
  259. package/dist/{select-Zg9UqtCA.cjs.map → select-BDonPD5a.cjs.map} +1 -1
  260. package/dist/{select-_Qkleofb.js → select-CkOAwmxC.js} +1 -1
  261. package/dist/{select-_Qkleofb.js.map → select-CkOAwmxC.js.map} +1 -1
  262. package/dist/select.cjs +1 -1
  263. package/dist/select.js +1 -1
  264. package/dist/{sheet-7LWVKgW9.cjs → sheet-Bv2mPHWk.cjs} +1 -1
  265. package/dist/{sheet-7LWVKgW9.cjs.map → sheet-Bv2mPHWk.cjs.map} +1 -1
  266. package/dist/{sheet-N9TET_t_.js → sheet-NUgEmozP.js} +3 -3
  267. package/dist/{sheet-N9TET_t_.js.map → sheet-NUgEmozP.js.map} +1 -1
  268. package/dist/sheet.cjs +1 -1
  269. package/dist/sheet.js +2 -2
  270. package/dist/{sheet.service-P2CkJW86.cjs → sheet.service-BKmnlkpZ.cjs} +1 -1
  271. package/dist/{sheet.service-P2CkJW86.cjs.map → sheet.service-BKmnlkpZ.cjs.map} +1 -1
  272. package/dist/{sheet.service-DCe4FOkQ.js → sheet.service-CanLo8ko.js} +1 -1
  273. package/dist/{sheet.service-DCe4FOkQ.js.map → sheet.service-CanLo8ko.js.map} +1 -1
  274. package/dist/skeleton.cjs +1 -1
  275. package/dist/skeleton.js +1 -1
  276. package/dist/slider.cjs +1 -1
  277. package/dist/slider.js +1 -1
  278. package/dist/{splash-screen-B5Sgz7eG.js → splash-screen-B0ppA3f1.js} +1 -1
  279. package/dist/{splash-screen-B5Sgz7eG.js.map → splash-screen-B0ppA3f1.js.map} +1 -1
  280. package/dist/{splash-screen-BUKRc46i.cjs → splash-screen-BemqNFNj.cjs} +1 -1
  281. package/dist/{splash-screen-BUKRc46i.cjs.map → splash-screen-BemqNFNj.cjs.map} +1 -1
  282. package/dist/splash-screen.cjs +1 -1
  283. package/dist/splash-screen.js +1 -1
  284. package/dist/{src-r2bV-AFk.cjs → src-ByGCYD-E.cjs} +1 -1
  285. package/dist/src-ByGCYD-E.cjs.map +1 -0
  286. package/dist/{src-59eVZMmI.js → src-Cjy9zCiU.js} +41 -41
  287. package/dist/src-Cjy9zCiU.js.map +1 -0
  288. package/dist/steps.cjs +1 -1
  289. package/dist/steps.js +3 -3
  290. package/dist/store-Bmj6rvZY.js.map +1 -1
  291. package/dist/store-CO4nJyGj.cjs.map +1 -1
  292. package/dist/{surface-B-y5Zzmz.cjs → surface-CoLYICO1.cjs} +1 -1
  293. package/dist/{surface-B-y5Zzmz.cjs.map → surface-CoLYICO1.cjs.map} +1 -1
  294. package/dist/{surface-BL6YlaS3.js → surface-CtpWeSGn.js} +2 -2
  295. package/dist/{surface-BL6YlaS3.js.map → surface-CtpWeSGn.js.map} +1 -1
  296. package/dist/surface.cjs +1 -1
  297. package/dist/surface.js +1 -1
  298. package/dist/switch.cjs +1 -1
  299. package/dist/switch.js +1 -1
  300. package/dist/{table-CzcIcVFc.cjs → table-COQKtlJB.cjs} +1 -1
  301. package/dist/{table-CzcIcVFc.cjs.map → table-COQKtlJB.cjs.map} +1 -1
  302. package/dist/{table-B0-Pi4G5.js → table-bgFb1KYU.js} +1 -1
  303. package/dist/{table-B0-Pi4G5.js.map → table-bgFb1KYU.js.map} +1 -1
  304. package/dist/table.cjs +1 -1
  305. package/dist/table.js +1 -1
  306. package/dist/{tabs-D-VbZiFu.js → tabs-BicCpU1B.js} +2 -2
  307. package/dist/{tabs-D-VbZiFu.js.map → tabs-BicCpU1B.js.map} +1 -1
  308. package/dist/{tabs-CzC8kJyY.cjs → tabs-CoMJAXDy.cjs} +1 -1
  309. package/dist/{tabs-CzC8kJyY.cjs.map → tabs-CoMJAXDy.cjs.map} +1 -1
  310. package/dist/tabs.cjs +1 -1
  311. package/dist/tabs.js +1 -1
  312. package/dist/tailwind.mixin-BfdVIGgD.cjs +2 -0
  313. package/dist/{tailwind.mixin-ZzkXQTFA.cjs.map → tailwind.mixin-BfdVIGgD.cjs.map} +1 -1
  314. package/dist/tailwind.mixin-CNdR3zFD.js +219 -0
  315. package/dist/{tailwind.mixin-BCz3GEpw.js.map → tailwind.mixin-CNdR3zFD.js.map} +1 -1
  316. package/dist/teleport.cjs +1 -1
  317. package/dist/teleport.js +1 -1
  318. package/dist/{textarea-CgB6XptL.cjs → textarea-CxTSwn3x.cjs} +1 -1
  319. package/dist/{textarea-CgB6XptL.cjs.map → textarea-CxTSwn3x.cjs.map} +1 -1
  320. package/dist/{textarea-ZopeteYQ.js → textarea-D7O9Uo15.js} +1 -1
  321. package/dist/{textarea-ZopeteYQ.js.map → textarea-D7O9Uo15.js.map} +1 -1
  322. package/dist/textarea.cjs +1 -1
  323. package/dist/textarea.js +1 -1
  324. package/dist/{theme-D9bRCDs9.cjs → theme-CCez6SRm.cjs} +1 -1
  325. package/dist/{theme-D9bRCDs9.cjs.map → theme-CCez6SRm.cjs.map} +1 -1
  326. package/dist/{theme-C7As-iVa.js → theme-DGiyJMTT.js} +3 -3
  327. package/dist/{theme-C7As-iVa.js.map → theme-DGiyJMTT.js.map} +1 -1
  328. package/dist/{theme-button-D2nMfwSr.cjs → theme-button-BV0CxpGn.cjs} +1 -1
  329. package/dist/{theme-button-D2nMfwSr.cjs.map → theme-button-BV0CxpGn.cjs.map} +1 -1
  330. package/dist/{theme-button-BDXtIhZC.js → theme-button-s9GfSQL5.js} +1 -1
  331. package/dist/{theme-button-BDXtIhZC.js.map → theme-button-s9GfSQL5.js.map} +1 -1
  332. package/dist/theme-button.cjs +1 -1
  333. package/dist/theme-button.js +1 -1
  334. package/dist/theme.cjs +1 -1
  335. package/dist/theme.js +2 -2
  336. package/dist/theme.service-ETiKUwVy.cjs.map +1 -1
  337. package/dist/theme.service-_qP5WvB9.js.map +1 -1
  338. package/dist/tree.cjs +1 -1
  339. package/dist/tree.cjs.map +1 -1
  340. package/dist/tree.js +1 -1
  341. package/dist/{typewriter-DaTkMEHc.js → typewriter-BTqEQXsX.js} +3 -3
  342. package/dist/{typewriter-DaTkMEHc.js.map → typewriter-BTqEQXsX.js.map} +1 -1
  343. package/dist/{typewriter-BjuFsiR3.cjs → typewriter-DeaL3NfZ.cjs} +1 -1
  344. package/dist/{typewriter-BjuFsiR3.cjs.map → typewriter-DeaL3NfZ.cjs.map} +1 -1
  345. package/dist/typewriter.cjs +1 -1
  346. package/dist/typewriter.js +1 -1
  347. package/dist/typography.cjs +1 -1
  348. package/dist/typography.js +1 -1
  349. package/dist/utils-C8PD8So2.cjs.map +1 -1
  350. package/dist/utils-DVuCPDfw.js.map +1 -1
  351. package/dist/visually-hidden.cjs +1 -1
  352. package/dist/visually-hidden.js +1 -1
  353. package/dist/{window-DPSIGCUq.js → window-CDHDVOwO.js} +1 -1
  354. package/dist/{window-DPSIGCUq.js.map → window-CDHDVOwO.js.map} +1 -1
  355. package/dist/{window-DAWRoXo1.cjs → window-IGZgxuUC.cjs} +1 -1
  356. package/dist/{window-DAWRoXo1.cjs.map → window-IGZgxuUC.cjs.map} +1 -1
  357. package/dist/window.cjs +1 -1
  358. package/dist/window.js +1 -1
  359. package/package.json +15 -3
  360. package/src/agent/agent-bundle.test.ts +92 -0
  361. package/src/agent/agent-entry.ts +17 -0
  362. package/src/agent/helpers.ts +161 -0
  363. package/src/agent/index.ts +1 -0
  364. package/src/agent/schmancy-skill.ts +71 -0
  365. package/src/agent/virtual-manifest.d.ts +10 -0
  366. package/src/area/area.service.ts +11 -0
  367. package/src/content-drawer/drawer.service.ts +9 -0
  368. package/src/dialog/dialog-service.ts +11 -1
  369. package/src/notification/notification-service.ts +11 -1
  370. package/src/sheet/sheet.service.ts +10 -0
  371. package/src/theme/theme.service.ts +11 -1
  372. package/types/src/agent/agent-bundle.test.d.ts +1 -0
  373. package/types/src/agent/agent-entry.d.ts +4 -0
  374. package/types/src/agent/helpers.d.ts +87 -0
  375. package/types/src/agent/index.d.ts +1 -0
  376. package/types/src/agent/schmancy-skill.d.ts +33 -0
  377. package/types/src/area/area.service.d.ts +11 -0
  378. package/types/src/content-drawer/drawer.service.d.ts +9 -0
  379. package/types/src/dialog/dialog-service.d.ts +11 -1
  380. package/types/src/notification/notification-service.d.ts +11 -1
  381. package/types/src/sheet/sheet.service.d.ts +9 -0
  382. package/types/src/theme/theme.service.d.ts +11 -0
  383. package/dist/area-CBjmKtN-.cjs.map +0 -1
  384. package/dist/area-CjX0Ckh9.js.map +0 -1
  385. package/dist/context-BRtGc7PP.cjs +0 -1
  386. package/dist/context-DgD3c6q-.js +0 -3
  387. package/dist/notification-BT84PlwC.cjs.map +0 -1
  388. package/dist/notification-DvrozLTu.js.map +0 -1
  389. package/dist/src-59eVZMmI.js.map +0 -1
  390. package/dist/src-r2bV-AFk.cjs.map +0 -1
  391. package/dist/tailwind.mixin-BCz3GEpw.js +0 -219
  392. package/dist/tailwind.mixin-ZzkXQTFA.cjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"code-highlight-B5_zONzv.js","names":[],"sources":["../src/code-highlight/code-highlight.ts","../src/code-highlight/code-preview.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport hljs from 'highlight.js/lib/core'\nimport bash from 'highlight.js/lib/languages/bash'\nimport javascript from 'highlight.js/lib/languages/javascript'\nimport markdown from 'highlight.js/lib/languages/markdown'\nimport typescript from 'highlight.js/lib/languages/typescript'\nimport xml from 'highlight.js/lib/languages/xml'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js'\n\n// Register only the languages we need\nhljs.registerLanguage('javascript', javascript)\nhljs.registerLanguage('typescript', typescript)\nhljs.registerLanguage('html', xml)\nhljs.registerLanguage('xml', xml)\nhljs.registerLanguage('markdown', markdown)\nhljs.registerLanguage('bash', bash)\n\n/**\n * @element schmancy-code\n * Code highlighting component using highlight.js with schmancy theming support\n */\n@customElement('schmancy-code')\nexport class SchmancyCode extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t}\n\n\t/* Code block styling using schmancy color system */\n\t.hljs {\n\t\tdisplay: block;\n\t\toverflow-x: auto;\n\t\tpadding: 0.5em;\n\t\tcolor: var(--md-sys-color-on-surface-variant);\n\t\tbackground: var(--md-sys-color-surface-container-lowest);\n\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;\n\t}\n\n\t/* Comments and documentation */\n\t.hljs-comment,\n\t.hljs-quote {\n\t\tcolor: var(--md-sys-color-outline);\n\t\tfont-style: italic;\n\t}\n\n\t/* Keywords, doctags, formulas */\n\t.hljs-doctag,\n\t.hljs-keyword,\n\t.hljs-formula {\n\t\tcolor: var(--md-sys-color-primary);\n\t}\n\n\t/* Tags, sections, names, deletions */\n\t.hljs-section,\n\t.hljs-name,\n\t.hljs-selector-tag,\n\t.hljs-deletion,\n\t.hljs-subst {\n\t\tcolor: var(--md-sys-color-error);\n\t}\n\n\t/* Literals */\n\t.hljs-literal {\n\t\tcolor: var(--md-sys-color-tertiary);\n\t}\n\n\t/* Strings, regex, additions */\n\t.hljs-string,\n\t.hljs-regexp,\n\t.hljs-addition,\n\t.hljs-attribute,\n\t.hljs-meta-string {\n\t\tcolor: var(--md-sys-color-secondary);\n\t}\n\n\t/* Built-ins and class titles */\n\t.hljs-built_in,\n\t.hljs-class .hljs-title {\n\t\tcolor: var(--md-sys-color-tertiary);\n\t}\n\n\t/* Variables, attributes, types */\n\t.hljs-attr,\n\t.hljs-variable,\n\t.hljs-template-variable,\n\t.hljs-type,\n\t.hljs-selector-class,\n\t.hljs-selector-attr,\n\t.hljs-selector-pseudo,\n\t.hljs-number {\n\t\tcolor: var(--md-sys-color-on-surface);\n\t}\n\n\t/* Symbols, bullets, links, meta */\n\t.hljs-symbol,\n\t.hljs-bullet,\n\t.hljs-link,\n\t.hljs-meta,\n\t.hljs-selector-id,\n\t.hljs-title {\n\t\tcolor: var(--md-sys-color-secondary);\n\t}\n\n\t.hljs-emphasis {\n\t\tfont-style: italic;\n\t}\n\n\t.hljs-strong {\n\t\tfont-weight: bold;\n\t}\n\n\t.hljs-link {\n\t\ttext-decoration: underline;\n\t}\n\n\t/* Line features styling */\n\t.code-with-lines {\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t.code-line {\n\t\tdisplay: block;\n\t\tpadding-left: 0;\n\t\ttransition: background-color 0.2s ease;\n\t}\n\n\t.code-line.highlighted {\n\t\tbackground-color: var(--md-sys-color-primary-container);\n\t\topacity: 0.2;\n\t}\n\n\t.line-number {\n\t\tdisplay: inline-block;\n\t\twidth: 3rem;\n\t\tpadding-right: 1rem;\n\t\ttext-align: right;\n\t\tcolor: var(--md-sys-color-outline);\n\t\tuser-select: none;\n\t\tfont-size: inherit;\n\t}\n`) {\n\t/**\n\t * Programming language for syntax highlighting\n\t */\n\t@property({ type: String })\n\tlanguage: string = 'javascript'\n\n\t/**\n\t * Code content to highlight\n\t */\n\t@property({ type: String })\n\tcode: string = ''\n\n\t/**\n\t * Optional filename or title to display in header\n\t */\n\t@property({ type: String })\n\tfilename?: string\n\n\t/**\n\t * Show line numbers\n\t */\n\t@property({ type: Boolean })\n\tlineNumbers: boolean = false\n\n\t/**\n\t * Show copy button\n\t */\n\t@property({ type: Boolean })\n\tcopyButton: boolean = true\n\n\t/**\n\t * Highlighted line numbers (comma-separated or ranges like \"1-3,5,7-9\")\n\t */\n\t@property({ type: String })\n\thighlightLines?: string\n\n\t/**\n\t * Maximum height before scrolling\n\t */\n\t@property({ type: String })\n\tmaxHeight?: string\n\n\t@state()\n\tprivate copied: boolean = false\n\n\tprivate get highlightedCode(): string {\n\t\tif (!this.code) return ''\n\n\t\tlet highlightedHtml = ''\n\n\t\ttry {\n\t\t\t// Use highlight.js to get highlighted code\n\t\t\tconst result = hljs.highlight(this.code.trim(), { language: this.language })\n\t\t\thighlightedHtml = result.value\n\t\t} catch {\n\t\t\t// Fallback to auto-detection if language is not supported\n\t\t\ttry {\n\t\t\t\tconst result = hljs.highlightAuto(this.code.trim())\n\t\t\t\thighlightedHtml = result.value\n\t\t\t} catch {\n\t\t\t\t// Final fallback to escaped plain text\n\t\t\t\thighlightedHtml = this.escapeHtml(this.code.trim())\n\t\t\t}\n\t\t}\n\n\t\t// Process for line numbers and highlighting if needed\n\t\tif (this.lineNumbers || this.highlightLines) {\n\t\t\treturn this.addLineFeatures(highlightedHtml)\n\t\t}\n\n\t\treturn highlightedHtml\n\t}\n\n\tprivate escapeHtml(text: string): string {\n\t\tconst div = document.createElement('div')\n\t\tdiv.textContent = text\n\t\treturn div.innerHTML\n\t}\n\n\tprivate getHighlightedLines(): Set<number> {\n\t\tconst lines = new Set<number>()\n\t\tif (!this.highlightLines) return lines\n\n\t\tconst parts = this.highlightLines.split(',')\n\t\tfor (const part of parts) {\n\t\t\tconst trimmed = part.trim()\n\t\t\tif (trimmed.includes('-')) {\n\t\t\t\tconst [start, end] = trimmed.split('-').map(n => parseInt(n.trim()))\n\t\t\t\tif (!isNaN(start) && !isNaN(end)) {\n\t\t\t\t\tfor (let i = start; i <= end; i++) {\n\t\t\t\t\t\tlines.add(i)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lineNum = parseInt(trimmed)\n\t\t\t\tif (!isNaN(lineNum)) {\n\t\t\t\t\tlines.add(lineNum)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn lines\n\t}\n\n\tprivate addLineFeatures(highlightedHtml: string): string {\n\t\tconst lines = highlightedHtml.split('\\n')\n\t\tconst highlightedLines = this.getHighlightedLines()\n\n\t\treturn lines\n\t\t\t.map((line, index) => {\n\t\t\t\tconst lineNumber = index + 1\n\t\t\t\tconst isHighlighted = highlightedLines.has(lineNumber)\n\t\t\t\tconst lineClass = isHighlighted ? 'code-line highlighted' : 'code-line'\n\n\t\t\t\tlet content = ''\n\t\t\t\tif (this.lineNumbers) {\n\t\t\t\t\tcontent += `<span class=\"line-number\">${lineNumber}</span>`\n\t\t\t\t}\n\t\t\t\tcontent += line\n\n\t\t\t\treturn `<div class=\"${lineClass}\">${content}</div>`\n\t\t\t})\n\t\t\t.join('')\n\t}\n\n\tprivate async copyCode() {\n\t\ttry {\n\t\t\tawait navigator.clipboard.writeText(this.code)\n\t\t\tthis.copied = true\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.copied = false\n\t\t\t}, 2000)\n\t\t} catch (err) {\n\t\t\tconsole.error('Failed to copy code:', err)\n\t\t}\n\t}\n\n\tprivate getLanguageLabel(): string {\n\t\tconst languageMap: Record<string, string> = {\n\t\t\tjavascript: 'JavaScript',\n\t\t\ttypescript: 'TypeScript',\n\t\t\thtml: 'HTML',\n\t\t\tmarkdown: 'Markdown',\n\t\t\tbash: 'Bash',\n\t\t}\n\n\t\tif (this.filename) {\n\t\t\treturn this.filename\n\t\t}\n\n\t\treturn languageMap[this.language.toLowerCase()] || this.language.toUpperCase()\n\t}\n\n\trender() {\n\t\tconst codeClass = this.lineNumbers || this.highlightLines ? 'code-with-lines' : 'hljs'\n\n\t\treturn html`\n\t\t\t<schmancy-details class=\"bg-surface-default\">\n\t\t\t\t<section slot=\"summary\">\n\t\t\t\t\t<!-- Header -->\n\t\t\t\t\t<div class=\"flex items-center justify-between\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"flex gap-1.5\">\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-error);\"></div>\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-tertiary);\"></div>\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-secondary);\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<span class=\"text-xs font-medium opacity-70 ml-2\" style=\"color: var(--md-sys-color-on-surface-variant);\">\n\t\t\t\t\t\t\t\t${this.getLanguageLabel()}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${this.copyButton\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\t\t\t.variant=\"${this.copied ? 'filled tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t\t\t@click=${this.copyCode}\n\t\t\t\t\t\t\t\t\t\tclass=\"transition-all\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<schmancy-icon > ${this.copied ? 'check' : 'content_copy'} </schmancy-icon>\n\t\t\t\t\t\t\t\t\t\t<span class=\"ml-1\">${this.copied ? 'Copied!' : 'Copy'}</span>\n\t\t\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t<!-- Code -->\n\t\t\t\t<div class=\"overflow-auto\" style=\"${this.maxHeight ? `max-height: ${this.maxHeight}` : ''}\">\n\t\t\t\t\t<pre class=\"m-0\"><code class=\"${codeClass}\">${unsafeHTML(this.highlightedCode)}</code></pre>\n\t\t\t\t</div>\n\t\t\t</schmancy-details>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-code': SchmancyCode\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { timer } from 'rxjs'\nimport { take } from 'rxjs/operators'\n\n/**\n * @element schmancy-code-preview\n * A component that shows code and its rendered preview side by side\n * Takes the content as a slot and displays both the source and rendered result\n */\n@customElement('schmancy-code-preview')\nexport class SchmancyCodePreview extends TailwindElement(\n\tcss`:host{\n\t\tdisplay:block;\n\t\toverflow:hidden;\n\t\tposition:relative;\n\t\tinset:0;\n\t}`\n) {\n\t/**\n\t * Programming language for syntax highlighting\n\t */\n\t@property({ type: String })\n\tlanguage: string = 'html'\n\n\t/**\n\t * Show code on top or side-by-side\n\t */\n\t@property({ type: String })\n\tlayout: 'vertical' | 'horizontal' = 'vertical'\n\n\t/**\n\t * Whether to render/execute the code in preview section\n\t * When false, only shows the code without rendering\n\t */\n\t@property({ type: Boolean })\n\tpreview: boolean = true\n\n\t@state()\n\tprivate slotContent: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Capture the slot content as HTML string\n\t\ttimer(0).pipe(take(1)).subscribe(() => {\n\t\t\tconst slot = this.shadowRoot?.querySelector('slot')\n\t\t\tif (slot) {\n\t\t\t\tconst nodes = slot.assignedNodes({ flatten: true })\n\t\t\t\tconst htmlStrings = nodes.map(node => {\n\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\treturn (node as HTMLElement).outerHTML\n\t\t\t\t\t} else if (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t\t\treturn node.textContent || ''\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t})\n\t\t\t\t\n\t\t\t\t// Clean up the HTML string\n\t\t\t\tconst rawContent = htmlStrings.join('')\n\t\t\t\t\n\t\t\t\t// Find the minimum indentation (excluding empty lines)\n\t\t\t\tconst lines = rawContent.split('\\n')\n\t\t\t\tconst minIndent = lines\n\t\t\t\t\t.filter(line => line.trim().length > 0)\n\t\t\t\t\t.reduce((min, line) => {\n\t\t\t\t\t\tconst indent = line.match(/^(\\s*)/)?.[1].length || 0\n\t\t\t\t\t\treturn Math.min(min, indent)\n\t\t\t\t\t}, Infinity)\n\t\t\t\t\n\t\t\t\t// Remove the minimum indentation from all lines\n\t\t\t\tthis.slotContent = lines\n\t\t\t\t\t.map(line => line.slice(minIndent))\n\t\t\t\t\t.join('\\n')\n\t\t\t\t\t.trim()\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\tconst containerClass = this.layout === 'horizontal' \n\t\t\t? 'grid grid-cols-1 lg:grid-cols-2 gap-0' \n\t\t\t: 'flex flex-col'\n\n\t\tconst showPreview = this.preview && this.language.toLowerCase() === 'html'\n\t\t\n\t\treturn html`\n\t\t\t<schmancy-surface class=\"rounded-lg overflow-hidden\">\n\t\t\t\t<div class=\"${showPreview ? containerClass : ''}\">\n\t\t\t\t\t<!-- Code section with proper overflow handling -->\n\t\t\t\t\t<div class=\"min-w-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-code\n\t\t\t\t\t\t\tlanguage=\"${this.language}\"\n\t\t\t\t\t\t\t.code=\"${this.slotContent}\"\n\t\t\t\t\t\t\t?copyButton=\"${true}\"\n\t\t\t\t\t\t\tclass=\"block w-full\"\n\t\t\t\t\t\t></schmancy-code>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<!-- Preview section (only visible for HTML and when preview is enabled) -->\n\t\t\t\t\t${showPreview ? html`\n\t\t\t\t\t\t<div class=\"min-w-0 overflow-auto\">\n\t\t\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"p-2 h-full\">\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t` : html`\n\t\t\t\t\t\t<!-- Hidden slot to capture content -->\n\t\t\t\t\t\t<div class=\"hidden\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`}\n\t\t\t\t</div>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-code-preview': SchmancyCodePreview\n\t}\n}"],"mappings":"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"}
1
+ {"version":3,"file":"code-highlight-SkMMTkIJ.js","names":[],"sources":["../src/code-highlight/code-highlight.ts","../src/code-highlight/code-preview.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport hljs from 'highlight.js/lib/core'\nimport bash from 'highlight.js/lib/languages/bash'\nimport javascript from 'highlight.js/lib/languages/javascript'\nimport markdown from 'highlight.js/lib/languages/markdown'\nimport typescript from 'highlight.js/lib/languages/typescript'\nimport xml from 'highlight.js/lib/languages/xml'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js'\n\n// Register only the languages we need\nhljs.registerLanguage('javascript', javascript)\nhljs.registerLanguage('typescript', typescript)\nhljs.registerLanguage('html', xml)\nhljs.registerLanguage('xml', xml)\nhljs.registerLanguage('markdown', markdown)\nhljs.registerLanguage('bash', bash)\n\n/**\n * @element schmancy-code\n * Code highlighting component using highlight.js with schmancy theming support\n */\n@customElement('schmancy-code')\nexport class SchmancyCode extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t}\n\n\t/* Code block styling using schmancy color system */\n\t.hljs {\n\t\tdisplay: block;\n\t\toverflow-x: auto;\n\t\tpadding: 0.5em;\n\t\tcolor: var(--md-sys-color-on-surface-variant);\n\t\tbackground: var(--md-sys-color-surface-container-lowest);\n\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;\n\t}\n\n\t/* Comments and documentation */\n\t.hljs-comment,\n\t.hljs-quote {\n\t\tcolor: var(--md-sys-color-outline);\n\t\tfont-style: italic;\n\t}\n\n\t/* Keywords, doctags, formulas */\n\t.hljs-doctag,\n\t.hljs-keyword,\n\t.hljs-formula {\n\t\tcolor: var(--md-sys-color-primary);\n\t}\n\n\t/* Tags, sections, names, deletions */\n\t.hljs-section,\n\t.hljs-name,\n\t.hljs-selector-tag,\n\t.hljs-deletion,\n\t.hljs-subst {\n\t\tcolor: var(--md-sys-color-error);\n\t}\n\n\t/* Literals */\n\t.hljs-literal {\n\t\tcolor: var(--md-sys-color-tertiary);\n\t}\n\n\t/* Strings, regex, additions */\n\t.hljs-string,\n\t.hljs-regexp,\n\t.hljs-addition,\n\t.hljs-attribute,\n\t.hljs-meta-string {\n\t\tcolor: var(--md-sys-color-secondary);\n\t}\n\n\t/* Built-ins and class titles */\n\t.hljs-built_in,\n\t.hljs-class .hljs-title {\n\t\tcolor: var(--md-sys-color-tertiary);\n\t}\n\n\t/* Variables, attributes, types */\n\t.hljs-attr,\n\t.hljs-variable,\n\t.hljs-template-variable,\n\t.hljs-type,\n\t.hljs-selector-class,\n\t.hljs-selector-attr,\n\t.hljs-selector-pseudo,\n\t.hljs-number {\n\t\tcolor: var(--md-sys-color-on-surface);\n\t}\n\n\t/* Symbols, bullets, links, meta */\n\t.hljs-symbol,\n\t.hljs-bullet,\n\t.hljs-link,\n\t.hljs-meta,\n\t.hljs-selector-id,\n\t.hljs-title {\n\t\tcolor: var(--md-sys-color-secondary);\n\t}\n\n\t.hljs-emphasis {\n\t\tfont-style: italic;\n\t}\n\n\t.hljs-strong {\n\t\tfont-weight: bold;\n\t}\n\n\t.hljs-link {\n\t\ttext-decoration: underline;\n\t}\n\n\t/* Line features styling */\n\t.code-with-lines {\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t.code-line {\n\t\tdisplay: block;\n\t\tpadding-left: 0;\n\t\ttransition: background-color 0.2s ease;\n\t}\n\n\t.code-line.highlighted {\n\t\tbackground-color: var(--md-sys-color-primary-container);\n\t\topacity: 0.2;\n\t}\n\n\t.line-number {\n\t\tdisplay: inline-block;\n\t\twidth: 3rem;\n\t\tpadding-right: 1rem;\n\t\ttext-align: right;\n\t\tcolor: var(--md-sys-color-outline);\n\t\tuser-select: none;\n\t\tfont-size: inherit;\n\t}\n`) {\n\t/**\n\t * Programming language for syntax highlighting\n\t */\n\t@property({ type: String })\n\tlanguage: string = 'javascript'\n\n\t/**\n\t * Code content to highlight\n\t */\n\t@property({ type: String })\n\tcode: string = ''\n\n\t/**\n\t * Optional filename or title to display in header\n\t */\n\t@property({ type: String })\n\tfilename?: string\n\n\t/**\n\t * Show line numbers\n\t */\n\t@property({ type: Boolean })\n\tlineNumbers: boolean = false\n\n\t/**\n\t * Show copy button\n\t */\n\t@property({ type: Boolean })\n\tcopyButton: boolean = true\n\n\t/**\n\t * Highlighted line numbers (comma-separated or ranges like \"1-3,5,7-9\")\n\t */\n\t@property({ type: String })\n\thighlightLines?: string\n\n\t/**\n\t * Maximum height before scrolling\n\t */\n\t@property({ type: String })\n\tmaxHeight?: string\n\n\t@state()\n\tprivate copied: boolean = false\n\n\tprivate get highlightedCode(): string {\n\t\tif (!this.code) return ''\n\n\t\tlet highlightedHtml = ''\n\n\t\ttry {\n\t\t\t// Use highlight.js to get highlighted code\n\t\t\tconst result = hljs.highlight(this.code.trim(), { language: this.language })\n\t\t\thighlightedHtml = result.value\n\t\t} catch {\n\t\t\t// Fallback to auto-detection if language is not supported\n\t\t\ttry {\n\t\t\t\tconst result = hljs.highlightAuto(this.code.trim())\n\t\t\t\thighlightedHtml = result.value\n\t\t\t} catch {\n\t\t\t\t// Final fallback to escaped plain text\n\t\t\t\thighlightedHtml = this.escapeHtml(this.code.trim())\n\t\t\t}\n\t\t}\n\n\t\t// Process for line numbers and highlighting if needed\n\t\tif (this.lineNumbers || this.highlightLines) {\n\t\t\treturn this.addLineFeatures(highlightedHtml)\n\t\t}\n\n\t\treturn highlightedHtml\n\t}\n\n\tprivate escapeHtml(text: string): string {\n\t\tconst div = document.createElement('div')\n\t\tdiv.textContent = text\n\t\treturn div.innerHTML\n\t}\n\n\tprivate getHighlightedLines(): Set<number> {\n\t\tconst lines = new Set<number>()\n\t\tif (!this.highlightLines) return lines\n\n\t\tconst parts = this.highlightLines.split(',')\n\t\tfor (const part of parts) {\n\t\t\tconst trimmed = part.trim()\n\t\t\tif (trimmed.includes('-')) {\n\t\t\t\tconst [start, end] = trimmed.split('-').map(n => parseInt(n.trim()))\n\t\t\t\tif (!isNaN(start) && !isNaN(end)) {\n\t\t\t\t\tfor (let i = start; i <= end; i++) {\n\t\t\t\t\t\tlines.add(i)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lineNum = parseInt(trimmed)\n\t\t\t\tif (!isNaN(lineNum)) {\n\t\t\t\t\tlines.add(lineNum)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn lines\n\t}\n\n\tprivate addLineFeatures(highlightedHtml: string): string {\n\t\tconst lines = highlightedHtml.split('\\n')\n\t\tconst highlightedLines = this.getHighlightedLines()\n\n\t\treturn lines\n\t\t\t.map((line, index) => {\n\t\t\t\tconst lineNumber = index + 1\n\t\t\t\tconst isHighlighted = highlightedLines.has(lineNumber)\n\t\t\t\tconst lineClass = isHighlighted ? 'code-line highlighted' : 'code-line'\n\n\t\t\t\tlet content = ''\n\t\t\t\tif (this.lineNumbers) {\n\t\t\t\t\tcontent += `<span class=\"line-number\">${lineNumber}</span>`\n\t\t\t\t}\n\t\t\t\tcontent += line\n\n\t\t\t\treturn `<div class=\"${lineClass}\">${content}</div>`\n\t\t\t})\n\t\t\t.join('')\n\t}\n\n\tprivate async copyCode() {\n\t\ttry {\n\t\t\tawait navigator.clipboard.writeText(this.code)\n\t\t\tthis.copied = true\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.copied = false\n\t\t\t}, 2000)\n\t\t} catch (err) {\n\t\t\tconsole.error('Failed to copy code:', err)\n\t\t}\n\t}\n\n\tprivate getLanguageLabel(): string {\n\t\tconst languageMap: Record<string, string> = {\n\t\t\tjavascript: 'JavaScript',\n\t\t\ttypescript: 'TypeScript',\n\t\t\thtml: 'HTML',\n\t\t\tmarkdown: 'Markdown',\n\t\t\tbash: 'Bash',\n\t\t}\n\n\t\tif (this.filename) {\n\t\t\treturn this.filename\n\t\t}\n\n\t\treturn languageMap[this.language.toLowerCase()] || this.language.toUpperCase()\n\t}\n\n\trender() {\n\t\tconst codeClass = this.lineNumbers || this.highlightLines ? 'code-with-lines' : 'hljs'\n\n\t\treturn html`\n\t\t\t<schmancy-details class=\"bg-surface-default\">\n\t\t\t\t<section slot=\"summary\">\n\t\t\t\t\t<!-- Header -->\n\t\t\t\t\t<div class=\"flex items-center justify-between\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"flex gap-1.5\">\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-error);\"></div>\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-tertiary);\"></div>\n\t\t\t\t\t\t\t\t<div class=\"w-3 h-3 rounded-full opacity-60\" style=\"background-color: var(--md-sys-color-secondary);\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<span class=\"text-xs font-medium opacity-70 ml-2\" style=\"color: var(--md-sys-color-on-surface-variant);\">\n\t\t\t\t\t\t\t\t${this.getLanguageLabel()}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${this.copyButton\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\t\t\t.variant=\"${this.copied ? 'filled tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t\t\t@click=${this.copyCode}\n\t\t\t\t\t\t\t\t\t\tclass=\"transition-all\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<schmancy-icon > ${this.copied ? 'check' : 'content_copy'} </schmancy-icon>\n\t\t\t\t\t\t\t\t\t\t<span class=\"ml-1\">${this.copied ? 'Copied!' : 'Copy'}</span>\n\t\t\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t<!-- Code -->\n\t\t\t\t<div class=\"overflow-auto\" style=\"${this.maxHeight ? `max-height: ${this.maxHeight}` : ''}\">\n\t\t\t\t\t<pre class=\"m-0\"><code class=\"${codeClass}\">${unsafeHTML(this.highlightedCode)}</code></pre>\n\t\t\t\t</div>\n\t\t\t</schmancy-details>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-code': SchmancyCode\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { timer } from 'rxjs'\nimport { take } from 'rxjs/operators'\n\n/**\n * @element schmancy-code-preview\n * A component that shows code and its rendered preview side by side\n * Takes the content as a slot and displays both the source and rendered result\n */\n@customElement('schmancy-code-preview')\nexport class SchmancyCodePreview extends TailwindElement(\n\tcss`:host{\n\t\tdisplay:block;\n\t\toverflow:hidden;\n\t\tposition:relative;\n\t\tinset:0;\n\t}`\n) {\n\t/**\n\t * Programming language for syntax highlighting\n\t */\n\t@property({ type: String })\n\tlanguage: string = 'html'\n\n\t/**\n\t * Show code on top or side-by-side\n\t */\n\t@property({ type: String })\n\tlayout: 'vertical' | 'horizontal' = 'vertical'\n\n\t/**\n\t * Whether to render/execute the code in preview section\n\t * When false, only shows the code without rendering\n\t */\n\t@property({ type: Boolean })\n\tpreview: boolean = true\n\n\t@state()\n\tprivate slotContent: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Capture the slot content as HTML string\n\t\ttimer(0).pipe(take(1)).subscribe(() => {\n\t\t\tconst slot = this.shadowRoot?.querySelector('slot')\n\t\t\tif (slot) {\n\t\t\t\tconst nodes = slot.assignedNodes({ flatten: true })\n\t\t\t\tconst htmlStrings = nodes.map(node => {\n\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\treturn (node as HTMLElement).outerHTML\n\t\t\t\t\t} else if (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t\t\treturn node.textContent || ''\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t})\n\t\t\t\t\n\t\t\t\t// Clean up the HTML string\n\t\t\t\tconst rawContent = htmlStrings.join('')\n\t\t\t\t\n\t\t\t\t// Find the minimum indentation (excluding empty lines)\n\t\t\t\tconst lines = rawContent.split('\\n')\n\t\t\t\tconst minIndent = lines\n\t\t\t\t\t.filter(line => line.trim().length > 0)\n\t\t\t\t\t.reduce((min, line) => {\n\t\t\t\t\t\tconst indent = line.match(/^(\\s*)/)?.[1].length || 0\n\t\t\t\t\t\treturn Math.min(min, indent)\n\t\t\t\t\t}, Infinity)\n\t\t\t\t\n\t\t\t\t// Remove the minimum indentation from all lines\n\t\t\t\tthis.slotContent = lines\n\t\t\t\t\t.map(line => line.slice(minIndent))\n\t\t\t\t\t.join('\\n')\n\t\t\t\t\t.trim()\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\tconst containerClass = this.layout === 'horizontal' \n\t\t\t? 'grid grid-cols-1 lg:grid-cols-2 gap-0' \n\t\t\t: 'flex flex-col'\n\n\t\tconst showPreview = this.preview && this.language.toLowerCase() === 'html'\n\t\t\n\t\treturn html`\n\t\t\t<schmancy-surface class=\"rounded-lg overflow-hidden\">\n\t\t\t\t<div class=\"${showPreview ? containerClass : ''}\">\n\t\t\t\t\t<!-- Code section with proper overflow handling -->\n\t\t\t\t\t<div class=\"min-w-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-code\n\t\t\t\t\t\t\tlanguage=\"${this.language}\"\n\t\t\t\t\t\t\t.code=\"${this.slotContent}\"\n\t\t\t\t\t\t\t?copyButton=\"${true}\"\n\t\t\t\t\t\t\tclass=\"block w-full\"\n\t\t\t\t\t\t></schmancy-code>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<!-- Preview section (only visible for HTML and when preview is enabled) -->\n\t\t\t\t\t${showPreview ? html`\n\t\t\t\t\t\t<div class=\"min-w-0 overflow-auto\">\n\t\t\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"p-2 h-full\">\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t` : html`\n\t\t\t\t\t\t<!-- Hidden slot to capture content -->\n\t\t\t\t\t\t<div class=\"hidden\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`}\n\t\t\t\t</div>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-code-preview': SchmancyCodePreview\n\t}\n}"],"mappings":";;;;;;;;;;;;;;AAYA,EAAK,iBAAiB,cAAc,EAAA,EACpC,EAAK,iBAAiB,cAAc,EAAA,EACpC,EAAK,iBAAiB,QAAQ,EAAA,EAC9B,EAAK,iBAAiB,OAAO,EAAA,EAC7B,EAAK,iBAAiB,YAAY,EAAA,EAClC,EAAK,iBAAiB,QAAQ,EAAA;AAOvB,IAAA,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA6HjC,cAAA,KAAA,OAMJ,IAAA,KAAA,cAAA,CAYQ,GAAA,KAAA,aAAA,CAMD,GAAA,KAAA,SAAA,CAeI;;CAE1B,IAAA,kBAAY;AACX,MAAA,CAAK,KAAK,KAAM,QAAO;EAEvB,IAAI,IAAkB;AAEtB,MAAA;AAGC,OADe,EAAK,UAAU,KAAK,KAAK,MAAA,EAAQ,EAAE,UAAU,KAAK,UAAA,CAAA,CACxC;UAAA;AAGzB,OAAA;AAEC,QADe,EAAK,cAAc,KAAK,KAAK,MAAA,CAAA,CACnB;WAAA;AAGzB,QAAkB,KAAK,WAAW,KAAK,KAAK,MAAA,CAAA;;;AAK9C,SAAI,KAAK,eAAe,KAAK,iBACrB,KAAK,gBAAgB,EAAA,GAGtB;;CAGR,WAAmB,GAAA;EAClB,IAAM,IAAM,SAAS,cAAc,MAAA;AAEnC,SADA,EAAI,cAAc,GACX,EAAI;;CAGZ,sBAAA;EACC,IAAM,oBAAQ,IAAI,KAAA;AAClB,MAAA,CAAK,KAAK,eAAgB,QAAO;EAEjC,IAAM,IAAQ,KAAK,eAAe,MAAM,IAAA;AACxC,OAAK,IAAM,KAAQ,GAAO;GACzB,IAAM,IAAU,EAAK,MAAA;AACrB,OAAI,EAAQ,SAAS,IAAA,EAAM;IAC1B,IAAA,CAAO,GAAO,KAAO,EAAQ,MAAM,IAAA,CAAK,KAAI,MAAK,SAAS,EAAE,MAAA,CAAA,CAAA;AAC5D,QAAA,CAAK,MAAM,EAAA,IAAA,CAAW,MAAM,EAAA,CAC3B,MAAK,IAAI,IAAI,GAAO,KAAK,GAAK,IAC7B,GAAM,IAAI,EAAA;UAGN;IACN,IAAM,IAAU,SAAS,EAAA;AACpB,UAAM,EAAA,IACV,EAAM,IAAI,EAAA;;;AAIb,SAAO;;CAGR,gBAAwB,GAAA;EACvB,IAAM,IAAQ,EAAgB,MAAM,KAAA,EAC9B,IAAmB,KAAK,qBAAA;AAE9B,SAAO,EACL,KAAK,GAAM,MAAA;GACX,IAAM,IAAa,IAAQ,GAErB,IADgB,EAAiB,IAAI,EAAA,GACT,0BAA0B,aAExD,IAAU;AAMd,UALI,KAAK,gBACR,KAAW,6BAA6B,EAAA,WAEzC,KAAW,GAEJ,eAAe,EAAA,IAAc,EAAA;IAAA,CAEpC,KAAK,GAAA;;CAGR,MAAA,WAAc;AACb,MAAA;AAAA,SACO,UAAU,UAAU,UAAU,KAAK,KAAA,EACzC,KAAK,SAAA,CAAS,GACd,iBAAA;AACC,SAAK,SAAA,CAAS;MACZ,IAAA;UACK;;CAKV,mBAAA;AASC,SAAI,KAAK,WACD,KAAK,WAT+B;GAC3C,YAAY;GACZ,YAAY;GACZ,MAAM;GACN,UAAU;GACV,MAAM;GAAA,CAOY,KAAK,SAAS,aAAA,KAAkB,KAAK,SAAS,aAAA;;CAGlE,SAAA;EACC,IAAM,IAAY,KAAK,eAAe,KAAK,iBAAiB,oBAAoB;AAEhF,SAAO,CAAI;;;;;;;;;;;;;UAaH,KAAK,kBAAA,CAAA;;;QAGP,KAAK,aACJ,CAAI;;sBAES,KAAK,SAAS,iBAAiB,OAAA;mBAClC,KAAK,SAAA;;;6BAGK,KAAK,SAAS,UAAU,eAAA;+BACtB,KAAK,SAAS,YAAY,OAAA;;YAGhD,GAAA;;;;wCAI+B,KAAK,YAAY,eAAe,KAAK,cAAc,GAAA;qCACtD,EAAA,IAAc,EAAW,KAAK,gBAAA,CAAA;;;;;;GAxLjE,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAM3B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAM3B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,kBAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,EAAA,CAG1B,GAAA,CAAA,EAAO,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CApKR,EAAc,gBAAA,CAAA,EAAgB,EAAA;ACXxB,IAAA,IAAA,cAAkC,EACxC,CAAG;;;;;;;+BAWgB,QAAA,KAAA,SAMiB,YAAA,KAAA,UAAA,CAOjB,GAAA,KAAA,cAGW;;CAE9B,oBAAA;AACC,QAAM,mBAAA,EAEN,EAAM,EAAA,CAAG,KAAK,EAAK,EAAA,CAAA,CAAI,gBAAA;GACtB,IAAM,IAAO,KAAK,YAAY,cAAc,OAAA;AAC5C,OAAI,GAAM;IAeT,IAAM,IAdQ,EAAK,cAAc,EAAE,SAAA,CAAS,GAAA,CAAA,CAClB,KAAI,MACzB,EAAK,aAAa,KAAK,eAClB,EAAqB,YACnB,EAAK,aAAa,KAAK,aAC1B,EAAK,eAEN,GAAA,CAIuB,KAAK,GAAA,CAGX,MAAM,KAAA,EACzB,IAAY,EAChB,QAAO,MAAQ,EAAK,MAAA,CAAO,SAAS,EAAA,CACpC,QAAQ,GAAK,MAAA;KACb,IAAM,IAAS,EAAK,MAAM,SAAA,GAAY,GAAG,UAAU;AACnD,YAAO,KAAK,IAAI,GAAK,EAAA;OACnB,SAAA;AAGJ,SAAK,cAAc,EACjB,KAAI,MAAQ,EAAK,MAAM,EAAA,CAAA,CACvB,KAAK,KAAA,CACL,MAAA;;IAAA;;CAKL,SAAA;EACC,IAAM,IAAiB,KAAK,WAAW,eACpC,0CACA,iBAEG,IAAc,KAAK,WAAW,KAAK,SAAS,aAAA,KAAkB;AAEpE,SAAO,CAAI;;kBAEK,IAAc,IAAiB,GAAA;;;;mBAI9B,KAAK,SAAA;gBACR,KAAK,YAAA;uBACC,EAAA;;;;;;OAMf,IAAc,CAAI;;;;;;SAMhB,CAAI;;;;;;;;;;;GAnFX,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAO1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,GAAA,CAAA,EAAO,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CA5BR,EAAc,wBAAA,CAAA,EAAwB,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./code-highlight-Q2x2hrWg.cjs`);Object.defineProperty(exports,`SchmancyCode`,{enumerable:!0,get:function(){return e.n}}),Object.defineProperty(exports,`SchmancyCodeHighlight`,{enumerable:!0,get:function(){return e.n}}),Object.defineProperty(exports,`SchmancyCodePreview`,{enumerable:!0,get:function(){return e.t}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./code-highlight-BToHh8T6.cjs`);Object.defineProperty(exports,`SchmancyCode`,{enumerable:!0,get:function(){return e.n}}),Object.defineProperty(exports,`SchmancyCodeHighlight`,{enumerable:!0,get:function(){return e.n}}),Object.defineProperty(exports,`SchmancyCodePreview`,{enumerable:!0,get:function(){return e.t}});
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./code-highlight-B5_zONzv.js";
1
+ import { n as e, t } from "./code-highlight-SkMMTkIJ.js";
2
2
  export { e as SchmancyCode, e as SchmancyCodeHighlight, t as SchmancyCodePreview };
@@ -1,4 +1,4 @@
1
- require(`./chunk-BCfY8kxB.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-Bx9Avv0M.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},a=function(e,t,n,r,i,o,s,c,l,u){var d=this;d.numeralDecimalMark=e||`.`,d.numeralIntegerScale=t>0?t:0,d.numeralDecimalScale=n>=0?n:2,d.numeralThousandsGroupStyle=r||a.groupStyle.thousand,d.numeralPositiveOnly=!!i,d.stripLeadingZeroes=!1!==o,d.prefix=s||s===``?s:``,d.signBeforePrefix=!!c,d.tailPrefix=!!l,d.delimiter=u||u===``?u:`,`,d.delimiterRE=u?RegExp(`\\`+u,`g`):``};a.groupStyle={thousand:`thousand`,lakh:`lakh`,wan:`wan`,none:`none`},a.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,``).replace(this.numeralDecimalMark,`.`)},format:function(e){var t,n,r,i,o=this,s=``;switch(e=e.replace(/[A-Za-z]/g,``).replace(o.numeralDecimalMark,`M`).replace(/[^\dM-]/g,``).replace(/^\-/,`N`).replace(/\-/g,``).replace(`N`,o.numeralPositiveOnly?``:`-`).replace(`M`,o.numeralDecimalMark),o.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,`$1`)),n=e.slice(0,1)===`-`?`-`:``,r=o.prefix===void 0?n:o.signBeforePrefix?n+o.prefix:o.prefix+n,i=e,e.indexOf(o.numeralDecimalMark)>=0&&(i=(t=e.split(o.numeralDecimalMark))[0],s=o.numeralDecimalMark+t[1].slice(0,o.numeralDecimalScale)),n===`-`&&(i=i.slice(1)),o.numeralIntegerScale>0&&(i=i.slice(0,o.numeralIntegerScale)),o.numeralThousandsGroupStyle){case a.groupStyle.lakh:i=i.replace(/(\d)(?=(\d\d)+\d$)/g,`$1`+o.delimiter);break;case a.groupStyle.wan:i=i.replace(/(\d)(?=(\d{4})+$)/g,`$1`+o.delimiter);break;case a.groupStyle.thousand:i=i.replace(/(\d)(?=(\d{3})+$)/g,`$1`+o.delimiter)}return o.tailPrefix?n+i.toString()+(o.numeralDecimalScale>0?s.toString():``)+o.prefix:r+i.toString()+(o.numeralDecimalScale>0?s.toString():``)}};var o=a,s=function(e,t,n){var r=this;r.date=[],r.blocks=[],r.datePattern=e,r.dateMin=t.split(`-`).reverse().map(function(e){return parseInt(e,10)}),r.dateMin.length===2&&r.dateMin.unshift(0),r.dateMax=n.split(`-`).reverse().map(function(e){return parseInt(e,10)}),r.dateMax.length===2&&r.dateMax.unshift(0),r.initBlocks()};s.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t===`Y`?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+`-`+e.addLeadingZero(t[1])+`-`+e.addLeadingZero(t[0]):``},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,n=``;return e=e.replace(/[^\d]/g,``),t.blocks.forEach(function(r,i){if(e.length>0){var a=e.slice(0,r),o=a.slice(0,1),s=e.slice(r);switch(t.datePattern[i]){case`d`:a===`00`?a=`01`:parseInt(o,10)>3?a=`0`+o:parseInt(a,10)>31&&(a=`31`);break;case`m`:a===`00`?a=`01`:parseInt(o,10)>1?a=`0`+o:parseInt(a,10)>12&&(a=`12`)}n+=a,e=s}}),this.getFixedDateString(n)},getFixedDateString:function(e){var t,n,r,i=this,a=i.datePattern,o=[],s=0,c=0,l=0,u=0,d=0,f=0,p=!1;return e.length===4&&a[0].toLowerCase()!==`y`&&a[1].toLowerCase()!==`y`&&(d=2-(u=a[0]===`d`?0:2),t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),o=this.getFixedDate(t,n,0)),e.length===8&&(a.forEach(function(e,t){switch(e){case`d`:s=t;break;case`m`:c=t;break;default:l=t}}),f=2*l,u=s<=l?2*s:2*s+2,d=c<=l?2*c:2*c+2,t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+4),10),p=e.slice(f,f+4).length===4,o=this.getFixedDate(t,n,r)),e.length!==4||a[0]!==`y`&&a[1]!==`y`||(f=2-(d=a[0]===`m`?0:2),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),p=e.slice(f,f+2).length===2,o=[0,n,r]),e.length!==6||a[0]!==`Y`&&a[1]!==`Y`||(f=2-.5*(d=a[0]===`m`?0:4),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+4),10),p=e.slice(f,f+4).length===4,o=[0,n,r]),o=i.getRangeFixedDate(o),i.date=o,o.length===0?e:a.reduce(function(e,t){switch(t){case`d`:return e+(o[0]===0?``:i.addLeadingZero(o[0]));case`m`:return e+(o[1]===0?``:i.addLeadingZero(o[1]));case`y`:return e+(p?i.addLeadingZeroForYear(o[2],!1):``);case`Y`:return e+(p?i.addLeadingZeroForYear(o[2],!0):``)}},``)},getRangeFixedDate:function(e){var t=this,n=t.datePattern,r=t.dateMin||[],i=t.dateMax||[];return!e.length||r.length<3&&i.length<3||n.find(function(e){return e.toLowerCase()===`y`})&&e[2]===0?e:i.length&&(i[2]<e[2]||i[2]===e[2]&&(i[1]<e[1]||i[1]===e[1]&&i[0]<e[0]))?i:r.length&&(r[2]>e[2]||r[2]===e[2]&&(r[1]>e[1]||r[1]===e[1]&&r[0]>e[0]))?r:e},getFixedDate:function(e,t,n){return e=Math.min(e,31),t=Math.min(t,12),n=parseInt(n||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(n)?29:28:30)),[e,t,n]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?`0`:``)+e},addLeadingZeroForYear:function(e,t){return t?(e<10?`000`:e<100?`00`:e<1e3?`0`:``)+e:(e<10?`0`:``)+e}};var c=s,l=function(e,t){var n=this;n.time=[],n.blocks=[],n.timePattern=e,n.timeFormat=t,n.initBlocks()};l.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+`:`+e.addLeadingZero(t[1])+`:`+e.addLeadingZero(t[2]):``},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)===`12`?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,n=``;e=e.replace(/[^\d]/g,``);var r=t.getTimeFormatOptions();return t.blocks.forEach(function(i,a){if(e.length>0){var o=e.slice(0,i),s=o.slice(0,1),c=e.slice(i);switch(t.timePattern[a]){case`h`:parseInt(s,10)>r.maxHourFirstDigit?o=`0`+s:parseInt(o,10)>r.maxHours&&(o=r.maxHours+``);break;case`m`:case`s`:parseInt(s,10)>r.maxMinutesFirstDigit?o=`0`+s:parseInt(o,10)>r.maxMinutes&&(o=r.maxMinutes+``)}n+=o,e=c}}),this.getFixedTimeString(n)},getFixedTimeString:function(e){var t,n,r,i=this,a=i.timePattern,o=[],s=0,c=0,l=0,u=0,d=0,f=0;return e.length===6&&(a.forEach(function(e,t){switch(e){case`s`:s=2*t;break;case`m`:c=2*t;break;case`h`:l=2*t}}),f=l,d=c,u=s,t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),o=this.getFixedTime(r,n,t)),e.length===4&&i.timePattern.indexOf(`s`)<0&&(a.forEach(function(e,t){switch(e){case`m`:c=2*t;break;case`h`:l=2*t}}),f=l,d=c,t=0,n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),o=this.getFixedTime(r,n,t)),i.time=o,o.length===0?e:a.reduce(function(e,t){switch(t){case`s`:return e+i.addLeadingZero(o[2]);case`m`:return e+i.addLeadingZero(o[1]);case`h`:return e+i.addLeadingZero(o[0])}},``)},getFixedTime:function(e,t,n){return n=Math.min(parseInt(n||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,n]},addLeadingZero:function(e){return(e<10?`0`:``)+e}};var u=l,d=function(e,t){var n=this;n.delimiter=t||t===``?t:` `,n.delimiterRE=t?RegExp(`\\`+t,`g`):``,n.formatter=e};d.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var n,r=``,i=!1,a=0,o=(e=(e=(e=e.replace(/[^\d+]/g,``)).replace(/^\+/,`B`).replace(/\+/g,``).replace(`B`,`+`)).replace(t.delimiterRE,``)).length;a<o;a++)n=t.formatter.inputDigit(e.charAt(a)),/[\s()-]/g.test(n)?(r=n,i=!0):i||(r=n);return r=(r=r.replace(/[()]/g,``)).replace(/[\s-]/g,t.delimiter)}};var f=d,p={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(e,t){return e+t},0);return e.concat(19-t)},getInfo:function(e,t){var n=p.blocks,r=p.re;for(var i in t=!!t,r)if(r[i].test(e)){var a=n[i];return{type:i,blocks:t?this.getStrictBlocks(a):a}}return{type:`unknown`,blocks:t?this.getStrictBlocks(n.general):n.general}}},m=p,h={noop:function(){},strip:function(e,t){return e.replace(t,``)},getPostDelimiter:function(e,t,n){if(n.length===0)return e.slice(-t.length)===t?t:``;var r=``;return n.forEach(function(t){e.slice(-t.length)===t&&(r=t)}),r},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,`\\$1`),`g`)},getNextCursorPosition:function(e,t,n,r,i){return t.length===e?n.length:e+this.getPositionOffset(e,t,n,r,i)},getPositionOffset:function(e,t,n,r,i){var a=this.stripDelimiters(t.slice(0,e),r,i),o=this.stripDelimiters(n.slice(0,e),r,i),s=a.length-o.length;return s===0?0:s/Math.abs(s)},stripDelimiters:function(e,t,n){var r=this;if(n.length===0){var i=t?r.getDelimiterREByDelimiter(t):``;return e.replace(i,``)}return n.forEach(function(t){t.split(``).forEach(function(t){e=e.replace(r.getDelimiterREByDelimiter(t),``)})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(e,t){return e+t},0)},getPrefixStrippedValue:function(e,t,n,r,i,a,o,s,c){if(n===0)return e;if(e===t&&e!==``)return``;if(c&&e.slice(0,1)==`-`){var l=r.slice(0,1)==`-`?r.slice(1):r;return`-`+this.getPrefixStrippedValue(e.slice(1),t,n,l,i,a,o,s,c)}if(r.slice(0,n)!==t&&!s||r.slice(-n)!==t&&s)return o&&!r&&e?e:``;var u=this.stripDelimiters(r,i,a);return e.slice(0,n)===t||s?e.slice(-n)!==t&&s?u.slice(0,-n-1):s?e.slice(0,-n):e.slice(n):u.slice(n)},getFirstDiffIndex:function(e,t){for(var n=0;e.charAt(n)===t.charAt(n);)if(e.charAt(n++)===``)return-1;return n},getFormattedValue:function(e,t,n,r,i,a){var o=``,s=i.length>0,c=``;return n===0?e:(t.forEach(function(t,l){if(e.length>0){var u=e.slice(0,t),d=e.slice(t);c=s?i[a?l-1:l]||c:r,a?(l>0&&(o+=c),o+=u):(o+=u,u.length===t&&l<n-1&&(o+=c)),e=d}}),o)},fixPrefixCursor:function(e,t,n,r){if(e){var i=e.value,a=n||r[0]||` `;if(e.setSelectionRange&&t&&!(t.length+a.length<=i.length)){var o=2*i.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,n){if(e===this.getActiveElement(n)&&!(e&&e.value.length<=t))if(e.createTextRange){var r=e.createTextRange();r.move(`character`,t),r.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},g={assign:function(e,t){return t||={},(e||={}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType=``,e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||`AU`,e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||[`h`,`m`,`s`],e.timeFormat=t.timeFormat||`24`,e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||[`d`,`m`,`Y`],e.dateMin=t.dateMin||``,e.dateMax=t.dateMax||``,e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||`.`,e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||`thousand`,e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=!1!==t.stripLeadingZeroes,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?``:t.prefix||``,e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():``,e.delimiter=t.delimiter||t.delimiter===``?t.delimiter:t.date?`/`:t.time?`:`:t.numeral?`,`:(t.phone,` `),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof i==`object`&&i?i:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result=``,e.onValueChanged=t.onValueChanged||function(){},e}},_=function(e,t){var n=this;if(typeof e==`string`?(n.element=document.querySelector(e),document.querySelectorAll(e).length):e.length!==void 0&&e.length>0?(n.element=e[0],e.length):n.element=e,!n.element)throw Error(`[cleave.js] Please check the element`);t.initValue=n.element.value,n.properties=_.DefaultProperties.assign({},t),n.init()};_.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=_.Util.getMaxLength(t.blocks),e.isAndroid=_.Util.isAndroid(),e.lastInputValue=``,e.isBackward=``,e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener(`input`,e.onChangeListener),e.element.addEventListener(`keydown`,e.onKeyDownListener),e.element.addEventListener(`focus`,e.onFocusListener),e.element.addEventListener(`cut`,e.onCutListener),e.element.addEventListener(`copy`,e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type=`hidden`,e.element=t,e.element.id=``}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new _.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new _.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=_.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new _.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=_.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new _.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw Error(`[cleave.js] Please include phone-type-formatter.{country}.js lib`)}},onKeyDown:function(e){var t=this,n=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=n===8},onChange:function(e){var t=this,n=t.properties,r=_.Util;t.isBackward=t.isBackward||e.inputType===`deleteContentBackward`;var i=r.getPostDelimiter(t.lastInputValue,n.delimiter,n.delimiters);t.isBackward&&i?n.postDelimiterBackspace=i:n.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),_.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){_.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(``))},onCopy:function(e){_.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,n=_.Util,r=this.element.value,i=``;i=t.copyDelimiter?r:n.stripDelimiters(r,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData(`Text`,i):window.clipboardData.setData(`Text`,i),e.preventDefault()}catch{}},onInput:function(e){var t=this,n=t.properties,r=_.Util,i=r.getPostDelimiter(e,n.delimiter,n.delimiters);n.numeral||!n.postDelimiterBackspace||i||(e=r.headStr(e,e.length-n.postDelimiterBackspace.length)),n.phone?(!n.prefix||n.noImmediatePrefix&&!e.length?n.result=n.phoneFormatter.format(e):n.result=n.prefix+n.phoneFormatter.format(e).slice(n.prefix.length),t.updateValueState()):n.numeral?(n.prefix&&n.noImmediatePrefix&&e.length===0?n.result=``:n.result=n.numeralFormatter.format(e),t.updateValueState()):(n.date&&(e=n.dateFormatter.getValidatedDate(e)),n.time&&(e=n.timeFormatter.getValidatedTime(e)),e=r.stripDelimiters(e,n.delimiter,n.delimiters),e=r.getPrefixStrippedValue(e,n.prefix,n.prefixLength,n.result,n.delimiter,n.delimiters,n.noImmediatePrefix,n.tailPrefix,n.signBeforePrefix),e=n.numericOnly?r.strip(e,/[^\d]/g):e,e=n.uppercase?e.toUpperCase():e,e=n.lowercase?e.toLowerCase():e,n.prefix&&(n.tailPrefix?e+=n.prefix:e=n.prefix+e,n.blocksLength===0)?(n.result=e,t.updateValueState()):(n.creditCard&&t.updateCreditCardPropsByValue(e),e=r.headStr(e,n.maxLength),n.result=r.getFormattedValue(e,n.blocks,n.blocksLength,n.delimiter,n.delimiters,n.delimiterLazyShow),t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,n=this.properties,r=_.Util;r.headStr(n.result,4)!==r.headStr(e,4)&&(t=_.CreditCardDetector.getInfo(e,n.creditCardStrictMode),n.blocks=t.blocks,n.blocksLength=n.blocks.length,n.maxLength=r.getMaxLength(n.blocks),n.creditCardType!==t.type&&(n.creditCardType=t.type,n.onCreditCardTypeChanged.call(this,n.creditCardType)))},updateValueState:function(){var e=this,t=_.Util,n=e.properties;if(e.element){var r=e.element.selectionEnd,i=e.element.value,a=n.result;r=t.getNextCursorPosition(r,i,a,n.delimiter,n.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=a,t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()},1):(e.element.value=a,n.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,n=t.properties;e=e==null?``:e.toString(),n.numeral&&(e=e.replace(`.`,n.numeralDecimalMark)),n.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=_.Util,n=this.element.value;return e.rawValueTrimPrefix&&(n=t.getPrefixStrippedValue(n,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),n=e.numeral?e.numeralFormatter.getRawValue(n):t.stripDelimiters(n,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():``},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():``},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener(`input`,e.onChangeListener),e.element.removeEventListener(`keydown`,e.onKeyDownListener),e.element.removeEventListener(`focus`,e.onFocusListener),e.element.removeEventListener(`cut`,e.onCutListener),e.element.removeEventListener(`copy`,e.onCopyListener)},toString:function(){return`[Cleave Object]`}},_.NumeralFormatter=o,_.DateFormatter=c,_.TimeFormatter=u,_.PhoneFormatter=f,_.CreditCardDetector=m,_.Util=h,_.DefaultProperties=g,(typeof i==`object`&&i?i:window).Cleave=_;var v=_,y=class extends t.t(){constructor(...e){super(...e),this.value={cardName:``,cardNumber:``,expirationDate:``,cvv:``},this.cardType=``,this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new v(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e===`unknown`?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity(`Please enter a valid card number.`),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(``),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e===`amex`?4:3)}}),new v(this.expirationDateInput,{date:!0,datePattern:[`m`,`y`],onValueChanged:e=>{let t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity(`Please enter a valid expiration date (MM/YY).`),this.expirationDateInput.error=!0;else{let[e,n]=t.split(`/`),r=new Date,i=r.getFullYear()%100,a=r.getMonth()+1,o=parseInt(e,10),s=parseInt(n,10);s<i||s===i&&o<a?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity(`Card has expired.`),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(``),this.expirationDateInput.error=!1)}}}),new v(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{let t=this.cardType===`amex`?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(``),this.cvvInput.error=!1)}}),new v(this.cardNameInput,{uppercase:!0,delimiter:` `,onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity(`Please enter the name as it appears on the card.`),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(``),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent(`change`,{detail:{...this.value},bubbles:!0}))}render(){let e=this.getCardIcon();return r.html`
1
+ require(`./chunk-BCfY8kxB.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-DeT3kAOS.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},a=function(e,t,n,r,i,o,s,c,l,u){var d=this;d.numeralDecimalMark=e||`.`,d.numeralIntegerScale=t>0?t:0,d.numeralDecimalScale=n>=0?n:2,d.numeralThousandsGroupStyle=r||a.groupStyle.thousand,d.numeralPositiveOnly=!!i,d.stripLeadingZeroes=!1!==o,d.prefix=s||s===``?s:``,d.signBeforePrefix=!!c,d.tailPrefix=!!l,d.delimiter=u||u===``?u:`,`,d.delimiterRE=u?RegExp(`\\`+u,`g`):``};a.groupStyle={thousand:`thousand`,lakh:`lakh`,wan:`wan`,none:`none`},a.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,``).replace(this.numeralDecimalMark,`.`)},format:function(e){var t,n,r,i,o=this,s=``;switch(e=e.replace(/[A-Za-z]/g,``).replace(o.numeralDecimalMark,`M`).replace(/[^\dM-]/g,``).replace(/^\-/,`N`).replace(/\-/g,``).replace(`N`,o.numeralPositiveOnly?``:`-`).replace(`M`,o.numeralDecimalMark),o.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,`$1`)),n=e.slice(0,1)===`-`?`-`:``,r=o.prefix===void 0?n:o.signBeforePrefix?n+o.prefix:o.prefix+n,i=e,e.indexOf(o.numeralDecimalMark)>=0&&(i=(t=e.split(o.numeralDecimalMark))[0],s=o.numeralDecimalMark+t[1].slice(0,o.numeralDecimalScale)),n===`-`&&(i=i.slice(1)),o.numeralIntegerScale>0&&(i=i.slice(0,o.numeralIntegerScale)),o.numeralThousandsGroupStyle){case a.groupStyle.lakh:i=i.replace(/(\d)(?=(\d\d)+\d$)/g,`$1`+o.delimiter);break;case a.groupStyle.wan:i=i.replace(/(\d)(?=(\d{4})+$)/g,`$1`+o.delimiter);break;case a.groupStyle.thousand:i=i.replace(/(\d)(?=(\d{3})+$)/g,`$1`+o.delimiter)}return o.tailPrefix?n+i.toString()+(o.numeralDecimalScale>0?s.toString():``)+o.prefix:r+i.toString()+(o.numeralDecimalScale>0?s.toString():``)}};var o=a,s=function(e,t,n){var r=this;r.date=[],r.blocks=[],r.datePattern=e,r.dateMin=t.split(`-`).reverse().map(function(e){return parseInt(e,10)}),r.dateMin.length===2&&r.dateMin.unshift(0),r.dateMax=n.split(`-`).reverse().map(function(e){return parseInt(e,10)}),r.dateMax.length===2&&r.dateMax.unshift(0),r.initBlocks()};s.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t===`Y`?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+`-`+e.addLeadingZero(t[1])+`-`+e.addLeadingZero(t[0]):``},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,n=``;return e=e.replace(/[^\d]/g,``),t.blocks.forEach(function(r,i){if(e.length>0){var a=e.slice(0,r),o=a.slice(0,1),s=e.slice(r);switch(t.datePattern[i]){case`d`:a===`00`?a=`01`:parseInt(o,10)>3?a=`0`+o:parseInt(a,10)>31&&(a=`31`);break;case`m`:a===`00`?a=`01`:parseInt(o,10)>1?a=`0`+o:parseInt(a,10)>12&&(a=`12`)}n+=a,e=s}}),this.getFixedDateString(n)},getFixedDateString:function(e){var t,n,r,i=this,a=i.datePattern,o=[],s=0,c=0,l=0,u=0,d=0,f=0,p=!1;return e.length===4&&a[0].toLowerCase()!==`y`&&a[1].toLowerCase()!==`y`&&(d=2-(u=a[0]===`d`?0:2),t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),o=this.getFixedDate(t,n,0)),e.length===8&&(a.forEach(function(e,t){switch(e){case`d`:s=t;break;case`m`:c=t;break;default:l=t}}),f=2*l,u=s<=l?2*s:2*s+2,d=c<=l?2*c:2*c+2,t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+4),10),p=e.slice(f,f+4).length===4,o=this.getFixedDate(t,n,r)),e.length!==4||a[0]!==`y`&&a[1]!==`y`||(f=2-(d=a[0]===`m`?0:2),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),p=e.slice(f,f+2).length===2,o=[0,n,r]),e.length!==6||a[0]!==`Y`&&a[1]!==`Y`||(f=2-.5*(d=a[0]===`m`?0:4),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+4),10),p=e.slice(f,f+4).length===4,o=[0,n,r]),o=i.getRangeFixedDate(o),i.date=o,o.length===0?e:a.reduce(function(e,t){switch(t){case`d`:return e+(o[0]===0?``:i.addLeadingZero(o[0]));case`m`:return e+(o[1]===0?``:i.addLeadingZero(o[1]));case`y`:return e+(p?i.addLeadingZeroForYear(o[2],!1):``);case`Y`:return e+(p?i.addLeadingZeroForYear(o[2],!0):``)}},``)},getRangeFixedDate:function(e){var t=this,n=t.datePattern,r=t.dateMin||[],i=t.dateMax||[];return!e.length||r.length<3&&i.length<3||n.find(function(e){return e.toLowerCase()===`y`})&&e[2]===0?e:i.length&&(i[2]<e[2]||i[2]===e[2]&&(i[1]<e[1]||i[1]===e[1]&&i[0]<e[0]))?i:r.length&&(r[2]>e[2]||r[2]===e[2]&&(r[1]>e[1]||r[1]===e[1]&&r[0]>e[0]))?r:e},getFixedDate:function(e,t,n){return e=Math.min(e,31),t=Math.min(t,12),n=parseInt(n||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(n)?29:28:30)),[e,t,n]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?`0`:``)+e},addLeadingZeroForYear:function(e,t){return t?(e<10?`000`:e<100?`00`:e<1e3?`0`:``)+e:(e<10?`0`:``)+e}};var c=s,l=function(e,t){var n=this;n.time=[],n.blocks=[],n.timePattern=e,n.timeFormat=t,n.initBlocks()};l.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+`:`+e.addLeadingZero(t[1])+`:`+e.addLeadingZero(t[2]):``},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)===`12`?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,n=``;e=e.replace(/[^\d]/g,``);var r=t.getTimeFormatOptions();return t.blocks.forEach(function(i,a){if(e.length>0){var o=e.slice(0,i),s=o.slice(0,1),c=e.slice(i);switch(t.timePattern[a]){case`h`:parseInt(s,10)>r.maxHourFirstDigit?o=`0`+s:parseInt(o,10)>r.maxHours&&(o=r.maxHours+``);break;case`m`:case`s`:parseInt(s,10)>r.maxMinutesFirstDigit?o=`0`+s:parseInt(o,10)>r.maxMinutes&&(o=r.maxMinutes+``)}n+=o,e=c}}),this.getFixedTimeString(n)},getFixedTimeString:function(e){var t,n,r,i=this,a=i.timePattern,o=[],s=0,c=0,l=0,u=0,d=0,f=0;return e.length===6&&(a.forEach(function(e,t){switch(e){case`s`:s=2*t;break;case`m`:c=2*t;break;case`h`:l=2*t}}),f=l,d=c,u=s,t=parseInt(e.slice(u,u+2),10),n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),o=this.getFixedTime(r,n,t)),e.length===4&&i.timePattern.indexOf(`s`)<0&&(a.forEach(function(e,t){switch(e){case`m`:c=2*t;break;case`h`:l=2*t}}),f=l,d=c,t=0,n=parseInt(e.slice(d,d+2),10),r=parseInt(e.slice(f,f+2),10),o=this.getFixedTime(r,n,t)),i.time=o,o.length===0?e:a.reduce(function(e,t){switch(t){case`s`:return e+i.addLeadingZero(o[2]);case`m`:return e+i.addLeadingZero(o[1]);case`h`:return e+i.addLeadingZero(o[0])}},``)},getFixedTime:function(e,t,n){return n=Math.min(parseInt(n||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,n]},addLeadingZero:function(e){return(e<10?`0`:``)+e}};var u=l,d=function(e,t){var n=this;n.delimiter=t||t===``?t:` `,n.delimiterRE=t?RegExp(`\\`+t,`g`):``,n.formatter=e};d.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var n,r=``,i=!1,a=0,o=(e=(e=(e=e.replace(/[^\d+]/g,``)).replace(/^\+/,`B`).replace(/\+/g,``).replace(`B`,`+`)).replace(t.delimiterRE,``)).length;a<o;a++)n=t.formatter.inputDigit(e.charAt(a)),/[\s()-]/g.test(n)?(r=n,i=!0):i||(r=n);return r=(r=r.replace(/[()]/g,``)).replace(/[\s-]/g,t.delimiter)}};var f=d,p={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(e,t){return e+t},0);return e.concat(19-t)},getInfo:function(e,t){var n=p.blocks,r=p.re;for(var i in t=!!t,r)if(r[i].test(e)){var a=n[i];return{type:i,blocks:t?this.getStrictBlocks(a):a}}return{type:`unknown`,blocks:t?this.getStrictBlocks(n.general):n.general}}},m=p,h={noop:function(){},strip:function(e,t){return e.replace(t,``)},getPostDelimiter:function(e,t,n){if(n.length===0)return e.slice(-t.length)===t?t:``;var r=``;return n.forEach(function(t){e.slice(-t.length)===t&&(r=t)}),r},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,`\\$1`),`g`)},getNextCursorPosition:function(e,t,n,r,i){return t.length===e?n.length:e+this.getPositionOffset(e,t,n,r,i)},getPositionOffset:function(e,t,n,r,i){var a=this.stripDelimiters(t.slice(0,e),r,i),o=this.stripDelimiters(n.slice(0,e),r,i),s=a.length-o.length;return s===0?0:s/Math.abs(s)},stripDelimiters:function(e,t,n){var r=this;if(n.length===0){var i=t?r.getDelimiterREByDelimiter(t):``;return e.replace(i,``)}return n.forEach(function(t){t.split(``).forEach(function(t){e=e.replace(r.getDelimiterREByDelimiter(t),``)})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(e,t){return e+t},0)},getPrefixStrippedValue:function(e,t,n,r,i,a,o,s,c){if(n===0)return e;if(e===t&&e!==``)return``;if(c&&e.slice(0,1)==`-`){var l=r.slice(0,1)==`-`?r.slice(1):r;return`-`+this.getPrefixStrippedValue(e.slice(1),t,n,l,i,a,o,s,c)}if(r.slice(0,n)!==t&&!s||r.slice(-n)!==t&&s)return o&&!r&&e?e:``;var u=this.stripDelimiters(r,i,a);return e.slice(0,n)===t||s?e.slice(-n)!==t&&s?u.slice(0,-n-1):s?e.slice(0,-n):e.slice(n):u.slice(n)},getFirstDiffIndex:function(e,t){for(var n=0;e.charAt(n)===t.charAt(n);)if(e.charAt(n++)===``)return-1;return n},getFormattedValue:function(e,t,n,r,i,a){var o=``,s=i.length>0,c=``;return n===0?e:(t.forEach(function(t,l){if(e.length>0){var u=e.slice(0,t),d=e.slice(t);c=s?i[a?l-1:l]||c:r,a?(l>0&&(o+=c),o+=u):(o+=u,u.length===t&&l<n-1&&(o+=c)),e=d}}),o)},fixPrefixCursor:function(e,t,n,r){if(e){var i=e.value,a=n||r[0]||` `;if(e.setSelectionRange&&t&&!(t.length+a.length<=i.length)){var o=2*i.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,n){if(e===this.getActiveElement(n)&&!(e&&e.value.length<=t))if(e.createTextRange){var r=e.createTextRange();r.move(`character`,t),r.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},g={assign:function(e,t){return t||={},(e||={}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType=``,e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||`AU`,e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||[`h`,`m`,`s`],e.timeFormat=t.timeFormat||`24`,e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||[`d`,`m`,`Y`],e.dateMin=t.dateMin||``,e.dateMax=t.dateMax||``,e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||`.`,e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||`thousand`,e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=!1!==t.stripLeadingZeroes,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?``:t.prefix||``,e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():``,e.delimiter=t.delimiter||t.delimiter===``?t.delimiter:t.date?`/`:t.time?`:`:t.numeral?`,`:(t.phone,` `),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof i==`object`&&i?i:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result=``,e.onValueChanged=t.onValueChanged||function(){},e}},_=function(e,t){var n=this;if(typeof e==`string`?(n.element=document.querySelector(e),document.querySelectorAll(e).length):e.length!==void 0&&e.length>0?(n.element=e[0],e.length):n.element=e,!n.element)throw Error(`[cleave.js] Please check the element`);t.initValue=n.element.value,n.properties=_.DefaultProperties.assign({},t),n.init()};_.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=_.Util.getMaxLength(t.blocks),e.isAndroid=_.Util.isAndroid(),e.lastInputValue=``,e.isBackward=``,e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener(`input`,e.onChangeListener),e.element.addEventListener(`keydown`,e.onKeyDownListener),e.element.addEventListener(`focus`,e.onFocusListener),e.element.addEventListener(`cut`,e.onCutListener),e.element.addEventListener(`copy`,e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type=`hidden`,e.element=t,e.element.id=``}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new _.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new _.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=_.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new _.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=_.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new _.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw Error(`[cleave.js] Please include phone-type-formatter.{country}.js lib`)}},onKeyDown:function(e){var t=this,n=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=n===8},onChange:function(e){var t=this,n=t.properties,r=_.Util;t.isBackward=t.isBackward||e.inputType===`deleteContentBackward`;var i=r.getPostDelimiter(t.lastInputValue,n.delimiter,n.delimiters);t.isBackward&&i?n.postDelimiterBackspace=i:n.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),_.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){_.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(``))},onCopy:function(e){_.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,n=_.Util,r=this.element.value,i=``;i=t.copyDelimiter?r:n.stripDelimiters(r,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData(`Text`,i):window.clipboardData.setData(`Text`,i),e.preventDefault()}catch{}},onInput:function(e){var t=this,n=t.properties,r=_.Util,i=r.getPostDelimiter(e,n.delimiter,n.delimiters);n.numeral||!n.postDelimiterBackspace||i||(e=r.headStr(e,e.length-n.postDelimiterBackspace.length)),n.phone?(!n.prefix||n.noImmediatePrefix&&!e.length?n.result=n.phoneFormatter.format(e):n.result=n.prefix+n.phoneFormatter.format(e).slice(n.prefix.length),t.updateValueState()):n.numeral?(n.prefix&&n.noImmediatePrefix&&e.length===0?n.result=``:n.result=n.numeralFormatter.format(e),t.updateValueState()):(n.date&&(e=n.dateFormatter.getValidatedDate(e)),n.time&&(e=n.timeFormatter.getValidatedTime(e)),e=r.stripDelimiters(e,n.delimiter,n.delimiters),e=r.getPrefixStrippedValue(e,n.prefix,n.prefixLength,n.result,n.delimiter,n.delimiters,n.noImmediatePrefix,n.tailPrefix,n.signBeforePrefix),e=n.numericOnly?r.strip(e,/[^\d]/g):e,e=n.uppercase?e.toUpperCase():e,e=n.lowercase?e.toLowerCase():e,n.prefix&&(n.tailPrefix?e+=n.prefix:e=n.prefix+e,n.blocksLength===0)?(n.result=e,t.updateValueState()):(n.creditCard&&t.updateCreditCardPropsByValue(e),e=r.headStr(e,n.maxLength),n.result=r.getFormattedValue(e,n.blocks,n.blocksLength,n.delimiter,n.delimiters,n.delimiterLazyShow),t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,n=this.properties,r=_.Util;r.headStr(n.result,4)!==r.headStr(e,4)&&(t=_.CreditCardDetector.getInfo(e,n.creditCardStrictMode),n.blocks=t.blocks,n.blocksLength=n.blocks.length,n.maxLength=r.getMaxLength(n.blocks),n.creditCardType!==t.type&&(n.creditCardType=t.type,n.onCreditCardTypeChanged.call(this,n.creditCardType)))},updateValueState:function(){var e=this,t=_.Util,n=e.properties;if(e.element){var r=e.element.selectionEnd,i=e.element.value,a=n.result;r=t.getNextCursorPosition(r,i,a,n.delimiter,n.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=a,t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()},1):(e.element.value=a,n.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,n=t.properties;e=e==null?``:e.toString(),n.numeral&&(e=e.replace(`.`,n.numeralDecimalMark)),n.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=_.Util,n=this.element.value;return e.rawValueTrimPrefix&&(n=t.getPrefixStrippedValue(n,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),n=e.numeral?e.numeralFormatter.getRawValue(n):t.stripDelimiters(n,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():``},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():``},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener(`input`,e.onChangeListener),e.element.removeEventListener(`keydown`,e.onKeyDownListener),e.element.removeEventListener(`focus`,e.onFocusListener),e.element.removeEventListener(`cut`,e.onCutListener),e.element.removeEventListener(`copy`,e.onCopyListener)},toString:function(){return`[Cleave Object]`}},_.NumeralFormatter=o,_.DateFormatter=c,_.TimeFormatter=u,_.PhoneFormatter=f,_.CreditCardDetector=m,_.Util=h,_.DefaultProperties=g,(typeof i==`object`&&i?i:window).Cleave=_;var v=_,y=class extends t.t(){constructor(...e){super(...e),this.value={cardName:``,cardNumber:``,expirationDate:``,cvv:``},this.cardType=``,this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new v(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e===`unknown`?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity(`Please enter a valid card number.`),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(``),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e===`amex`?4:3)}}),new v(this.expirationDateInput,{date:!0,datePattern:[`m`,`y`],onValueChanged:e=>{let t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity(`Please enter a valid expiration date (MM/YY).`),this.expirationDateInput.error=!0;else{let[e,n]=t.split(`/`),r=new Date,i=r.getFullYear()%100,a=r.getMonth()+1,o=parseInt(e,10),s=parseInt(n,10);s<i||s===i&&o<a?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity(`Card has expired.`),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(``),this.expirationDateInput.error=!1)}}}),new v(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{let t=this.cardType===`amex`?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(``),this.cvvInput.error=!1)}}),new v(this.cardNameInput,{uppercase:!0,delimiter:` `,onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity(`Please enter the name as it appears on the card.`),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(``),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent(`change`,{detail:{...this.value},bubbles:!0}))}render(){let e=this.getCardIcon();return r.html`
2
2
  <schmancy-form
3
3
  @change=${e=>{e.stopPropagation(),e.preventDefault()}}
4
4
  >