@screenreader-speech-capture/bridge 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/dist/cli.mjs +6291 -0
  4. package/dist/ui/adapter-node.js +11 -0
  5. package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css +1 -0
  6. package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css.br +0 -0
  7. package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css.gz +0 -0
  8. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css +1 -0
  9. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.br +3 -0
  10. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.gz +0 -0
  11. package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css +1 -0
  12. package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.br +0 -0
  13. package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.gz +0 -0
  14. package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css +1 -0
  15. package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.br +0 -0
  16. package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.gz +0 -0
  17. package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css +1 -0
  18. package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css.br +0 -0
  19. package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css.gz +0 -0
  20. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css +1 -0
  21. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.br +0 -0
  22. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.gz +0 -0
  23. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  24. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.br +0 -0
  25. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.gz +0 -0
  26. package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css +1 -0
  27. package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.br +0 -0
  28. package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.gz +0 -0
  29. package/dist/ui/client/ui/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
  30. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
  31. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
  32. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
  33. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
  34. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
  35. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
  36. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
  37. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
  38. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
  39. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
  40. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
  41. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
  42. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
  43. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
  44. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
  45. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
  46. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
  47. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
  48. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
  49. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
  50. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
  51. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
  52. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
  53. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
  54. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
  55. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
  56. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
  57. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
  58. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
  59. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
  60. package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js +3 -0
  61. package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js.br +0 -0
  62. package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js.gz +0 -0
  63. package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js +33 -0
  64. package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.br +0 -0
  65. package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.gz +0 -0
  66. package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js +3 -0
  67. package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.br +0 -0
  68. package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.gz +0 -0
  69. package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js +3 -0
  70. package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.br +0 -0
  71. package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.gz +0 -0
  72. package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js +40 -0
  73. package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.br +0 -0
  74. package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.gz +0 -0
  75. package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js +1 -0
  76. package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js.br +2 -0
  77. package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js.gz +0 -0
  78. package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js +72 -0
  79. package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js.br +0 -0
  80. package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js.gz +0 -0
  81. package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js +2 -0
  82. package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js.br +0 -0
  83. package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js.gz +0 -0
  84. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js +1 -0
  85. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.br +0 -0
  86. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.gz +0 -0
  87. package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js +48 -0
  88. package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.br +0 -0
  89. package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.gz +0 -0
  90. package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js +138 -0
  91. package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.br +0 -0
  92. package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.gz +0 -0
  93. package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js +1 -0
  94. package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js.br +0 -0
  95. package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js.gz +0 -0
  96. package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js +1 -0
  97. package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js.br +4 -0
  98. package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js.gz +0 -0
  99. package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js +1 -0
  100. package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js.br +2 -0
  101. package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js.gz +0 -0
  102. package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js +1 -0
  103. package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js.br +2 -0
  104. package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js.gz +0 -0
  105. package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js +1 -0
  106. package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.br +0 -0
  107. package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.gz +0 -0
  108. package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js +1 -0
  109. package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js.br +0 -0
  110. package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js.gz +0 -0
  111. package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js +3 -0
  112. package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js.br +0 -0
  113. package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js.gz +0 -0
  114. package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js +1 -0
  115. package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js.br +1 -0
  116. package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js.gz +0 -0
  117. package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js +4 -0
  118. package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.br +0 -0
  119. package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.gz +0 -0
  120. package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js +2 -0
  121. package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.br +0 -0
  122. package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.gz +0 -0
  123. package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js +1 -0
  124. package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js.br +0 -0
  125. package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js.gz +0 -0
  126. package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js +2 -0
  127. package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js.br +0 -0
  128. package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js.gz +0 -0
  129. package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js +1 -0
  130. package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.br +0 -0
  131. package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.gz +0 -0
  132. package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js +1 -0
  133. package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js.br +0 -0
  134. package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js.gz +0 -0
  135. package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js +1 -0
  136. package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js.br +0 -0
  137. package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js.gz +0 -0
  138. package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js +5 -0
  139. package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.br +0 -0
  140. package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.gz +0 -0
  141. package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js +160 -0
  142. package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.br +0 -0
  143. package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.gz +0 -0
  144. package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js +6 -0
  145. package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.br +0 -0
  146. package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.gz +0 -0
  147. package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js +6 -0
  148. package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.br +0 -0
  149. package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.gz +0 -0
  150. package/dist/ui/client/ui/_app/version.json +1 -0
  151. package/dist/ui/client/ui/_app/version.json.br +0 -0
  152. package/dist/ui/client/ui/_app/version.json.gz +0 -0
  153. package/dist/ui/client/ui/robots.txt +3 -0
  154. package/dist/ui/client/ui/robots.txt.br +0 -0
  155. package/dist/ui/client/ui/robots.txt.gz +0 -0
  156. package/dist/ui/handler.js +1 -0
  157. package/dist/ui/index.js +1 -0
  158. package/dist/ui/server/.vite/manifest.json +761 -0
  159. package/dist/ui/server/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  160. package/dist/ui/server/_app/immutable/assets/Pane.Dgdg5KMw.css +1 -0
  161. package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +1 -0
  162. package/dist/ui/server/_app/immutable/assets/_layout.ONZWQgDA.css +1 -0
  163. package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +1 -0
  164. package/dist/ui/server/_app/immutable/assets/_page.DyY1vjRV.css +1 -0
  165. package/dist/ui/server/_app/immutable/assets/_page.WduKm4aT.css +1 -0
  166. package/dist/ui/server/_app/immutable/assets/_page.YyxFzHED.css +1 -0
  167. package/dist/ui/server/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
  168. package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
  169. package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
  170. package/dist/ui/server/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
  171. package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
  172. package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
  173. package/dist/ui/server/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
  174. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
  175. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
  176. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
  177. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
  178. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
  179. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
  180. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
  181. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
  182. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
  183. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
  184. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
  185. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
  186. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
  187. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
  188. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
  189. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
  190. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
  191. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
  192. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
  193. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
  194. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
  195. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
  196. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
  197. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
  198. package/dist/ui/server/adapter-env.js +1 -0
  199. package/dist/ui/server/adapter-index.js +73 -0
  200. package/dist/ui/server/adapter-index.js.map +1 -0
  201. package/dist/ui/server/adapter-node-env.js +63 -0
  202. package/dist/ui/server/adapter-node-env.js.map +1 -0
  203. package/dist/ui/server/adapter-node-handler.js +638 -0
  204. package/dist/ui/server/adapter-node-handler.js.map +1 -0
  205. package/dist/ui/server/chunks/ExternalLink.js +12 -0
  206. package/dist/ui/server/chunks/ExternalLink.js.map +1 -0
  207. package/dist/ui/server/chunks/Pane.js +13 -0
  208. package/dist/ui/server/chunks/Pane.js.map +1 -0
  209. package/dist/ui/server/chunks/composition.js +3468 -0
  210. package/dist/ui/server/chunks/composition.js.map +1 -0
  211. package/dist/ui/server/chunks/config-state.js +21 -0
  212. package/dist/ui/server/chunks/config-state.js.map +1 -0
  213. package/dist/ui/server/chunks/config.js +145 -0
  214. package/dist/ui/server/chunks/config.js.map +1 -0
  215. package/dist/ui/server/chunks/dialog.js +592 -0
  216. package/dist/ui/server/chunks/dialog.js.map +1 -0
  217. package/dist/ui/server/chunks/exports.js +352 -0
  218. package/dist/ui/server/chunks/exports.js.map +1 -0
  219. package/dist/ui/server/chunks/filled-button.js +116 -0
  220. package/dist/ui/server/chunks/filled-button.js.map +1 -0
  221. package/dist/ui/server/chunks/functions.js +29 -0
  222. package/dist/ui/server/chunks/functions.js.map +1 -0
  223. package/dist/ui/server/chunks/icon-button.js +234 -0
  224. package/dist/ui/server/chunks/icon-button.js.map +1 -0
  225. package/dist/ui/server/chunks/icon.js +49 -0
  226. package/dist/ui/server/chunks/icon.js.map +1 -0
  227. package/dist/ui/server/chunks/index-server.js +6 -0
  228. package/dist/ui/server/chunks/index-server.js.map +1 -0
  229. package/dist/ui/server/chunks/instance.js +3577 -0
  230. package/dist/ui/server/chunks/instance.js.map +1 -0
  231. package/dist/ui/server/chunks/internal.js +3577 -0
  232. package/dist/ui/server/chunks/internal.js.map +1 -0
  233. package/dist/ui/server/chunks/navigation.js +11 -0
  234. package/dist/ui/server/chunks/navigation.js.map +1 -0
  235. package/dist/ui/server/chunks/navigation2.js +15 -0
  236. package/dist/ui/server/chunks/navigation2.js.map +1 -0
  237. package/dist/ui/server/chunks/outlined-text-field.js +1477 -0
  238. package/dist/ui/server/chunks/outlined-text-field.js.map +1 -0
  239. package/dist/ui/server/chunks/paths.js +2 -0
  240. package/dist/ui/server/chunks/redispatch-event.js +91 -0
  241. package/dist/ui/server/chunks/redispatch-event.js.map +1 -0
  242. package/dist/ui/server/chunks/remote-1j2tn2d.js +4 -0
  243. package/dist/ui/server/chunks/remote.js +1580 -0
  244. package/dist/ui/server/chunks/remote.js.map +1 -0
  245. package/dist/ui/server/chunks/scope.js +13 -0
  246. package/dist/ui/server/chunks/scope.js.map +1 -0
  247. package/dist/ui/server/chunks/server-errors.js +471 -0
  248. package/dist/ui/server/chunks/server-errors.js.map +1 -0
  249. package/dist/ui/server/chunks/server.js +8 -0
  250. package/dist/ui/server/chunks/server.js.map +1 -0
  251. package/dist/ui/server/chunks/server2.js +1960 -0
  252. package/dist/ui/server/chunks/server2.js.map +1 -0
  253. package/dist/ui/server/chunks/sessions.js +65 -0
  254. package/dist/ui/server/chunks/sessions.js.map +1 -0
  255. package/dist/ui/server/chunks/sessions.remote.js +56 -0
  256. package/dist/ui/server/chunks/sessions.remote.js.map +1 -0
  257. package/dist/ui/server/chunks/shared-errors.js +198 -0
  258. package/dist/ui/server/chunks/shared-errors.js.map +1 -0
  259. package/dist/ui/server/chunks/shared.js +85 -0
  260. package/dist/ui/server/chunks/shared.js.map +1 -0
  261. package/dist/ui/server/chunks/src.js +1217 -0
  262. package/dist/ui/server/chunks/src.js.map +1 -0
  263. package/dist/ui/server/chunks/state.js +38 -0
  264. package/dist/ui/server/chunks/state.js.map +1 -0
  265. package/dist/ui/server/chunks/static-html.js +38 -0
  266. package/dist/ui/server/chunks/static-html.js.map +1 -0
  267. package/dist/ui/server/chunks/text-button.js +307 -0
  268. package/dist/ui/server/chunks/text-button.js.map +1 -0
  269. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +19 -0
  270. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -0
  271. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js +14 -0
  272. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js.map +1 -0
  273. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +13 -0
  274. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js.map +1 -0
  275. package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js +12 -0
  276. package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js.map +1 -0
  277. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +13 -0
  278. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js.map +1 -0
  279. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +9 -0
  280. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +1 -0
  281. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +25 -0
  282. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js.map +1 -0
  283. package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js +19 -0
  284. package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js.map +1 -0
  285. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js +9 -0
  286. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js.map +1 -0
  287. package/dist/ui/server/entries/hooks.server.js +161 -0
  288. package/dist/ui/server/entries/hooks.server.js.map +1 -0
  289. package/dist/ui/server/entries/pages/_error.svelte.js +16 -0
  290. package/dist/ui/server/entries/pages/_error.svelte.js.map +1 -0
  291. package/dist/ui/server/entries/pages/_layout.server.ts.js +17 -0
  292. package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -0
  293. package/dist/ui/server/entries/pages/_layout.svelte.js +175 -0
  294. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -0
  295. package/dist/ui/server/entries/pages/_page.server.ts.js +18 -0
  296. package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -0
  297. package/dist/ui/server/entries/pages/_page.svelte.js +444 -0
  298. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -0
  299. package/dist/ui/server/entries/pages/settings/_page.server.ts.js +12 -0
  300. package/dist/ui/server/entries/pages/settings/_page.server.ts.js.map +1 -0
  301. package/dist/ui/server/entries/pages/settings/_page.svelte.js +3531 -0
  302. package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -0
  303. package/dist/ui/server/entries/pages/setup/_layout.svelte.js +51 -0
  304. package/dist/ui/server/entries/pages/setup/_layout.svelte.js.map +1 -0
  305. package/dist/ui/server/entries/pages/setup/_page.svelte.js +230 -0
  306. package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -0
  307. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js +12 -0
  308. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js.map +1 -0
  309. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +271 -0
  310. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -0
  311. package/dist/ui/server/entries/params.js +60 -0
  312. package/dist/ui/server/entries/params.js.map +1 -0
  313. package/dist/ui/server/env.js +1 -0
  314. package/dist/ui/server/handler.js +1 -0
  315. package/dist/ui/server/index.js +67 -0
  316. package/dist/ui/server/index.js.map +1 -0
  317. package/dist/ui/server/manifest-full.js +126 -0
  318. package/dist/ui/server/manifest.js +126 -0
  319. package/dist/ui/server/nodes/0.js +10 -0
  320. package/dist/ui/server/nodes/1.js +8 -0
  321. package/dist/ui/server/nodes/2.js +8 -0
  322. package/dist/ui/server/nodes/3.js +10 -0
  323. package/dist/ui/server/nodes/4.js +10 -0
  324. package/dist/ui/server/nodes/5.js +8 -0
  325. package/dist/ui/server/nodes/6.js +10 -0
  326. package/dist/ui/server/remote-entry.js +1 -0
  327. package/dist/ui/server/server.js +128 -0
  328. package/package.json +39 -3
@@ -0,0 +1,3468 @@
1
+ import { t as getSessions } from "./sessions.remote.js";
2
+ import { nt as resolve } from "./internal.js";
3
+ import { _ as CONFIG_LIMITS, n as checkDto, u as SpeechEntrySchema, v as EXACT_VERSION_PATTERN } from "./src.js";
4
+ import { l as getContext, u as setContext } from "./server2.js";
5
+ import "./index-server.js";
6
+ import "./paths.js";
7
+ // ../../node_modules/.pnpm/tslib@2.9.1/node_modules/tslib/tslib.es6.mjs
8
+ function __decorate(decorators, target, key, desc) {
9
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13
+ }
14
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/custom-element.js
15
+ /**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */
20
+ var t$3 = (t) => (e, o) => {
21
+ void 0 !== o ? o.addInitializer(() => {
22
+ customElements.define(t, e);
23
+ }) : customElements.define(t, e);
24
+ };
25
+ // ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
26
+ /**
27
+ * @license
28
+ * Copyright 2023 Google LLC
29
+ * SPDX-License-Identifier: BSD-3-Clause
30
+ */
31
+ var ElementInternalsShim = class ElementInternals {
32
+ get shadowRoot() {
33
+ return this.__host.__shadowRoot;
34
+ }
35
+ constructor(_host) {
36
+ this.ariaActiveDescendantElement = null;
37
+ this.ariaAtomic = "";
38
+ this.ariaAutoComplete = "";
39
+ this.ariaBrailleLabel = "";
40
+ this.ariaBrailleRoleDescription = "";
41
+ this.ariaBusy = "";
42
+ this.ariaChecked = "";
43
+ this.ariaColCount = "";
44
+ this.ariaColIndex = "";
45
+ this.ariaColIndexText = "";
46
+ this.ariaColSpan = "";
47
+ this.ariaControlsElements = null;
48
+ this.ariaCurrent = "";
49
+ this.ariaDescribedByElements = null;
50
+ this.ariaDescription = "";
51
+ this.ariaDetailsElements = null;
52
+ this.ariaDisabled = "";
53
+ this.ariaErrorMessageElements = null;
54
+ this.ariaExpanded = "";
55
+ this.ariaFlowToElements = null;
56
+ this.ariaHasPopup = "";
57
+ this.ariaHidden = "";
58
+ this.ariaInvalid = "";
59
+ this.ariaKeyShortcuts = "";
60
+ this.ariaLabel = "";
61
+ this.ariaLabelledByElements = null;
62
+ this.ariaLevel = "";
63
+ this.ariaLive = "";
64
+ this.ariaModal = "";
65
+ this.ariaMultiLine = "";
66
+ this.ariaMultiSelectable = "";
67
+ this.ariaOrientation = "";
68
+ this.ariaOwnsElements = null;
69
+ this.ariaPlaceholder = "";
70
+ this.ariaPosInSet = "";
71
+ this.ariaPressed = "";
72
+ this.ariaReadOnly = "";
73
+ this.ariaRelevant = "";
74
+ this.ariaRequired = "";
75
+ this.ariaRoleDescription = "";
76
+ this.ariaRowCount = "";
77
+ this.ariaRowIndex = "";
78
+ this.ariaRowIndexText = "";
79
+ this.ariaRowSpan = "";
80
+ this.ariaSelected = "";
81
+ this.ariaSetSize = "";
82
+ this.ariaSort = "";
83
+ this.ariaValueMax = "";
84
+ this.ariaValueMin = "";
85
+ this.ariaValueNow = "";
86
+ this.ariaValueText = "";
87
+ this.role = "";
88
+ this.form = null;
89
+ this.labels = [];
90
+ this.states = /* @__PURE__ */ new Set();
91
+ this.validationMessage = "";
92
+ this.validity = {};
93
+ this.willValidate = true;
94
+ this.__host = _host;
95
+ }
96
+ checkValidity() {
97
+ console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true.");
98
+ return true;
99
+ }
100
+ reportValidity() {
101
+ return true;
102
+ }
103
+ setFormValue() {}
104
+ setValidity() {}
105
+ };
106
+ // ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
107
+ /**
108
+ * @license
109
+ * Copyright 2023 Google LLC
110
+ * SPDX-License-Identifier: BSD-3-Clause
111
+ */
112
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
113
+ if (kind === "m") throw new TypeError("Private method is not writable");
114
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
115
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
116
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
117
+ };
118
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
119
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
120
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
121
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
122
+ };
123
+ var _Event_cancelable;
124
+ var _Event_bubbles;
125
+ var _Event_composed;
126
+ var _Event_defaultPrevented;
127
+ var _Event_timestamp;
128
+ var _Event_propagationStopped;
129
+ var _Event_type;
130
+ var _Event_target;
131
+ var _Event_isBeingDispatched;
132
+ var _a$1;
133
+ var _CustomEvent_detail;
134
+ var _b;
135
+ var NONE = 0;
136
+ var CAPTURING_PHASE = 1;
137
+ var AT_TARGET = 2;
138
+ var BUBBLING_PHASE = 3;
139
+ var enumerableProperty$1 = { __proto__: null };
140
+ enumerableProperty$1.enumerable = true;
141
+ Object.freeze(enumerableProperty$1);
142
+ var EventShim = (_a$1 = class Event {
143
+ constructor(type, options = {}) {
144
+ _Event_cancelable.set(this, false);
145
+ _Event_bubbles.set(this, false);
146
+ _Event_composed.set(this, false);
147
+ _Event_defaultPrevented.set(this, false);
148
+ _Event_timestamp.set(this, Date.now());
149
+ _Event_propagationStopped.set(this, false);
150
+ _Event_type.set(this, void 0);
151
+ _Event_target.set(this, void 0);
152
+ _Event_isBeingDispatched.set(this, void 0);
153
+ this.NONE = NONE;
154
+ this.CAPTURING_PHASE = CAPTURING_PHASE;
155
+ this.AT_TARGET = AT_TARGET;
156
+ this.BUBBLING_PHASE = BUBBLING_PHASE;
157
+ if (arguments.length === 0) throw new Error(`The type argument must be specified`);
158
+ if (typeof options !== "object" || !options) throw new Error(`The "options" argument must be an object`);
159
+ const { bubbles, cancelable, composed } = options;
160
+ __classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
161
+ __classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
162
+ __classPrivateFieldSet(this, _Event_composed, !!composed, "f");
163
+ __classPrivateFieldSet(this, _Event_type, `${type}`, "f");
164
+ __classPrivateFieldSet(this, _Event_target, null, "f");
165
+ __classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
166
+ }
167
+ initEvent(_type, _bubbles, _cancelable) {
168
+ throw new Error("Method not implemented.");
169
+ }
170
+ stopImmediatePropagation() {
171
+ this.stopPropagation();
172
+ }
173
+ preventDefault() {
174
+ __classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
175
+ }
176
+ get target() {
177
+ return __classPrivateFieldGet(this, _Event_target, "f");
178
+ }
179
+ get currentTarget() {
180
+ return __classPrivateFieldGet(this, _Event_target, "f");
181
+ }
182
+ get srcElement() {
183
+ return __classPrivateFieldGet(this, _Event_target, "f");
184
+ }
185
+ get type() {
186
+ return __classPrivateFieldGet(this, _Event_type, "f");
187
+ }
188
+ get cancelable() {
189
+ return __classPrivateFieldGet(this, _Event_cancelable, "f");
190
+ }
191
+ get defaultPrevented() {
192
+ return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
193
+ }
194
+ get timeStamp() {
195
+ return __classPrivateFieldGet(this, _Event_timestamp, "f");
196
+ }
197
+ composedPath() {
198
+ return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
199
+ }
200
+ get returnValue() {
201
+ return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
202
+ }
203
+ get bubbles() {
204
+ return __classPrivateFieldGet(this, _Event_bubbles, "f");
205
+ }
206
+ get composed() {
207
+ return __classPrivateFieldGet(this, _Event_composed, "f");
208
+ }
209
+ get eventPhase() {
210
+ return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a$1.AT_TARGET : _a$1.NONE;
211
+ }
212
+ get cancelBubble() {
213
+ return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
214
+ }
215
+ set cancelBubble(value) {
216
+ if (value) __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
217
+ }
218
+ stopPropagation() {
219
+ __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
220
+ }
221
+ get isTrusted() {
222
+ return false;
223
+ }
224
+ }, _Event_cancelable = /* @__PURE__ */ new WeakMap(), _Event_bubbles = /* @__PURE__ */ new WeakMap(), _Event_composed = /* @__PURE__ */ new WeakMap(), _Event_defaultPrevented = /* @__PURE__ */ new WeakMap(), _Event_timestamp = /* @__PURE__ */ new WeakMap(), _Event_propagationStopped = /* @__PURE__ */ new WeakMap(), _Event_type = /* @__PURE__ */ new WeakMap(), _Event_target = /* @__PURE__ */ new WeakMap(), _Event_isBeingDispatched = /* @__PURE__ */ new WeakMap(), _a$1.NONE = NONE, _a$1.CAPTURING_PHASE = CAPTURING_PHASE, _a$1.AT_TARGET = AT_TARGET, _a$1.BUBBLING_PHASE = BUBBLING_PHASE, _a$1);
225
+ Object.defineProperties(EventShim.prototype, {
226
+ initEvent: enumerableProperty$1,
227
+ stopImmediatePropagation: enumerableProperty$1,
228
+ preventDefault: enumerableProperty$1,
229
+ target: enumerableProperty$1,
230
+ currentTarget: enumerableProperty$1,
231
+ srcElement: enumerableProperty$1,
232
+ type: enumerableProperty$1,
233
+ cancelable: enumerableProperty$1,
234
+ defaultPrevented: enumerableProperty$1,
235
+ timeStamp: enumerableProperty$1,
236
+ composedPath: enumerableProperty$1,
237
+ returnValue: enumerableProperty$1,
238
+ bubbles: enumerableProperty$1,
239
+ composed: enumerableProperty$1,
240
+ eventPhase: enumerableProperty$1,
241
+ cancelBubble: enumerableProperty$1,
242
+ stopPropagation: enumerableProperty$1,
243
+ isTrusted: enumerableProperty$1
244
+ });
245
+ var CustomEventShim = (_b = class CustomEvent extends EventShim {
246
+ constructor(type, options = {}) {
247
+ super(type, options);
248
+ _CustomEvent_detail.set(this, void 0);
249
+ __classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
250
+ }
251
+ initCustomEvent(_type, _bubbles, _cancelable, _detail) {
252
+ throw new Error("Method not implemented.");
253
+ }
254
+ get detail() {
255
+ return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
256
+ }
257
+ }, _CustomEvent_detail = /* @__PURE__ */ new WeakMap(), _b);
258
+ Object.defineProperties(CustomEventShim.prototype, { detail: enumerableProperty$1 });
259
+ var EventShimWithRealType = EventShim;
260
+ var CustomEventShimWithRealType = CustomEventShim;
261
+ // ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
262
+ /**
263
+ * @license
264
+ * Copyright 2024 Google LLC
265
+ * SPDX-License-Identifier: BSD-3-Clause
266
+ */
267
+ var _a = class CSSRule {
268
+ constructor() {
269
+ this.STYLE_RULE = 1;
270
+ this.CHARSET_RULE = 2;
271
+ this.IMPORT_RULE = 3;
272
+ this.MEDIA_RULE = 4;
273
+ this.FONT_FACE_RULE = 5;
274
+ this.PAGE_RULE = 6;
275
+ this.NAMESPACE_RULE = 10;
276
+ this.KEYFRAMES_RULE = 7;
277
+ this.KEYFRAME_RULE = 8;
278
+ this.SUPPORTS_RULE = 12;
279
+ this.COUNTER_STYLE_RULE = 11;
280
+ this.FONT_FEATURE_VALUES_RULE = 14;
281
+ this.MARGIN_RULE = 9;
282
+ this.__parentStyleSheet = null;
283
+ this.cssText = "";
284
+ }
285
+ get parentRule() {
286
+ return null;
287
+ }
288
+ get parentStyleSheet() {
289
+ return this.__parentStyleSheet;
290
+ }
291
+ get type() {
292
+ return 0;
293
+ }
294
+ };
295
+ _a.STYLE_RULE = 1, _a.CHARSET_RULE = 2, _a.IMPORT_RULE = 3, _a.MEDIA_RULE = 4, _a.FONT_FACE_RULE = 5, _a.PAGE_RULE = 6, _a.NAMESPACE_RULE = 10, _a.KEYFRAMES_RULE = 7, _a.KEYFRAME_RULE = 8, _a.SUPPORTS_RULE = 12, _a.COUNTER_STYLE_RULE = 11, _a.FONT_FEATURE_VALUES_RULE = 14, _a.MARGIN_RULE = 9;
296
+ // ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/index.js
297
+ /**
298
+ * @license
299
+ * Copyright 2019 Google LLC
300
+ * SPDX-License-Identifier: BSD-3-Clause
301
+ */
302
+ globalThis.Event ??= EventShimWithRealType;
303
+ globalThis.CustomEvent ??= CustomEventShimWithRealType;
304
+ var constructionToken = Symbol();
305
+ var isCaptureEventListener = (options) => typeof options === "boolean" ? options : options?.capture ?? false;
306
+ var enumerableProperty = { __proto__: null };
307
+ enumerableProperty.enumerable = true;
308
+ Object.freeze(enumerableProperty);
309
+ /**
310
+ * This is a basic implementation of an EventTarget.
311
+ *
312
+ * This is not fully spec compliant (e.g. validation),
313
+ * but should work well enough for our use cases.
314
+ *
315
+ * @see https://dom.spec.whatwg.org/#eventtarget
316
+ *
317
+ * Example Event Path
318
+ * ------------------
319
+ *
320
+ * Note that this depends on the logic in `packages/labs/ssr/src/lib/render-value.ts`.
321
+ * Any element that is not a custom element or a slot element is skipped in the chain.
322
+ *
323
+ * <main>
324
+ * <my-el1>
325
+ * #shadow-dom (open)
326
+ * <div>
327
+ * <slot></slot>
328
+ * <my-el2>
329
+ * #shadow-dom (closed)
330
+ * <slot></slot>
331
+ * <event-dispatcher3></event-dispatcher3>
332
+ * <slot name="nested"></slot>
333
+ * </my-el2>
334
+ * </div>
335
+ * <event-dispatcher1></event-dispatcher1>
336
+ * <event-dispatcher2 slot="nested"></event-dispatcher2>
337
+ * </my-el1>
338
+ * </main>
339
+ *
340
+ * Given the previous structure, the event path of this shim would be as follows,
341
+ * for the given dispatcher with an event that bubbles (document-fragment
342
+ * represents a ShadowRoot/#shadow-dom instance):
343
+ *
344
+ * <event-dispatcher1>:
345
+ * [event-dispatcher1, slot{my-el1}, document-fragment{my-el1}, my-el1, document]
346
+ *
347
+ * <event-dispatcher2>:
348
+ * [
349
+ * event-dispatcher2,
350
+ * slot[name="nested"]{my-el1},
351
+ * slot{my-el2},
352
+ * document-fragment{my-el2},
353
+ * my-el2,
354
+ * document-fragment{my-el1},
355
+ * my-el1,
356
+ * document
357
+ * ]
358
+ *
359
+ * <event-dispatcher3> (without composed):
360
+ * [event-dispatcher3, document-fragment{my-el2}]
361
+ *
362
+ * <event-dispatcher3> (composed):
363
+ * [
364
+ * event-dispatcher3,
365
+ * document-fragment{my-el2},
366
+ * my-el2,
367
+ * document-fragment{my-el1},
368
+ * my-el1,
369
+ * document
370
+ * ]
371
+ */
372
+ var EventTarget$1 = class {
373
+ constructor() {
374
+ this.__eventListeners = /* @__PURE__ */ new Map();
375
+ this.__captureEventListeners = /* @__PURE__ */ new Map();
376
+ }
377
+ addEventListener(type, callback, options) {
378
+ if (callback === void 0 || callback === null) return;
379
+ const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
380
+ let eventListeners = eventListenersMap.get(type);
381
+ if (eventListeners === void 0) {
382
+ eventListeners = /* @__PURE__ */ new Map();
383
+ eventListenersMap.set(type, eventListeners);
384
+ } else if (eventListeners.has(callback)) return;
385
+ const normalizedOptions = typeof options === "object" && options ? options : {};
386
+ normalizedOptions.signal?.addEventListener("abort", () => this.removeEventListener(type, callback, options));
387
+ eventListeners.set(callback, normalizedOptions ?? {});
388
+ }
389
+ removeEventListener(type, callback, options) {
390
+ if (callback === void 0 || callback === null) return;
391
+ const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
392
+ const eventListeners = eventListenersMap.get(type);
393
+ if (eventListeners !== void 0) {
394
+ eventListeners.delete(callback);
395
+ if (!eventListeners.size) eventListenersMap.delete(type);
396
+ }
397
+ }
398
+ dispatchEvent(event) {
399
+ let composedPath = this.__resolveFullEventPath();
400
+ if (!event.composed && this.__host) composedPath = composedPath.slice(0, composedPath.indexOf(this.__host));
401
+ let stopPropagation = false;
402
+ let stopImmediatePropagation = false;
403
+ let eventPhase = EventShimWithRealType.NONE;
404
+ let target = null;
405
+ let tmpTarget = null;
406
+ let currentTarget = null;
407
+ const originalStopPropagation = event.stopPropagation;
408
+ const originalStopImmediatePropagation = event.stopImmediatePropagation;
409
+ Object.defineProperties(event, {
410
+ target: {
411
+ get() {
412
+ return target ?? tmpTarget;
413
+ },
414
+ ...enumerableProperty
415
+ },
416
+ srcElement: {
417
+ get() {
418
+ return event.target;
419
+ },
420
+ ...enumerableProperty
421
+ },
422
+ currentTarget: {
423
+ get() {
424
+ return currentTarget;
425
+ },
426
+ ...enumerableProperty
427
+ },
428
+ eventPhase: {
429
+ get() {
430
+ return eventPhase;
431
+ },
432
+ ...enumerableProperty
433
+ },
434
+ composedPath: {
435
+ value: () => composedPath,
436
+ ...enumerableProperty
437
+ },
438
+ stopPropagation: {
439
+ value: () => {
440
+ stopPropagation = true;
441
+ originalStopPropagation.call(event);
442
+ },
443
+ ...enumerableProperty
444
+ },
445
+ stopImmediatePropagation: {
446
+ value: () => {
447
+ stopImmediatePropagation = true;
448
+ originalStopImmediatePropagation.call(event);
449
+ },
450
+ ...enumerableProperty
451
+ }
452
+ });
453
+ const invokeEventListener = (listener, options, eventListenerMap) => {
454
+ if (typeof listener === "function") listener(event);
455
+ else if (typeof listener?.handleEvent === "function") listener.handleEvent(event);
456
+ if (options.once) eventListenerMap.delete(listener);
457
+ };
458
+ const finishDispatch = () => {
459
+ currentTarget = null;
460
+ eventPhase = EventShimWithRealType.NONE;
461
+ return !event.defaultPrevented;
462
+ };
463
+ const captureEventPath = composedPath.slice().reverse();
464
+ target = !this.__host || !event.composed ? this : null;
465
+ const retarget = (eventTargets) => {
466
+ tmpTarget = this;
467
+ while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) tmpTarget = tmpTarget.__host;
468
+ };
469
+ for (const eventTarget of captureEventPath) {
470
+ if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
471
+ currentTarget = eventTarget;
472
+ eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.CAPTURING_PHASE;
473
+ const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
474
+ if (captureEventListeners) for (const [listener, options] of captureEventListeners) {
475
+ invokeEventListener(listener, options, captureEventListeners);
476
+ if (stopImmediatePropagation) return finishDispatch();
477
+ }
478
+ if (stopPropagation) return finishDispatch();
479
+ }
480
+ const bubbleEventPath = event.bubbles ? composedPath : [this];
481
+ tmpTarget = null;
482
+ for (const eventTarget of bubbleEventPath) {
483
+ if (!target && (!tmpTarget || eventTarget === tmpTarget.__host)) retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
484
+ currentTarget = eventTarget;
485
+ eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.BUBBLING_PHASE;
486
+ const eventListeners = eventTarget.__eventListeners.get(event.type);
487
+ if (eventListeners) for (const [listener, options] of eventListeners) {
488
+ invokeEventListener(listener, options, eventListeners);
489
+ if (stopImmediatePropagation) return finishDispatch();
490
+ }
491
+ if (stopPropagation) return finishDispatch();
492
+ }
493
+ return finishDispatch();
494
+ }
495
+ __resolveFullEventPath() {
496
+ if (this.__eventPathCache) return this.__eventPathCache;
497
+ else if (!this.__eventTargetParent) return this.__eventPathCache = [
498
+ this,
499
+ documentShim,
500
+ windowShim
501
+ ];
502
+ else return this.__eventPathCache = [this, ...this.__eventTargetParent.__resolveFullEventPath()];
503
+ }
504
+ };
505
+ var attributes = /* @__PURE__ */ new WeakMap();
506
+ var attributesForElement = (element) => {
507
+ let attrs = attributes.get(element);
508
+ if (attrs === void 0) attributes.set(element, attrs = /* @__PURE__ */ new Map());
509
+ return attrs;
510
+ };
511
+ var NodeShim = class Node extends EventTarget$1 {
512
+ getRootNode(options) {
513
+ if (options?.composed) return document$1;
514
+ return this.__host?.__shadowRoot ?? document$1;
515
+ }
516
+ };
517
+ var DocumentShim = class Document extends NodeShim {
518
+ get adoptedStyleSheets() {
519
+ return [];
520
+ }
521
+ createTreeWalker() {
522
+ return {};
523
+ }
524
+ createTextNode() {
525
+ return {};
526
+ }
527
+ createElement() {
528
+ return {};
529
+ }
530
+ };
531
+ var documentShim = new DocumentShim();
532
+ var document$1 = documentShim;
533
+ var WindowShim = class Window extends NodeShim {
534
+ constructor(token) {
535
+ super();
536
+ if (token !== constructionToken) throw new TypeError("Illegal constructor");
537
+ Object.assign(this, globalThis, {
538
+ CustomElementRegistry,
539
+ customElements: customElements$1,
540
+ document: document$1,
541
+ Document: DocumentShim,
542
+ Element: ElementShim,
543
+ EventTarget: EventTarget$1,
544
+ HTMLElement: HTMLElementShim,
545
+ Node: NodeShim,
546
+ ShadowRoot: ShadowRootShim,
547
+ window: this,
548
+ Window: WindowShim
549
+ });
550
+ }
551
+ };
552
+ var ElementShim = class Element extends NodeShim {
553
+ constructor() {
554
+ super(...arguments);
555
+ this.__shadowRootMode = null;
556
+ this.__shadowRoot = null;
557
+ this.__internals = null;
558
+ }
559
+ get attributes() {
560
+ return Array.from(attributesForElement(this)).map(([name, value]) => ({
561
+ name,
562
+ value
563
+ }));
564
+ }
565
+ get shadowRoot() {
566
+ if (this.__shadowRootMode === "closed") return null;
567
+ return this.__shadowRoot;
568
+ }
569
+ get localName() {
570
+ return this.constructor.__localName;
571
+ }
572
+ get tagName() {
573
+ return this.localName?.toUpperCase();
574
+ }
575
+ setAttribute(name, value) {
576
+ attributesForElement(this).set(name, String(value));
577
+ }
578
+ removeAttribute(name) {
579
+ attributesForElement(this).delete(name);
580
+ }
581
+ toggleAttribute(name, force) {
582
+ if (this.hasAttribute(name)) {
583
+ if (force === void 0 || !force) {
584
+ this.removeAttribute(name);
585
+ return false;
586
+ }
587
+ } else if (force === void 0 || force) {
588
+ this.setAttribute(name, "");
589
+ return true;
590
+ } else return false;
591
+ return true;
592
+ }
593
+ hasAttribute(name) {
594
+ return attributesForElement(this).has(name);
595
+ }
596
+ attachShadow(init) {
597
+ this.__shadowRootMode = init.mode;
598
+ const shadowRoot = new ShadowRootShim(constructionToken, init);
599
+ shadowRoot.__eventTargetParent = this;
600
+ shadowRoot.__host = this;
601
+ return this.__shadowRoot = shadowRoot;
602
+ }
603
+ attachInternals() {
604
+ if (this.__internals !== null) throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
605
+ const internals = new ElementInternalsShim(this);
606
+ this.__internals = internals;
607
+ return internals;
608
+ }
609
+ getAttribute(name) {
610
+ return attributesForElement(this).get(name) ?? null;
611
+ }
612
+ };
613
+ var HTMLElementShim = class HTMLElement extends ElementShim {};
614
+ var HTMLElementShimWithRealType = HTMLElementShim;
615
+ var ShadowRootShim = class ShadowRoot extends NodeShim {
616
+ get host() {
617
+ return this.__host;
618
+ }
619
+ constructor(constructionToken, init) {
620
+ super();
621
+ if (constructionToken !== constructionToken) throw new TypeError("Illegal constructor");
622
+ this.mode = init.mode;
623
+ }
624
+ };
625
+ globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), "localName", { get() {
626
+ return "lit-server-root";
627
+ } });
628
+ function promiseWithResolvers() {
629
+ let resolve;
630
+ let reject;
631
+ return {
632
+ promise: new Promise((res, rej) => {
633
+ resolve = res;
634
+ reject = rej;
635
+ }),
636
+ resolve,
637
+ reject
638
+ };
639
+ }
640
+ var CustomElementRegistry = class {
641
+ constructor() {
642
+ this.__definitions = /* @__PURE__ */ new Map();
643
+ this.__reverseDefinitions = /* @__PURE__ */ new Map();
644
+ this.__pendingWhenDefineds = /* @__PURE__ */ new Map();
645
+ }
646
+ define(name, ctor) {
647
+ if (this.__definitions.has(name)) {
648
+ if (process.env.NODE_ENV === "development") console.warn(`'CustomElementRegistry' already has "${name}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`);
649
+ else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${name}" has already been used with this registry`);
650
+ }
651
+ if (this.__reverseDefinitions.has(ctor)) throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(ctor)}`);
652
+ ctor.__localName = name;
653
+ this.__definitions.set(name, {
654
+ ctor,
655
+ observedAttributes: ctor.observedAttributes ?? []
656
+ });
657
+ this.__reverseDefinitions.set(ctor, name);
658
+ this.__pendingWhenDefineds.get(name)?.resolve(ctor);
659
+ this.__pendingWhenDefineds.delete(name);
660
+ }
661
+ get(name) {
662
+ return this.__definitions.get(name)?.ctor;
663
+ }
664
+ getName(ctor) {
665
+ return this.__reverseDefinitions.get(ctor) ?? null;
666
+ }
667
+ initialize(_root) {
668
+ throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.");
669
+ }
670
+ upgrade(_element) {
671
+ throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.");
672
+ }
673
+ async whenDefined(name) {
674
+ const definition = this.__definitions.get(name);
675
+ if (definition) return definition.ctor;
676
+ let withResolvers = this.__pendingWhenDefineds.get(name);
677
+ if (!withResolvers) {
678
+ withResolvers = promiseWithResolvers();
679
+ this.__pendingWhenDefineds.set(name, withResolvers);
680
+ }
681
+ return withResolvers.promise;
682
+ }
683
+ };
684
+ var customElements$1 = new CustomElementRegistry();
685
+ var windowShim = new WindowShim(constructionToken);
686
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
687
+ /**
688
+ * @license
689
+ * Copyright 2019 Google LLC
690
+ * SPDX-License-Identifier: BSD-3-Clause
691
+ */
692
+ var t$2 = globalThis;
693
+ var e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
694
+ var s$2 = Symbol();
695
+ var o$3 = /* @__PURE__ */ new WeakMap();
696
+ var n$3 = class {
697
+ constructor(t, e, o) {
698
+ if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
699
+ this.cssText = t, this.t = e;
700
+ }
701
+ get styleSheet() {
702
+ let t = this.o;
703
+ const s = this.t;
704
+ if (e$5 && void 0 === t) {
705
+ const e = void 0 !== s && 1 === s.length;
706
+ e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
707
+ }
708
+ return t;
709
+ }
710
+ toString() {
711
+ return this.cssText;
712
+ }
713
+ };
714
+ var r$4 = (t) => new n$3("string" == typeof t ? t : t + "", void 0, s$2);
715
+ var i$3 = (t, ...e) => {
716
+ return new n$3(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
717
+ if (!0 === t._$cssResult$) return t.cssText;
718
+ if ("number" == typeof t) return t;
719
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
720
+ })(s) + t[o + 1], t[0]), t, s$2);
721
+ };
722
+ var S$1 = (s, o) => {
723
+ if (e$5) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
724
+ else for (const e of o) {
725
+ const o = document.createElement("style"), n = t$2.litNonce;
726
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
727
+ }
728
+ };
729
+ var c$2 = e$5 || void 0 === t$2.CSSStyleSheet ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
730
+ let e = "";
731
+ for (const s of t.cssRules) e += s.cssText;
732
+ return r$4(e);
733
+ })(t) : t;
734
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/reactive-element.js
735
+ var { is: h$1, defineProperty: r$3, getOwnPropertyDescriptor: o$2, getOwnPropertyNames: n$2, getOwnPropertySymbols: a$1, getPrototypeOf: c$1 } = Object, l$1 = globalThis;
736
+ l$1.customElements ??= customElements$1;
737
+ var p$1 = l$1.trustedTypes;
738
+ var d$1 = p$1 ? p$1.emptyScript : "";
739
+ var u$1 = l$1.reactiveElementPolyfillSupport;
740
+ var f$1 = (t, s) => t;
741
+ var b$1 = {
742
+ toAttribute(t, s) {
743
+ switch (s) {
744
+ case Boolean:
745
+ t = t ? d$1 : null;
746
+ break;
747
+ case Object:
748
+ case Array: t = null == t ? t : JSON.stringify(t);
749
+ }
750
+ return t;
751
+ },
752
+ fromAttribute(t, s) {
753
+ let i = t;
754
+ switch (s) {
755
+ case Boolean:
756
+ i = null !== t;
757
+ break;
758
+ case Number:
759
+ i = null === t ? null : Number(t);
760
+ break;
761
+ case Object:
762
+ case Array: try {
763
+ i = JSON.parse(t);
764
+ } catch (t) {
765
+ i = null;
766
+ }
767
+ }
768
+ return i;
769
+ }
770
+ };
771
+ var m$1 = (t, s) => !h$1(t, s);
772
+ var y$1 = {
773
+ attribute: !0,
774
+ type: String,
775
+ converter: b$1,
776
+ reflect: !1,
777
+ useDefault: !1,
778
+ hasChanged: m$1
779
+ };
780
+ Symbol.metadata ??= Symbol("metadata"), l$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
781
+ var g$1 = class extends (globalThis.HTMLElement ?? HTMLElementShimWithRealType) {
782
+ static addInitializer(t) {
783
+ this._$Ei(), (this.l ??= []).push(t);
784
+ }
785
+ static get observedAttributes() {
786
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
787
+ }
788
+ static createProperty(t, s = y$1) {
789
+ if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
790
+ const i = Symbol(), e = this.getPropertyDescriptor(t, i, s);
791
+ void 0 !== e && r$3(this.prototype, t, e);
792
+ }
793
+ }
794
+ static getPropertyDescriptor(t, s, i) {
795
+ const { get: e, set: h } = o$2(this.prototype, t) ?? {
796
+ get() {
797
+ return this[s];
798
+ },
799
+ set(t) {
800
+ this[s] = t;
801
+ }
802
+ };
803
+ return {
804
+ get: e,
805
+ set(s) {
806
+ const r = e?.call(this);
807
+ h?.call(this, s), this.requestUpdate(t, r, i);
808
+ },
809
+ configurable: !0,
810
+ enumerable: !0
811
+ };
812
+ }
813
+ static getPropertyOptions(t) {
814
+ return this.elementProperties.get(t) ?? y$1;
815
+ }
816
+ static _$Ei() {
817
+ if (this.hasOwnProperty(f$1("elementProperties"))) return;
818
+ const t = c$1(this);
819
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
820
+ }
821
+ static finalize() {
822
+ if (this.hasOwnProperty(f$1("finalized"))) return;
823
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(f$1("properties"))) {
824
+ const t = this.properties, s = [...n$2(t), ...a$1(t)];
825
+ for (const i of s) this.createProperty(i, t[i]);
826
+ }
827
+ const t = this[Symbol.metadata];
828
+ if (null !== t) {
829
+ const s = litPropertyMetadata.get(t);
830
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
831
+ }
832
+ this._$Eh = /* @__PURE__ */ new Map();
833
+ for (const [t, s] of this.elementProperties) {
834
+ const i = this._$Eu(t, s);
835
+ void 0 !== i && this._$Eh.set(i, t);
836
+ }
837
+ this.elementStyles = this.finalizeStyles(this.styles);
838
+ }
839
+ static finalizeStyles(t) {
840
+ const s = [];
841
+ if (Array.isArray(t)) {
842
+ const e = new Set(t.flat(1 / 0).reverse());
843
+ for (const t of e) s.unshift(c$2(t));
844
+ } else void 0 !== t && s.push(c$2(t));
845
+ return s;
846
+ }
847
+ static _$Eu(t, s) {
848
+ const i = s.attribute;
849
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
850
+ }
851
+ constructor() {
852
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
853
+ }
854
+ _$Ev() {
855
+ this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
856
+ }
857
+ addController(t) {
858
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
859
+ }
860
+ removeController(t) {
861
+ this._$EO?.delete(t);
862
+ }
863
+ _$E_() {
864
+ const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
865
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
866
+ t.size > 0 && (this._$Ep = t);
867
+ }
868
+ createRenderRoot() {
869
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
870
+ return S$1(t, this.constructor.elementStyles), t;
871
+ }
872
+ connectedCallback() {
873
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
874
+ }
875
+ enableUpdating(t) {}
876
+ disconnectedCallback() {
877
+ this._$EO?.forEach((t) => t.hostDisconnected?.());
878
+ }
879
+ attributeChangedCallback(t, s, i) {
880
+ this._$AK(t, i);
881
+ }
882
+ _$ET(t, s) {
883
+ const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
884
+ if (void 0 !== e && !0 === i.reflect) {
885
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : b$1).toAttribute(s, i.type);
886
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
887
+ }
888
+ }
889
+ _$AK(t, s) {
890
+ const i = this.constructor, e = i._$Eh.get(t);
891
+ if (void 0 !== e && this._$Em !== e) {
892
+ const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : b$1;
893
+ this._$Em = e;
894
+ const r = h.fromAttribute(s, t.type);
895
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
896
+ }
897
+ }
898
+ requestUpdate(t, s, i, e = !1, h) {
899
+ if (void 0 !== t) {
900
+ const r = this.constructor;
901
+ if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? m$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
902
+ this.C(t, s, i);
903
+ }
904
+ !1 === this.isUpdatePending && (this._$ES = this._$EP());
905
+ }
906
+ C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) {
907
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
908
+ }
909
+ async _$EP() {
910
+ this.isUpdatePending = !0;
911
+ try {
912
+ await this._$ES;
913
+ } catch (t) {
914
+ Promise.reject(t);
915
+ }
916
+ const t = this.scheduleUpdate();
917
+ return null != t && await t, !this.isUpdatePending;
918
+ }
919
+ scheduleUpdate() {
920
+ return this.performUpdate();
921
+ }
922
+ performUpdate() {
923
+ if (!this.isUpdatePending) return;
924
+ if (!this.hasUpdated) {
925
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
926
+ for (const [t, s] of this._$Ep) this[t] = s;
927
+ this._$Ep = void 0;
928
+ }
929
+ const t = this.constructor.elementProperties;
930
+ if (t.size > 0) for (const [s, i] of t) {
931
+ const { wrapped: t } = i, e = this[s];
932
+ !0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
933
+ }
934
+ }
935
+ let t = !1;
936
+ const s = this._$AL;
937
+ try {
938
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM();
939
+ } catch (s) {
940
+ throw t = !1, this._$EM(), s;
941
+ }
942
+ t && this._$AE(s);
943
+ }
944
+ willUpdate(t) {}
945
+ _$AE(t) {
946
+ this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
947
+ }
948
+ _$EM() {
949
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
950
+ }
951
+ get updateComplete() {
952
+ return this.getUpdateComplete();
953
+ }
954
+ getUpdateComplete() {
955
+ return this._$ES;
956
+ }
957
+ shouldUpdate(t) {
958
+ return !0;
959
+ }
960
+ update(t) {
961
+ this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
962
+ }
963
+ updated(t) {}
964
+ firstUpdated(t) {}
965
+ };
966
+ g$1.elementStyles = [], g$1.shadowRootOptions = { mode: "open" }, g$1[f$1("elementProperties")] = /* @__PURE__ */ new Map(), g$1[f$1("finalized")] = /* @__PURE__ */ new Map(), u$1?.({ ReactiveElement: g$1 }), (l$1.reactiveElementVersions ??= []).push("2.1.2");
967
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/property.js
968
+ /**
969
+ * @license
970
+ * Copyright 2017 Google LLC
971
+ * SPDX-License-Identifier: BSD-3-Clause
972
+ */ var o$1 = {
973
+ attribute: !0,
974
+ type: String,
975
+ converter: b$1,
976
+ reflect: !1,
977
+ hasChanged: m$1
978
+ };
979
+ var r$2 = (t = o$1, e, r) => {
980
+ const { kind: n, metadata: i } = r;
981
+ let s = globalThis.litPropertyMetadata.get(i);
982
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
983
+ const { name: o } = r;
984
+ return {
985
+ set(r) {
986
+ const n = e.get.call(this);
987
+ e.set.call(this, r), this.requestUpdate(o, n, t, !0, r);
988
+ },
989
+ init(e) {
990
+ return void 0 !== e && this.C(o, void 0, t, e), e;
991
+ }
992
+ };
993
+ }
994
+ if ("setter" === n) {
995
+ const { name: o } = r;
996
+ return function(r) {
997
+ const n = this[o];
998
+ e.call(this, r), this.requestUpdate(o, n, t, !0, r);
999
+ };
1000
+ }
1001
+ throw Error("Unsupported decorator location: " + n);
1002
+ };
1003
+ function n$1(t) {
1004
+ return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
1005
+ const r = e.hasOwnProperty(o);
1006
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
1007
+ })(t, e, o);
1008
+ }
1009
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/state.js
1010
+ /**
1011
+ * @license
1012
+ * Copyright 2017 Google LLC
1013
+ * SPDX-License-Identifier: BSD-3-Clause
1014
+ */ function r$1(r) {
1015
+ return n$1({
1016
+ ...r,
1017
+ state: !0,
1018
+ attribute: !1
1019
+ });
1020
+ }
1021
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/base.js
1022
+ /**
1023
+ * @license
1024
+ * Copyright 2017 Google LLC
1025
+ * SPDX-License-Identifier: BSD-3-Clause
1026
+ */
1027
+ var e$4 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
1028
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query.js
1029
+ /**
1030
+ * @license
1031
+ * Copyright 2017 Google LLC
1032
+ * SPDX-License-Identifier: BSD-3-Clause
1033
+ */ function e$3(e, r) {
1034
+ return (n, s, i) => {
1035
+ const o = (t) => t.renderRoot?.querySelector(e) ?? null;
1036
+ if (r) {
1037
+ const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => {
1038
+ const t = Symbol();
1039
+ return {
1040
+ get() {
1041
+ return this[t];
1042
+ },
1043
+ set(e) {
1044
+ this[t] = e;
1045
+ }
1046
+ };
1047
+ })();
1048
+ return e$4(n, s, { get() {
1049
+ let t = e.call(this);
1050
+ return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t;
1051
+ } });
1052
+ }
1053
+ return e$4(n, s, { get() {
1054
+ return o(this);
1055
+ } });
1056
+ };
1057
+ }
1058
+ // ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/lit-html.js
1059
+ /**
1060
+ * @license
1061
+ * Copyright 2017 Google LLC
1062
+ * SPDX-License-Identifier: BSD-3-Clause
1063
+ */
1064
+ var t$1 = globalThis;
1065
+ var i$2 = (t) => t;
1066
+ var s$1 = t$1.trustedTypes;
1067
+ var e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0;
1068
+ var h = "$lit$";
1069
+ var o = `lit$${Math.random().toFixed(9).slice(2)}$`;
1070
+ var n = "?" + o;
1071
+ var r = `<${n}>`;
1072
+ var l = void 0 === t$1.document ? { createTreeWalker: () => ({}) } : document;
1073
+ var c = () => l.createComment("");
1074
+ var a = (t) => null === t || "object" != typeof t && "function" != typeof t;
1075
+ var u = Array.isArray;
1076
+ var d = (t) => u(t) || "function" == typeof t?.[Symbol.iterator];
1077
+ var f = "[ \n\f\r]";
1078
+ var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
1079
+ var _ = /-->/g;
1080
+ var m = />/g;
1081
+ var p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g");
1082
+ var g = /'/g;
1083
+ var $ = /"/g;
1084
+ var y = /^(?:script|style|textarea|title)$/i;
1085
+ var x = (t) => (i, ...s) => ({
1086
+ _$litType$: t,
1087
+ strings: i,
1088
+ values: s
1089
+ });
1090
+ var T = x(1);
1091
+ var b = x(2);
1092
+ var w = x(3);
1093
+ var E = Symbol.for("lit-noChange");
1094
+ var A = Symbol.for("lit-nothing");
1095
+ var C = /* @__PURE__ */ new WeakMap();
1096
+ var P = l.createTreeWalker(l, 129);
1097
+ function V(t, i) {
1098
+ if (!u(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1099
+ return void 0 !== e$2 ? e$2.createHTML(i) : i;
1100
+ }
1101
+ var N = (t, i) => {
1102
+ const s = t.length - 1, e = [];
1103
+ let n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
1104
+ for (let i = 0; i < s; i++) {
1105
+ const s = t[i];
1106
+ let a, u, d = -1, f = 0;
1107
+ for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n ?? v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : "\"" === u[3] ? $ : g) : c === $ || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
1108
+ const x = c === p && t[i + 1].startsWith("/>") ? " " : "";
1109
+ l += c === v ? s + r : d >= 0 ? (e.push(a), s.slice(0, d) + h + s.slice(d) + o + x) : s + o + (-2 === d ? i : x);
1110
+ }
1111
+ return [V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
1112
+ };
1113
+ var S = class S {
1114
+ constructor({ strings: t, _$litType$: i }, e) {
1115
+ let r;
1116
+ this.parts = [];
1117
+ let l = 0, a = 0;
1118
+ const u = t.length - 1, d = this.parts, [f, v] = N(t, i);
1119
+ if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
1120
+ const t = this.el.content.firstChild;
1121
+ t.replaceWith(...t.childNodes);
1122
+ }
1123
+ for (; null !== (r = P.nextNode()) && d.length < u;) {
1124
+ if (1 === r.nodeType) {
1125
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h)) {
1126
+ const i = v[a++], s = r.getAttribute(t).split(o), e = /([.?@])?(.*)/.exec(i);
1127
+ d.push({
1128
+ type: 1,
1129
+ index: l,
1130
+ name: e[2],
1131
+ strings: s,
1132
+ ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H
1133
+ }), r.removeAttribute(t);
1134
+ } else t.startsWith(o) && (d.push({
1135
+ type: 6,
1136
+ index: l
1137
+ }), r.removeAttribute(t));
1138
+ if (y.test(r.tagName)) {
1139
+ const t = r.textContent.split(o), i = t.length - 1;
1140
+ if (i > 0) {
1141
+ r.textContent = s$1 ? s$1.emptyScript : "";
1142
+ for (let s = 0; s < i; s++) r.append(t[s], c()), P.nextNode(), d.push({
1143
+ type: 2,
1144
+ index: ++l
1145
+ });
1146
+ r.append(t[i], c());
1147
+ }
1148
+ }
1149
+ } else if (8 === r.nodeType) if (r.data === n) d.push({
1150
+ type: 2,
1151
+ index: l
1152
+ });
1153
+ else {
1154
+ let t = -1;
1155
+ for (; -1 !== (t = r.data.indexOf(o, t + 1));) d.push({
1156
+ type: 7,
1157
+ index: l
1158
+ }), t += o.length - 1;
1159
+ }
1160
+ l++;
1161
+ }
1162
+ }
1163
+ static createElement(t, i) {
1164
+ const s = l.createElement("template");
1165
+ return s.innerHTML = t, s;
1166
+ }
1167
+ };
1168
+ function M(t, i, s = t, e) {
1169
+ if (i === E) return i;
1170
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
1171
+ const o = a(i) ? void 0 : i._$litDirective$;
1172
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
1173
+ }
1174
+ var k = class {
1175
+ constructor(t, i) {
1176
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1177
+ }
1178
+ get parentNode() {
1179
+ return this._$AM.parentNode;
1180
+ }
1181
+ get _$AU() {
1182
+ return this._$AM._$AU;
1183
+ }
1184
+ u(t) {
1185
+ const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l).importNode(i, !0);
1186
+ P.currentNode = e;
1187
+ let h = P.nextNode(), o = 0, n = 0, r = s[0];
1188
+ for (; void 0 !== r;) {
1189
+ if (o === r.index) {
1190
+ let i;
1191
+ 2 === r.type ? i = new R(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new W(h, this, t)), this._$AV.push(i), r = s[++n];
1192
+ }
1193
+ o !== r?.index && (h = P.nextNode(), o++);
1194
+ }
1195
+ return P.currentNode = l, e;
1196
+ }
1197
+ p(t) {
1198
+ let i = 0;
1199
+ for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
1200
+ }
1201
+ };
1202
+ var R = class R {
1203
+ get _$AU() {
1204
+ return this._$AM?._$AU ?? this._$Cv;
1205
+ }
1206
+ constructor(t, i, s, e) {
1207
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
1208
+ }
1209
+ get parentNode() {
1210
+ let t = this._$AA.parentNode;
1211
+ const i = this._$AM;
1212
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
1213
+ }
1214
+ get startNode() {
1215
+ return this._$AA;
1216
+ }
1217
+ get endNode() {
1218
+ return this._$AB;
1219
+ }
1220
+ _$AI(t, i = this) {
1221
+ t = M(this, t, i), a(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d(t) ? this.k(t) : this._(t);
1222
+ }
1223
+ O(t) {
1224
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
1225
+ }
1226
+ T(t) {
1227
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
1228
+ }
1229
+ _(t) {
1230
+ this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l.createTextNode(t)), this._$AH = t;
1231
+ }
1232
+ $(t) {
1233
+ const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
1234
+ if (this._$AH?._$AD === e) this._$AH.p(i);
1235
+ else {
1236
+ const t = new k(e, this), s = t.u(this.options);
1237
+ t.p(i), this.T(s), this._$AH = t;
1238
+ }
1239
+ }
1240
+ _$AC(t) {
1241
+ let i = C.get(t.strings);
1242
+ return void 0 === i && C.set(t.strings, i = new S(t)), i;
1243
+ }
1244
+ k(t) {
1245
+ u(this._$AH) || (this._$AH = [], this._$AR());
1246
+ const i = this._$AH;
1247
+ let s, e = 0;
1248
+ for (const h of t) e === i.length ? i.push(s = new R(this.O(c()), this.O(c()), this, this.options)) : s = i[e], s._$AI(h), e++;
1249
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1250
+ }
1251
+ _$AR(t = this._$AA.nextSibling, s) {
1252
+ for (this._$AP?.(!1, !0, s); t !== this._$AB;) {
1253
+ const s = i$2(t).nextSibling;
1254
+ i$2(t).remove(), t = s;
1255
+ }
1256
+ }
1257
+ setConnected(t) {
1258
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
1259
+ }
1260
+ };
1261
+ var H = class {
1262
+ get tagName() {
1263
+ return this.element.tagName;
1264
+ }
1265
+ get _$AU() {
1266
+ return this._$AM._$AU;
1267
+ }
1268
+ constructor(t, i, s, e, h) {
1269
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A;
1270
+ }
1271
+ _$AI(t, i = this, s, e) {
1272
+ const h = this.strings;
1273
+ let o = !1;
1274
+ if (void 0 === h) t = M(this, t, i, 0), o = !a(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
1275
+ else {
1276
+ const e = t;
1277
+ let n, r;
1278
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = M(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
1279
+ }
1280
+ o && !e && this.j(t);
1281
+ }
1282
+ j(t) {
1283
+ t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1284
+ }
1285
+ };
1286
+ var I = class extends H {
1287
+ constructor() {
1288
+ super(...arguments), this.type = 3;
1289
+ }
1290
+ j(t) {
1291
+ this.element[this.name] = t === A ? void 0 : t;
1292
+ }
1293
+ };
1294
+ var L = class extends H {
1295
+ constructor() {
1296
+ super(...arguments), this.type = 4;
1297
+ }
1298
+ j(t) {
1299
+ this.element.toggleAttribute(this.name, !!t && t !== A);
1300
+ }
1301
+ };
1302
+ var z = class extends H {
1303
+ constructor(t, i, s, e, h) {
1304
+ super(t, i, s, e, h), this.type = 5;
1305
+ }
1306
+ _$AI(t, i = this) {
1307
+ if ((t = M(this, t, i, 0) ?? A) === E) return;
1308
+ const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
1309
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1310
+ }
1311
+ handleEvent(t) {
1312
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
1313
+ }
1314
+ };
1315
+ var W = class {
1316
+ constructor(t, i, s) {
1317
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1318
+ }
1319
+ get _$AU() {
1320
+ return this._$AM._$AU;
1321
+ }
1322
+ _$AI(t) {
1323
+ M(this, t);
1324
+ }
1325
+ };
1326
+ var Z = {
1327
+ M: h,
1328
+ P: o,
1329
+ A: n,
1330
+ C: 1,
1331
+ L: N,
1332
+ R: k,
1333
+ D: d,
1334
+ V: M,
1335
+ I: R,
1336
+ H,
1337
+ N: L,
1338
+ U: z,
1339
+ B: I,
1340
+ F: W
1341
+ };
1342
+ (0, t$1.litHtmlPolyfillSupport)?.(S, R), (t$1.litHtmlVersions ??= []).push("3.3.3");
1343
+ var B = (t, i, s) => {
1344
+ const e = s?.renderBefore ?? i;
1345
+ let h = e._$litPart$;
1346
+ if (void 0 === h) {
1347
+ const t = s?.renderBefore ?? null;
1348
+ e._$litPart$ = h = new R(i.insertBefore(c(), t), t, void 0, s ?? {});
1349
+ }
1350
+ return h._$AI(t), h;
1351
+ };
1352
+ // ../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js
1353
+ /**
1354
+ * @license
1355
+ * Copyright 2017 Google LLC
1356
+ * SPDX-License-Identifier: BSD-3-Clause
1357
+ */ var s = globalThis;
1358
+ var i$1 = class extends g$1 {
1359
+ constructor() {
1360
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1361
+ }
1362
+ createRenderRoot() {
1363
+ const t = super.createRenderRoot();
1364
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
1365
+ }
1366
+ update(t) {
1367
+ const r = this.render();
1368
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
1369
+ }
1370
+ connectedCallback() {
1371
+ super.connectedCallback(), this._$Do?.setConnected(!0);
1372
+ }
1373
+ disconnectedCallback() {
1374
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
1375
+ }
1376
+ render() {
1377
+ return E;
1378
+ }
1379
+ };
1380
+ i$1._$litElement$ = !0, i$1["finalized"] = !0, s.litElementHydrateSupport?.({ LitElement: i$1 });
1381
+ (0, s.litElementPolyfillSupport)?.({ LitElement: i$1 });
1382
+ (s.litElementVersions ??= []).push("4.2.2");
1383
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/controller/attachable-controller.js
1384
+ /**
1385
+ * @license
1386
+ * Copyright 2023 Google LLC
1387
+ * SPDX-License-Identifier: Apache-2.0
1388
+ */
1389
+ /**
1390
+ * A key to retrieve an `Attachable` element's `AttachableController` from a
1391
+ * global `MutationObserver`.
1392
+ */
1393
+ var ATTACHABLE_CONTROLLER = Symbol("attachableController");
1394
+ /**
1395
+ * A controller that provides an implementation for `Attachable` elements.
1396
+ *
1397
+ * @example
1398
+ * ```ts
1399
+ * class MyElement extends LitElement implements Attachable {
1400
+ * get control() { return this.attachableController.control; }
1401
+ *
1402
+ * private readonly attachableController = new AttachableController(
1403
+ * this,
1404
+ * (previousControl, newControl) => {
1405
+ * previousControl?.removeEventListener('click', this.handleClick);
1406
+ * newControl?.addEventListener('click', this.handleClick);
1407
+ * }
1408
+ * );
1409
+ *
1410
+ * // Implement remaining `Attachable` properties/methods that call the
1411
+ * // controller's properties/methods.
1412
+ * }
1413
+ * ```
1414
+ */
1415
+ var AttachableController = class {
1416
+ get htmlFor() {
1417
+ return this.host.getAttribute("for");
1418
+ }
1419
+ set htmlFor(htmlFor) {
1420
+ if (htmlFor === null) this.host.removeAttribute("for");
1421
+ else this.host.setAttribute("for", htmlFor);
1422
+ }
1423
+ get control() {
1424
+ if (this.host.hasAttribute("for")) {
1425
+ if (!this.htmlFor || !this.host.isConnected) return null;
1426
+ return this.host.getRootNode().querySelector(`#${this.htmlFor}`);
1427
+ }
1428
+ return this.currentControl || this.host.parentElement;
1429
+ }
1430
+ set control(control) {
1431
+ if (control) this.attach(control);
1432
+ else this.detach();
1433
+ }
1434
+ /**
1435
+ * Creates a new controller for an `Attachable` element.
1436
+ *
1437
+ * @param host The `Attachable` element.
1438
+ * @param onControlChange A callback with two parameters for the previous and
1439
+ * next control. An `Attachable` element may perform setup or teardown
1440
+ * logic whenever the control changes.
1441
+ */
1442
+ constructor(host, onControlChange) {
1443
+ this.host = host;
1444
+ this.onControlChange = onControlChange;
1445
+ this.currentControl = null;
1446
+ host.addController(this);
1447
+ host[ATTACHABLE_CONTROLLER] = this;
1448
+ }
1449
+ attach(control) {
1450
+ if (control === this.currentControl) return;
1451
+ this.setCurrentControl(control);
1452
+ this.host.removeAttribute("for");
1453
+ }
1454
+ detach() {
1455
+ this.setCurrentControl(null);
1456
+ this.host.setAttribute("for", "");
1457
+ }
1458
+ /** @private */
1459
+ hostConnected() {
1460
+ this.setCurrentControl(this.control);
1461
+ }
1462
+ /** @private */
1463
+ hostDisconnected() {
1464
+ this.setCurrentControl(null);
1465
+ }
1466
+ setCurrentControl(control) {
1467
+ this.onControlChange(this.currentControl, control);
1468
+ this.currentControl = control;
1469
+ }
1470
+ };
1471
+ /**
1472
+ * @license
1473
+ * Copyright 2021 Google LLC
1474
+ * SPDX-License-Identifier: Apache-2.0
1475
+ */
1476
+ /**
1477
+ * A focus ring component.
1478
+ *
1479
+ * @fires visibility-changed {Event} Fired whenever `visible` changes.
1480
+ */
1481
+ var FocusRing = class extends i$1 {
1482
+ constructor() {
1483
+ super(...arguments);
1484
+ /**
1485
+ * Makes the focus ring visible.
1486
+ */
1487
+ this.visible = false;
1488
+ /**
1489
+ * Makes the focus ring animate inwards instead of outwards.
1490
+ */
1491
+ this.inward = false;
1492
+ this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
1493
+ }
1494
+ get htmlFor() {
1495
+ return this.attachableController.htmlFor;
1496
+ }
1497
+ set htmlFor(htmlFor) {
1498
+ this.attachableController.htmlFor = htmlFor;
1499
+ }
1500
+ get control() {
1501
+ return this.attachableController.control;
1502
+ }
1503
+ set control(control) {
1504
+ this.attachableController.control = control;
1505
+ }
1506
+ attach(control) {
1507
+ this.attachableController.attach(control);
1508
+ }
1509
+ detach() {
1510
+ this.attachableController.detach();
1511
+ }
1512
+ connectedCallback() {
1513
+ super.connectedCallback();
1514
+ this.setAttribute("aria-hidden", "true");
1515
+ }
1516
+ /** @private */
1517
+ handleEvent(event) {
1518
+ if (event[HANDLED_BY_FOCUS_RING]) return;
1519
+ switch (event.type) {
1520
+ default: return;
1521
+ case "focusin":
1522
+ this.visible = this.control?.matches(":focus-visible") ?? false;
1523
+ break;
1524
+ case "focusout":
1525
+ case "pointerdown": this.visible = false;
1526
+ }
1527
+ event[HANDLED_BY_FOCUS_RING] = true;
1528
+ }
1529
+ onControlChange(prev, next) {}
1530
+ update(changed) {
1531
+ if (changed.has("visible")) this.dispatchEvent(new Event("visibility-changed"));
1532
+ super.update(changed);
1533
+ }
1534
+ };
1535
+ __decorate([n$1({
1536
+ type: Boolean,
1537
+ reflect: true
1538
+ })], FocusRing.prototype, "visible", void 0);
1539
+ __decorate([n$1({
1540
+ type: Boolean,
1541
+ reflect: true
1542
+ })], FocusRing.prototype, "inward", void 0);
1543
+ var HANDLED_BY_FOCUS_RING = Symbol("handledByFocusRing");
1544
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/internal/focus-ring-styles.cssresult.js
1545
+ /**
1546
+ * @license
1547
+ * Copyright 2026 Google LLC
1548
+ * SPDX-License-Identifier: Apache-2.0
1549
+ */
1550
+ var styles$1 = i$3`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
1551
+ `;
1552
+ styles$1.styleSheet;
1553
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/md-focus-ring.js
1554
+ /**
1555
+ * @license
1556
+ * Copyright 2021 Google LLC
1557
+ * SPDX-License-Identifier: Apache-2.0
1558
+ */
1559
+ /**
1560
+ * TODO(b/267336424): add docs
1561
+ *
1562
+ * @final
1563
+ * @suppress {visibility}
1564
+ */
1565
+ var MdFocusRing = class MdFocusRing extends FocusRing {};
1566
+ MdFocusRing.styles = [styles$1];
1567
+ MdFocusRing = __decorate([t$3("md-focus-ring")], MdFocusRing);
1568
+ // ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directive.js
1569
+ /**
1570
+ * @license
1571
+ * Copyright 2017 Google LLC
1572
+ * SPDX-License-Identifier: BSD-3-Clause
1573
+ */
1574
+ var t = {
1575
+ ATTRIBUTE: 1,
1576
+ CHILD: 2,
1577
+ PROPERTY: 3,
1578
+ BOOLEAN_ATTRIBUTE: 4,
1579
+ EVENT: 5,
1580
+ ELEMENT: 6
1581
+ };
1582
+ var e$1 = (t) => (...e) => ({
1583
+ _$litDirective$: t,
1584
+ values: e
1585
+ });
1586
+ var i = class {
1587
+ constructor(t) {}
1588
+ get _$AU() {
1589
+ return this._$AM._$AU;
1590
+ }
1591
+ _$AT(t, e, i) {
1592
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
1593
+ }
1594
+ _$AS(t, e) {
1595
+ return this.update(t, e);
1596
+ }
1597
+ update(t, e) {
1598
+ return this.render(...e);
1599
+ }
1600
+ };
1601
+ // ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directives/class-map.js
1602
+ /**
1603
+ * @license
1604
+ * Copyright 2018 Google LLC
1605
+ * SPDX-License-Identifier: BSD-3-Clause
1606
+ */ var e = e$1(class extends i {
1607
+ constructor(t$4) {
1608
+ if (super(t$4), t$4.type !== t.ATTRIBUTE || "class" !== t$4.name || t$4.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1609
+ }
1610
+ render(t) {
1611
+ return " " + Object.keys(t).filter((s) => t[s]).join(" ") + " ";
1612
+ }
1613
+ update(s, [i]) {
1614
+ if (void 0 === this.st) {
1615
+ this.st = /* @__PURE__ */ new Set(), void 0 !== s.strings && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((t) => "" !== t)));
1616
+ for (const t in i) i[t] && !this.nt?.has(t) && this.st.add(t);
1617
+ return this.render(i);
1618
+ }
1619
+ const r = s.element.classList;
1620
+ for (const t of this.st) t in i || (r.remove(t), this.st.delete(t));
1621
+ for (const t in i) {
1622
+ const s = !!i[t];
1623
+ s === this.st.has(t) || this.nt?.has(t) || (s ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t)));
1624
+ }
1625
+ return E;
1626
+ }
1627
+ });
1628
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/motion/animation.js
1629
+ /**
1630
+ * @license
1631
+ * Copyright 2021 Google LLC
1632
+ * SPDX-License-Identifier: Apache-2.0
1633
+ */
1634
+ /**
1635
+ * Easing functions to use for web animations.
1636
+ *
1637
+ * **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy.
1638
+ *
1639
+ * TODO(b/241113345): replace with tokens
1640
+ */
1641
+ var EASING = {
1642
+ STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
1643
+ STANDARD_ACCELERATE: "cubic-bezier(.3,0,1,1)",
1644
+ STANDARD_DECELERATE: "cubic-bezier(0,0,0,1)",
1645
+ EMPHASIZED: "cubic-bezier(.3,0,0,1)",
1646
+ EMPHASIZED_ACCELERATE: "cubic-bezier(.3,0,.8,.15)",
1647
+ EMPHASIZED_DECELERATE: "cubic-bezier(.05,.7,.1,1)"
1648
+ };
1649
+ /**
1650
+ * Creates an `AnimationSignal` that can be used to cancel a previous task.
1651
+ *
1652
+ * @example
1653
+ * class MyClass {
1654
+ * private labelAnimationSignal = createAnimationSignal();
1655
+ *
1656
+ * private async animateLabel() {
1657
+ * // Start of the task. Previous tasks will be canceled.
1658
+ * const signal = this.labelAnimationSignal.start();
1659
+ *
1660
+ * // Do async work...
1661
+ * if (signal.aborted) {
1662
+ * // Use AbortSignal to check if a request was made to abort after some
1663
+ * // asynchronous work.
1664
+ * return;
1665
+ * }
1666
+ *
1667
+ * const animation = this.animate(...);
1668
+ * // Add event listeners to be notified when the task should be canceled.
1669
+ * signal.addEventListener('abort', () => {
1670
+ * animation.cancel();
1671
+ * });
1672
+ *
1673
+ * animation.addEventListener('finish', () => {
1674
+ * // Tell the signal that the current task is finished.
1675
+ * this.labelAnimationSignal.finish();
1676
+ * });
1677
+ * }
1678
+ * }
1679
+ *
1680
+ * @return An `AnimationSignal`.
1681
+ */
1682
+ function createAnimationSignal() {
1683
+ let animationAbortController = null;
1684
+ return {
1685
+ start() {
1686
+ animationAbortController?.abort();
1687
+ animationAbortController = new AbortController();
1688
+ return animationAbortController.signal;
1689
+ },
1690
+ finish() {
1691
+ animationAbortController = null;
1692
+ }
1693
+ };
1694
+ }
1695
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple.js
1696
+ /**
1697
+ * @license
1698
+ * Copyright 2022 Google LLC
1699
+ * SPDX-License-Identifier: Apache-2.0
1700
+ */
1701
+ var PRESS_GROW_MS = 450;
1702
+ var MINIMUM_PRESS_MS = 225;
1703
+ var INITIAL_ORIGIN_SCALE = .2;
1704
+ var PADDING = 10;
1705
+ var SOFT_EDGE_MINIMUM_SIZE = 75;
1706
+ var SOFT_EDGE_CONTAINER_RATIO = .35;
1707
+ var PRESS_PSEUDO = "::after";
1708
+ var ANIMATION_FILL = "forwards";
1709
+ /**
1710
+ * Interaction states for the ripple.
1711
+ *
1712
+ * On Touch:
1713
+ * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
1714
+ * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
1715
+ *
1716
+ * On Mouse or Pen:
1717
+ * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
1718
+ */
1719
+ var State;
1720
+ (function(State) {
1721
+ /**
1722
+ * Initial state of the control, no touch in progress.
1723
+ *
1724
+ * Transitions:
1725
+ * - on touch down: transition to `TOUCH_DELAY`.
1726
+ * - on mouse down: transition to `WAITING_FOR_CLICK`.
1727
+ */
1728
+ State[State["INACTIVE"] = 0] = "INACTIVE";
1729
+ /**
1730
+ * Touch down has been received, waiting to determine if it's a swipe or
1731
+ * scroll.
1732
+ *
1733
+ * Transitions:
1734
+ * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
1735
+ * - on cancel: transition to `INACTIVE`.
1736
+ * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
1737
+ */
1738
+ State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
1739
+ /**
1740
+ * A touch has been deemed to be a press
1741
+ *
1742
+ * Transitions:
1743
+ * - on up: transition to `WAITING_FOR_CLICK`.
1744
+ */
1745
+ State[State["HOLDING"] = 2] = "HOLDING";
1746
+ /**
1747
+ * The user touch has finished, transition into rest state.
1748
+ *
1749
+ * Transitions:
1750
+ * - on click end press; transition to `INACTIVE`.
1751
+ */
1752
+ State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
1753
+ })(State || (State = {}));
1754
+ /**
1755
+ * Delay reacting to touch so that we do not show the ripple for a swipe or
1756
+ * scroll interaction.
1757
+ */
1758
+ var TOUCH_DELAY_MS = 150;
1759
+ /**
1760
+ * Used to detect if HCM is active. Events do not process during HCM when the
1761
+ * ripple is not displayed.
1762
+ */
1763
+ var FORCED_COLORS = null;
1764
+ /**
1765
+ * A ripple component.
1766
+ */
1767
+ var Ripple = class extends i$1 {
1768
+ constructor() {
1769
+ super(...arguments);
1770
+ /**
1771
+ * Disables the ripple.
1772
+ */
1773
+ this.disabled = false;
1774
+ this.hovered = false;
1775
+ this.pressed = false;
1776
+ this.rippleSize = "";
1777
+ this.rippleScale = "";
1778
+ this.initialSize = 0;
1779
+ this.state = State.INACTIVE;
1780
+ this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
1781
+ }
1782
+ get htmlFor() {
1783
+ return this.attachableController.htmlFor;
1784
+ }
1785
+ set htmlFor(htmlFor) {
1786
+ this.attachableController.htmlFor = htmlFor;
1787
+ }
1788
+ get control() {
1789
+ return this.attachableController.control;
1790
+ }
1791
+ set control(control) {
1792
+ this.attachableController.control = control;
1793
+ }
1794
+ attach(control) {
1795
+ this.attachableController.attach(control);
1796
+ }
1797
+ detach() {
1798
+ this.attachableController.detach();
1799
+ }
1800
+ connectedCallback() {
1801
+ super.connectedCallback();
1802
+ this.setAttribute("aria-hidden", "true");
1803
+ }
1804
+ render() {
1805
+ return T`<div class="surface ${e({
1806
+ "hovered": this.hovered,
1807
+ "pressed": this.pressed
1808
+ })}"></div>`;
1809
+ }
1810
+ update(changedProps) {
1811
+ if (changedProps.has("disabled") && this.disabled) {
1812
+ this.hovered = false;
1813
+ this.pressed = false;
1814
+ }
1815
+ super.update(changedProps);
1816
+ }
1817
+ /**
1818
+ * TODO(b/269799771): make private
1819
+ * @private only public for slider
1820
+ */
1821
+ handlePointerenter(event) {
1822
+ if (!this.shouldReactToEvent(event)) return;
1823
+ this.hovered = true;
1824
+ }
1825
+ /**
1826
+ * TODO(b/269799771): make private
1827
+ * @private only public for slider
1828
+ */
1829
+ handlePointerleave(event) {
1830
+ if (!this.shouldReactToEvent(event)) return;
1831
+ this.hovered = false;
1832
+ if (this.state !== State.INACTIVE) this.endPressAnimation();
1833
+ }
1834
+ handlePointerup(event) {
1835
+ if (!this.shouldReactToEvent(event)) return;
1836
+ if (this.state === State.HOLDING) {
1837
+ this.state = State.WAITING_FOR_CLICK;
1838
+ return;
1839
+ }
1840
+ if (this.state === State.TOUCH_DELAY) {
1841
+ this.state = State.WAITING_FOR_CLICK;
1842
+ this.startPressAnimation(this.rippleStartEvent);
1843
+ return;
1844
+ }
1845
+ }
1846
+ async handlePointerdown(event) {
1847
+ if (!this.shouldReactToEvent(event)) return;
1848
+ this.rippleStartEvent = event;
1849
+ if (!this.isTouch(event)) {
1850
+ this.state = State.WAITING_FOR_CLICK;
1851
+ this.startPressAnimation(event);
1852
+ return;
1853
+ }
1854
+ this.state = State.TOUCH_DELAY;
1855
+ await new Promise((resolve) => {
1856
+ setTimeout(resolve, TOUCH_DELAY_MS);
1857
+ });
1858
+ if (this.state !== State.TOUCH_DELAY) return;
1859
+ this.state = State.HOLDING;
1860
+ this.startPressAnimation(event);
1861
+ }
1862
+ handleClick() {
1863
+ if (this.disabled) return;
1864
+ if (this.state === State.WAITING_FOR_CLICK) {
1865
+ this.endPressAnimation();
1866
+ return;
1867
+ }
1868
+ if (this.state === State.INACTIVE) {
1869
+ this.startPressAnimation();
1870
+ this.endPressAnimation();
1871
+ }
1872
+ }
1873
+ handlePointercancel(event) {
1874
+ if (!this.shouldReactToEvent(event)) return;
1875
+ this.endPressAnimation();
1876
+ }
1877
+ handleContextmenu() {
1878
+ if (this.disabled) return;
1879
+ this.endPressAnimation();
1880
+ }
1881
+ determineRippleSize() {
1882
+ const { height, width } = this.getBoundingClientRect();
1883
+ const maxDim = Math.max(height, width);
1884
+ const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
1885
+ const zoom = this.currentCSSZoom ?? 1;
1886
+ const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE / zoom);
1887
+ const maxRadius = Math.sqrt(width ** 2 + height ** 2) + PADDING;
1888
+ this.initialSize = initialSize;
1889
+ const maybeZoomedScale = (maxRadius + softEdgeSize) / initialSize;
1890
+ this.rippleScale = `${maybeZoomedScale / zoom}`;
1891
+ this.rippleSize = `${initialSize}px`;
1892
+ }
1893
+ getNormalizedPointerEventCoords(pointerEvent) {
1894
+ const { scrollX, scrollY } = window;
1895
+ const { left, top } = this.getBoundingClientRect();
1896
+ const documentX = scrollX + left;
1897
+ const documentY = scrollY + top;
1898
+ const { pageX, pageY } = pointerEvent;
1899
+ const zoom = this.currentCSSZoom ?? 1;
1900
+ return {
1901
+ x: (pageX - documentX) / zoom,
1902
+ y: (pageY - documentY) / zoom
1903
+ };
1904
+ }
1905
+ getTranslationCoordinates(positionEvent) {
1906
+ const { height, width } = this.getBoundingClientRect();
1907
+ const zoom = this.currentCSSZoom ?? 1;
1908
+ const endPoint = {
1909
+ x: (width / zoom - this.initialSize) / 2,
1910
+ y: (height / zoom - this.initialSize) / 2
1911
+ };
1912
+ let startPoint;
1913
+ if (positionEvent instanceof PointerEvent) startPoint = this.getNormalizedPointerEventCoords(positionEvent);
1914
+ else startPoint = {
1915
+ x: width / zoom / 2,
1916
+ y: height / zoom / 2
1917
+ };
1918
+ startPoint = {
1919
+ x: startPoint.x - this.initialSize / 2,
1920
+ y: startPoint.y - this.initialSize / 2
1921
+ };
1922
+ return {
1923
+ startPoint,
1924
+ endPoint
1925
+ };
1926
+ }
1927
+ startPressAnimation(positionEvent) {
1928
+ if (!this.mdRoot) return;
1929
+ this.pressed = true;
1930
+ this.growAnimation?.cancel();
1931
+ this.determineRippleSize();
1932
+ const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
1933
+ const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
1934
+ const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
1935
+ this.growAnimation = this.mdRoot.animate({
1936
+ top: [0, 0],
1937
+ left: [0, 0],
1938
+ height: [this.rippleSize, this.rippleSize],
1939
+ width: [this.rippleSize, this.rippleSize],
1940
+ transform: [`translate(${translateStart}) scale(1)`, `translate(${translateEnd}) scale(${this.rippleScale})`]
1941
+ }, {
1942
+ pseudoElement: PRESS_PSEUDO,
1943
+ duration: PRESS_GROW_MS,
1944
+ easing: EASING.STANDARD,
1945
+ fill: ANIMATION_FILL
1946
+ });
1947
+ }
1948
+ async endPressAnimation() {
1949
+ this.rippleStartEvent = void 0;
1950
+ this.state = State.INACTIVE;
1951
+ const animation = this.growAnimation;
1952
+ let pressAnimationPlayState = 1e400;
1953
+ if (typeof animation?.currentTime === "number") pressAnimationPlayState = animation.currentTime;
1954
+ else if (animation?.currentTime) pressAnimationPlayState = animation.currentTime.to("ms").value;
1955
+ if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
1956
+ this.pressed = false;
1957
+ return;
1958
+ }
1959
+ await new Promise((resolve) => {
1960
+ setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);
1961
+ });
1962
+ if (this.growAnimation !== animation) return;
1963
+ this.pressed = false;
1964
+ }
1965
+ /**
1966
+ * Returns `true` if
1967
+ * - the ripple element is enabled
1968
+ * - the pointer is primary for the input type
1969
+ * - the pointer is the pointer that started the interaction, or will start
1970
+ * the interaction
1971
+ * - the pointer is a touch, or the pointer state has the primary button
1972
+ * held, or the pointer is hovering
1973
+ */
1974
+ shouldReactToEvent(event) {
1975
+ if (this.disabled || !event.isPrimary) return false;
1976
+ if (this.rippleStartEvent && this.rippleStartEvent.pointerId !== event.pointerId) return false;
1977
+ if (event.type === "pointerenter" || event.type === "pointerleave") return !this.isTouch(event);
1978
+ const isPrimaryButton = event.buttons === 1;
1979
+ return this.isTouch(event) || isPrimaryButton;
1980
+ }
1981
+ isTouch({ pointerType }) {
1982
+ return pointerType === "touch";
1983
+ }
1984
+ /** @private */
1985
+ async handleEvent(event) {
1986
+ if (FORCED_COLORS?.matches) return;
1987
+ switch (event.type) {
1988
+ case "click":
1989
+ this.handleClick();
1990
+ break;
1991
+ case "contextmenu":
1992
+ this.handleContextmenu();
1993
+ break;
1994
+ case "pointercancel":
1995
+ this.handlePointercancel(event);
1996
+ break;
1997
+ case "pointerdown":
1998
+ await this.handlePointerdown(event);
1999
+ break;
2000
+ case "pointerenter":
2001
+ this.handlePointerenter(event);
2002
+ break;
2003
+ case "pointerleave":
2004
+ this.handlePointerleave(event);
2005
+ break;
2006
+ case "pointerup": this.handlePointerup(event);
2007
+ }
2008
+ }
2009
+ onControlChange(prev, next) {}
2010
+ };
2011
+ __decorate([n$1({
2012
+ type: Boolean,
2013
+ reflect: true
2014
+ })], Ripple.prototype, "disabled", void 0);
2015
+ __decorate([r$1()], Ripple.prototype, "hovered", void 0);
2016
+ __decorate([r$1()], Ripple.prototype, "pressed", void 0);
2017
+ __decorate([e$3(".surface")], Ripple.prototype, "mdRoot", void 0);
2018
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple-styles.cssresult.js
2019
+ /**
2020
+ * @license
2021
+ * Copyright 2026 Google LLC
2022
+ * SPDX-License-Identifier: Apache-2.0
2023
+ */
2024
+ var styles = i$3`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
2025
+ `;
2026
+ styles.styleSheet;
2027
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/ripple.js
2028
+ /**
2029
+ * @license
2030
+ * Copyright 2022 Google LLC
2031
+ * SPDX-License-Identifier: Apache-2.0
2032
+ */
2033
+ /**
2034
+ * @summary Ripples, also known as state layers, are visual indicators used to
2035
+ * communicate the status of a component or interactive element.
2036
+ *
2037
+ * @description A state layer is a semi-transparent covering on an element that
2038
+ * indicates its state. State layers provide a systematic approach to
2039
+ * visualizing states by using opacity. A layer can be applied to an entire
2040
+ * element or in a circular shape and only one state layer can be applied at a
2041
+ * given time.
2042
+ *
2043
+ * @final
2044
+ * @suppress {visibility}
2045
+ */
2046
+ var MdRipple = class MdRipple extends Ripple {};
2047
+ MdRipple.styles = [styles];
2048
+ MdRipple = __decorate([t$3("md-ripple")], MdRipple);
2049
+ /**
2050
+ * @license
2051
+ * Copyright 2023 Google LLC
2052
+ * SPDX-License-Identifier: Apache-2.0
2053
+ */
2054
+ [
2055
+ "role",
2056
+ "ariaAtomic",
2057
+ "ariaAutoComplete",
2058
+ "ariaBusy",
2059
+ "ariaChecked",
2060
+ "ariaColCount",
2061
+ "ariaColIndex",
2062
+ "ariaColSpan",
2063
+ "ariaCurrent",
2064
+ "ariaDisabled",
2065
+ "ariaExpanded",
2066
+ "ariaHasPopup",
2067
+ "ariaHidden",
2068
+ "ariaInvalid",
2069
+ "ariaKeyShortcuts",
2070
+ "ariaLabel",
2071
+ "ariaLevel",
2072
+ "ariaLive",
2073
+ "ariaModal",
2074
+ "ariaMultiLine",
2075
+ "ariaMultiSelectable",
2076
+ "ariaOrientation",
2077
+ "ariaPlaceholder",
2078
+ "ariaPosInSet",
2079
+ "ariaPressed",
2080
+ "ariaReadOnly",
2081
+ "ariaRequired",
2082
+ "ariaRoleDescription",
2083
+ "ariaRowCount",
2084
+ "ariaRowIndex",
2085
+ "ariaRowSpan",
2086
+ "ariaSelected",
2087
+ "ariaSetSize",
2088
+ "ariaSort",
2089
+ "ariaValueMax",
2090
+ "ariaValueMin",
2091
+ "ariaValueNow",
2092
+ "ariaValueText"
2093
+ ].map(ariaPropertyToAttribute);
2094
+ /**
2095
+ * Converts an AOM aria property into its corresponding attribute.
2096
+ *
2097
+ * @example
2098
+ * ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
2099
+ *
2100
+ * @param property The aria property.
2101
+ * @return The aria attribute.
2102
+ */
2103
+ function ariaPropertyToAttribute(property) {
2104
+ return property.replace("aria", "aria-").replace(/Elements?/g, "").toLowerCase();
2105
+ }
2106
+ /**
2107
+ * @license
2108
+ * Copyright 2023 Google LLC
2109
+ * SPDX-License-Identifier: Apache-2.0
2110
+ */
2111
+ /**
2112
+ * Mixes in aria delegation for elements that delegate focus and aria to inner
2113
+ * shadow root elements.
2114
+ *
2115
+ * This mixin fixes invalid aria announcements with shadow roots, caused by
2116
+ * duplicate aria attributes on both the host and the inner shadow root element.
2117
+ *
2118
+ * Note: this mixin **does not yet support** ID reference attributes, such as
2119
+ * `aria-labelledby` or `aria-controls`.
2120
+ *
2121
+ * @example
2122
+ * ```ts
2123
+ * class MyButton extends mixinDelegatesAria(LitElement) {
2124
+ * static shadowRootOptions = {mode: 'open', delegatesFocus: true};
2125
+ *
2126
+ * render() {
2127
+ * return html`
2128
+ * <button aria-label=${this.ariaLabel || nothing}>
2129
+ * <slot></slot>
2130
+ * </button>
2131
+ * `;
2132
+ * }
2133
+ * }
2134
+ * ```
2135
+ * ```html
2136
+ * <my-button aria-label="Plus one">+1</my-button>
2137
+ * ```
2138
+ *
2139
+ * Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
2140
+ * attribute.
2141
+ *
2142
+ * @example
2143
+ * ```ts
2144
+ * return html`
2145
+ * <button role=${(this as ARIAMixinStrict).role || nothing}>
2146
+ * <slot></slot>
2147
+ * </button>
2148
+ * `;
2149
+ * ```
2150
+ *
2151
+ * In the future, updates to the Accessibility Object Model (AOM) will provide
2152
+ * built-in aria delegation features that will replace this mixin.
2153
+ *
2154
+ * @param base The class to mix functionality into.
2155
+ * @return The provided class with aria delegation mixed in.
2156
+ */
2157
+ function mixinDelegatesAria(base) {
2158
+ return base;
2159
+ }
2160
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/dispatch-hooks.js
2161
+ /**
2162
+ * @license
2163
+ * Copyright 2023 Google LLC
2164
+ * SPDX-License-Identifier: Apache-2.0
2165
+ */
2166
+ /**
2167
+ * A symbol used to access dispatch hooks on an event.
2168
+ */
2169
+ var dispatchHooks = Symbol("dispatchHooks");
2170
+ /**
2171
+ * Add a hook for an event that is called after the event is dispatched and
2172
+ * propagates to other event listeners.
2173
+ *
2174
+ * This is useful for behaviors that need to check if an event is canceled.
2175
+ *
2176
+ * The callback is invoked synchronously, which allows for better integration
2177
+ * with synchronous platform APIs (like `<form>` or `<label>` clicking).
2178
+ *
2179
+ * Note: `setupDispatchHooks()` must be called on the element before adding any
2180
+ * other event listeners. Call it in the constructor of an element or
2181
+ * controller.
2182
+ *
2183
+ * @example
2184
+ * ```ts
2185
+ * class MyControl extends LitElement {
2186
+ * constructor() {
2187
+ * super();
2188
+ * setupDispatchHooks(this, 'click');
2189
+ * this.addEventListener('click', event => {
2190
+ * afterDispatch(event, () => {
2191
+ * if (event.defaultPrevented) {
2192
+ * return
2193
+ * }
2194
+ *
2195
+ * // ... perform logic
2196
+ * });
2197
+ * });
2198
+ * }
2199
+ * }
2200
+ * ```
2201
+ *
2202
+ * @example
2203
+ * ```ts
2204
+ * class MyController implements ReactiveController {
2205
+ * constructor(host: ReactiveElement) {
2206
+ * // setupDispatchHooks() may be called multiple times for the same
2207
+ * // element and events, making it safe for multiple controllers to use it.
2208
+ * setupDispatchHooks(host, 'click');
2209
+ * host.addEventListener('click', event => {
2210
+ * afterDispatch(event, () => {
2211
+ * if (event.defaultPrevented) {
2212
+ * return;
2213
+ * }
2214
+ *
2215
+ * // ... perform logic
2216
+ * });
2217
+ * });
2218
+ * }
2219
+ * }
2220
+ * ```
2221
+ *
2222
+ * @param event The event to add a hook to.
2223
+ * @param callback A hook that is called after the event finishes dispatching.
2224
+ */
2225
+ function afterDispatch(event, callback) {
2226
+ const hooks = event[dispatchHooks];
2227
+ if (!hooks) throw new Error(`'${event.type}' event needs setupDispatchHooks().`);
2228
+ hooks.addEventListener("after", callback, { once: true });
2229
+ }
2230
+ /**
2231
+ * A lookup map of elements and event types that have a dispatch hook listener
2232
+ * set up. Used to ensure we don't set up multiple hook listeners on the same
2233
+ * element for the same event.
2234
+ */
2235
+ var ELEMENT_DISPATCH_HOOK_TYPES = /* @__PURE__ */ new WeakMap();
2236
+ /**
2237
+ * Sets up an element to add dispatch hooks to given event types. This must be
2238
+ * called before adding any event listeners that need to use dispatch hooks
2239
+ * like `afterDispatch()`.
2240
+ *
2241
+ * This function is safe to call multiple times with the same element or event
2242
+ * types. Call it in the constructor of elements, mixins, and controllers to
2243
+ * ensure it is set up before external listeners.
2244
+ *
2245
+ * @example
2246
+ * ```ts
2247
+ * class MyControl extends LitElement {
2248
+ * constructor() {
2249
+ * super();
2250
+ * setupDispatchHooks(this, 'click');
2251
+ * this.addEventListener('click', this.listenerUsingAfterDispatch);
2252
+ * }
2253
+ * }
2254
+ * ```
2255
+ *
2256
+ * @param element The element to set up event dispatch hooks for.
2257
+ * @param eventTypes The event types to add dispatch hooks to.
2258
+ */
2259
+ function setupDispatchHooks(element, ...eventTypes) {
2260
+ let typesAlreadySetUp = ELEMENT_DISPATCH_HOOK_TYPES.get(element);
2261
+ if (!typesAlreadySetUp) {
2262
+ typesAlreadySetUp = /* @__PURE__ */ new Set();
2263
+ ELEMENT_DISPATCH_HOOK_TYPES.set(element, typesAlreadySetUp);
2264
+ }
2265
+ for (const eventType of eventTypes) {
2266
+ if (typesAlreadySetUp.has(eventType)) continue;
2267
+ element.addEventListener(eventType, (event) => {
2268
+ const hooks = new EventTarget();
2269
+ event[dispatchHooks] = hooks;
2270
+ const cleanupLastNodeListener = new AbortController();
2271
+ const callAfterDispatch = () => {
2272
+ cleanupLastNodeListener.abort();
2273
+ hooks.dispatchEvent(new Event("after"));
2274
+ };
2275
+ const patchStopPropagation = (superMethod) => {
2276
+ return function() {
2277
+ superMethod.call(this);
2278
+ callAfterDispatch();
2279
+ };
2280
+ };
2281
+ event.stopPropagation = patchStopPropagation(event.stopPropagation);
2282
+ event.stopImmediatePropagation = patchStopPropagation(event.stopImmediatePropagation);
2283
+ const composedPath = event.composedPath();
2284
+ let lastNodeForEvent;
2285
+ if (event.composed && event.bubbles) lastNodeForEvent = composedPath[composedPath.length - 1];
2286
+ else if (!event.bubbles) lastNodeForEvent = composedPath[0];
2287
+ else lastNodeForEvent = composedPath[0].getRootNode();
2288
+ lastNodeForEvent.addEventListener(eventType, () => {
2289
+ callAfterDispatch();
2290
+ }, {
2291
+ once: true,
2292
+ signal: cleanupLastNodeListener.signal
2293
+ });
2294
+ }, { capture: true });
2295
+ typesAlreadySetUp.add(eventType);
2296
+ }
2297
+ }
2298
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/element-internals.js
2299
+ /**
2300
+ * @license
2301
+ * Copyright 2023 Google LLC
2302
+ * SPDX-License-Identifier: Apache-2.0
2303
+ */
2304
+ /**
2305
+ * A unique symbol used for protected access to an instance's
2306
+ * `ElementInternals`.
2307
+ *
2308
+ * @example
2309
+ * ```ts
2310
+ * class MyElement extends mixinElementInternals(LitElement) {
2311
+ * constructor() {
2312
+ * super();
2313
+ * this[internals].role = 'button';
2314
+ * }
2315
+ * }
2316
+ * ```
2317
+ */
2318
+ var internals = Symbol("internals");
2319
+ var privateInternals = Symbol("privateInternals");
2320
+ /**
2321
+ * Mixes in an attached `ElementInternals` instance.
2322
+ *
2323
+ * This mixin is only needed when other shared code needs access to a
2324
+ * component's `ElementInternals`, such as form-associated mixins.
2325
+ *
2326
+ * @param base The class to mix functionality into.
2327
+ * @return The provided class with `WithElementInternals` mixed in.
2328
+ */
2329
+ function mixinElementInternals(base) {
2330
+ class WithElementInternalsElement extends base {
2331
+ get [internals]() {
2332
+ if (!this[privateInternals]) this[privateInternals] = this.attachInternals();
2333
+ return this[privateInternals];
2334
+ }
2335
+ }
2336
+ return WithElementInternalsElement;
2337
+ }
2338
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-associated.js
2339
+ /**
2340
+ * @license
2341
+ * Copyright 2023 Google LLC
2342
+ * SPDX-License-Identifier: Apache-2.0
2343
+ */
2344
+ /**
2345
+ * A symbol property to retrieve the form value for an element.
2346
+ */
2347
+ var getFormValue = Symbol("getFormValue");
2348
+ /**
2349
+ * A symbol property to retrieve the form state for an element.
2350
+ */
2351
+ var getFormState = Symbol("getFormState");
2352
+ /**
2353
+ * Mixes in form-associated behavior for a class. This allows an element to add
2354
+ * values to `<form>` elements.
2355
+ *
2356
+ * Implementing classes should provide a `[formValue]` to return the current
2357
+ * value of the element, as well as reset and restore callbacks.
2358
+ *
2359
+ * @example
2360
+ * ```ts
2361
+ * const base = mixinFormAssociated(mixinElementInternals(LitElement));
2362
+ *
2363
+ * class MyControl extends base {
2364
+ * \@property()
2365
+ * value = '';
2366
+ *
2367
+ * override [getFormValue]() {
2368
+ * return this.value;
2369
+ * }
2370
+ *
2371
+ * override formResetCallback() {
2372
+ * const defaultValue = this.getAttribute('value');
2373
+ * this.value = defaultValue;
2374
+ * }
2375
+ *
2376
+ * override formStateRestoreCallback(state: string) {
2377
+ * this.value = state;
2378
+ * }
2379
+ * }
2380
+ * ```
2381
+ *
2382
+ * Elements may optionally provide a `[formState]` if their values do not
2383
+ * represent the state of the component.
2384
+ *
2385
+ * @example
2386
+ * ```ts
2387
+ * const base = mixinFormAssociated(mixinElementInternals(LitElement));
2388
+ *
2389
+ * class MyCheckbox extends base {
2390
+ * \@property()
2391
+ * value = 'on';
2392
+ *
2393
+ * \@property({type: Boolean})
2394
+ * checked = false;
2395
+ *
2396
+ * override [getFormValue]() {
2397
+ * return this.checked ? this.value : null;
2398
+ * }
2399
+ *
2400
+ * override [getFormState]() {
2401
+ * return String(this.checked);
2402
+ * }
2403
+ *
2404
+ * override formResetCallback() {
2405
+ * const defaultValue = this.hasAttribute('checked');
2406
+ * this.checked = defaultValue;
2407
+ * }
2408
+ *
2409
+ * override formStateRestoreCallback(state: string) {
2410
+ * this.checked = Boolean(state);
2411
+ * }
2412
+ * }
2413
+ * ```
2414
+ *
2415
+ * @param base The class to mix functionality into. The base class must use
2416
+ * `mixinElementInternals()`.
2417
+ * @return The provided class with `FormAssociated` mixed in.
2418
+ */
2419
+ function mixinFormAssociated(base) {
2420
+ class FormAssociatedElement extends base {
2421
+ get form() {
2422
+ return this[internals].form;
2423
+ }
2424
+ get labels() {
2425
+ return this[internals].labels;
2426
+ }
2427
+ get name() {
2428
+ return this.getAttribute("name") ?? "";
2429
+ }
2430
+ set name(name) {
2431
+ this.setAttribute("name", name);
2432
+ }
2433
+ get disabled() {
2434
+ return this.hasAttribute("disabled");
2435
+ }
2436
+ set disabled(disabled) {
2437
+ this.toggleAttribute("disabled", Boolean(disabled));
2438
+ }
2439
+ attributeChangedCallback(name, old, value) {
2440
+ if (name === "name" || name === "disabled") {
2441
+ const oldValue = name === "disabled" ? old !== null : old;
2442
+ this.requestUpdate(name, oldValue);
2443
+ return;
2444
+ }
2445
+ super.attributeChangedCallback(name, old, value);
2446
+ }
2447
+ requestUpdate(name, oldValue, options) {
2448
+ super.requestUpdate(name, oldValue, options);
2449
+ this[internals].setFormValue(this[getFormValue](), this[getFormState]());
2450
+ }
2451
+ [getFormValue]() {
2452
+ return this.getAttribute("value");
2453
+ }
2454
+ [getFormState]() {
2455
+ return this[getFormValue]();
2456
+ }
2457
+ formDisabledCallback(disabled) {
2458
+ this.disabled = disabled;
2459
+ }
2460
+ }
2461
+ /** @nocollapse */
2462
+ FormAssociatedElement.formAssociated = true;
2463
+ __decorate([n$1({ noAccessor: true })], FormAssociatedElement.prototype, "name", null);
2464
+ __decorate([n$1({
2465
+ type: Boolean,
2466
+ noAccessor: true
2467
+ })], FormAssociatedElement.prototype, "disabled", null);
2468
+ return FormAssociatedElement;
2469
+ }
2470
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-submitter.js
2471
+ /**
2472
+ * @license
2473
+ * Copyright 2023 Google LLC
2474
+ * SPDX-License-Identifier: Apache-2.0
2475
+ */
2476
+ /**
2477
+ * Mixes in form submitter behavior for a class.
2478
+ *
2479
+ * A click listener is added to each element instance. If the click is not
2480
+ * default prevented, it will submit the element's form, if any.
2481
+ *
2482
+ * @example
2483
+ * ```ts
2484
+ * const base = mixinFormSubmitter(mixinElementInternals(LitElement));
2485
+ * class MyButton extends base {
2486
+ * static formAssociated = true;
2487
+ * }
2488
+ * ```
2489
+ *
2490
+ * @param base The class to mix functionality into.
2491
+ * @return The provided class with `FormSubmitter` mixed in.
2492
+ */
2493
+ function mixinFormSubmitter(base) {
2494
+ class FormSubmitterElement extends base {
2495
+ get name() {
2496
+ return this.getAttribute("name") ?? "";
2497
+ }
2498
+ set name(name) {
2499
+ this.setAttribute("name", name);
2500
+ }
2501
+ constructor(...args) {
2502
+ super(...args);
2503
+ this.type = "submit";
2504
+ this.value = "";
2505
+ }
2506
+ }
2507
+ __decorate([n$1()], FormSubmitterElement.prototype, "type", void 0);
2508
+ __decorate([n$1({ reflect: true })], FormSubmitterElement.prototype, "value", void 0);
2509
+ return FormSubmitterElement;
2510
+ }
2511
+ // src/lib/adapters/browser-clipboard.ts
2512
+ /**
2513
+ * The browser's clipboard. `navigator.clipboard` only exists in a secure context, and the bridge
2514
+ * speaks plain HTTP: opened from another machine, the old selection command has to do it.
2515
+ */
2516
+ var BrowserClipboard = class {
2517
+ async copy(text) {
2518
+ const modern = navigator.clipboard;
2519
+ if (modern !== void 0) try {
2520
+ await modern.writeText(text);
2521
+ return true;
2522
+ } catch {}
2523
+ return copySelected(text);
2524
+ }
2525
+ };
2526
+ /** Copies through a text area that exists only for this, then gives the focus back. */
2527
+ function copySelected(text) {
2528
+ const focused = document.activeElement;
2529
+ const area = document.createElement("textarea");
2530
+ area.value = text;
2531
+ area.readOnly = true;
2532
+ area.setAttribute("aria-hidden", "true");
2533
+ Object.assign(area.style, {
2534
+ position: "fixed",
2535
+ top: "0",
2536
+ left: "0",
2537
+ opacity: "0"
2538
+ });
2539
+ document.body.append(area);
2540
+ try {
2541
+ area.select();
2542
+ return document.execCommand("copy");
2543
+ } catch {
2544
+ return false;
2545
+ } finally {
2546
+ area.remove();
2547
+ if (focused instanceof HTMLElement) focused.focus({ preventScroll: true });
2548
+ }
2549
+ }
2550
+ // src/lib/core/theme.ts
2551
+ var DEFAULT_THEME = "light";
2552
+ /** The choices in the order the settings page lists them. */
2553
+ var THEMES = [
2554
+ {
2555
+ value: "light",
2556
+ label: "Light",
2557
+ description: "Default light scheme."
2558
+ },
2559
+ {
2560
+ value: "dark",
2561
+ label: "Dark",
2562
+ description: "Default dark scheme."
2563
+ },
2564
+ {
2565
+ value: "high-contrast",
2566
+ label: "High contrast",
2567
+ description: "White surface, black text, 2px outlines."
2568
+ },
2569
+ {
2570
+ value: "dark-high-contrast",
2571
+ label: "Dark high contrast",
2572
+ description: "Black surface, white text, 2px outlines."
2573
+ }
2574
+ ];
2575
+ function parseTheme(raw) {
2576
+ return THEMES.find((t) => t.value === raw)?.value ?? null;
2577
+ }
2578
+ // src/lib/adapters/browser-theme-storage.ts
2579
+ var THEME_STORAGE_KEY = "sr-theme";
2580
+ /** Keeps the theme in `localStorage` and applies it as `data-theme` on `<html>`. */
2581
+ var BrowserThemeStorage = class {
2582
+ read() {
2583
+ try {
2584
+ return parseTheme(localStorage.getItem(THEME_STORAGE_KEY));
2585
+ } catch {
2586
+ return null;
2587
+ }
2588
+ }
2589
+ write(theme) {
2590
+ document.documentElement.dataset.theme = theme;
2591
+ try {
2592
+ localStorage.setItem(THEME_STORAGE_KEY, theme);
2593
+ } catch {}
2594
+ }
2595
+ };
2596
+ // src/lib/core/config.ts
2597
+ /** The bridge (or the BFF) refused a setting; `field` is its dotted path when it names one. */
2598
+ var SettingRejected = class extends Error {
2599
+ field;
2600
+ constructor(message, field) {
2601
+ super(message);
2602
+ this.field = field;
2603
+ this.name = "SettingRejected";
2604
+ }
2605
+ };
2606
+ function flatten(value, path, into) {
2607
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) for (const [key, inner] of Object.entries(value)) flatten(inner, path === "" ? key : `${path}.${key}`, into);
2608
+ else into.set(path, JSON.stringify(value));
2609
+ return into;
2610
+ }
2611
+ /**
2612
+ * The dotted paths of the settings whose saved value differs from the one in use: they wait for a
2613
+ * restart of the bridge.
2614
+ */
2615
+ function pendingFields(active, saved) {
2616
+ const running = flatten(active, "", /* @__PURE__ */ new Map());
2617
+ return [...flatten(saved, "", /* @__PURE__ */ new Map())].filter(([path, value]) => running.get(path) !== value).map(([path]) => path);
2618
+ }
2619
+ var PORT_MESSAGE = "Enter a port from 1 to 65535.";
2620
+ /**
2621
+ * Reads a port as typed. Only whole numbers from 1 to 65535: the API also takes 0 (a random
2622
+ * port), but a voice that has its port built in can't find that one.
2623
+ */
2624
+ function parsePort(text) {
2625
+ const trimmed = text.trim();
2626
+ if (!/^\d{1,5}$/.test(trimmed)) return {
2627
+ ok: false,
2628
+ message: PORT_MESSAGE
2629
+ };
2630
+ const port = Number(trimmed);
2631
+ return port >= 1 && port <= 65535 ? {
2632
+ ok: true,
2633
+ port
2634
+ } : {
2635
+ ok: false,
2636
+ message: PORT_MESSAGE
2637
+ };
2638
+ }
2639
+ var PLAYWRIGHT_VERSION_MESSAGE = "Enter an exact version like 1.65.0, or leave the field empty.";
2640
+ /** Reads a Playwright version as typed: an exact version, or empty for the bundled one (`null`). */
2641
+ function parsePlaywrightVersion(text) {
2642
+ const trimmed = text.trim();
2643
+ if (trimmed === "") return {
2644
+ ok: true,
2645
+ version: null
2646
+ };
2647
+ return EXACT_VERSION_PATTERN.test(trimmed) ? {
2648
+ ok: true,
2649
+ version: trimmed
2650
+ } : {
2651
+ ok: false,
2652
+ message: PLAYWRIGHT_VERSION_MESSAGE
2653
+ };
2654
+ }
2655
+ var { min: MIN_ENTRIES, max: MAX_ENTRIES } = CONFIG_LIMITS.maxEntries;
2656
+ var MAX_ENTRIES_MESSAGE = `Enter a whole number from ${MIN_ENTRIES} to ${MAX_ENTRIES}.`;
2657
+ /** Reads the size of the speech buffer as typed: a whole number within the API's limits. */
2658
+ function parseMaxEntries(text) {
2659
+ const trimmed = text.trim();
2660
+ const entries = /^\d+$/.test(trimmed) ? Number(trimmed) : NaN;
2661
+ return entries >= MIN_ENTRIES && entries <= MAX_ENTRIES ? {
2662
+ ok: true,
2663
+ entries
2664
+ } : {
2665
+ ok: false,
2666
+ message: MAX_ENTRIES_MESSAGE
2667
+ };
2668
+ }
2669
+ // src/lib/adapters/route-request.ts
2670
+ var defaultRejection = (error, status) => new Error(error?.message ?? `The request answered ${status}`);
2671
+ /** Calls one of the UI's own routes (`url` includes the base path) and rejects unless it is ok. */
2672
+ async function routeRequest(url, { method = "GET", body, signal, rejection = defaultRejection } = {}) {
2673
+ const response = await fetch(url, {
2674
+ method,
2675
+ headers: {
2676
+ accept: "application/json",
2677
+ ...body === void 0 ? {} : { "content-type": "application/json" }
2678
+ },
2679
+ body: body === void 0 ? void 0 : JSON.stringify(body),
2680
+ signal
2681
+ });
2682
+ if (!response.ok) throw rejection(await readRouteError(response), response.status);
2683
+ return response;
2684
+ }
2685
+ /**
2686
+ * {@link routeRequest} for a JSON answer. It is not checked again: the BFF already checked the
2687
+ * bridge's answer against the contract (`lib/server/bridge-api.ts`), and only the UI calls its
2688
+ * routes. `T` is what the route answers.
2689
+ */
2690
+ async function routeJson(url, request) {
2691
+ return await (await routeRequest(url, request)).json();
2692
+ }
2693
+ async function readRouteError(response) {
2694
+ const body = await response.json().catch(() => void 0);
2695
+ if (typeof body !== "object" || body === null || !("message" in body)) return null;
2696
+ const { message } = body;
2697
+ if (typeof message !== "string") return null;
2698
+ return {
2699
+ message,
2700
+ field: "field" in body && typeof body.field === "string" ? body.field : void 0
2701
+ };
2702
+ }
2703
+ // src/lib/adapters/http-config-api.ts
2704
+ /** A refused save names the bridge's reason (and the setting, when it names one). */
2705
+ var rejection = (error, status) => error === null ? /* @__PURE__ */ new Error(`The request answered ${status}`) : new SettingRejected(error.message, error.field);
2706
+ /** Reads and saves the configuration through the UI's own config route (`url` includes the base path). */
2707
+ var HttpConfigApi = class {
2708
+ url;
2709
+ constructor(url) {
2710
+ this.url = url;
2711
+ }
2712
+ /** `GET /ui/api/config` answers `{ active, saved, overrides }` in one go. */
2713
+ fetch() {
2714
+ return routeJson(this.url, { rejection });
2715
+ }
2716
+ update(patch) {
2717
+ return routeJson(this.url, {
2718
+ method: "PUT",
2719
+ body: patch,
2720
+ rejection
2721
+ });
2722
+ }
2723
+ };
2724
+ // src/lib/adapters/http-keys-api.ts
2725
+ /** Sends key presses through the UI's own route (`url` includes the base path). */
2726
+ var HttpKeysApi = class {
2727
+ url;
2728
+ constructor(url) {
2729
+ this.url = url;
2730
+ }
2731
+ async press(keys) {
2732
+ await routeRequest(this.url, {
2733
+ method: "POST",
2734
+ body: { keys }
2735
+ });
2736
+ }
2737
+ };
2738
+ // src/lib/adapters/http-speech-api.ts
2739
+ /** Changes the speech through the UI's own markers and speech routes (the urls include the base path). */
2740
+ var HttpSpeechApi = class {
2741
+ markersUrl;
2742
+ speechUrl;
2743
+ constructor(markersUrl, speechUrl) {
2744
+ this.markersUrl = markersUrl;
2745
+ this.speechUrl = speechUrl;
2746
+ }
2747
+ async addMarker(label) {
2748
+ await routeRequest(this.markersUrl, {
2749
+ method: "POST",
2750
+ body: { label }
2751
+ });
2752
+ }
2753
+ async clear(scope) {
2754
+ await routeRequest(`${this.speechUrl}?session=${scope}`, { method: "DELETE" });
2755
+ }
2756
+ };
2757
+ // src/lib/adapters/http-sessions-api.ts
2758
+ /**
2759
+ * Reads the sessions with the `getSessions` remote query and changes them through the UI's own
2760
+ * sessions routes (`url` includes the base path).
2761
+ */
2762
+ var HttpSessionsApi = class {
2763
+ url;
2764
+ constructor(url) {
2765
+ this.url = url;
2766
+ }
2767
+ /** Always asks the server again: a query keeps its last answer while anything still uses it. */
2768
+ async list() {
2769
+ const sessions = getSessions();
2770
+ await sessions.refresh();
2771
+ return sessions.current;
2772
+ }
2773
+ start(name, run) {
2774
+ return routeJson(this.url, {
2775
+ method: "POST",
2776
+ body: {
2777
+ name,
2778
+ run
2779
+ }
2780
+ });
2781
+ }
2782
+ async end() {
2783
+ await routeRequest(`${this.url}/end`, { method: "POST" });
2784
+ }
2785
+ async delete(id) {
2786
+ await routeRequest(`${this.url}/${id}`, { method: "DELETE" });
2787
+ }
2788
+ };
2789
+ // src/lib/adapters/sse-speech-feed.ts
2790
+ /** Entries read per request when an ended session is read page by page. */
2791
+ var PAGE_SIZE = 1e3;
2792
+ /**
2793
+ * Reads the speech of a scope through the UI's own routes (`urls` include the base path):
2794
+ * - A live scope is followed on the stream relay with `?since=0`, so the bridge replays the
2795
+ * buffer first. `EventSource` reconnects by itself and sends `Last-Event-ID`, so a drop only
2796
+ * shows as `reconnecting` and the missed entries are replayed.
2797
+ * - An ended session never gets new entries: it is read page by page, once, without a stream.
2798
+ */
2799
+ var SseSpeechFeed = class {
2800
+ streamUrl;
2801
+ speechUrl;
2802
+ constructor(streamUrl, speechUrl) {
2803
+ this.streamUrl = streamUrl;
2804
+ this.speechUrl = speechUrl;
2805
+ }
2806
+ open(scope, live, handlers) {
2807
+ handlers.onState("connecting");
2808
+ return live ? this.follow(scope, handlers) : this.read(scope, handlers);
2809
+ }
2810
+ listen(since, handlers) {
2811
+ const source = this.stream(`since=${since}`, (entry) => handlers.onEntry(entry));
2812
+ source.onopen = () => handlers.onState("live");
2813
+ source.onerror = () => handlers.onState(source.readyState === EventSource.CLOSED ? "failed" : "reconnecting");
2814
+ return () => source.close();
2815
+ }
2816
+ follow(scope, handlers) {
2817
+ const source = this.stream(`session=${encodeURIComponent(String(scope))}&since=0`, (entry) => handlers.onEntry(entry));
2818
+ source.onopen = () => handlers.onState("live");
2819
+ source.onerror = () => handlers.onState("reconnecting");
2820
+ source.addEventListener("clear", () => handlers.onClear());
2821
+ return () => source.close();
2822
+ }
2823
+ stream(query, onEntry) {
2824
+ const source = new EventSource(`${this.streamUrl}?${query}`);
2825
+ source.addEventListener("entry", (event) => {
2826
+ let data;
2827
+ try {
2828
+ data = JSON.parse(event.data);
2829
+ } catch {
2830
+ return;
2831
+ }
2832
+ const checked = checkDto(SpeechEntrySchema, data);
2833
+ if (checked.ok) onEntry(checked.value);
2834
+ });
2835
+ return source;
2836
+ }
2837
+ read(scope, handlers) {
2838
+ const abort = new AbortController();
2839
+ const load = async () => {
2840
+ let since = 0;
2841
+ for (;;) {
2842
+ const query = new URLSearchParams({
2843
+ session: String(scope),
2844
+ since: String(since),
2845
+ limit: String(PAGE_SIZE)
2846
+ });
2847
+ const { entries, hasMore } = await routeJson(`${this.speechUrl}?${query}`, { signal: abort.signal });
2848
+ handlers.onEntries(entries);
2849
+ const last = entries.at(-1);
2850
+ if (!hasMore || last === void 0) return;
2851
+ since = last.seq;
2852
+ }
2853
+ };
2854
+ load().then(() => handlers.onState("ended"), () => {
2855
+ if (!abort.signal.aborted) handlers.onState("failed");
2856
+ });
2857
+ return () => abort.abort();
2858
+ }
2859
+ };
2860
+ // src/lib/adapters/http-status-api.ts
2861
+ /** Reads the bridge status through the UI's own status route (`url` includes the base path). */
2862
+ var HttpStatusApi = class {
2863
+ url;
2864
+ constructor(url) {
2865
+ this.url = url;
2866
+ }
2867
+ fetch() {
2868
+ return routeJson(this.url);
2869
+ }
2870
+ };
2871
+ // src/lib/core/sessions-pane.ts
2872
+ /** Parses the stored text; anything but `'1'` / `'0'` counts as no choice. */
2873
+ function parseCollapsed(raw) {
2874
+ if (raw === "1") return true;
2875
+ if (raw === "0") return false;
2876
+ return null;
2877
+ }
2878
+ function serializeCollapsed(collapsed) {
2879
+ return collapsed ? "1" : "0";
2880
+ }
2881
+ // src/lib/adapters/browser-sessions-pane-storage.ts
2882
+ var SESSIONS_PANE_STORAGE_KEY = "sr-sessions-collapsed";
2883
+ /** Keeps the sessions pane's collapsed choice in `localStorage`. */
2884
+ var BrowserSessionsPaneStorage = class {
2885
+ read() {
2886
+ try {
2887
+ return parseCollapsed(localStorage.getItem(SESSIONS_PANE_STORAGE_KEY));
2888
+ } catch {
2889
+ return null;
2890
+ }
2891
+ }
2892
+ write(collapsed) {
2893
+ try {
2894
+ localStorage.setItem(SESSIONS_PANE_STORAGE_KEY, serializeCollapsed(collapsed));
2895
+ } catch {}
2896
+ }
2897
+ };
2898
+ // src/lib/stores/config.svelte.ts
2899
+ function createConfigStore(api) {
2900
+ let state = null;
2901
+ let reachable = true;
2902
+ let inFlight = null;
2903
+ function read() {
2904
+ if (inFlight) return inFlight;
2905
+ inFlight = api.fetch().then((next) => {
2906
+ state = next;
2907
+ reachable = true;
2908
+ }).catch(() => {
2909
+ reachable = false;
2910
+ }).finally(() => {
2911
+ inFlight = null;
2912
+ });
2913
+ return inFlight;
2914
+ }
2915
+ return {
2916
+ /** Whether a configuration has been read yet. */
2917
+ get loaded() {
2918
+ return state !== null;
2919
+ },
2920
+ get reachable() {
2921
+ return reachable;
2922
+ },
2923
+ get active() {
2924
+ return state?.active ?? null;
2925
+ },
2926
+ get saved() {
2927
+ return state?.saved ?? null;
2928
+ },
2929
+ /** Settings a flag or variable sets, by dotted path, with what sets them. */
2930
+ get overrides() {
2931
+ return state?.overrides ?? {};
2932
+ },
2933
+ /** Dotted paths of the saved settings that wait for a restart. */
2934
+ get pending() {
2935
+ return state === null ? [] : pendingFields(state.active, state.saved);
2936
+ },
2937
+ /**
2938
+ * Shows the configuration the page's load read, before any request of its own. Call it while
2939
+ * the page renders, on the server too: the stores are per request, so the server's HTML and the
2940
+ * first browser render agree. Unlike a list that is polled, every load's answer replaces what
2941
+ * is shown; `null` (the load failed) changes nothing.
2942
+ */
2943
+ seed(next) {
2944
+ if (next === null) return;
2945
+ state = next;
2946
+ reachable = true;
2947
+ },
2948
+ /** Reads the configuration now (also after a failed read, to try again). */
2949
+ refresh() {
2950
+ return read();
2951
+ },
2952
+ /** Saves a partial config for the next start. Rejects with the bridge's message. */
2953
+ async save(patch) {
2954
+ await api.update(patch);
2955
+ await inFlight;
2956
+ await read();
2957
+ }
2958
+ };
2959
+ }
2960
+ // src/lib/stores/sessions-pane.svelte.ts
2961
+ function createSessionsPaneStore(storage) {
2962
+ let collapsed = true;
2963
+ return {
2964
+ get collapsed() {
2965
+ return collapsed;
2966
+ },
2967
+ /** Pick up the saved choice. Call it in the browser only, after hydration. */
2968
+ init() {
2969
+ collapsed = storage.read() ?? false;
2970
+ },
2971
+ toggle() {
2972
+ collapsed = !collapsed;
2973
+ storage.write(collapsed);
2974
+ }
2975
+ };
2976
+ }
2977
+ // src/lib/stores/sessions.svelte.ts
2978
+ var REFRESH_MS = 3e3;
2979
+ function createSessionsStore(api) {
2980
+ let sessions = [];
2981
+ let currentId = null;
2982
+ let outsideEntries = 0;
2983
+ let reachable = true;
2984
+ let loaded = false;
2985
+ let now = Date.now();
2986
+ let inFlight = null;
2987
+ function apply(list, at = Date.now()) {
2988
+ sessions = list.sessions;
2989
+ currentId = list.currentId;
2990
+ outsideEntries = list.outsideEntries;
2991
+ now = at;
2992
+ loaded = true;
2993
+ }
2994
+ function read() {
2995
+ if (inFlight) return inFlight;
2996
+ inFlight = api.list().then((list) => {
2997
+ apply(list);
2998
+ reachable = true;
2999
+ }).catch(() => {
3000
+ reachable = false;
3001
+ }).finally(() => {
3002
+ inFlight = null;
3003
+ });
3004
+ return inFlight;
3005
+ }
3006
+ /** A read that started before the change would show the old list, so wait for it and read again. */
3007
+ async function refreshAfterChange() {
3008
+ await inFlight;
3009
+ await read();
3010
+ }
3011
+ return {
3012
+ get sessions() {
3013
+ return sessions;
3014
+ },
3015
+ get currentId() {
3016
+ return currentId;
3017
+ },
3018
+ /** Entries in the buffer recorded outside any session. */
3019
+ get outsideEntries() {
3020
+ return outsideEntries;
3021
+ },
3022
+ /** Whether a list has been applied yet (the seed or a read). */
3023
+ get loaded() {
3024
+ return loaded;
3025
+ },
3026
+ get reachable() {
3027
+ return reachable;
3028
+ },
3029
+ /** Epoch ms, ticking once a second while a session is live (for its duration). */
3030
+ get now() {
3031
+ return now;
3032
+ },
3033
+ /**
3034
+ * Shows the list the page's load read (`now`: when it was read), before any request of its
3035
+ * own. Call it while the page renders, on the server too: the stores are per request, so the
3036
+ * server's HTML and the first browser render agree. Does nothing once a list is shown.
3037
+ */
3038
+ seed(list, at) {
3039
+ if (list !== null && !loaded) apply(list, at);
3040
+ },
3041
+ /**
3042
+ * Reads the list and keeps it fresh. Call it in the browser only. Returns the function that
3043
+ * stops the timers (call it when the page goes away).
3044
+ */
3045
+ init() {
3046
+ read();
3047
+ const tick = setInterval(() => {
3048
+ if (currentId !== null) now = Date.now();
3049
+ }, 1e3);
3050
+ const refresh = setInterval(() => void read(), REFRESH_MS);
3051
+ return () => {
3052
+ clearInterval(tick);
3053
+ clearInterval(refresh);
3054
+ };
3055
+ },
3056
+ /** Reads the list now, for a change made elsewhere (the speech of a scope was cleared). */
3057
+ refresh() {
3058
+ return refreshAfterChange();
3059
+ },
3060
+ /** Starts a session, which ends the previous one. Rejects with the bridge's message. */
3061
+ async start(name, run) {
3062
+ const started = await api.start(name, run);
3063
+ await refreshAfterChange();
3064
+ return started;
3065
+ },
3066
+ async end() {
3067
+ await api.end();
3068
+ await refreshAfterChange();
3069
+ },
3070
+ /** Deletes an ended session. Rejects with the bridge's message. */
3071
+ async delete(id) {
3072
+ await api.delete(id);
3073
+ await refreshAfterChange();
3074
+ }
3075
+ };
3076
+ }
3077
+ // src/lib/core/speech.ts
3078
+ /** The table keeps this many rows; the oldest go first (the bridge's own buffer is capped too). */
3079
+ var MAX_ROWS = 5e3;
3080
+ /**
3081
+ * Whether a marker added now shows up in `scope`. The bridge files a marker under the current
3082
+ * session, or outside any session when none is current: it has no way to name another scope.
3083
+ */
3084
+ function canAddMarker(scope, currentId) {
3085
+ return currentId === null ? scope === "none" : scope === currentId;
3086
+ }
3087
+ /**
3088
+ * Whether the log can clear `scope`: the current session or the speech outside sessions, the scopes
3089
+ * that can still receive speech. An ended session can only be deleted.
3090
+ */
3091
+ function canClearSpeech(scope, currentId) {
3092
+ return isLiveScope(scope, currentId);
3093
+ }
3094
+ /** Whether the log can delete `scope`: an ended session, never the current one or the outside log. */
3095
+ function canDeleteSession(scope, currentId) {
3096
+ return scope !== "none" && scope !== currentId;
3097
+ }
3098
+ /** Whether new speech can still arrive in `scope`. */
3099
+ function isLiveScope(scope, currentId) {
3100
+ return scope === "none" || scope === currentId;
3101
+ }
3102
+ /** `14:03:07.042` in the browser's time zone. */
3103
+ function formatReceivedTime(iso) {
3104
+ const date = new Date(iso);
3105
+ if (Number.isNaN(date.getTime())) return iso;
3106
+ const two = (value) => String(value).padStart(2, "0");
3107
+ const millis = String(date.getMilliseconds()).padStart(3, "0");
3108
+ return `${two(date.getHours())}:${two(date.getMinutes())}:${two(date.getSeconds())}.${millis}`;
3109
+ }
3110
+ /** `Checkout flow #3`, or what the log shows when no session is selected. */
3111
+ function logHeading(scope, sessions) {
3112
+ if (scope === "none") return "Records outside sessions";
3113
+ const session = sessions.find((candidate) => candidate.id === scope);
3114
+ return session === void 0 ? `#${scope}` : `${session.name} #${session.id}`;
3115
+ }
3116
+ // src/lib/stores/speech.svelte.ts
3117
+ function createSpeechStore(feed, api) {
3118
+ let entries = [];
3119
+ let connection = "connecting";
3120
+ let close = null;
3121
+ function stop() {
3122
+ close?.();
3123
+ close = null;
3124
+ }
3125
+ /** Adds entries newer than the last one shown (a replay after a reconnect repeats some). */
3126
+ function append(added) {
3127
+ let lastSeq = entries.at(-1)?.seq ?? 0;
3128
+ const fresh = [];
3129
+ for (const entry of added) {
3130
+ if (entry.seq <= lastSeq) continue;
3131
+ fresh.push(entry);
3132
+ lastSeq = entry.seq;
3133
+ }
3134
+ if (fresh.length === 0) return;
3135
+ const next = [...entries, ...fresh];
3136
+ entries = next.length > 5e3 ? next.slice(next.length - MAX_ROWS) : next;
3137
+ }
3138
+ return {
3139
+ get entries() {
3140
+ return entries;
3141
+ },
3142
+ get connection() {
3143
+ return connection;
3144
+ },
3145
+ /**
3146
+ * Shows the speech of `scope`, replacing what was shown. A live scope replays the buffer and
3147
+ * follows; an ended session is read once. After a reconnect the stream resumes where it left
3148
+ * off, and an entry seen twice is dropped. Returns the function that stops the stream.
3149
+ */
3150
+ open(scope, live) {
3151
+ stop();
3152
+ entries = [];
3153
+ connection = "connecting";
3154
+ close = feed.open(scope, live, {
3155
+ onEntry: (entry) => append([entry]),
3156
+ onEntries: append,
3157
+ onClear() {
3158
+ entries = [];
3159
+ },
3160
+ onState(state) {
3161
+ connection = state;
3162
+ }
3163
+ });
3164
+ return stop;
3165
+ },
3166
+ /** Rejects with the reason; the table empties through the feed (the bridge's `clear` event). */
3167
+ clear(scope) {
3168
+ return api.clear(scope);
3169
+ },
3170
+ /** Rejects with the reason; the new entry arrives through the feed, so nothing is added here. */
3171
+ addMarker(label) {
3172
+ return api.addMarker(label);
3173
+ }
3174
+ };
3175
+ }
3176
+ // src/lib/stores/status.svelte.ts
3177
+ function createStatusStore(api) {
3178
+ let status = null;
3179
+ let reachable = true;
3180
+ let loading = false;
3181
+ let inFlight = null;
3182
+ function read() {
3183
+ if (inFlight) return inFlight;
3184
+ loading = true;
3185
+ inFlight = api.fetch().then((next) => {
3186
+ status = next;
3187
+ reachable = true;
3188
+ }).catch(() => {
3189
+ reachable = false;
3190
+ }).finally(() => {
3191
+ loading = false;
3192
+ inFlight = null;
3193
+ });
3194
+ return inFlight;
3195
+ }
3196
+ return {
3197
+ get status() {
3198
+ return status;
3199
+ },
3200
+ get reachable() {
3201
+ return reachable;
3202
+ },
3203
+ get loading() {
3204
+ return loading;
3205
+ },
3206
+ /** Reads the status once; `seed` is the status the server rendered, so there is no flash. */
3207
+ init(seed) {
3208
+ if (seed && status === null) status = seed;
3209
+ read();
3210
+ },
3211
+ /** The refresh button. */
3212
+ retry() {
3213
+ return read();
3214
+ }
3215
+ };
3216
+ }
3217
+ // src/lib/stores/theme.svelte.ts
3218
+ function createThemeStore(storage) {
3219
+ let current = DEFAULT_THEME;
3220
+ return {
3221
+ get current() {
3222
+ return current;
3223
+ },
3224
+ /** Pick up the saved choice. Call it in the browser only, after hydration. */
3225
+ init() {
3226
+ current = storage.read() ?? "light";
3227
+ },
3228
+ /** Apply and remember a choice. */
3229
+ set(theme) {
3230
+ current = theme;
3231
+ storage.write(theme);
3232
+ }
3233
+ };
3234
+ }
3235
+ // src/lib/core/setup.ts
3236
+ /** The keys of the check: "read the window title" in NVDA and JAWS. */
3237
+ var CHECK_CHORD = "Insert+T";
3238
+ /** The marker in front of the check's keys, so the speech they cause is told apart. */
3239
+ var CHECK_MARKER = `ui: ${CHECK_CHORD}`;
3240
+ /** How long the check waits for speech someone makes by hand. */
3241
+ var LISTEN_TIMEOUT_MS = 3e4;
3242
+ /** How long it waits for speech after it sent the keys. */
3243
+ var KEYS_TIMEOUT_MS = 5e3;
3244
+ /** After the first speech, the check collects what follows until nothing came for this long. */
3245
+ var QUIET_MS = 1e3;
3246
+ /** The id of the screen reader heading in the Setup instructions, where the check links to. */
3247
+ var SCREEN_READER_ID = "screen-reader-heading";
3248
+ var DOCS_URL = "https://github.com/TimoSto/screenreader-speech-capture/blob";
3249
+ /**
3250
+ * A page of `docs/` on GitHub, as of the bridge's release. Only stable releases are tagged, so a
3251
+ * preview, a development build and an unknown version read `main`.
3252
+ */
3253
+ function docsUrl(version, path) {
3254
+ return `${DOCS_URL}/${version !== null && /^\d+\.\d+\.\d+$/.test(version) ? `@screenreader-speech-capture/bridge@${version}` : "main"}/docs/${path}`;
3255
+ }
3256
+ /** Where the libraries behind a feature live, by the `backend` name the bridge reports. */
3257
+ var LIBRARY_REPOS = /* @__PURE__ */ new Map([["robotjs", "https://github.com/jitsi/robotjs"], ["koffi", "https://github.com/Koromix/koffi"]]);
3258
+ /** What the bridge itself knows about the setup, one row each. */
3259
+ function deriveCheckRows(status) {
3260
+ const link = (label, path) => ({
3261
+ label,
3262
+ href: docsUrl(status.bridge.version, path)
3263
+ });
3264
+ const row = (id, label, tone, state, help, library = null) => ({
3265
+ id,
3266
+ label,
3267
+ tone,
3268
+ state,
3269
+ library,
3270
+ help: tone === "ok" ? null : "path" in help ? link(help.label, help.path) : help
3271
+ });
3272
+ const { listening, port, encoding, connections } = status.tcp;
3273
+ const voices = [...new Set(connections.flatMap(({ voice }) => voice === null ? [] : [voice]))];
3274
+ const count = connections.length === 1 ? "1 connection" : `${connections.length} connections`;
3275
+ const input = (id, label, { available, backend, reason }, help) => row(id, label, available ? "ok" : "warning", available ? "Available" : `Not available: ${reason ?? "no reason given"}`, help, backend === null ? null : {
3276
+ name: backend,
3277
+ href: LIBRARY_REPOS.get(backend) ?? null
3278
+ });
3279
+ const service = (id, label, { state, version }) => {
3280
+ const [tone, words] = {
3281
+ running: ["ok", `Running, version ${version}`],
3282
+ starting: ["neutral", `Starting, version ${version}`],
3283
+ stopped: ["neutral", "Off"],
3284
+ crashed: ["warning", `Crashed, version ${version}. It restarts by itself.`],
3285
+ failed: ["warning", `Failed, version ${version}`]
3286
+ }[state];
3287
+ return row(id, label, tone, words, {
3288
+ label: "Child services",
3289
+ path: "usage/operations.md#child-service-crashes"
3290
+ });
3291
+ };
3292
+ return [
3293
+ row("listener", "Speech listener", listening ? "ok" : "warning", listening ? `Listening on port ${port} (${encoding})` : `Not listening on port ${port}`, {
3294
+ label: "Troubleshooting",
3295
+ path: "usage/troubleshooting.md#speech"
3296
+ }),
3297
+ row("voice", "Voice connected", connections.length > 0 ? "ok" : "neutral", connections.length > 0 ? `${count}${voices.length > 0 ? ` (voice ${voices.join(", ")})` : ""}` : "None yet: the voice connects with its first words", {
3298
+ label: "Select the voice",
3299
+ screenReader: true
3300
+ }),
3301
+ input("input", "Native input", status.input.native, {
3302
+ label: "Troubleshooting",
3303
+ path: "usage/troubleshooting.md#browser-and-input"
3304
+ }),
3305
+ input("focus", "Window focus", status.input.focus, {
3306
+ label: "Bringing the browser to the front",
3307
+ path: "usage/native-input.md#bringing-the-browser-to-the-front"
3308
+ }),
3309
+ service("playwright", "Playwright server", status.playwright),
3310
+ service("mcp", "Playwright MCP", status.mcp)
3311
+ ];
3312
+ }
3313
+ // src/lib/stores/voice-check.svelte.ts
3314
+ function createVoiceCheckStore(statusApi, probe, keysApi, speechApi) {
3315
+ let phase = "idle";
3316
+ let via = "manual";
3317
+ let entries = [];
3318
+ let reconnecting = false;
3319
+ let failure = "";
3320
+ /** Counts the runs: whatever answers for an earlier one is ignored. */
3321
+ let run = 0;
3322
+ let close = null;
3323
+ let timer;
3324
+ /** Ends the current run: its stream, its timer and every answer still to come. */
3325
+ function finish() {
3326
+ run++;
3327
+ clearTimeout(timer);
3328
+ close?.();
3329
+ close = null;
3330
+ reconnecting = false;
3331
+ }
3332
+ function fail(message) {
3333
+ finish();
3334
+ phase = "failed";
3335
+ failure = message;
3336
+ }
3337
+ /** Gives up after `ms`. A lost connection is a failure, not silence. */
3338
+ function giveUpAfter(ms) {
3339
+ timer = setTimeout(() => {
3340
+ if (reconnecting) {
3341
+ fail("The connection to the bridge was lost.");
3342
+ return;
3343
+ }
3344
+ finish();
3345
+ phase = "silent";
3346
+ }, ms);
3347
+ }
3348
+ return {
3349
+ get phase() {
3350
+ return phase;
3351
+ },
3352
+ get via() {
3353
+ return via;
3354
+ },
3355
+ /** The speech that arrived, oldest first. */
3356
+ get entries() {
3357
+ return entries;
3358
+ },
3359
+ get reconnecting() {
3360
+ return reconnecting;
3361
+ },
3362
+ /** Why the check failed. */
3363
+ get failure() {
3364
+ return failure;
3365
+ },
3366
+ /**
3367
+ * Waits for new speech. With `keys` it also sends {@link CHECK_CHORD}, after a marker, and
3368
+ * only counts the speech after that marker. Replaces a run that is still going.
3369
+ */
3370
+ async start(how) {
3371
+ finish();
3372
+ const mine = run;
3373
+ via = how;
3374
+ phase = "starting";
3375
+ entries = [];
3376
+ failure = "";
3377
+ let since;
3378
+ try {
3379
+ since = (await statusApi.fetch()).buffer.lastSeq ?? 0;
3380
+ } catch {
3381
+ if (mine === run) fail("The bridge is not reachable.");
3382
+ return;
3383
+ }
3384
+ if (mine !== run) return;
3385
+ let counting = how === "manual";
3386
+ phase = "listening";
3387
+ close = probe.listen(since, {
3388
+ onEntry(entry) {
3389
+ if (mine !== run) return;
3390
+ if (entry.kind === "marker") {
3391
+ if (entry.text === "ui: Insert+T") counting = true;
3392
+ return;
3393
+ }
3394
+ if (!counting) return;
3395
+ entries = [...entries, entry];
3396
+ phase = "heard";
3397
+ clearTimeout(timer);
3398
+ if (entries.length >= 5) finish();
3399
+ else timer = setTimeout(finish, QUIET_MS);
3400
+ },
3401
+ onState(state) {
3402
+ if (mine !== run) return;
3403
+ if (state !== "failed") reconnecting = state === "reconnecting";
3404
+ else if (phase === "heard") finish();
3405
+ else fail("The speech stream is not available.");
3406
+ }
3407
+ });
3408
+ if (how === "manual") {
3409
+ giveUpAfter(LISTEN_TIMEOUT_MS);
3410
+ return;
3411
+ }
3412
+ try {
3413
+ await speechApi.addMarker(CHECK_MARKER);
3414
+ if (mine !== run) return;
3415
+ await keysApi.press(CHECK_CHORD);
3416
+ } catch (cause) {
3417
+ if (mine === run && entries.length === 0) fail(cause instanceof Error ? cause.message : "The keys could not be sent.");
3418
+ return;
3419
+ }
3420
+ if (mine === run && entries.length === 0) giveUpAfter(KEYS_TIMEOUT_MS);
3421
+ },
3422
+ /** Stops listening and forgets the result. */
3423
+ stop() {
3424
+ finish();
3425
+ phase = "idle";
3426
+ entries = [];
3427
+ failure = "";
3428
+ }
3429
+ };
3430
+ }
3431
+ // src/lib/composition.ts
3432
+ /** Wires the adapters into the stores; components get the stores, never the adapters. */
3433
+ function createAppStores() {
3434
+ const statusApi = new HttpStatusApi(resolve("/api/status"));
3435
+ const speechFeed = new SseSpeechFeed(resolve("/api/speech/stream"), resolve("/api/speech"));
3436
+ const speechApi = new HttpSpeechApi(resolve("/api/markers"), resolve("/api/speech"));
3437
+ const clipboard = new BrowserClipboard();
3438
+ return {
3439
+ theme: createThemeStore(new BrowserThemeStorage()),
3440
+ status: createStatusStore(statusApi),
3441
+ config: createConfigStore(new HttpConfigApi(resolve("/api/config"))),
3442
+ sessions: createSessionsStore(new HttpSessionsApi(resolve("/api/sessions"))),
3443
+ speech: createSpeechStore(speechFeed, speechApi),
3444
+ voiceCheck: createVoiceCheckStore(statusApi, speechFeed, new HttpKeysApi(resolve("/api/input/keys")), speechApi),
3445
+ sessionsPane: createSessionsPaneStore(new BrowserSessionsPaneStorage()),
3446
+ /** A port without state, so there is no store around it. */
3447
+ clipboard
3448
+ };
3449
+ }
3450
+ /** The context key of the stores (component tests pass their own stores under it). */
3451
+ var APP_STORES = Symbol("app-stores");
3452
+ /**
3453
+ * Creates the stores of one app and hands them to the components below (the root layout calls it).
3454
+ * Not a module-level singleton: on the server every request renders its own app, and a store
3455
+ * shared by all of them would show one viewer's state to another.
3456
+ */
3457
+ function provideAppStores() {
3458
+ return setContext(APP_STORES, createAppStores());
3459
+ }
3460
+ /** The stores {@link provideAppStores} created. Call it while a component initialises. */
3461
+ function appStores() {
3462
+ const stores = getContext(APP_STORES);
3463
+ if (stores === void 0) throw new Error("appStores() needs provideAppStores() in a parent");
3464
+ return stores;
3465
+ }
3466
+ export { i as A, e$3 as B, afterDispatch as C, createAnimationSignal as D, EASING as E, E as F, t$3 as G, r$1 as H, T as I, __decorate as K, Z as L, i$1 as M, A as N, e as O, B as P, b as R, mixinElementInternals as S, mixinDelegatesAria as T, n$1 as U, e$4 as V, i$3 as W, THEMES as _, deriveCheckRows as a, mixinFormAssociated as b, canClearSpeech as c, logHeading as d, SettingRejected as f, pendingFields as g, parsePort as h, SCREEN_READER_ID as i, t as j, e$1 as k, canDeleteSession as l, parsePlaywrightVersion as m, provideAppStores as n, docsUrl as o, parseMaxEntries as p, CHECK_CHORD as r, canAddMarker as s, appStores as t, formatReceivedTime as u, mixinFormSubmitter as v, setupDispatchHooks as w, internals as x, getFormValue as y, w as z };
3467
+
3468
+ //# sourceMappingURL=composition.js.map